Skip to content

Commit

Permalink
Fix weird allocation (#1918)
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmoses authored Jun 5, 2024
1 parent 46647d1 commit 5325724
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions enzyme/Enzyme/Utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,10 @@ Value *CreateAllocation(IRBuilder<> &Builder, llvm::Type *T, Value *Count,
res = unwrap(CustomAllocator(wrap(&Builder), wrap(T), wrap(Count),
wrap(Align), isDefault,
ZeroMem ? &wzeromem : nullptr));
if (isa<UndefValue>(res))
return res;
if (isa<Constant>(res))
return res;
if (auto I = dyn_cast<Instruction>(res))
I->setName(Name);

Expand Down

0 comments on commit 5325724

Please sign in to comment.