[llvm] [AArch64][GlobalISel] Don't crash when legalising vector G_SHL (PR #168848)
David Green via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 1 08:11:08 PST 2025
================
@@ -1033,6 +1033,34 @@ define <2 x i128> @lshr_v2i128(<2 x i128> %0, <2 x i128> %1){
ret <2 x i128> %3
}
+define <2 x i8> @pr168848() {
----------------
davemgreen wrote:
Can you change this to the code below, providing that it is hitting the same problem. So it isn't just optimized away in the future.
```
define <2 x i8> @pr168848(<2 x i1> %a) {
entry:
%zeroes = zext <2 x i1> %a to <2 x i32>
%ones = shl <2 x i32> splat (i32 1), %zeroes
%ones.trunc = trunc <2 x i32> %ones to <2 x i8>
ret <2 x i8> %ones.trunc
}
```
https://github.com/llvm/llvm-project/pull/168848
More information about the llvm-commits
mailing list