File: branch-relax-alignment.ll

package info (click to toggle)
llvm-toolchain-9 1%3A9.0.1-16
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 882,436 kB
  • sloc: cpp: 4,167,636; ansic: 714,256; asm: 457,610; python: 155,927; objc: 65,094; sh: 42,856; lisp: 26,908; perl: 7,786; pascal: 7,722; makefile: 6,881; ml: 5,581; awk: 3,648; cs: 2,027; xml: 888; javascript: 381; ruby: 156
file content (29 lines) | stat: -rw-r--r-- 731 bytes parent folder | download | duplicates (9)
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
; RUN: llc -mtriple=aarch64-apple-darwin -aarch64-bcc-offset-bits=4 -align-all-nofallthru-blocks=4 < %s | FileCheck %s

; Long branch is assumed because the block has a higher alignment
; requirement than the function.

; CHECK-LABEL: invert_bcc_block_align_higher_func:
; CHECK: b.eq [[JUMP_BB1:LBB[0-9]+_[0-9]+]]
; CHECK-NEXT: b [[JUMP_BB2:LBB[0-9]+_[0-9]+]]

; CHECK: [[JUMP_BB1]]:
; CHECK: ret
; CHECK: .p2align 4

; CHECK: [[JUMP_BB2]]:
; CHECK: ret
define i32 @invert_bcc_block_align_higher_func(i32 %x, i32 %y) align 4 #0 {
  %1 = icmp eq i32 %x, %y
  br i1 %1, label %bb1, label %bb2

bb2:
  store volatile i32 9, i32* undef
  ret i32 1

bb1:
  store volatile i32 42, i32* undef
  ret i32 0
}

attributes #0 = { nounwind }