[PATCH] D99424: [BasicAA] Be more careful with modulo ops on VariableGEPIndex.

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 30 06:01:29 PDT 2021


mstorsjo added a comment.

In D99424#2849581 <https://reviews.llvm.org/D99424#2849581>, @fhahn wrote:

> In D99424#2849458 <https://reviews.llvm.org/D99424#2849458>, @mstorsjo wrote:
>
>> The problem appears with https://martin.st/temp/pixlet-preproc.c, compiled with “clang -target aarch64-w64-mingw32 -c -O3 pixlet-preproc.c”. I haven’t pinpointed exactly what changes and whether that’s wrong or if the source itself relies on something undefined though, or if there’s some strict aliasing violation.
>
> Thanks for the heads-up!
>
> I suspect that setting `Scale = APInt::getOneBitSet(Scale.getBitWidth(),` may be at fault here. With the change below, which makes BasicAA more conservative for that case, I don't get any differences with your reproducer. Could you try if that fixes the end-to-end miscomputation?

Thanks! That does indeed fix my issue, and it also fixes another failed testcase that I hadn’t inspected closer yet.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99424



More information about the llvm-commits mailing list