File tree Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -690,6 +690,10 @@ G_SPLAT_VECTOR
690
690
691
691
Create a vector where all elements are the scalar from the source operand.
692
692
693
+ The type of the operand must be equal to or smaller than the vector element
694
+ type. If the operand is smaller than the vector element type, the scalar is
695
+ implicitly truncated to the vector element type.
696
+
693
697
Vector Reduction Operations
694
698
---------------------------
695
699
Original file line number Diff line number Diff line change @@ -1774,9 +1774,10 @@ void MachineVerifier::verifyPreISelGenericInstruction(const MachineInstr *MI) {
1774
1774
if (!SrcTy.isScalar ())
1775
1775
report (" Source type must be a scalar" , MI);
1776
1776
1777
- if (DstTy.getScalarType () != SrcTy)
1778
- report (" Element type of the destination must be the same type as the "
1779
- " source type" ,
1777
+ if (TypeSize::isKnownGT (DstTy.getScalarType ().getSizeInBits (),
1778
+ SrcTy.getSizeInBits ()))
1779
+ report (" Element type of the destination must be the same size or smaller "
1780
+ " than the source type" ,
1780
1781
MI);
1781
1782
1782
1783
break ;
Original file line number Diff line number Diff line change @@ -22,6 +22,6 @@ body: |
22
22
; CHECK: Source type must be a scalar
23
23
%6:_(<vscale x 2 x s32>) = G_SPLAT_VECTOR %2
24
24
25
- ; CHECK: Element type of the destination must be the same type as the source type
26
- %7:_(<vscale x 2 x s64 >) = G_SPLAT_VECTOR %0
25
+ ; CHECK: Element type of the destination must be the same size or smaller than the source type
26
+ %7:_(<vscale x 2 x s128 >) = G_SPLAT_VECTOR %0
27
27
...
You can’t perform that action at this time.
0 commit comments