forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MemoryBuiltins][FIX] Adjust index type size properly wrt. AS casts
Use existing functionality to strip constant offsets that works well with AS casts and avoids the code duplication. Since we strip AS casts during the computation of the offset we also need to adjust the APInt properly to avoid mismatches in the bit width. This code ensures the caller of `compute` sees APInts that match the index type size of the value passed to `compute`, not the value result of the strip pointer cast. Fixes llvm#53559. Differential Revision: https://reviews.llvm.org/D118727 (cherry picked from commit 29c8eba)
- Loading branch information
Showing
3 changed files
with
72 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters