[llvm] [AArch64][GlobalISel] Fold buildvector of bitcast (PR #141553)
David Green via llvm-commits
llvm-commits at lists.llvm.org
Tue May 27 08:51:02 PDT 2025
davemgreen wrote:
> I can't follow the example in the description, the register names and numbers in the result don't match the input, and there's a missing operand to the result bitcast
In this?
```
%5:_(<4 x s8>) = G_BITCAST %16:_(s32)
%18:_(s8), %19:_(s8), %20:_(s8), %21:_(s8) = G_UNMERGE_VALUES %5:_(<4 x s8>)
%22:_(s8) = G_IMPLICIT_DEF
%23:_(<8 x s8>) = G_BUILD_VECTOR %18:_(s8), %19:_(s8), %20:_(s8), %21:_(s8), %22:_(s8), %22:_(s8), %22:_(s8), %22:_(s8)
=>
<2 x s32> G_BUILD_VECTOR %16, %undef
<8 x s8> G_BITCAST
```
%16 is the same as this input, the G_BITCAST is performed on the G_BUILD_VECTOR and replaces %23. I'll try and update it to be less like pseudocode.
https://github.com/llvm/llvm-project/pull/141553
More information about the llvm-commits
mailing list