Debian Codegraph @

llvm/test/tools/UpdateTestChecks/update_mir_test_checks/Inputs/x86-condbr.mir

raw
1 # RUN: llc -mtriple=x86_64-linux-gnu -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s --check-prefixes=CHECK
2
3 --- |
4
5 define i32 @test(i32 %a) {
6 entry:
7 %cmp = trunc i32 %a to i1
8 br i1 %cmp, label %true, label %false
9
10 true: ; preds = %entry
11 ret i32 0
12
13 false: ; preds = %entry
14 ret i32 1
15 }
16
17 ...
18 ---
19 name: test
20 alignment: 16
21 legalized: true
22 regBankSelected: true
23 registers:
24 - { id: 0, class: gpr, preferred-register: '' }
25 - { id: 1, class: gpr, preferred-register: '' }
26 - { id: 2, class: gpr, preferred-register: '' }
27 - { id: 3, class: gpr, preferred-register: '' }
28 body: |
29 bb.1.entry:
30 successors: %bb.2(0x40000000), %bb.3(0x40000000)
31 liveins: $edi
32
33 %0(s32) = COPY $edi
34 %2(s32) = G_CONSTANT i32 0
35 %3(s32) = G_CONSTANT i32 1
36 %1(s1) = G_TRUNC %0(s32)
37 G_BRCOND %1(s1), %bb.2
38 G_BR %bb.3
39
40 bb.2.true:
41 $eax = COPY %2(s32)
42 RET 0, implicit $eax
43
44 bb.3.false:
45 $eax = COPY %3(s32)
46 RET 0, implicit $eax
47
48 ...