Diff Detail
Event Timeline
llvm/lib/Analysis/InstructionSimplify.cpp | ||
---|---|---|
5156 | What if we have %i = ptr2int %p %null = sub %i, %i %nullptr = int2ptr %null %scope = call @llvm.noalias(%nullptr) ; introduce the scope %null2 = ptr2int %scope %i2 = add %null2, %i %same.as.orig.p = int2ptr %i2 Why don't we want %same.as.orig.p to have the scope? | |
llvm/test/Transforms/InstSimplify/noalias.ll | ||
9 | Simplify to CHECK-NEXT: ret void? |
llvm/lib/Analysis/InstructionSimplify.cpp | ||
---|---|---|
5156 | A ptr2int will normally block the noalias propagation. Not sure if a %same.as.orig.p = getelementptr %scope, %i is valid when %scope is null. If that is valid, the noalias dependency should not be removed, and we should not short-circuit it here. |
llvm/lib/Analysis/InstructionSimplify.cpp | ||
---|---|---|
5156 | getelementptr is valid for null pointer. |
For review convenience, all changes related to the original local restrict patches have now been incorporated in the full restrict patch series.
What if we have
Why don't we want %same.as.orig.p to have the scope?