Without this check unnecessary FMA instructions are generated when the FSUB RHS term is reused.
This also has the side-effect that the same value is computed to different levels of precision, which can create undesirable effects if the results are used together in subsequent computation.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
- Build Status
Buildable 42725 Build 43276: arc lint + arc unit
Event Timeline
Comment Actions
Looks like this case was missed in rL291642. Is it worth checking the other cases too, e.g. the next one at line 11896? Can you add your test to fadd-fma-fmul-combine.ll instead of creating a new test file?
Comment Actions
Thanks for pointing this out. I'll review the other cases and integrate the tests into the same file. It looks like the test I created is just a mirror of the previous test with LHS and RHS swapped.
llvm/test/CodeGen/AMDGPU/fadd-fma-fmul-combine.ll | ||
---|---|---|
258 ↗ | (On Diff #234826) | s/CHECK/GCN |
llvm/test/CodeGen/AMDGPU/fadd-fma-fmul-combine.ll | ||
---|---|---|
258 ↗ | (On Diff #234826) | s/GCN/GCN-LABEL/ :-) |