File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -1392,19 +1392,19 @@ void SPIRVEmitIntrinsics::preprocessCompositeConstants(IRBuilder<> &B) {
13921392 Constant *AggrConst = nullptr ;
13931393 Type *ResTy = nullptr ;
13941394 if  (auto  *COp = dyn_cast<ConstantVector>(Op)) {
1395-  AggrConst = cast<Constant>( COp) ;
1395+  AggrConst = COp;
13961396 ResTy = COp->getType ();
13971397 } else  if  (auto  *COp = dyn_cast<ConstantArray>(Op)) {
1398-  AggrConst = cast<Constant>( COp) ;
1398+  AggrConst = COp;
13991399 ResTy = B.getInt32Ty ();
14001400 } else  if  (auto  *COp = dyn_cast<ConstantStruct>(Op)) {
1401-  AggrConst = cast<Constant>( COp) ;
1401+  AggrConst = COp;
14021402 ResTy = B.getInt32Ty ();
14031403 } else  if  (auto  *COp = dyn_cast<ConstantDataArray>(Op)) {
1404-  AggrConst = cast<Constant>( COp) ;
1404+  AggrConst = COp;
14051405 ResTy = B.getInt32Ty ();
14061406 } else  if  (auto  *COp = dyn_cast<ConstantAggregateZero>(Op)) {
1407-  AggrConst = cast<Constant>( COp) ;
1407+  AggrConst = COp;
14081408 ResTy = Op->getType ()->isVectorTy () ? COp->getType () : B.getInt32Ty ();
14091409 }
14101410 if  (AggrConst) {
                         You can’t perform that action at this time. 
           
                  
0 commit comments