[llvm] [GlobalISel] Preserve destination type kind when lowering G_EXTRACT (PR #218345)
David Green via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 26 00:57:13 PDT 2026
================
@@ -9907,7 +9907,8 @@ LegalizerHelper::lowerExtract(MachineInstr &MI) {
(SrcTy.isVector() && DstTy == SrcTy.getElementType()))) {
LLT SrcIntTy = SrcTy;
if (!SrcTy.isScalar()) {
- SrcIntTy = LLT::scalar(SrcTy.getSizeInBits());
+ SrcIntTy = DstTy.isAnyScalar() ? LLT::scalar(SrcTy.getSizeInBits())
+ : LLT::integer(SrcTy.getSizeInBits());
----------------
davemgreen wrote:
Can this just be LLT::integer(SrcTy.getSizeInBits()), given the uses of integer instructions in this function?
https://github.com/llvm/llvm-project/pull/218345
More information about the llvm-commits
mailing list