[llvm] [AArch64] Fold COPY(y:gpr, DUP(x:fpr, i)) -> UMOV(y:gpr, x:fpr, i) (PR #89017)
Dhruv Chawla via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 18 01:30:24 PDT 2024
dc03-work wrote:
> The regbank for insert in https://github.com/llvm/llvm-project/pull/81453/files#diff-c2b6149d4ce96115e46b03ba19778fe7dd911412078c302ace57ac14364f5227 does two things - it re-uses FPR/GPR if the input is already known to be a give type, and extends small i8/i16 values to i32. The second part is something different that we can do separately, but is the first part possible to use for extracts too?
The problem is unfortunately with the output operand not the input operand. The element that gets extracted gets used in a place where only GPR is accepted, so a copy must be generated. Because RegBankSelect works top-down, there's no way for us to know how the output operand is going to be used, which is why I had made this as a peephole.
https://github.com/llvm/llvm-project/pull/89017
More information about the llvm-commits
mailing list