File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
llvm/test/Transforms/InstCombine Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -1187,3 +1187,20 @@ define i1 @and_ranges_no_overlap(i8 %x) {
1187
1187
%c7 = and i1 %c3 , %c6
1188
1188
ret i1 %c7
1189
1189
}
1190
+
1191
+ define i1 @and_ranges_signed_pred (i64 %x ) {
1192
+ ; CHECK-LABEL: @and_ranges_signed_pred(
1193
+ ; CHECK-NEXT: [[T1:%.*]] = add i64 [[X:%.*]], 127
1194
+ ; CHECK-NEXT: [[T2:%.*]] = icmp slt i64 [[T1]], 1024
1195
+ ; CHECK-NEXT: [[T3:%.*]] = add i64 [[X]], 128
1196
+ ; CHECK-NEXT: [[T4:%.*]] = icmp slt i64 [[T3]], 256
1197
+ ; CHECK-NEXT: [[T5:%.*]] = and i1 [[T2]], [[T4]]
1198
+ ; CHECK-NEXT: ret i1 [[T5]]
1199
+ ;
1200
+ %t1 = add i64 %x , 127
1201
+ %t2 = icmp slt i64 %t1 , 1024
1202
+ %t3 = add i64 %x , 128
1203
+ %t4 = icmp slt i64 %t3 , 256
1204
+ %t5 = and i1 %t2 , %t4
1205
+ ret i1 %t5
1206
+ }
You can’t perform that action at this time.
0 commit comments