File: align-branch-boundary-noautopadding.ll

package info (click to toggle)
llvm-toolchain-11 1%3A11.0.1-2~deb10u1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 995,836 kB
  • sloc: cpp: 4,767,656; ansic: 760,916; asm: 477,436; python: 170,940; objc: 69,804; lisp: 29,914; sh: 23,855; f90: 18,173; pascal: 7,551; perl: 7,471; ml: 5,603; awk: 3,489; makefile: 2,573; xml: 915; cs: 573; fortran: 503; javascript: 452
file content (36 lines) | stat: -rw-r--r-- 1,475 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
; RUN: llc -verify-machineinstrs -O3 -mcpu=skylake -x86-align-branch-boundary=32 -x86-align-branch=call -filetype=obj < %s | llvm-objdump -d --no-show-raw-insn - | FileCheck %s

;; This file is a companion to align-branch-boundary-suppressions.ll.
;; It exists to demonstrate that suppressions are actually wired into the
;; integrated assembler.

target datalayout = "e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"

define void @test_statepoint(i32 addrspace(1)* %ptr) gc "statepoint-example" {
; CHECK: 1: callq
; CHECK-NEXT: 6: callq
; CHECK-NEXT: b: callq
; CHECK-NEXT: 10: callq
; CHECK-NEXT: 15: callq
; CHECK-NEXT: 1a: callq
; CHECK-NEXT: 1f: callq
entry:
  ; Each of these will be 5 bytes, pushing the statepoint to offset=30.
  ; For a normal call, this would force padding between the last normal
  ; call and the safepoint, but since we've suppressed alignment that won't
  ; happen for the safepoint.  That's non-ideal, we'd really prefer to do
  ; the alignment and just keep the label with the statepoint call. (TODO)
  call void @foo()
  call void @foo()
  call void @foo()
  call void @foo()
  call void @foo()
  call void @foo()
  call token (i64, i32, i1 ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_i1f(i64 0, i32 0, i1 ()* @return_i1, i32 0, i32 0, i32 0, i32 0)
  ret void
}

declare void @foo()
declare zeroext i1 @return_i1()
declare token @llvm.experimental.gc.statepoint.p0f_i1f(i64, i32, i1 ()*, i32, i32, ...)