Skip to content

Commit 21bd55e

Browse files
committed
Fix global init
1 parent 582b7af commit 21bd55e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

enzyme/Enzyme/GradientUtils.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -3594,7 +3594,7 @@ Constant *GradientUtils::GetOrCreateShadowConstant(
35943594
shadow->setAlignment(arg->getAlignment());
35953595
#endif
35963596
shadow->setUnnamedAddr(arg->getUnnamedAddr());
3597-
if (arg->getInitializer())
3597+
if (arg->hasInitializer())
35983598
shadow->setInitializer(GetOrCreateShadowConstant(
35993599
Logic, TLI, TA, cast<Constant>(arg->getOperand(0)), mode, width,
36003600
AtomicAdd));
@@ -4124,7 +4124,7 @@ Value *GradientUtils::invertPointerM(Value *const oval, IRBuilder<> &BuilderM,
41244124

41254125
Value *shadow = applyChainRule(oval->getType(), BuilderM, rule);
41264126

4127-
if (arg->getInitializer()) {
4127+
if (arg->hasInitializer()) {
41284128
applyChainRule(
41294129
BuilderM,
41304130
[&](Value *shadow, Value *ip) {

0 commit comments

Comments
 (0)