[LLVMdev] supporting SAD in loop vectorizer

Das, Dibyendu Dibyendu.Das at amd.com
Tue Nov 4 03:06:45 PST 2014


Nadav and other vectorizer folks-

Is there any plan to support special idioms in the loop vectorizer like sum of absolute difference (SAD) ? We see some useful cases where llvm is losing performance at -O3 due to SADs not being vectorized (hence PSADBWs not being generated).

Also, since the abs() call is already lowered to a sequence of 'icmp; neg; select' by simplifylibcalls (in -O3), we may then need to get hold of this pattern in the loop vectorizer (part of reduction analysis) and do the needful.

Thoughts ?

-Thx
Dibyendu




More information about the llvm-dev mailing list