Page MenuHomePhabricator

[PowerPC] Exploit vabsd for absolute difference of vectors on P9

Authored by Esme on May 19 2020, 11:05 PM.


Group Reviewers
Restricted Project
rG3101601b54fb: [PowerPC] Exploit vabsd on P9

Exploit vabsd for some cases on power9, 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.

Diff Detail

Event Timeline

Esme created this revision.May 19 2020, 11:05 PM
Esme edited the summary of this revision. (Show Details)May 19 2020, 11:31 PM
Esme updated this revision to Diff 265158.May 20 2020, 12:57 AM

Fix whitespace error.

qiucf added a subscriber: qiucf.May 24 2020, 8:14 PM

minor comment: would it be better to make 'some cases' in title more accurate, like 'absolute difference' (how ISA names the instr)?

Esme retitled this revision from [PowerPC] Exploit vabsd for some cases on P9 to [PowerPC] Exploit vabsd for absolute difference of vectors on P9.May 26 2020, 2:10 AM
steven.zhang accepted this revision.May 28 2020, 8:20 PM

LGTM. Thank you for adding this.

This revision is now accepted and ready to land.May 28 2020, 8:20 PM
This revision was automatically updated to reflect the committed changes.