File: compare-branch.ll

package info (click to toggle)
llvm-toolchain-14 1%3A14.0.6-12
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,496,180 kB
  • sloc: cpp: 5,593,972; ansic: 986,872; asm: 585,869; python: 184,223; objc: 72,530; lisp: 31,119; f90: 27,793; javascript: 9,780; pascal: 9,762; sh: 9,482; perl: 7,468; ml: 5,432; awk: 3,523; makefile: 2,538; xml: 953; cs: 573; fortran: 567
file content (41 lines) | stat: -rw-r--r-- 929 bytes parent folder | download | duplicates (16)
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
37
38
39
40
41
; RUN: llc -verify-machineinstrs -o - %s -mtriple=aarch64-linux-gnu | FileCheck %s

@var32 = global i32 0
@var64 = global i64 0

define void @foo() {
; CHECK-LABEL: foo:

  %val1 = load volatile i32, i32* @var32
  %tst1 = icmp eq i32 %val1, 0
  br i1 %tst1, label %end, label %test2, !prof !1
; CHECK: cbz {{w[0-9]+}}, .LBB

test2:
  %val2 = load volatile i32, i32* @var32
  %tst2 = icmp ne i32 %val2, 0
  br i1 %tst2, label %end, label %test3, !prof !1
; CHECK: cbnz {{w[0-9]+}}, .LBB

test3:
  %val3 = load volatile i64, i64* @var64
  %tst3 = icmp eq i64 %val3, 0
  br i1 %tst3, label %end, label %test4, !prof !1
; CHECK: cbz {{x[0-9]+}}, .LBB

test4:
  %val4 = load volatile i64, i64* @var64
  %tst4 = icmp ne i64 %val4, 0
  br i1 %tst4, label %end, label %test5, !prof !1
; CHECK: cbnz {{x[0-9]+}}, .LBB

test5:
  store volatile i64 %val4, i64* @var64
  ret void

end:
  ret void
}


!1 = !{!"branch_weights", i32 1, i32 1}