1
1
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2
- ; RUN: opt < %s -passes=instcombine -S | FileCheck %s
2
+ ; RUN: opt < %s -passes=' instcombine<no-verify-fixpoint>' -S | FileCheck %s
3
3
4
4
declare void @use (i8 )
5
5
@@ -428,13 +428,17 @@ define i1 @icmp_or_xor_2_ne_fail(i64 %x1, i64 %y1, i64 %x2, i64 %y2) {
428
428
429
429
; negative test - xor multiuse
430
430
431
+ ; NB: This requires more than 1 iteration to simplify. After we
432
+ ; simplify `%cmp_1 = icmp eq i64 %xor, 0`, `%xor = xor i64 %x1, %y1`
433
+ ; has one use which allows for complete simplification (rooted on
434
+ ; `%or1 = or i1 %cmp, %cmp_1` so we don't end up adding it back).
431
435
define i1 @icmp_or_xor_2_3_fail (i64 %x1 , i64 %y1 , i64 %x2 , i64 %y2 ) {
432
436
; CHECK-LABEL: @icmp_or_xor_2_3_fail(
433
437
; CHECK-NEXT: [[XOR:%.*]] = xor i64 [[X1:%.*]], [[Y1:%.*]]
434
438
; CHECK-NEXT: [[XOR1:%.*]] = xor i64 [[X2:%.*]], [[Y2:%.*]]
435
439
; CHECK-NEXT: [[OR:%.*]] = or i64 [[XOR]], [[XOR1]]
436
440
; CHECK-NEXT: [[CMP:%.*]] = icmp eq i64 [[OR]], 0
437
- ; CHECK-NEXT: [[CMP_1:%.*]] = icmp eq i64 [[XOR ]], 0
441
+ ; CHECK-NEXT: [[CMP_1:%.*]] = icmp eq i64 [[X1 ]], [[Y1]]
438
442
; CHECK-NEXT: [[OR1:%.*]] = or i1 [[CMP]], [[CMP_1]]
439
443
; CHECK-NEXT: ret i1 [[OR1]]
440
444
;
@@ -455,7 +459,7 @@ define i1 @icmp_or_xor_2_4_fail(i64 %x1, i64 %y1, i64 %x2, i64 %y2) {
455
459
; CHECK-NEXT: [[XOR1:%.*]] = xor i64 [[X2:%.*]], [[Y2:%.*]]
456
460
; CHECK-NEXT: [[OR:%.*]] = or i64 [[XOR]], [[XOR1]]
457
461
; CHECK-NEXT: [[CMP:%.*]] = icmp eq i64 [[OR]], 0
458
- ; CHECK-NEXT: [[CMP_1:%.*]] = icmp eq i64 [[XOR1 ]], 0
462
+ ; CHECK-NEXT: [[CMP_1:%.*]] = icmp eq i64 [[X2 ]], [[Y2]]
459
463
; CHECK-NEXT: [[OR1:%.*]] = or i1 [[CMP]], [[CMP_1]]
460
464
; CHECK-NEXT: ret i1 [[OR1]]
461
465
;
@@ -955,7 +959,7 @@ define i1 @icmp_or_xor_with_sub_3_6(i64 %x1, i64 %y1, i64 %x2, i64 %y2, i64 %x3,
955
959
956
960
define i1 @or_disjoint_with_constants (i8 %x ) {
957
961
; CHECK-LABEL: @or_disjoint_with_constants(
958
- ; CHECK-NEXT: [[CMP:%.*]] = icmp eq i8 [[TMP1 :%.*]], 18
962
+ ; CHECK-NEXT: [[CMP:%.*]] = icmp eq i8 [[X :%.*]], 18
959
963
; CHECK-NEXT: ret i1 [[CMP]]
960
964
;
961
965
%or = or disjoint i8 %x , 1
@@ -966,8 +970,8 @@ define i1 @or_disjoint_with_constants(i8 %x) {
966
970
967
971
define i1 @or_disjoint_with_constants2 (i8 %x ) {
968
972
; CHECK-LABEL: @or_disjoint_with_constants2(
969
- ; CHECK-NEXT: [[OR:%.*]] = or disjoint i8 [[TMP1 :%.*]], 5
970
- ; CHECK-NEXT: [[CMP:%.*]] = icmp ne i8 [[TMP1 ]], 66
973
+ ; CHECK-NEXT: [[OR:%.*]] = or disjoint i8 [[X :%.*]], 5
974
+ ; CHECK-NEXT: [[CMP:%.*]] = icmp ne i8 [[X ]], 66
971
975
; CHECK-NEXT: call void @use(i8 [[OR]])
972
976
; CHECK-NEXT: ret i1 [[CMP]]
973
977
;
0 commit comments