summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2019-04-29 18:52:19 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2019-04-29 18:52:19 +0000
commite3c8776172b6ac675bc2179632ad7da6177297f4 (patch)
tree394015d3ed9482d271a70d63c03975eeeddbc4a0 /llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
parent8f079844d01246dd638675635e8aa5755f0401d5 (diff)
downloadbcm5719-llvm-e3c8776172b6ac675bc2179632ad7da6177297f4.tar.gz
bcm5719-llvm-e3c8776172b6ac675bc2179632ad7da6177297f4.zip
[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/ llvm-svn: 359482
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
index c73a095804b..b27ddb779d7 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
+++ b/llvm/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;
}
}
OpenPOWER on IntegriCloud