1 # RUN: llc -mtriple arm-- -run-pass=legalizer %s -o - | FileCheck %s
2 # RUN: llc -mtriple thumb-- -mattr=+v6t2 -run-pass=legalizer %s -o - | FileCheck %s
4 define void @test_select_s32() { ret void }
5 define void @test_select_ptr() { ret void }
9 # CHECK-LABEL: name: test_select_s32
11 # CHECK: legalized: true
12 regBankSelected: false
14 tracksRegLiveness: true
22 liveins: $r0, $r1, $r2
26 %2(s1) = G_CONSTANT i1 1
27 %3(s32) = G_SELECT %2(s1), %0, %1
28 ; G_SELECT with s32 is legal, so we should find it unchanged in the output
29 ; CHECK: {{%[0-9]+}}:_(s32) = G_SELECT {{%[0-9]+}}(s1), {{%[0-9]+}}, {{%[0-9]+}}
31 BX_RET 14, $noreg, implicit $r0
35 # CHECK-LABEL: name: test_select_ptr
37 # CHECK: legalized: true
38 regBankSelected: false
40 tracksRegLiveness: true
48 liveins: $r0, $r1, $r2
52 %2(s1) = G_CONSTANT i1 0
53 %3(p0) = G_SELECT %2(s1), %0, %1
54 ; G_SELECT with p0 is legal, so we should find it unchanged in the output
55 ; CHECK: {{%[0-9]+}}:_(p0) = G_SELECT {{%[0-9]+}}(s1), {{%[0-9]+}}, {{%[0-9]+}}
57 BX_RET 14, $noreg, implicit $r0