[PATCH] D20598: [X86] Detect SAD patterns and emit psadbw instructions on X86 redux
Michael Kuperstein via llvm-commits
llvm-commits at lists.llvm.org
Tue May 24 13:52:02 PDT 2016
mkuper created this revision.
mkuper added reviewers: congh, RKSimon, hfinkel.
mkuper added subscribers: llvm-commits, davidxl, wmi.
This fixes PR27539 in the SAD detection code originally commited in http://reviews.llvm.org/rL267649
The patch is intentionally against r267722 and not against trunk (in which r267649 has been reverted), to highlight the diff vs. the original patch.
The original patch wasn't happy with reductions where the reduction vector was smaller than the result of the psadbw.
This can be handled by taking the low part of the result of the psadbw - this should be safe, since when the the reduction type is narrower than the psadbw result, the input vectors are also narrow, so the non-zero part of the psadbw result is even narrower.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 6500 bytes
Desc: not available
More information about the llvm-commits