[llvm] [ARM][MVE] Invalid tail predication in LowOverheadLoop pass (PR #163217)
Simon Tatham via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 15 08:48:57 PDT 2025
statham-arm wrote:
> The MQPRCopy should be lowered to either a MVE_ORR if it can be predicated, or a pair of FMOVD's if it cannot, so that it still performs the full vector write. The 2 instructions it needs to generate is worse, but the tail predications otherwise is quite a lot better IIRC.
Ah! I hadn't thought of that at all. Now I see that the definition of `MQPRCopy` in `ARMInstrMVE.td` has a comment explaining that. But I didn't find any code anywhere to actually do that expansion into two FMOVD – if an `MQPRCopy` gets as far as `ARMExpandPseudoInsts.cpp`, that will do nothing with it, and let it fall all the way through to MC instruction output, which will choke on it.
OK, so I need to rework this patch completely by adding the missing pseudo expansion, and then instead of inhibiting tail predication, just decide which `MQPRCopy`s are safe to convert into `MVE_VORR` and which should be left alone. Thanks for the pointer.
I think probably I should close this PR and try again from scratch. Not enough of the details are going to be shared to make it worth trying to turn this patch into that one incrementally!
https://github.com/llvm/llvm-project/pull/163217
More information about the llvm-commits
mailing list