Page MenuHomePhabricator

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

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