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
59 ; Function Attrs: norecurse nounwind readnone
60 define dso_local i64 @select_cc_32_64(i32 %a, i32 %b, i64 %c, i64 %d) local_unnamed_addr #0 {
62 %cmp = icmp ugt i32 %a, %b
63 %c.d = select i1 %cmp, i64 %c, i64 %d
67 ; Function Attrs: norecurse nounwind readnone
68 define dso_local i32 @select_cc_64_32(i64 %a, i64 %b, i32 %c, i32 %d) local_unnamed_addr #0 {
70 %cmp = icmp sgt i64 %a, %b
71 %c.d = select i1 %cmp, i32 %c, i32 %d
75 ; Function Attrs: norecurse nounwind readnone
76 define dso_local i32 @selecti_cc_32(i32 %a, i32 %c, i32 %d) local_unnamed_addr #0 {
78 %cmp = icmp ugt i32 %a, 10
79 %c.d = select i1 %cmp, i32 %c, i32 %d
83 ; Function Attrs: norecurse nounwind readnone
84 define dso_local i64 @selecti_cc_32_64(i32 %a, i64 %c, i64 %d) local_unnamed_addr #0 {
86 %cmp = icmp ugt i32 %a, 11
87 %c.d = select i1 %cmp, i64 %c, i64 %d
91 ; Function Attrs: norecurse nounwind readnone
92 define dso_local i32 @selecti_cc_64_32(i64 %a, i32 %c, i32 %d) local_unnamed_addr #0 {
94 %cmp = icmp sgt i64 %a, 12
95 %c.d = select i1 %cmp, i32 %c, i32 %d
98 ; There shouldn't be any type promotion, all of them are expected to be
99 ; eliminated by peephole optimization.
100 ; CHECK-NOT: r{{[0-9]+}} <<= 32