[PATCH] D51145: make copyFMF consistent with AnyDefined for detection of any FMF flag set to true

Michael Berg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 31 13:34:22 PDT 2018


mcberg2017 added a comment.

In the newly created test case above, as checked in for test/CodeGen/X86/intersect-fma-fmf.ll, we get precisely this scenario.  From a debug session breakpointed in llvm::SelectionDAGBuilder::visit at the line containing Node->intersectFlagsWith(IncomingFlags);
The Instruction in question is: %tmp11 = extractelement <4 x float> %tmp10, i32 1 as seen by the debugger, the Node we are associating it to is: t7: f32 = fadd nnan ninf nsz arcp contract afn reassoc t6, t5.  
The extractelement is an Instruction that never carries flags and qualifies under

if (auto *FPMO = dyn_cast<FPMathOperator>(&I))

as a FPMathOperator, so it looks like we have the 3rd type.  SelectionDAGBuilder::visitExtractElement results in the association under setValue.


https://reviews.llvm.org/D51145





More information about the llvm-commits mailing list