File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -1336,7 +1336,8 @@ void TypeAnalyzer::visitGetElementPtrInst(GetElementPtrInst &gep) {
1336
1336
// is valid. We could make it always valid by checking the pointer
1337
1337
// operand explicitly is a pointer.
1338
1338
if (direction & UP) {
1339
- if (gep.isInBounds () || (pointerAnalysis.Inner0 () == BaseType::Pointer &&
1339
+ if (gep.isInBounds () || (!EnzymeStrictAliasing &&
1340
+ pointerAnalysis.Inner0 () == BaseType::Pointer &&
1340
1341
getAnalysis (&gep).Inner0 () == BaseType::Pointer)) {
1341
1342
for (auto &ind : gep.indices ()) {
1342
1343
updateAnalysis (ind, TypeTree (BaseType::Integer).Only (-1 ), &gep);
Original file line number Diff line number Diff line change 1
- ; RUN: %opt < %s %loadEnzyme -print-type-analysis -type-analysis-func=callee -o /dev/null | FileCheck %s
1
+ ; RUN: %opt < %s %loadEnzyme -print-type-analysis -enzyme-strict-aliasing=0 - type-analysis-func=callee -o /dev/null | FileCheck %s
2
2
3
3
declare i64 @val ()
4
4
You can’t perform that action at this time.
0 commit comments