[PowerPC] Exploit vabsd on P9
authorLi Rong Yi <esme.yi@ibm.com>
Mon, 1 Jun 2020 02:29:18 +0000 (02:29 +0000)
committerEloring <onelirong@gmail.com>
Mon, 1 Jun 2020 02:30:27 +0000 (02:30 +0000)
commit3101601b54fbb8062c179e804974b9fb4e2b7c19
tree3d8bc67454002451436eaebbf89ff0447d505c4c
parent216bad9a64ebfac51d36210738d2b9aa3de69511
[PowerPC] Exploit vabsd on P9

Summary: Exploit vabsd* for for absolute difference of vectors on P9,
for example:
void foo (char *restrict p, char *restrict q, char *restrict t)
{
  for (int i = 0; i < 16; i++)
     t[i] = abs (p[i] - q[i]);
}
this case should be matched to the HW instruction vabsdub.

Reviewed By: steven.zhang

Differential Revision: https://reviews.llvm.org/D80271
llvm/lib/Target/PowerPC/PPCISelLowering.cpp
llvm/test/CodeGen/PowerPC/vec_absd.ll