[llvm] [AArch64] recognise zip1/zip2 with flipped operands (PR #167235)
David Green via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 19 02:37:24 PST 2025
https://github.com/davemgreen commented:
>> I always though we were or should be canonicalising shuffles so that the first index is for the LHS.
> It is definitely possible to make clang -O2 -emit-llvm generate code where that is not the case (https://godbolt.org/z/Yx4TToebb):
Yeah, it depends on the shuffle but many are not. I was wondering if we should - to avoid the need to try and match every pattern in multiple ways. It would fix them all at once, (and we could make the perfect shuffle tables smaller). There are DAG canonicalizations that get in the way though, for shuffle(x, shuffle), so this is probably OK.
https://github.com/llvm/llvm-project/pull/167235
More information about the llvm-commits
mailing list