]> granicus.if.org Git - llvm/commitdiff
[InstCombine] visitFCmpInst - appease copy+paste pattern warning. NFCI.
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Mon, 29 Apr 2019 18:52:19 +0000 (18:52 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Mon, 29 Apr 2019 18:52:19 +0000 (18:52 +0000)
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/

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359482 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/InstCombine/InstCombineCompares.cpp

index c73a095804bdd33884369c35cf84ab93d36728a5..b27ddb779d7bd27c6a9e905261ecf877e51e6f5d 100644 (file)
@@ -5512,7 +5512,7 @@ Instruction *InstCombiner::visitFCmpInst(FCmpInst &I) {
       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;
     }
   }