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.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
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.
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.