[PATCH] D68877: [AArch64][SVE] Implement masked load intrinsics
Dave Green via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 22 04:20:55 PDT 2019
dmgreen added a comment.
Thanks!
It looks like the only supported parameter of the PassThru here is a splat of 0 or undef. This might get in the way of IR level optimisation that could try to producing a masked load with different passthru, which would then fail to select. The ARM backed added a custom lowering to turn this case into a select of the loaded value and the passthru. Like this, which was further modified in later commits:
https://github.com/llvm/llvm-project/commit/b325c057322ce14b5c561d8ac49508adab7649e5#diff-b853ecd5d5e0f73c2c093ffb5b4f2fbbR8855
That way you only have to check on the zero, not undef. I'm not sure if there is support yet for vector selects in the SVE codegen?
I was also expecting something that says "setOperationAction(ISD::MLOAD, VT, Legal)" somewhere, but I guess that's already the default?
================
Comment at: llvm/lib/Target/AArch64/SVEInstrFormats.td:4753
+ let hasSideEffects = 1, hasNoSchedulingInfo = 1, mayLoad = 1 in {
+ def "" : Pseudo<(outs listty:$Zt), (ins PPR3bAny:$Pg, GPR64sp:$Rn, simm4s1:$imm4), []>,
+ PseudoInstExpansion<(!cast<Instruction>(NAME # _REAL) listty:$Zt, PPR3bAny:$Pg, GPR64sp:$Rn, simm4s1:$imm4)>;
----------------
Can you explain why is this pseudo is needed, exactly? I feel that using pseudos is often the wrong solution to a problem (it may be required here, I'm just sure why exactly).
We currently seem to generate ld1b (for example), over ldnf1b. Is there ever a time that we expect to generate a nf load?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68877/new/
https://reviews.llvm.org/D68877
More information about the llvm-commits
mailing list