[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
Wed Feb 16 08:21:18 PST 2022


jdoerfert abandoned this revision.
jdoerfert added a comment.

In D119740#3325545 <https://reviews.llvm.org/D119740#3325545>, @nikic wrote:

> In D119740#3323013 <https://reviews.llvm.org/D119740#3323013>, @jdoerfert wrote:
>
>> In D119740#3322389 <https://reviews.llvm.org/D119740#3322389>, @nikic wrote:
>>
>>> Does https://github.com/llvm/llvm-project/commit/f35af77573d9e80bf6e61b3fdd20fe55191e962f fix your original problem?
>>
>> It makes it easier to fix but without testing it I would not assume the issue is gone.
>> The strip calls can still yield constants with different bit-width as they are matched to the bit-width of the resulting value.
>> So LHS/RHS that come out of the strip call can have different types and address spaces, and the constant offsets can have different bit-widths.
>
> The reason why I'd expect it to be fixed is that RHSOffset and LHSOffset only get used together if RHS == LHS now, in which case the type of the (offset-stripped) pointers match and as such should also have the same index size.

I think you are right.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D119740/new/

https://reviews.llvm.org/D119740



More information about the llvm-commits mailing list