[PATCH] D103458: [SLP]Improve gathering of scalar elements.
Guozhi Wei via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 30 13:03:15 PDT 2021
Carrot added a comment.
> Alive does not agree with your analysis. Also, it is not SLP who merges undefs into poison, `Builder.CreateInsertElement` does this magic. Also, https://llvm.org/docs/LangRef.html#poison-values says that phis do not depend on the operands, so phi is not poisoned.
Thanks for the pointer, from the LLVM IR dump, the poison value was generated after SLP pass, we may dig it further.
> 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. 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.
It is because the code snippet is extremely reduced, the original function has hundreds of blocks! I can pass the address of the stack variable to function bar() to make it more meaningful, but it does not impact the generation of poison value.
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