[llvm] r303808 - [InstCombine] move tests and use FileCheck; NFC
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Wed May 24 14:48:25 PDT 2017
Author: spatel
Date: Wed May 24 16:48:25 2017
New Revision: 303808
URL: http://llvm.org/viewvc/llvm-project?rev=303808&view=rev
Log:
[InstCombine] move tests and use FileCheck; NFC
Removed:
llvm/trunk/test/Transforms/InstCombine/2008-07-10-ICmpBinOp.ll
Modified:
llvm/trunk/test/Transforms/InstCombine/icmp.ll
Removed: llvm/trunk/test/Transforms/InstCombine/2008-07-10-ICmpBinOp.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/2008-07-10-ICmpBinOp.ll?rev=303807&view=auto
==============================================================================
--- llvm/trunk/test/Transforms/InstCombine/2008-07-10-ICmpBinOp.ll (original)
+++ llvm/trunk/test/Transforms/InstCombine/2008-07-10-ICmpBinOp.ll (removed)
@@ -1,19 +0,0 @@
-; RUN: opt < %s -instcombine -S | not grep add
-; RUN: opt < %s -instcombine -S | not grep mul
-; PR2330
-
-define i1 @f(i32 %x, i32 %y) nounwind {
-entry:
- %A = add i32 %x, 5
- %B = add i32 %y, 5
- %C = icmp eq i32 %A, %B
- ret i1 %C
-}
-
-define i1 @g(i32 %x, i32 %y) nounwind {
-entry:
- %A = mul i32 %x, 5
- %B = mul i32 %y, 5
- %C = icmp eq i32 %A, %B
- ret i1 %C
-}
Modified: llvm/trunk/test/Transforms/InstCombine/icmp.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/icmp.ll?rev=303808&r1=303807&r2=303808&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/InstCombine/icmp.ll (original)
+++ llvm/trunk/test/Transforms/InstCombine/icmp.ll Wed May 24 16:48:25 2017
@@ -2895,3 +2895,26 @@ define i1 @cmp_ult_rhs_dec(float %x, i32
%cmp = icmp ult i32 %conv, %dec
ret i1 %cmp
}
+
+define i1 @eq_add_constants(i32 %x, i32 %y) {
+; CHECK-LABEL: @eq_add_constants(
+; CHECK-NEXT: [[C:%.*]] = icmp eq i32 %x, %y
+; CHECK-NEXT: ret i1 [[C]]
+;
+ %A = add i32 %x, 5
+ %B = add i32 %y, 5
+ %C = icmp eq i32 %A, %B
+ ret i1 %C
+}
+
+define i1 @eq_mul_constants(i32 %x, i32 %y) {
+; CHECK-LABEL: @eq_mul_constants(
+; CHECK-NEXT: [[C:%.*]] = icmp eq i32 %x, %y
+; CHECK-NEXT: ret i1 [[C]]
+;
+ %A = mul i32 %x, 5
+ %B = mul i32 %y, 5
+ %C = icmp eq i32 %A, %B
+ ret i1 %C
+}
+
More information about the llvm-commits
mailing list