Skip to content

Commit

Permalink
Fix clang tests in ATD. (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsjodin authored Jan 25, 2024
1 parent 7056f72 commit 95d748c
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5712,14 +5712,8 @@ OpenMPIRBuilder::InsertPointTy OpenMPIRBuilder::createTargetInit(
? KernelEnvironmentGV
: ConstantExpr::getAddrSpaceCast(KernelEnvironmentGV,
KernelEnvironmentPtr);
LLVMContext &Ctx = Fn->getContext();
Type *PtrTy = PointerType::getUnqual(Ctx);
Value *KLEnv = Builder.CreateAlloca(PtrTy, nullptr, "kernel_launch_env");
Value *KLEnvAcast = Builder.CreatePointerBitCastOrAddrSpaceCast(KLEnv, PtrTy);
Builder.CreateStore(Kernel->getArg(0), KLEnvAcast);
Value *KernelLaunchEnvironment = Builder.CreateLoad(PtrTy, KLEnvAcast);
CallInst *ThreadKind =
Builder.CreateCall(Fn, {KernelEnvironment, KernelLaunchEnvironment});
Builder.CreateCall(Fn, {KernelEnvironment, Kernel->getArg(0)});

Value *ExecUserCode = Builder.CreateICmpEQ(
ThreadKind, ConstantInt::get(ThreadKind->getType(), -1),
Expand Down

0 comments on commit 95d748c

Please sign in to comment.