This is an archive of the discontinued LLVM Phabricator instance.

[X86] Add the custom ABS expanding and change the SAD pattern recognizer.
AbandonedPublic

Authored by ikulagin on Aug 3 2018, 3:46 AM.

Details

Summary

These changes are required for D49837 and add support of the ABS node
for the SAD pattern recognizer and the custom ABS expanding.

The i64 result of the ABS is expanded to

tmp = (SRA, Hi, 31)
Lo = (UADDO tmp, Lo)
Hi = (XOR tmp, (ADDCARRY tmp, hi, Lo:1))
Lo = (XOR tmp, Lo)

The "detectZextAbsDiff" function is changed for the recognition of pattern
with the ABS node. Given an ABS node, detect the following pattern:

(ABS (SUB (ZERO_EXTEND a), (ZERO_EXTEND b))).

Diff Detail

Repository
rL LLVM

Event Timeline

ikulagin created this revision.Aug 3 2018, 3:46 AM
ikulagin updated this revision to Diff 163982.Sep 5 2018, 1:56 AM

Rebase and fix the SAD pattern recognizer.

@ikulagin I think this can be abandoned now?

Herald added a project: Restricted Project. · View Herald TranscriptMar 21 2019, 9:01 AM
Herald added a subscriber: jdoerfert. · View Herald Transcript

@ikulagin I think this can be abandoned now?

Yes, it was committed in rL356468.

ikulagin abandoned this revision.Mar 21 2019, 10:34 PM