1 # RUN: llc -mtriple=x86_64-linux-gnu -run-pass=legalizer %s -o - | FileCheck %s --check-prefix=ALL --check-prefix=X64
2 # RUN: llc -mtriple=i386-linux-gnu -run-pass=legalizer %s -o - | FileCheck %s --check-prefix=ALL --check-prefix=X32
6 define i32 @test(i32 %a) {
8 %cmp = trunc i32 %a to i1
9 br i1 %cmp, label %if.then, label %if.else
11 if.then: ; preds = %entry
14 if.else: ; preds = %entry
20 # ALL-LABEL: name: test
23 regBankSelected: false
25 - { id: 0, class: _, preferred-register: '' }
26 - { id: 1, class: _, preferred-register: '' }
27 - { id: 2, class: _, preferred-register: '' }
28 - { id: 3, class: _, preferred-register: '' }
29 # ALL: %1:_(s1) = G_TRUNC %0(s32)
30 # ALL-NEXT: G_BRCOND %1(s1), %[[TRUE:bb.[0-9]+]]
31 # ALL-NEXT: G_BR %[[FALSE:bb.[0-9]+]]
32 # ALL: [[TRUE]].{{[a-zA-Z0-9.]+}}:
33 # ALL-NEXT: $eax = COPY %2(s32)
34 # ALL-NEXT: RET 0, implicit $eax
35 # ALL: [[FALSE]].{{[a-zA-Z0-9.]+}}:
36 # ALL-NEXT: $eax = COPY %3(s32)
37 # ALL-NEXT: RET 0, implicit $eax
40 successors: %bb.2(0x40000000), %bb.3(0x40000000)
44 %2(s32) = G_CONSTANT i32 0
45 %3(s32) = G_CONSTANT i32 1
46 %1(s1) = G_TRUNC %0(s32)
47 G_BRCOND %1(s1), %bb.2