[llvm] [GlobalIsel][NFC] Fix LLT Propagation (PR #119587)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 11 15:19:38 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());
----------------
arsenm wrote:
I think this could use LLT::divide
https://github.com/llvm/llvm-project/pull/119587
More information about the llvm-commits
mailing list