Skip to content

Commit 15c24c6

Browse files
committed
add one use check
1 parent b888fd8 commit 15c24c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8104,7 +8104,7 @@ Instruction *InstCombinerImpl::visitFCmpInst(FCmpInst &I) {
81048104
case FCmpInst::FCMP_ULE:
81058105
// fcmp pred (x - y), 0 --> fcmp pred x, y
81068106
if (match(RHSC, m_AnyZeroFP()) &&
8107-
match(LHSI, m_FSub(m_Value(X), m_Value(Y))) &&
8107+
match(LHSI, m_OneUse(m_FSub(m_Value(X), m_Value(Y)))) &&
81088108
I.getFunction()->getDenormalMode(
81098109
LHSI->getType()->getScalarType()->getFltSemantics()) ==
81108110
DenormalMode::getIEEE()) {

0 commit comments

Comments
 (0)