llvm-project
4a873d58 - [IR] Don't create ptrtoint expression to determine alignment (NFCI) (#161364)

Commit
3 days ago
[IR] Don't create ptrtoint expression to determine alignment (NFCI) (#161364) We try to determine the alignment of a constant by creating a ptrtoint expression and seeing if it folds. I believe the only case this can actually handle is where the constant is an inttoptr expression. Handle that directly instead of going through another ptrtoint expression. I ran into this while trying to clean up our isEliminableCastPair() mess, which is going to disable ptrtoint(inttoptr) folding without DataLayout, breaking this code.
Author
Parents
Loading