This is an archive of the discontinued LLVM Phabricator instance.

[SVE] Remove AArch64ISD::PFALSE.
ClosedPublic

Authored by paulwalker-arm on Jan 28 2022, 6:51 AM.

Details

Summary

AArch64ISD::PFALSE does not provide any value, in fact it can
prevent common combines from firing. It only existed as a
convenience until ISD::SPLAT_VECTOR was generally available.

Diff Detail

Event Timeline

paulwalker-arm created this revision.Jan 28 2022, 6:51 AM
paulwalker-arm requested review of this revision.Jan 28 2022, 6:51 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 28 2022, 6:51 AM

Hi @paulwalker-arm, you mentioned that "it can prevent common combines from firing". I don't suppose you've got any examples of such cases at all? If not, then don't worry. The patch looks good anyway!

Hi @paulwalker-arm, you mentioned that "it can prevent common combines from firing". I don't suppose you've got any examples of such cases at all? If not, then don't worry. The patch looks good anyway!

I've nothing specific but it was D118147 that promoted this patch as it needed extra code to account for this other representation of zero. My hope is that after the obvious REINTERPRET_CAST 0 -> 0 fold we'd get such select optimisations for free. I'm also thinking it might be worth having similar behaviour for all_true (i.e. maintain the splat_vector instead of using PTRUE) but that requires more thought.

sdesmalen accepted this revision.Jan 28 2022, 7:11 AM

As long as the "has-no-unmodelled-side-effects" property is still inferred from the patterns (i.e. sve-pfalse-machine-cse.mir still passes), that makes sense.

This revision is now accepted and ready to land.Jan 28 2022, 7:11 AM
This revision was landed with ongoing or failed builds.Jan 29 2022, 4:02 AM
This revision was automatically updated to reflect the committed changes.