1 ; RUN: llc -O2 -march=bpfel -mattr=+alu32 < %s | FileCheck %s
3 ; unsigned int select_cc_32 (unsigned a, unsigned b, int c, int d)
11 ; long long select_cc_32_64 (unsigned a, unsigned b, long long c, long long d)
19 ; int select_cc_64_32 (long long a, long long b, int c, int d)
27 ; int selecti_cc_32 (unsigned a, int c, int d)
35 ; long long selecti_cc_32_64 (unsigned a, long long c, long long d)
43 ; int selecti_cc_64_32 (long long a, int c, int d)
51 ; Function Attrs: norecurse nounwind readnone
52 define dso_local i32 @select_cc_32(i32 %a, i32 %b, i32 %c, i32 %d) local_unnamed_addr #0 {
54 %cmp = icmp ugt i32 %a, %b
55 %c.d = select i1 %cmp, i32 %c, i32 %d
58 ; CHECK-LABEL: select_cc_32
59 ; CHECK: r{{[0-9]+}} = w{{[0-9]+}}
60 ; CHECK-NOT: r{{[0-9]+}} <<= 32
61 ; CHECK-NOT: r{{[0-9]+}} >>= 32
63 ; Function Attrs: norecurse nounwind readnone
64 define dso_local i64 @select_cc_32_64(i32 %a, i32 %b, i64 %c, i64 %d) local_unnamed_addr #0 {
66 %cmp = icmp ugt i32 %a, %b
67 %c.d = select i1 %cmp, i64 %c, i64 %d
70 ; CHECK-LABEL: select_cc_32_64
71 ; CHECK: r{{[0-9]+}} = w{{[0-9]+}}
72 ; CHECK-NOT: r{{[0-9]+}} <<= 32
73 ; CHECK-NOT: r{{[0-9]+}} >>= 32
75 ; Function Attrs: norecurse nounwind readnone
76 define dso_local i32 @select_cc_64_32(i64 %a, i64 %b, i32 %c, i32 %d) local_unnamed_addr #0 {
78 %cmp = icmp sgt i64 %a, %b
79 %c.d = select i1 %cmp, i32 %c, i32 %d
82 ; CHECK-LABEL: select_cc_64_32
83 ; CHECK-NOT: r{{[0-9]+}} <<= 32
85 ; Function Attrs: norecurse nounwind readnone
86 define dso_local i32 @selecti_cc_32(i32 %a, i32 %c, i32 %d) local_unnamed_addr #0 {
88 %cmp = icmp ugt i32 %a, 10
89 %c.d = select i1 %cmp, i32 %c, i32 %d
92 ; CHECK-LABEL: selecti_cc_32
93 ; CHECK: r{{[0-9]+}} = w{{[0-9]+}}
94 ; CHECK-NOT: r{{[0-9]+}} <<= 32
95 ; CHECK-NOT: r{{[0-9]+}} >>= 32
97 ; Function Attrs: norecurse nounwind readnone
98 define dso_local i64 @selecti_cc_32_64(i32 %a, i64 %c, i64 %d) local_unnamed_addr #0 {
100 %cmp = icmp ugt i32 %a, 11
101 %c.d = select i1 %cmp, i64 %c, i64 %d
104 ; CHECK-LABEL: selecti_cc_32_64
105 ; CHECK: r{{[0-9]+}} = w{{[0-9]+}}
106 ; CHECK-NOT: r{{[0-9]+}} <<= 32
107 ; CHECK-NOT: r{{[0-9]+}} >>= 32
109 ; Function Attrs: norecurse nounwind readnone
110 define dso_local i32 @selecti_cc_64_32(i64 %a, i32 %c, i32 %d) local_unnamed_addr #0 {
112 %cmp = icmp sgt i64 %a, 12
113 %c.d = select i1 %cmp, i32 %c, i32 %d
116 ; CHECK-LABEL: selecti_cc_64_32
117 ; CHECK-NOT: r{{[0-9]+}} <<= 32