[llvm] [GlobalISel] Fix buildCopyFromRegs for split vectors (PR #77448)
Pierre van Houtryve via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 9 05:22:02 PST 2024
================
@@ -478,9 +478,43 @@ static void buildCopyFromRegs(MachineIRBuilder &B, ArrayRef<Register> OrigRegs,
} else {
// Vector was split, and elements promoted to a wider type.
// FIXME: Should handle floating point promotions.
- LLT BVType = LLT::fixed_vector(LLTy.getNumElements(), PartLLT);
- auto BV = B.buildBuildVector(BVType, Regs);
- B.buildTrunc(OrigRegs[0], BV);
+ unsigned NumElts = LLTy.getNumElements();
+ LLT BVType = LLT::fixed_vector(NumElts, PartLLT);
+
----------------
Pierre-vh wrote:
I don't think so, I don't see how it could help because we have multiple Regs to process + we have to handle the anyExt
https://github.com/llvm/llvm-project/pull/77448
More information about the llvm-commits
mailing list