Currently we only fold a BitCast into a Load when the BitCast is its only user. This patch enables doing the same for IntToPtr and PtrToInt in the case they are noops.
Details
Details
- Reviewers
chandlerc majnemer - Commits
- rG490cfbe2a25a: Re-apply r238452, the bug was in clang and was fixed in r260567.
rGdd04352558d7: [InstCombine] Fold IntToPtr and PtrToInt into preceding loads.
rL260612: Re-apply r238452, the bug was in clang and was fixed in r260567.
rL238452: [InstCombine] Fold IntToPtr and PtrToInt into preceding loads.
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
This change also affects a clang test-case. I created another patch to fix this: {D9153: [clang] Update a test-case affected by IntToPtr/PtrToInt being folded into Loads}