File: align-branch-boundary-noautopadding.ll

package info (click to toggle)
llvm-toolchain-16 1%3A16.0.6-15~deb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,634,792 kB
  • sloc: cpp: 6,179,261; ansic: 1,216,205; asm: 741,319; python: 196,614; objc: 75,325; f90: 49,640; lisp: 32,396; pascal: 12,286; sh: 9,394; perl: 7,442; ml: 5,494; awk: 3,523; makefile: 2,723; javascript: 1,206; xml: 886; fortran: 581; cs: 573
file content (36 lines) | stat: -rw-r--r-- 1,474 bytes parent folder | download | duplicates (13)
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(ptr 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, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 0, i32 0, ptr elementtype(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.p0(i64, i32, ptr, i32, i32, ...)