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 @@ -1143,3 +1143,20 @@ define i1 @foo1_and_signbit_lshr_without_shifting_signbit_not_pwr2_logical(i32 %
1143
1143
%or = select i1 %t2 , i1 true , i1 %t4
1144
1144
ret i1 %or
1145
1145
}
1146
+
1147
+ define i1 @two_types_of_bittest (i8 %x , i8 %c ) {
1148
+ ; CHECK-LABEL: @two_types_of_bittest(
1149
+ ; CHECK-NEXT: [[T0:%.*]] = shl nuw i8 1, [[C:%.*]]
1150
+ ; CHECK-NEXT: [[ICMP1:%.*]] = icmp slt i8 [[X:%.*]], 0
1151
+ ; CHECK-NEXT: [[AND:%.*]] = and i8 [[X]], [[T0]]
1152
+ ; CHECK-NEXT: [[ICMP2:%.*]] = icmp ne i8 [[AND]], 0
1153
+ ; CHECK-NEXT: [[RET:%.*]] = and i1 [[ICMP1]], [[ICMP2]]
1154
+ ; CHECK-NEXT: ret i1 [[RET]]
1155
+ ;
1156
+ %t0 = shl i8 1 , %c
1157
+ %icmp1 = icmp slt i8 %x , 0
1158
+ %and = and i8 %x , %t0
1159
+ %icmp2 = icmp ne i8 %and , 0
1160
+ %ret = and i1 %icmp1 , %icmp2
1161
+ ret i1 %ret
1162
+ }
You can’t perform that action at this time.
0 commit comments