[PATCH] D147373: [InstCombine] fold double reverses

Zhengyang Liu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 1 11:32:09 PDT 2023


liuz added a comment.

In D147373#4238404 <https://reviews.llvm.org/D147373#4238404>, @nikic wrote:

> As this is not a cost-model driven transform, it should be part of InstCombine, not VectorCombine.

Hi Nikita, thanks for the comment, I moved the code to InstCombine.



================
Comment at: llvm/lib/Transforms/Vectorize/VectorCombine.cpp:357
+  if (!C->getSplatValue())
+    return false;
+
----------------
RKSimon wrote:
> Why does this need to be a splat? If its constant we can just constant fold with the outer shuffle
Thanks Simon for the comment, yes this does not need to be a splat, let me update this code to handle any constants.


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

https://reviews.llvm.org/D147373



More information about the llvm-commits mailing list