|
|
| Bugzilla Link |
2206 |
| Resolution |
FIXED |
| Resolved on |
Apr 19, 2008 17:18 |
| Version |
unspecified |
| OS |
Linux |
| Reporter |
LLVM Bugzilla Contributor |
| CC |
@sunfishcode |
Extended Description
Consider "i64 and (i64 ptrtoint (i64 (i64)* @cons to i64), i64 -8)"[1].
(Where @cons is a global function with an alignment >= 8 specified)
Such expressions aren't simplified by "opt -std-compile-opts", even though the relevant bits of the ptrtoint result are guaranteed to be zero because of above-mentioned alignment and similar optimizations are performed if the pointer is replaced by an integer.
[1]: That expression was shortened for readability, and not actually tested in this form. The actual expression was "i64 inttoptr (i64 and (i64 or (i64 ptrtoint (i64 (i64)* @cons to i64), i64 1), i64 -8) to i64 (i64)*)".