[PATCH] D79234: [ValueTracking] Fix computeKnownBits() with bitwidth-changing ptrtoint
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 6 11:19:53 PDT 2020
efriedma added a comment.
Historically, we allowed IR without a datalayout, so we didn't actually know what the pointer width would be when the IR was eventually compiled. Given that, allowing arbitrary casts was the least-bad alternative: otherwise, we wouldn't be able to verify a module.
Now that datalayout is required, we could maybe restrict the legal ptrtoint casts? Not sure what we would do about ptrtoint constant expressions; constant expressions that don't reference globals aren't associated with a particular module.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79234/new/
https://reviews.llvm.org/D79234
More information about the llvm-commits
mailing list