[llvm] [GlobalIsel][NFC] Fix LLT Propagation (PR #119587)
Tim Gymnich via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 11 23:39:00 PST 2024
================
@@ -5347,9 +5347,9 @@ LegalizerHelper::fewerElementsBitcast(MachineInstr &MI, unsigned int TypeIdx,
auto [DstReg, DstTy, SrcReg, SrcTy] = MI.getFirst2RegLLTs();
- unsigned SrcScalSize = SrcTy.getScalarSizeInBits();
- LLT SrcNarrowTy =
- LLT::fixed_vector(NarrowTy.getSizeInBits() / SrcScalSize, SrcScalSize);
+ unsigned NewElemCount =
+ NarrowTy.getSizeInBits() / SrcTy.getScalarSizeInBits();
+ LLT SrcNarrowTy = LLT::fixed_vector(NewElemCount, SrcTy.getElementType());
----------------
tgymnich wrote:
`LLT::divide` operates on element counts not on bit sizes.
https://github.com/llvm/llvm-project/pull/119587
More information about the llvm-commits
mailing list