diff --git a/llvm/test/Transforms/InstCombine/icmp-add.ll b/llvm/test/Transforms/InstCombine/icmp-add.ll --- a/llvm/test/Transforms/InstCombine/icmp-add.ll +++ b/llvm/test/Transforms/InstCombine/icmp-add.ll @@ -666,7 +666,7 @@ define i1 @without_nsw_nuw(i8 %x, i8 %y) { ; CHECK-LABEL: @without_nsw_nuw( -; CHECK-NEXT: [[TMP1:%.*]] = add nsw i8 [[X:%.*]], 2 +; CHECK-NEXT: [[TMP1:%.*]] = add i8 [[X:%.*]], 2 ; CHECK-NEXT: [[TOBOOL:%.*]] = icmp eq i8 [[TMP1]], [[Y:%.*]] ; CHECK-NEXT: ret i1 [[TOBOOL]] ; @@ -678,7 +678,7 @@ define i1 @with_nsw_nuw(i8 %x, i8 %y) { ; CHECK-LABEL: @with_nsw_nuw( -; CHECK-NEXT: [[TMP1:%.*]] = add nsw i8 [[X:%.*]], 2 +; CHECK-NEXT: [[TMP1:%.*]] = add nuw nsw i8 [[X:%.*]], 2 ; CHECK-NEXT: [[TOBOOL:%.*]] = icmp eq i8 [[TMP1]], [[Y:%.*]] ; CHECK-NEXT: ret i1 [[TOBOOL]] ; @@ -702,7 +702,7 @@ define i1 @with_nsw_small(i8 %x, i8 %y) { ; CHECK-LABEL: @with_nsw_small( -; CHECK-NEXT: [[TMP1:%.*]] = add nsw i8 [[Y:%.*]], 2 +; CHECK-NEXT: [[TMP1:%.*]] = add i8 [[Y:%.*]], 2 ; CHECK-NEXT: [[TOBOOL:%.*]] = icmp eq i8 [[TMP1]], [[X:%.*]] ; CHECK-NEXT: ret i1 [[TOBOOL]] ; @@ -714,7 +714,7 @@ define i1 @with_nuw_large(i8 %x, i8 %y) { ; CHECK-LABEL: @with_nuw_large( -; CHECK-NEXT: [[TMP1:%.*]] = add nsw i8 [[X:%.*]], 2 +; CHECK-NEXT: [[TMP1:%.*]] = add nuw i8 [[X:%.*]], 2 ; CHECK-NEXT: [[TOBOOL:%.*]] = icmp eq i8 [[TMP1]], [[Y:%.*]] ; CHECK-NEXT: ret i1 [[TOBOOL]] ; @@ -726,7 +726,7 @@ define i1 @with_nuw_small(i8 %x, i8 %y) { ; CHECK-LABEL: @with_nuw_small( -; CHECK-NEXT: [[TMP1:%.*]] = add nsw i8 [[Y:%.*]], 2 +; CHECK-NEXT: [[TMP1:%.*]] = add i8 [[Y:%.*]], 2 ; CHECK-NEXT: [[TOBOOL:%.*]] = icmp eq i8 [[TMP1]], [[X:%.*]] ; CHECK-NEXT: ret i1 [[TOBOOL]] ; diff --git a/llvm/test/Transforms/InstCombine/icmp-emit-nsw-nuw.ll b/llvm/test/Transforms/InstCombine/icmp-emit-nsw-nuw.ll deleted file mode 100644 --- a/llvm/test/Transforms/InstCombine/icmp-emit-nsw-nuw.ll +++ /dev/null @@ -1,90 +0,0 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt -instcombine -S < %s | FileCheck %s - -declare void @use_1(i1 ) -declare void @use_8(i8 ) - -define void @test_emit_without_nsw_nuw(i8 %x, i8 %y) { -; CHECK-LABEL: @test_emit_without_nsw_nuw( -; CHECK-NEXT: [[TMP1:%.*]] = add i8 [[X:%.*]], 2 -; CHECK-NEXT: [[TOBOOL:%.*]] = icmp eq i8 [[TMP1]], [[Y:%.*]] -; CHECK-NEXT: call void @use_1(i1 [[TOBOOL]]) -; CHECK-NEXT: ret void -; -%1=add i8 %x, 37 -%2=add i8 %y, 35 -%tobool=icmp eq i8 %2, %1 -call void @use_1(i1 %tobool) -ret void -} - -define void @test_emit_with_nsw_nuw(i8 %x, i8 %y) { -; CHECK-LABEL: @test_emit_with_nsw_nuw( -; CHECK-NEXT: [[TMP1:%.*]] = add nuw nsw i8 [[X:%.*]], 2 -; CHECK-NEXT: [[TOBOOL:%.*]] = icmp eq i8 [[TMP1]], [[Y:%.*]] -; CHECK-NEXT: call void @use_1(i1 [[TOBOOL]]) -; CHECK-NEXT: ret void -; -%1=add nsw nuw i8 %x, 37 -%2=add i8 %y, 35 -%tobool=icmp eq i8 %2, %1 -call void @use_1(i1 %tobool) -ret void -} - -define void @test-emit-with-nsw-large(i8 %x, i8 %y) { -; CHECK-LABEL: @test-emit-with-nsw-large( -; CHECK-NEXT: [[TMP1:%.*]] = add nsw i8 [[X:%.*]], 2 -; CHECK-NEXT: [[TOBOOL:%.*]] = icmp eq i8 [[TMP1]], [[Y:%.*]] -; CHECK-NEXT: call void @use_1(i1 [[TOBOOL]]) -; CHECK-NEXT: ret void -; -%1=add nsw i8 %x, 37 -%2=add i8 %y, 35 -%tobool=icmp eq i8 %2, %1 -call void @use_1(i1 %tobool) -ret void -} - -define void @test_emit_with_nsw_small(i8 %x, i8 %y) { -; CHECK-LABEL: @test_emit_with_nsw_small( -; CHECK-NEXT: [[TMP1:%.*]] = add i8 [[Y:%.*]], 2 -; CHECK-NEXT: [[TOBOOL:%.*]] = icmp eq i8 [[TMP1]], [[X:%.*]] -; CHECK-NEXT: call void @use_1(i1 [[TOBOOL]]) -; CHECK-NEXT: ret void -; -%1=add nsw i8 %x, 35 -%2=add i8 %y, 37 -%tobool=icmp eq i8 %2, %1 -call void @use_1(i1 %tobool) -ret void -} - -define void @test_emit_with_nuw_large(i8 %x, i8 %y) { -; CHECK-LABEL: @test_emit_with_nuw_large( -; CHECK-NEXT: [[TMP1:%.*]] = add nuw i8 [[X:%.*]], 2 -; CHECK-NEXT: [[TOBOOL:%.*]] = icmp eq i8 [[TMP1]], [[Y:%.*]] -; CHECK-NEXT: call void @use_1(i1 [[TOBOOL]]) -; CHECK-NEXT: ret void -; -%1=add nuw i8 %x, 37 -%2=add i8 %y, 35 -%tobool=icmp eq i8 %2, %1 -call void @use_1(i1 %tobool) -ret void -} - -define void @test_emit_with_nuw_small(i8 %x, i8 %y) { -; CHECK-LABEL: @test_emit_with_nuw_small( -; CHECK-NEXT: [[TMP1:%.*]] = add i8 [[Y:%.*]], 2 -; CHECK-NEXT: [[TOBOOL:%.*]] = icmp eq i8 [[TMP1]], [[X:%.*]] -; CHECK-NEXT: call void @use_1(i1 [[TOBOOL]]) -; CHECK-NEXT: ret void -; -%1=add nuw i8 %x, 35 -%2=add i8 %y, 37 -%tobool=icmp eq i8 %2, %1 -call void @use_1(i1 %tobool) -ret void -} -