Page MenuHomePhabricator

[SVE] Remove isel patterns for (fneg (fma)) -> fnmla.
Changes PlannedPublic

Authored by craig.topper on Sep 9 2021, 9:43 AM.

Details

Summary

(fneg (fma X, Y, Z)) is not the same as (fma (fneg X), Y, (fneg Z))
due to -0.0.

See https://reviews.llvm.org/D90901 for a similar discussion on X86.

Diff Detail

Event Timeline

craig.topper created this revision.Sep 9 2021, 9:43 AM
craig.topper requested review of this revision.Sep 9 2021, 9:43 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 9 2021, 9:43 AM
dmgreen added inline comments.Sep 9 2021, 11:59 AM
llvm/test/CodeGen/AArch64/sve-fp-combine.ll
407–409

These are all fast...?

craig.topper added inline comments.Sep 9 2021, 12:04 PM
llvm/test/CodeGen/AArch64/sve-fp-combine.ll
407–409

That's true, but the patterns weren't checking that. Would you prefer I add a PatFrag to check the fast math flags and keep the patterns?

dmgreen added inline comments.Sep 9 2021, 12:49 PM
llvm/test/CodeGen/AArch64/sve-fp-combine.ll
407–409

It would seem prudent to not delete obviously useful patterns. Having non-fast tests would be useful too, if we don't have them already.

Same goes for D109523 but the tests might be reversed there, where we have non-fast tests, but no nsz tests.

Matt added a subscriber: Matt.Sep 16 2021, 1:22 PM
craig.topper planned changes to this revision.Sun, Oct 3, 11:42 PM

Hi @craig.topper, are you actively working on this or would you like us to pick it up?

Hi @craig.topper, are you actively working on this or would you like us to pick it up?

I'm not actively working on it. Would you mind picking it up?