@@ -2278,7 +2278,7 @@ Value *OpenMPIRBuilder::castValueToType(InsertPointTy AllocaIP, Value *From,
2278
2278
Builder.restoreIP (SaveIP);
2279
2279
2280
2280
Value *ValCastItem = Builder.CreatePointerBitCastOrAddrSpaceCast (
2281
- CastItem, FromType-> getPointerTo ( ));
2281
+ CastItem, Builder. getPtrTy ( 0 ));
2282
2282
Builder.CreateStore (From, ValCastItem);
2283
2283
return Builder.CreateLoad (ToType, CastItem);
2284
2284
}
@@ -2328,11 +2328,11 @@ void OpenMPIRBuilder::shuffleAndStore(InsertPointTy AllocaIP, Value *SrcAddr,
2328
2328
continue ;
2329
2329
Type *IntType = Builder.getIntNTy (IntSize * 8 );
2330
2330
Ptr = Builder.CreatePointerBitCastOrAddrSpaceCast (
2331
- Ptr , IntType-> getPointerTo ( ), Ptr ->getName () + " .ascast" );
2331
+ Ptr , Builder. getPtrTy ( 0 ), Ptr ->getName () + " .ascast" );
2332
2332
Value *SrcAddrGEP =
2333
2333
Builder.CreateGEP (ElemType, SrcAddr, {ConstantInt::get (IndexTy, 1 )});
2334
2334
ElemPtr = Builder.CreatePointerBitCastOrAddrSpaceCast (
2335
- ElemPtr, IntType-> getPointerTo ( ), ElemPtr->getName () + " .ascast" );
2335
+ ElemPtr, Builder. getPtrTy ( 0 ), ElemPtr->getName () + " .ascast" );
2336
2336
2337
2337
Function *CurFunc = Builder.GetInsertBlock ()->getParent ();
2338
2338
if ((Size / IntSize) > 1 ) {
@@ -2567,7 +2567,7 @@ Function *OpenMPIRBuilder::emitInterWarpCopyFunction(
2567
2567
Value *ReduceListAddrCast = Builder.CreatePointerBitCastOrAddrSpaceCast (
2568
2568
ReduceListAlloca, Arg0Type, ReduceListAlloca->getName () + " .ascast" );
2569
2569
Value *NumWarpsAddrCast = Builder.CreatePointerBitCastOrAddrSpaceCast (
2570
- NumWarpsAlloca, Arg1Type-> getPointerTo ( ),
2570
+ NumWarpsAlloca, Builder. getPtrTy ( 0 ),
2571
2571
NumWarpsAlloca->getName () + " .ascast" );
2572
2572
Builder.CreateStore (ReduceListArg, ReduceListAddrCast);
2573
2573
Builder.CreateStore (NumWarpsArg, NumWarpsAddrCast);
@@ -2765,7 +2765,7 @@ Function *OpenMPIRBuilder::emitShuffleAndReduceFunction(
2765
2765
2766
2766
Type *ReduceListArgType = ReduceListArg->getType ();
2767
2767
Type *LaneIDArgType = LaneIDArg->getType ();
2768
- Type *LaneIDArgPtrType = LaneIDArg-> getType ()-> getPointerTo ( );
2768
+ Type *LaneIDArgPtrType = Builder. getPtrTy ( 0 );
2769
2769
Value *ReduceListAlloca = Builder.CreateAlloca (
2770
2770
ReduceListArgType, nullptr , ReduceListArg->getName () + " .addr" );
2771
2771
Value *LaneIdAlloca = Builder.CreateAlloca (LaneIDArgType, nullptr ,
0 commit comments