[PATCH] D14840: [X86] Detect SAD patterns and emit psadbw instructions on X86.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 11 06:39:45 PST 2016
RKSimon added a comment.
What would be necessary to enable PSADBW to match for SSE2 in the 32i8/64i8 cases (and AVX2/AVX512F in the 64i8 case)?
================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:13643
@@ -13642,3 +13642,3 @@
SDValue N0 = N->getOperand(0);
SDValue N2 = N->getOperand(2);
----------------
We're referencing N->getOperand(1) enough now that we can bring this out as N1.
================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:13650
@@ +13649,3 @@
+ if (N0.getValueType() != N->getOperand(1).getValueType())
+ return SDValue();
+
----------------
Add this condition to the outer if()
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:29046
@@ +29045,3 @@
+ // The second operand of SelectOp Op1 is the negation of the first operand
+ // Op0, which is implementes as 0 - Op0.
+ if (!(Op1.getOpcode() == ISD::SUB &&
----------------
implemented
http://reviews.llvm.org/D14840
More information about the llvm-commits
mailing list