This change uses fmf subflags to guard fma optimizations as well as unsafe. These changes originated from D46483 and have been simplified via getNode.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comments? These changes really only have two components. 1.) Adding flags to fma operations and their interior expressions when needed. 2.) extending fusing fma operations based on isContractable().
This review now contains only 1 context, propagating flags onto FMA, it is in effect NFC. The next download will show some cleanup in the tests. The changes are flags only.
In a subsequent review I will extend FMA as earlier.
Thanks for splitting things up - that makes it a lot easier to make sure we're not introducing bugs.
This one is probably good to go, but I want to make sure I understand a couple of the test diffs.
test/CodeGen/PowerPC/fmf-propagation.ll | ||
---|---|---|
195 ↗ | (On Diff #150182) | What's the intent of this diff? IIUC, the existing check isn't complete - we could check that there are both an fmul and fma both before and after this patch. |
267 ↗ | (On Diff #150182) | Same comment as above. |