File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
llvm/test/Transforms/InstCombine Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -373,3 +373,30 @@ define i1 @pr64610(ptr %b) {
373
373
%r = icmp ugt i32 %or , %s
374
374
ret i1 %r
375
375
}
376
+
377
+ define i1 @icmp_eq_x_invertable_y2_todo (i8 %x , i1 %y , i8 %z ) {
378
+ ; CHECK-LABEL: @icmp_eq_x_invertable_y2_todo(
379
+ ; CHECK-NEXT: [[ZZ:%.*]] = xor i8 [[Z:%.*]], -1
380
+ ; CHECK-NEXT: [[YY:%.*]] = select i1 [[Y:%.*]], i8 7, i8 [[ZZ]]
381
+ ; CHECK-NEXT: [[OR:%.*]] = or i8 [[YY]], [[X:%.*]]
382
+ ; CHECK-NEXT: [[R:%.*]] = icmp eq i8 [[YY]], [[OR]]
383
+ ; CHECK-NEXT: ret i1 [[R]]
384
+ ;
385
+ %zz = xor i8 %z , -1
386
+ %yy = select i1 %y , i8 7 , i8 %zz
387
+ %or = or i8 %x , %yy
388
+ %r = icmp eq i8 %yy , %or
389
+ ret i1 %r
390
+ }
391
+
392
+ define i1 @icmp_eq_x_invertable_y2 (i8 %x , i8 %y ) {
393
+ ; CHECK-LABEL: @icmp_eq_x_invertable_y2(
394
+ ; CHECK-NEXT: [[TMP1:%.*]] = and i8 [[X:%.*]], [[Y:%.*]]
395
+ ; CHECK-NEXT: [[R:%.*]] = icmp eq i8 [[TMP1]], 0
396
+ ; CHECK-NEXT: ret i1 [[R]]
397
+ ;
398
+ %yy = xor i8 %y , -1
399
+ %or = or i8 %x , %yy
400
+ %r = icmp eq i8 %yy , %or
401
+ ret i1 %r
402
+ }
You can’t perform that action at this time.
0 commit comments