File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -3179,6 +3179,13 @@ bool SPIRVInstructionSelector::selectFirstBitSet64Overflow(
3179
3179
Register SrcReg, unsigned BitSetOpcode, bool SwapPrimarySide) const {
3180
3180
3181
3181
unsigned ComponentCount = GR.getScalarOrVectorComponentCount (ResType);
3182
+ // SPIR-V only allow vecs of size 2,3,4. Calling with a larger vec requires
3183
+ // creating a return type with an invalid vec size. If that is resolved
3184
+ // then this function is valid up to vec8 as the intermediate splitting
3185
+ // would create 2 vec4.
3186
+ assert (ComponentCount < 5 && " Vec 5+ will generate invalid SPIR-V ops" );
3187
+
3188
+
3182
3189
SPIRVType *BaseType = GR.retrieveScalarOrVectorIntType (ResType);
3183
3190
bool ZeroAsNull = STI.isOpenCLEnv ();
3184
3191
Register ConstIntZero =
You can’t perform that action at this time.
0 commit comments