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
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 | s/CHECK/GCN |
llvm/test/CodeGen/AMDGPU/fadd-fma-fmul-combine.ll | ||
---|---|---|
258 | s/GCN/GCN-LABEL/ :-) |
s/CHECK/GCN