Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmoses committed Nov 4, 2024
1 parent 2b0dd8e commit 94dc476
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions enzyme/Enzyme/JLInstSimplify.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,9 @@ bool jlInstSimplify(llvm::Function &F, TargetLibraryInfo &TLI,
}
auto llhs = dyn_cast<LoadInst>(lhs);
auto lrhs = dyn_cast<LoadInst>(rhs);
if (llhs && lrhs && isa<PointerType>(llhs->getType()) &&
isa<PointerType>(lrhs->getType())) {
if (llhs && lrhs &&
(isa<PointerType>(llhs->getType()) || isa<IntegerType>(llhs->getType())) &&
(isa<PointerType>(lrhs->getType()) || isa<IntegerType>(lrhs->getType()))) {
auto lhsv =
getBaseObject(llhs->getOperand(0), /*offsetAllowed*/ false);
auto rhsv =
Expand Down

0 comments on commit 94dc476

Please sign in to comment.