[llvm] [GlobalIsel] Combine zext of trunc (episode II) (PR #108305)
Thorsten Schütt via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 10 11:01:23 PDT 2024
================
@@ -333,8 +333,10 @@ MachineInstrBuilder CSEMIRBuilder::buildConstant(const DstOp &Res,
// For vectors, CSE the element only for now.
LLT Ty = Res.getLLTTy(*getMRI());
- if (Ty.isVector())
+ if (Ty.isFixedVector())
return buildSplatBuildVector(Res, buildConstant(Ty.getElementType(), Val));
+ if (Ty.isScalableVector())
+ return buildSplatVector(Res, buildConstant(Ty.getElementType(), Val));
----------------
tschuett wrote:
G_BUILD_VECTOR is for fixed-length vectors. G_SPLAT_VECTOR is for scalable vectors. It takes a register and implicitly broadcasts it over the scalable vector.
https://github.com/llvm/llvm-project/pull/108305
More information about the llvm-commits
mailing list