[Bug tree-optimization/58762] New: [missed optimization] Vectorizing abs(int).
congh at google dot com
gcc-bugzilla@gcc.gnu.org
Wed Oct 16 23:05:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58762
Bug ID: 58762
Summary: [missed optimization] Vectorizing abs(int).
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: congh at google dot com
pabsd in SSSE3 makes it quite straightforward to vectorize abs(int) operation.
But with only SSE2 available, GCC won't vectorize this operation. GCC
translates the abs(int) operation into three instructions: sar, xor, and sub.
Each of them can be vectorized. So I am wondering why GCC does not vectorize
abs(int) in this way? Are there any platform or safety concerns?
Thank you!
Cong
More information about the Gcc-bugs
mailing list