1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=aarch64 | FileCheck %s
4 define i64 @select_ogt_float(float %a, float %b) {
5 ; CHECK-LABEL: select_ogt_float:
6 ; CHECK: // %bb.0: // %entry
7 ; CHECK-NEXT: fcmp s0, s1
8 ; CHECK-NEXT: cset w8, gt
9 ; CHECK-NEXT: lsl x0, x8, #2
12 %cc = fcmp ogt float %a, %b
13 %sel = select i1 %cc, i64 4, i64 0
17 define i64 @select_ule_float_inverse(float %a, float %b) {
18 ; CHECK-LABEL: select_ule_float_inverse:
19 ; CHECK: // %bb.0: // %entry
20 ; CHECK-NEXT: fcmp s0, s1
21 ; CHECK-NEXT: cset w8, gt
22 ; CHECK-NEXT: lsl x0, x8, #2
25 %cc = fcmp ule float %a, %b
26 %sel = select i1 %cc, i64 0, i64 4
30 define i64 @select_eq_i32(i32 %a, i32 %b) {
31 ; CHECK-LABEL: select_eq_i32:
32 ; CHECK: // %bb.0: // %entry
33 ; CHECK-NEXT: cmp w0, w1
34 ; CHECK-NEXT: cset w8, eq
35 ; CHECK-NEXT: lsl x0, x8, #2
38 %cc = icmp eq i32 %a, %b
39 %sel = select i1 %cc, i64 4, i64 0
43 define i64 @select_ne_i32_inverse(i32 %a, i32 %b) {
44 ; CHECK-LABEL: select_ne_i32_inverse:
45 ; CHECK: // %bb.0: // %entry
46 ; CHECK-NEXT: cmp w0, w1
47 ; CHECK-NEXT: cset w8, eq
48 ; CHECK-NEXT: lsl x0, x8, #2
51 %cc = icmp ne i32 %a, %b
52 %sel = select i1 %cc, i64 0, i64 4