[MIPS GlobalISel] Select MSA vector generic and builtin add
[llvm-core.git] / test / CodeGen / AArch64 / arm64-regress-opt-cmp.mir
blobb4590756d044221079dbeb73a3f32e488aad40a8
1 # RUN: llc -mtriple=aarch64-linux-gnu -run-pass peephole-opt -o - %s | FileCheck %s
2 # CHECK: %1:gpr32common = ANDWri {{.*}}
3 # CHECK-NEXT: $wzr = SUBSWri {{.*}}
4 --- |
5   define i32 @test01() nounwind {
6   entry:
7     %0 = select i1 true, i32 1, i32 0
8     %1 = and i32 %0, 65535
9     %2 = icmp ugt i32 %1, 0
10     br i1 %2, label %if.then, label %if.end
12   if.then:                                      ; preds = %entry
13     ret i32 1
15   if.end:                                       ; preds = %entry
16     ret i32 0
17   }
18 ...
19 ---
20 name:            test01
21 registers:
22   - { id: 0, class: gpr32 }
23   - { id: 1, class: gpr32common }
24 body:             |
25   bb.0.entry:
26     successors: %bb.2.if.end, %bb.1.if.then
28     %0 = MOVi32imm 1
29     %1 = ANDWri killed %1, 15
30     $wzr = SUBSWri killed %1, 0, 0, implicit-def $nzcv
31     Bcc 9, %bb.2.if.end, implicit $nzcv
33   bb.1.if.then:
34     $w0 = MOVi32imm 1
35     RET_ReallyLR implicit $w0
37   bb.2.if.end:
38     $w0 = MOVi32imm 0
39     RET_ReallyLR implicit $w0
41 ...