[PATCH] D55722: [DAGCombiner] scalarize binop followed by extractelement

Ulrich Weigand via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 17 04:11:09 PST 2018


uweigand added a subscriber: jonpa.
uweigand added a comment.

Just looking at the SystemZ test cases:

- The knownbits.ll case shows what might be an unintended consequence.  We have a vector "not" followed by a vector "and", which are merged into a single vector "and complement" operation, and this is then followed by an element extraction.  Your patch moves the "and" to the scalar side, but leaves the "not" a vector operation.  This means that we can now no longer combine the two into an "and complement".  Would it maybe be better to do the same transformation also for unary operations like "not"?

- The vec-trunc-to-i1.ll case is supposed to verify that a particular vector operation doesn't crash (see PR 32275).  With your patch, we no longer have that vector operation.  While this leads to better code and thus is certainly a useful transformation, it means that we should probably modify the test case so it again tests  the original problem.  @jonpa, can you have a look?


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

https://reviews.llvm.org/D55722





More information about the llvm-commits mailing list