@@ -5907,7 +5907,7 @@ CallInst *OpenMPIRBuilder::createOMPInteropInit(
5907
5907
Value *Ident = getOrCreateIdent (SrcLocStr, SrcLocStrSize);
5908
5908
Value *ThreadId = getOrCreateThreadID (Ident);
5909
5909
if (Device == nullptr )
5910
- Device = ConstantInt::get (Int32, - 1 );
5910
+ Device = Constant::getAllOnesValue (Int32);
5911
5911
Constant *InteropTypeVal = ConstantInt::get (Int32, (int )InteropType);
5912
5912
if (NumDependences == nullptr ) {
5913
5913
NumDependences = ConstantInt::get (Int32, 0 );
@@ -5935,7 +5935,7 @@ CallInst *OpenMPIRBuilder::createOMPInteropDestroy(
5935
5935
Value *Ident = getOrCreateIdent (SrcLocStr, SrcLocStrSize);
5936
5936
Value *ThreadId = getOrCreateThreadID (Ident);
5937
5937
if (Device == nullptr )
5938
- Device = ConstantInt::get (Int32, - 1 );
5938
+ Device = Constant::getAllOnesValue (Int32);
5939
5939
if (NumDependences == nullptr ) {
5940
5940
NumDependences = ConstantInt::get (Int32, 0 );
5941
5941
PointerType *PointerTypeVar = PointerType::getUnqual (M.getContext ());
@@ -5963,7 +5963,7 @@ CallInst *OpenMPIRBuilder::createOMPInteropUse(const LocationDescription &Loc,
5963
5963
Value *Ident = getOrCreateIdent (SrcLocStr, SrcLocStrSize);
5964
5964
Value *ThreadId = getOrCreateThreadID (Ident);
5965
5965
if (Device == nullptr )
5966
- Device = ConstantInt::get (Int32, - 1 );
5966
+ Device = Constant::getAllOnesValue (Int32);
5967
5967
if (NumDependences == nullptr ) {
5968
5968
NumDependences = ConstantInt::get (Int32, 0 );
5969
5969
PointerType *PointerTypeVar = PointerType::getUnqual (M.getContext ());
@@ -6104,7 +6104,7 @@ OpenMPIRBuilder::createTargetInit(const LocationDescription &Loc, bool IsSPMD,
6104
6104
Builder.CreateCall (Fn, {KernelEnvironment, KernelLaunchEnvironment});
6105
6105
6106
6106
Value *ExecUserCode = Builder.CreateICmpEQ (
6107
- ThreadKind, ConstantInt::get (ThreadKind->getType (), - 1 ),
6107
+ ThreadKind, Constant::getAllOnesValue (ThreadKind->getType ()),
6108
6108
" exec_user_code" );
6109
6109
6110
6110
// ThreadKind = __kmpc_target_init(...)
0 commit comments