summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2018-07-31 17:12:08 +0000
committerCraig Topper <craig.topper@intel.com>2018-07-31 17:12:08 +0000
commitbef126fb710c84575f15bb3a2618aad04b35096c (patch)
tree5cbc6b6091c023d75c8977ac491f42453f2dedd6 /llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp
parentd03d44e0b963cb85d59cd0c8a848f82e956388fc (diff)
downloadbcm5719-llvm-bef126fb710c84575f15bb3a2618aad04b35096c.tar.gz
bcm5719-llvm-bef126fb710c84575f15bb3a2618aad04b35096c.zip
[X86] Add pattern matching for PMADDUBSW
Summary: Similar to D49636, but for PMADDUBSW. This instruction has the additional complexity that the addition of the two products saturates to 16-bits rather than wrapping around. And one operand is treated as signed and the other as unsigned. A C example that triggers this pattern ``` static const int N = 128; int8_t A[2*N]; uint8_t B[2*N]; int16_t C[N]; void foo() { for (int i = 0; i != N; ++i) C[i] = MIN(MAX((int16_t)A[2*i]*(int16_t)B[2*i] + (int16_t)A[2*i+1]*(int16_t)B[2*i+1], -32768), 32767); } ``` Reviewers: RKSimon, spatel, zvi Reviewed By: RKSimon, zvi Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D49829 llvm-svn: 338402
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud