xref: /llvm-project/llvm/test/CodeGen/AArch64/branch-relax-alignment.ll (revision db158c7c830807caeeb0691739c41f1d522029e9)
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2; RUN: llc -mtriple=aarch64-apple-darwin -aarch64-bcc-offset-bits=4 -align-all-nofallthru-blocks=4 < %s | FileCheck %s
3
4; Long branch is assumed because the block has a higher alignment
5; requirement than the function.
6
7define i32 @invert_bcc_block_align_higher_func(i32 %x, i32 %y) align 4 #0 {
8; CHECK-LABEL: invert_bcc_block_align_higher_func:
9; CHECK:       ; %bb.0: ; %common.ret
10; CHECK-NEXT:    mov w8, #9 ; =0x9
11; CHECK-NEXT:    cmp w0, w1
12; CHECK-NEXT:    mov w9, #42 ; =0x2a
13; CHECK-NEXT:    cset w0, ne
14; CHECK-NEXT:    csel w8, w9, w8, eq
15; CHECK-NEXT:    str w8, [x8]
16; CHECK-NEXT:    ret
17  %1 = icmp eq i32 %x, %y
18  br i1 %1, label %bb1, label %bb2
19
20bb2:
21  store volatile i32 9, ptr undef
22  ret i32 1
23
24bb1:
25  store volatile i32 42, ptr undef
26  ret i32 0
27}
28
29attributes #0 = { nounwind }
30