From e3da0d820a37c78767320ca138aa9284822fca03 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Mon, 29 Apr 2019 18:52:19 +0000 Subject: [PATCH] [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/ git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359482 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/InstCombine/InstCombineCompares.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Transforms/InstCombine/InstCombineCompares.cpp b/lib/Transforms/InstCombine/InstCombineCompares.cpp index c73a095804b..b27ddb779d7 100644 --- a/lib/Transforms/InstCombine/InstCombineCompares.cpp +++ b/lib/Transforms/InstCombine/InstCombineCompares.cpp @@ -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; } } -- 2.50.1