[PATCH] D45723: [X86] Lowering SAD (sum of absolute differences) intrinsics to native IR (LLVM side)

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 25 07:21:13 PDT 2018


RKSimon added a comment.

In https://reviews.llvm.org/D45723#1071518, @craig.topper wrote:

> How much value are we getting out of this change? Does this expose a lot of optimization potential to the middle end? This is a pretty complex sequence. How easy/likely is for the middle end to mess this up and make it hard for the backend to recognize?


This will be the 3rd code path we'll have for PSADBW recognition.....



================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:38075
+  // by vectors of 0-7 offsets, creating 8 vectors of byte differences that are
+  // then summed.
+  while (NumByteGroups) {
----------------
Can we reuse/tweak matchBinOpReduction to do this for us?


https://reviews.llvm.org/D45723





More information about the llvm-commits mailing list