[PATCH] D59065: [BasicAA] Simplify inttoptr(and(ptrtoint(X), C)) to X, if C preserves all significant bits.
Hal Finkel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 29 12:11:39 PDT 2019
hfinkel added a comment.
> I am also not entirely sure how control dependencies could add new underlying objects with this patch
Please read this https://bugs.llvm.org/show_bug.cgi?id=34548
I *think* that this is okay if the ptrtoint and the and have only one user, and they're in the same basic block, and there's nothing that can throw, etc. in between?
================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:3751
}
+ Value *Ptr;
+ ConstantInt *CI;
----------------
This code is essentially repeated from the code added to BasicAA. Please put this into a utility function or similar.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59065/new/
https://reviews.llvm.org/D59065
More information about the llvm-commits
mailing list