[llvm] [RISCV][GISEL] Legalize G_VSCALE (PR #85967)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 25 14:00:15 PDT 2024
================
@@ -1699,6 +1699,21 @@ LegalizerHelper::LegalizeResult LegalizerHelper::narrowScalar(MachineInstr &MI,
case TargetOpcode::G_FLDEXP:
case TargetOpcode::G_STRICT_FLDEXP:
return narrowScalarFLDEXP(MI, TypeIdx, NarrowTy);
+ case TargetOpcode::G_VSCALE: {
+ Register Dst = MI.getOperand(0).getReg();
+ LLT Ty = MRI.getType(Dst);
+ LLT HalfTy = Ty.divide(2);
+
+ // Assume VSCALE(1) fits into a legal integer
+ const APInt One(HalfTy.getSizeInBits(), 1);
----------------
topperc wrote:
Shoudl this be NarrowTy instead of HalfTy?
https://github.com/llvm/llvm-project/pull/85967
More information about the llvm-commits
mailing list