@@ -255,7 +255,7 @@ Type *AMDGPUCodeGenPrepare::getI32Ty(IRBuilder<> &B, const Type *T) const {
255255
256256 if (T->isIntegerTy ())
257257 return B.getInt32Ty ();
258- return VectorType ::get (B.getInt32Ty (), cast<VectorType >(T)-> getNumElements ( ));
258+ return FixedVectorType ::get (B.getInt32Ty (), cast<FixedVectorType >(T));
259259}
260260
261261bool AMDGPUCodeGenPrepare::isSigned (const BinaryOperator &I) const {
@@ -477,7 +477,7 @@ bool AMDGPUCodeGenPrepare::isU24(Value *V, unsigned ScalarSize) const {
477477
478478static void extractValues (IRBuilder<> &Builder,
479479 SmallVectorImpl<Value *> &Values, Value *V) {
480- VectorType *VT = dyn_cast<VectorType >(V->getType ());
480+ auto *VT = dyn_cast<FixedVectorType >(V->getType ());
481481 if (!VT) {
482482 Values.push_back (V);
483483 return ;
@@ -777,7 +777,7 @@ bool AMDGPUCodeGenPrepare::visitFDiv(BinaryOperator &FDiv) {
777777 Value *Den = FDiv.getOperand (1 );
778778
779779 Value *NewFDiv = nullptr ;
780- if (VectorType *VT = dyn_cast<VectorType >(FDiv.getType ())) {
780+ if (auto *VT = dyn_cast<FixedVectorType >(FDiv.getType ())) {
781781 NewFDiv = UndefValue::get (VT);
782782
783783 // FIXME: Doesn't do the right thing for cases where the vector is partially
@@ -1233,7 +1233,7 @@ bool AMDGPUCodeGenPrepare::visitBinaryOperator(BinaryOperator &I) {
12331233 IRBuilder<> Builder (&I);
12341234 Builder.SetCurrentDebugLocation (I.getDebugLoc ());
12351235
1236- if (VectorType *VT = dyn_cast<VectorType >(Ty)) {
1236+ if (auto *VT = dyn_cast<FixedVectorType >(Ty)) {
12371237 NewDiv = UndefValue::get (VT);
12381238
12391239 for (unsigned N = 0 , E = VT->getNumElements (); N != E; ++N) {
0 commit comments