[PATCH] D119740: [InstructionSimplify][FIX] Handle bit widths in the presence of AS-casts

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 14 10:42:18 PST 2022


jdoerfert created this revision.
jdoerfert added reviewers: arsenm, hliao.
Herald added subscribers: bollu, hiraditya.
jdoerfert requested review of this revision.
Herald added a subscriber: wdng.
Herald added a project: LLVM.

While D64768 <https://reviews.llvm.org/D64768> fixed some problems, it did not make sure we always keep
matching types for constant offsets in the presence of AS-casts.

The new approach is mostly keeping the constant offset bit width in sync
with the original value type (in the spirit of D118727 <https://reviews.llvm.org/D118727>). That said, if
we perform multiple strip operations we still need to adjust the types
if the first pointer strip causes a bit width change.

NOTE: Test is WIP.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D119740

Files:
  llvm/lib/Analysis/InstructionSimplify.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119740.408501.patch
Type: text/x-patch
Size: 5616 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220214/742b4ab4/attachment.bin>


More information about the llvm-commits mailing list