[PATCH] D103458: [SLP]Improve gathering of scalar elements.

Alexey Bataev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 30 12:20:36 PDT 2021


ABataev added a comment.

In D103458#2851020 <https://reviews.llvm.org/D103458#2851020>, @rupprecht wrote:

> In D103458#2851005 <https://reviews.llvm.org/D103458#2851005>, @ABataev wrote:
>
>> To me, the code is strange. You're allocating a variable on the stack, initialize it and then just exit from the function and the variable is not used anyware.
>
> Are you referring to `d_inlineNv`? That is a class member, not a stack variable.

I mean, in the LLVM IR reproducer. Here is a code:

  %nb = alloca %S, 

You're writing/reading data to/from this local variable, this value is not going anywhere then. So, the compiler just optimizes out all the operations with this variable.

>> Of course optimizer optimizes it out and all operations with it. To me, looks like something wrong with the code or other transformations, if the code is correct, SLP just reveals it.
>
> I still haven't ruled out that something is wrong with the code, but it looks totally correct to me. There is also nothing that ubsan/msan/asan catch, not that those are perfect though.

Then probably the other pass incorrectly does some transformations. Why is this data member transformed into a stack variable?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D103458



More information about the llvm-commits mailing list