[PATCH] D148841: [LV] Use SCEV for uniformity analysis across VF

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 1 10:30:56 PDT 2023


mstorsjo added a comment.

In D148841#4387363 <https://reviews.llvm.org/D148841#4387363>, @fhahn wrote:

> In D148841#4386771 <https://reviews.llvm.org/D148841#4386771>, @mstorsjo wrote:
>
>> Hi Florian!
>>
>> This commit triggers failed asserts in my builds, reproduced as below:
>>
>>   $ cat repro.c 
>>   typedef struct {
>>     int a;
>>     short b[]
>>   } c;
>>   void d() {
>>     c *e = d;
>>     for (int f = 1; f < 56; f++) {
>>       int g = f * f / 6;
>>       e->b[g] = f;
>>     }
>>   }
>>   $ clang -target x86_64-linux-gnu -w -c repro.c -O2
>>   clang: /home/martin/code/llvm-project/llvm/lib/Analysis/ScalarEvolution.cpp:3674: const llvm::SCEV* llvm::ScalarEvolution::getAddRecExpr(llvm::SmallVectorImpl<const llvm::SCEV*>&, const llvm::Loop*, llvm::SCEV::NoWrapFlags): Assertion `isLoopInvariant(Operands[i], L) && "SCEVAddRecExpr operand is not loop-invariant!"' failed.
>>
>> Can you have a look, and revert if it takes a while to get it fixed?
>
> Thanks, should be fixed by 3b912e269a52 <https://reviews.llvm.org/rG3b912e269a52f8d30c4de38487ea8319df23f85c>

Yes, the regression seems to be fixed in the original, non-reduced case now as well. Thanks!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D148841



More information about the llvm-commits mailing list