[llvm] [GlobalISel](NFC) Refactor construction of LLTs in `LegalizerHelper` (PR #170664)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 4 12:52:25 PST 2025


================
@@ -3289,7 +3285,7 @@ LegalizerHelper::widenScalar(MachineInstr &MI, unsigned TypeIdx, LLT WideTy) {
       Observer.changingInstr(MI);
 
       widenScalarSrc(
-          MI, LLT::vector(VecTy.getElementCount(), WideTy.getSizeInBits()), 1,
----------------
arsenm wrote:

The cases directly using LLT::vector/fixed_vector are slightly different, since this doesn't handle scalar inputs which are presumed impossible. This is a direct replacement for the scalarOrVector cases 

https://github.com/llvm/llvm-project/pull/170664


More information about the llvm-commits mailing list