[llvm] [IR] Add llvm.masked.load.first.fault intrinsic (PR #156470)
Graham Hunter via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 12 05:46:46 PST 2026
huntergr-arm wrote:
> IIUC the new intrinsic has the same semantics as `llvm.vp.load.ff`, modulo the extra EVL argument?
>
> If so, it would be nice if it would be possible to unify them if possible, not sure if we could have an optional EVL argument, which defaults to the number of elements of the vector type if omitted?
>
> If that's not possible, it would be good to try to keep the names consistent (`load.ff` vs `load.first.fault`) and possibly share the wording for the semantics definition somehow, possibly referencing `vp.load.ff`
Sure, I can use `.ff`, I just figured it might be a little more obvious what it was spelled out. Looks like I can also remove the alignment arg and just use metadata from the ptr arg.
It returns a mask instead of a new evl, but that mask would be a 'prefix' mask so could be synthesized from the returned evl.
As far as the overlap in functionality goes, it's pretty much the same as llvm.masked.load vs. llvm.vp.load, or store,gather,scatter,etc.
Would operand bundles be the way to make an argument optional?
At some point, Arm would probably also want to introduce a `llvm.masked.gather.ff`, as well as `.nf` no-fault versions to enable interleaving; I don't think RVV has those operations (yet?).
https://github.com/llvm/llvm-project/pull/156470
More information about the llvm-commits
mailing list