[PATCH] D124321: [InstSimplify] Use canReplacePointersIfEqual to conditionally simplify '(ptr1 == ptr2) ? a : b'
Juneyoung Lee via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 23 19:24:31 PDT 2022
aqjune added a comment.
I began to think that we might not need to make replacement of pointers 'directional' because it is too complex.
What about renaming `canReplacePointersIfEqual` in Loads.h to `haveSameProvenance` and only checking the equivalence of two pointers, which will make things simpler (including this patch)?
In theory, if `inttoptr` is involved, pointer replacement might be directional (it depends on the semantics of `inttoptr`); but we don't need to get that deep ATM.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124321/new/
https://reviews.llvm.org/D124321
More information about the llvm-commits
mailing list