Skip to content

Commit f12f9be

Browse files
committed
[x86] propagate FMF from x86-specific intrinsic nodes to others during combining
This is another FMF gap exposed by D90901, but I don't see a way to show the difference in a regression test as with: f66ba4c 6025663 We will see an asm difference if we add a test as part of D90901.
1 parent fd09a76 commit f12f9be

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

llvm/lib/Target/X86/X86ISelLowering.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48063,6 +48063,8 @@ static SDValue combineFMA(SDNode *N, SelectionDAG &DAG,
4806348063
unsigned NewOpcode =
4806448064
negateFMAOpcode(N->getOpcode(), NegA != NegB, NegC, false);
4806548065

48066+
// Propagate fast-math-flags to new FMA node.
48067+
SelectionDAG::FlagInserter FlagsInserter(DAG, Flags);
4806648068
if (IsStrict) {
4806748069
assert(N->getNumOperands() == 4 && "Shouldn't be greater than 4");
4806848070
return DAG.getNode(NewOpcode, dl, {VT, MVT::Other},

0 commit comments

Comments
 (0)