Skip to content

Commit 00973c3

Browse files
committed
add replaceOperand
1 parent 785fe71 commit 00973c3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -8051,7 +8051,7 @@ Instruction *InstCombinerImpl::visitFCmpInst(FCmpInst &I) {
80518051
(match(LHSI,
80528052
m_Select(m_Value(), m_Value(X), m_FNeg(m_Deferred(X)))) ||
80538053
match(LHSI, m_Select(m_Value(), m_FNeg(m_Value(X)), m_Deferred(X)))))
8054-
return new FCmpInst(Pred, X, RHSC, "", &I);
8054+
return replaceOperand(I, 0, X);
80558055
break;
80568056
case Instruction::PHI:
80578057
if (Instruction *NV = foldOpIntoPhi(I, cast<PHINode>(LHSI)))

0 commit comments

Comments
 (0)