[llvm] [GISEL] G_SPLAT_VECTOR can take a splat that is larger than the vector element (PR #86974)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 28 23:37:53 PDT 2024
================
@@ -1768,16 +1768,23 @@ void MachineVerifier::verifyPreISelGenericInstruction(const MachineInstr *MI) {
LLT DstTy = MRI->getType(MI->getOperand(0).getReg());
LLT SrcTy = MRI->getType(MI->getOperand(1).getReg());
- if (!DstTy.isScalableVector())
+ if (!DstTy.isScalableVector()) {
report("Destination type must be a scalable vector", MI);
+ break;
+ }
- if (!SrcTy.isScalar())
+ if (!SrcTy.isScalar()) {
report("Source type must be a scalar", MI);
+ break;
+ }
- if (DstTy.getScalarType() != SrcTy)
- report("Element type of the destination must be the same type as the "
- "source type",
+ if (TypeSize::isKnownGT(DstTy.getScalarType().getSizeInBits(),
----------------
arsenm wrote:
```suggestion
if (TypeSize::isKnownGT(DstTy.getElementType().getSizeInBits(),
```
https://github.com/llvm/llvm-project/pull/86974
More information about the llvm-commits
mailing list