[PATCH] D136713: [SDAG] avoid vector extract/insert around binop

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 26 07:06:18 PDT 2022


spatel planned changes to this revision.
spatel marked an inline comment as done.
spatel added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:23519
+      TLI.isBinOp(Opcode) && VT.getScalarType() == Scalar.getValueType() &&
+      hasOperation(Opcode, VT)) {
+    // Match an extract element and get a shuffle mask equivalent.
----------------
RKSimon wrote:
> is anything stopping a vectorized integer division with undef elements occurring apart from the fact that almost no target has such an instruction? 
Good point - I don't know how to test it, but we can't do this for opcodes that are not speculatable (because of immediate UB). 

A similar problem came up here:
17dcbd816547 
...so I should've remembered that! :)


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

https://reviews.llvm.org/D136713



More information about the llvm-commits mailing list