[llvm] r359482 - [InstCombine] visitFCmpInst - appease copy+paste pattern warning. NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 29 11:52:19 PDT 2019
Author: rksimon
Date: Mon Apr 29 11:52:19 2019
New Revision: 359482
URL: http://llvm.org/viewvc/llvm-project?rev=359482&view=rev
Log:
[InstCombine] visitFCmpInst - appease copy+paste pattern warning. NFCI.
PVS Studio's copy+paste recognizer was seeing this as a typo, technically Op0/Op1 in a fcmp should always be the same type, but we might as well avoid the issue.
Reported in https://www.viva64.com/en/b/0629/
Modified:
llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp
Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp?rev=359482&r1=359481&r2=359482&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp Mon Apr 29 11:52:19 2019
@@ -5512,7 +5512,7 @@ Instruction *InstCombiner::visitFCmpInst
return &I;
}
if (!match(Op1, m_PosZeroFP()) && isKnownNeverNaN(Op1, &TLI)) {
- I.setOperand(1, ConstantFP::getNullValue(Op0->getType()));
+ I.setOperand(1, ConstantFP::getNullValue(Op1->getType()));
return &I;
}
}
More information about the llvm-commits
mailing list