[llvm] [AArch64][SVE] Combine UXT[BHW] intrinsics to AND. (PR #137956)

Paul Walker via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 30 07:55:27 PDT 2025


paulwalker-arm wrote:

> > Option (2) is my preference because once complete we can practically ignore `sve.uxt` from all future transformations.
> 
> I agree, although thinking about it a bit more, can we really canonicalise all `sve.uxt` to `sve.and`? More specifically, how do we encode the passthrough of the UXT in the AND? The latter doesn't seem to have a real passthrough, in the sense that inactive elements are taken from one of the operands. Do you see what I mean? Or are you suggesting converting the UXT to a sequence of SEL+AND (i.e. something like `uxt (pg, inactive, op) -> sel (pg, (and pg, op, mask), inactive)`)? (Sorry if I'm missing something obvious.)

Darn it! I forgot the unary operations don't use the same operand for data and passthrough :( Sorry for the misdirect.  Let's stick with option (1).

https://github.com/llvm/llvm-project/pull/137956


More information about the llvm-commits mailing list