[llvm] r274155 - [InstCombine, NFC] Change the generated variable names by creating new instructions
Tim Shen via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 29 13:10:13 PDT 2016
Author: timshen
Date: Wed Jun 29 15:10:13 2016
New Revision: 274155
URL: http://llvm.org/viewvc/llvm-project?rev=274155&view=rev
Log:
[InstCombine, NFC] Change the generated variable names by creating new instructions
This removes some noise for D21775's test changes.
Modified:
llvm/trunk/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
llvm/trunk/test/Transforms/InstCombine/and-fcmp.ll
Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp?rev=274155&r1=274154&r2=274155&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp Wed Jun 29 15:10:13 2016
@@ -1148,9 +1148,9 @@ Value *InstCombiner::FoldAndOfFCmps(FCmp
if (Op0CC == FCmpInst::FCMP_FALSE || Op1CC == FCmpInst::FCMP_FALSE)
return ConstantInt::get(CmpInst::makeCmpResultType(LHS->getType()), 0);
if (Op0CC == FCmpInst::FCMP_TRUE)
- return RHS;
+ return Builder->CreateFCmp(Op1CC, Op0LHS, Op0RHS);
if (Op1CC == FCmpInst::FCMP_TRUE)
- return LHS;
+ return Builder->CreateFCmp(Op0CC, Op0LHS, Op0RHS);
bool Op0Ordered;
bool Op1Ordered;
@@ -1168,9 +1168,9 @@ Value *InstCombiner::FoldAndOfFCmps(FCmp
// uno && ueq -> uno && (uno || eq) -> uno
// ord && olt -> ord && (ord && lt) -> olt
if (!Op0Ordered && (Op0Ordered == Op1Ordered))
- return LHS;
+ return Builder->CreateFCmp(Op0CC, Op0LHS, Op0RHS);
if (Op0Ordered && (Op0Ordered == Op1Ordered))
- return RHS;
+ return Builder->CreateFCmp(Op1CC, Op0LHS, Op0RHS);
// uno && oeq -> uno && (ord && eq) -> false
if (!Op0Ordered)
@@ -2036,9 +2036,9 @@ Value *InstCombiner::FoldOrOfFCmps(FCmpI
if (Op0CC == FCmpInst::FCMP_TRUE || Op1CC == FCmpInst::FCMP_TRUE)
return ConstantInt::get(CmpInst::makeCmpResultType(LHS->getType()), 1);
if (Op0CC == FCmpInst::FCMP_FALSE)
- return RHS;
+ return Builder->CreateFCmp(Op1CC, Op0LHS, Op0RHS);
if (Op1CC == FCmpInst::FCMP_FALSE)
- return LHS;
+ return Builder->CreateFCmp(Op0CC, Op0LHS, Op0RHS);
bool Op0Ordered;
bool Op1Ordered;
unsigned Op0Pred = getFCmpCode(Op0CC, Op0Ordered);
Modified: llvm/trunk/test/Transforms/InstCombine/and-fcmp.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/and-fcmp.ll?rev=274155&r1=274154&r2=274155&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/InstCombine/and-fcmp.ll (original)
+++ llvm/trunk/test/Transforms/InstCombine/and-fcmp.ll Wed Jun 29 15:10:13 2016
@@ -371,8 +371,8 @@ define i1 @auto_gen_28(double %a, double
define i1 @auto_gen_29(double %a, double %b) {
; CHECK-LABEL: @auto_gen_29(
-; CHECK-NEXT: [[CMP1:%.*]] = fcmp oeq double %a, %b
-; CHECK-NEXT: ret i1 [[CMP1]]
+; CHECK-NEXT: [[TMP1:%.*]] = fcmp oeq double %a, %b
+; CHECK-NEXT: ret i1 [[TMP1]]
;
%cmp = fcmp ord double %a, %b
%cmp1 = fcmp oeq double %a, %b
@@ -382,8 +382,8 @@ define i1 @auto_gen_29(double %a, double
define i1 @auto_gen_30(double %a, double %b) {
; CHECK-LABEL: @auto_gen_30(
-; CHECK-NEXT: [[CMP1:%.*]] = fcmp ogt double %a, %b
-; CHECK-NEXT: ret i1 [[CMP1]]
+; CHECK-NEXT: [[TMP1:%.*]] = fcmp ogt double %a, %b
+; CHECK-NEXT: ret i1 [[TMP1]]
;
%cmp = fcmp ord double %a, %b
%cmp1 = fcmp ogt double %a, %b
@@ -393,8 +393,8 @@ define i1 @auto_gen_30(double %a, double
define i1 @auto_gen_31(double %a, double %b) {
; CHECK-LABEL: @auto_gen_31(
-; CHECK-NEXT: [[CMP1:%.*]] = fcmp oge double %a, %b
-; CHECK-NEXT: ret i1 [[CMP1]]
+; CHECK-NEXT: [[TMP1:%.*]] = fcmp oge double %a, %b
+; CHECK-NEXT: ret i1 [[TMP1]]
;
%cmp = fcmp ord double %a, %b
%cmp1 = fcmp oge double %a, %b
@@ -404,8 +404,8 @@ define i1 @auto_gen_31(double %a, double
define i1 @auto_gen_32(double %a, double %b) {
; CHECK-LABEL: @auto_gen_32(
-; CHECK-NEXT: [[CMP1:%.*]] = fcmp olt double %a, %b
-; CHECK-NEXT: ret i1 [[CMP1]]
+; CHECK-NEXT: [[TMP1:%.*]] = fcmp olt double %a, %b
+; CHECK-NEXT: ret i1 [[TMP1]]
;
%cmp = fcmp ord double %a, %b
%cmp1 = fcmp olt double %a, %b
@@ -415,8 +415,8 @@ define i1 @auto_gen_32(double %a, double
define i1 @auto_gen_33(double %a, double %b) {
; CHECK-LABEL: @auto_gen_33(
-; CHECK-NEXT: [[CMP1:%.*]] = fcmp ole double %a, %b
-; CHECK-NEXT: ret i1 [[CMP1]]
+; CHECK-NEXT: [[TMP1:%.*]] = fcmp ole double %a, %b
+; CHECK-NEXT: ret i1 [[TMP1]]
;
%cmp = fcmp ord double %a, %b
%cmp1 = fcmp ole double %a, %b
@@ -426,8 +426,8 @@ define i1 @auto_gen_33(double %a, double
define i1 @auto_gen_34(double %a, double %b) {
; CHECK-LABEL: @auto_gen_34(
-; CHECK-NEXT: [[CMP1:%.*]] = fcmp one double %a, %b
-; CHECK-NEXT: ret i1 [[CMP1]]
+; CHECK-NEXT: [[TMP1:%.*]] = fcmp one double %a, %b
+; CHECK-NEXT: ret i1 [[TMP1]]
;
%cmp = fcmp ord double %a, %b
%cmp1 = fcmp one double %a, %b
@@ -1385,8 +1385,8 @@ define i1 @auto_gen_112(double %a, doubl
define i1 @auto_gen_113(double %a, double %b) {
; CHECK-LABEL: @auto_gen_113(
-; CHECK-NEXT: [[CMP:%.*]] = fcmp uno double %a, %b
-; CHECK-NEXT: ret i1 [[CMP]]
+; CHECK-NEXT: [[TMP1:%.*]] = fcmp uno double %a, %b
+; CHECK-NEXT: ret i1 [[TMP1]]
;
%cmp = fcmp uno double %a, %b
%cmp1 = fcmp ueq double %a, %b
@@ -1396,8 +1396,8 @@ define i1 @auto_gen_113(double %a, doubl
define i1 @auto_gen_114(double %a, double %b) {
; CHECK-LABEL: @auto_gen_114(
-; CHECK-NEXT: [[CMP:%.*]] = fcmp uno double %a, %b
-; CHECK-NEXT: ret i1 [[CMP]]
+; CHECK-NEXT: [[TMP1:%.*]] = fcmp uno double %a, %b
+; CHECK-NEXT: ret i1 [[TMP1]]
;
%cmp = fcmp uno double %a, %b
%cmp1 = fcmp ugt double %a, %b
@@ -1407,8 +1407,8 @@ define i1 @auto_gen_114(double %a, doubl
define i1 @auto_gen_115(double %a, double %b) {
; CHECK-LABEL: @auto_gen_115(
-; CHECK-NEXT: [[CMP:%.*]] = fcmp uno double %a, %b
-; CHECK-NEXT: ret i1 [[CMP]]
+; CHECK-NEXT: [[TMP1:%.*]] = fcmp uno double %a, %b
+; CHECK-NEXT: ret i1 [[TMP1]]
;
%cmp = fcmp uno double %a, %b
%cmp1 = fcmp uge double %a, %b
@@ -1418,8 +1418,8 @@ define i1 @auto_gen_115(double %a, doubl
define i1 @auto_gen_116(double %a, double %b) {
; CHECK-LABEL: @auto_gen_116(
-; CHECK-NEXT: [[CMP:%.*]] = fcmp uno double %a, %b
-; CHECK-NEXT: ret i1 [[CMP]]
+; CHECK-NEXT: [[TMP1:%.*]] = fcmp uno double %a, %b
+; CHECK-NEXT: ret i1 [[TMP1]]
;
%cmp = fcmp uno double %a, %b
%cmp1 = fcmp ult double %a, %b
@@ -1429,8 +1429,8 @@ define i1 @auto_gen_116(double %a, doubl
define i1 @auto_gen_117(double %a, double %b) {
; CHECK-LABEL: @auto_gen_117(
-; CHECK-NEXT: [[CMP:%.*]] = fcmp uno double %a, %b
-; CHECK-NEXT: ret i1 [[CMP]]
+; CHECK-NEXT: [[TMP1:%.*]] = fcmp uno double %a, %b
+; CHECK-NEXT: ret i1 [[TMP1]]
;
%cmp = fcmp uno double %a, %b
%cmp1 = fcmp ule double %a, %b
@@ -1440,8 +1440,8 @@ define i1 @auto_gen_117(double %a, doubl
define i1 @auto_gen_118(double %a, double %b) {
; CHECK-LABEL: @auto_gen_118(
-; CHECK-NEXT: [[CMP:%.*]] = fcmp uno double %a, %b
-; CHECK-NEXT: ret i1 [[CMP]]
+; CHECK-NEXT: [[TMP1:%.*]] = fcmp uno double %a, %b
+; CHECK-NEXT: ret i1 [[TMP1]]
;
%cmp = fcmp uno double %a, %b
%cmp1 = fcmp une double %a, %b
More information about the llvm-commits
mailing list