Skip to content

Commit

Permalink
Mac optional (#2165)
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmoses authored Nov 13, 2024
1 parent 896da02 commit 624621a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
6 changes: 1 addition & 5 deletions enzyme/Enzyme/JLInstSimplify.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,7 @@ bool jlInstSimplify(llvm::Function &F, TargetLibraryInfo &TLI,
if (auto alias = arePointersGuaranteedNoAlias(
TLI, AA, LI, I.getOperand(0), I.getOperand(1), false)) {

#if LLVM_VERSION_MAJOR >= 16
bool val = alias.value();
#else
bool val = alias.getValue();
#endif
bool val = *alias;
auto repval = ICmpInst::isTrueWhenEqual(pred)
? ConstantInt::get(I.getType(), 1 - val)
: ConstantInt::get(I.getType(), val);
Expand Down
6 changes: 1 addition & 5 deletions enzyme/Enzyme/Utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2307,11 +2307,7 @@ bool overwritesToMemoryReadBy(const TypeResults *TR, llvm::AAResults &AA,
if (loadPtr && storePtr)
if (auto alias =
arePointersGuaranteedNoAlias(TLI, AA, LI, loadPtr, storePtr, true))
#if LLVM_VERSION_MAJOR >= 16
if (alias.value())
#else
if (alias.getValue())
#endif
if (*alias)
return false;

if (!overwritesToMemoryReadByLoop(SE, LI, DT, maybeReader, LoadBegin, LoadEnd,
Expand Down

0 comments on commit 624621a

Please sign in to comment.