[PATCH] D17181: [X86] Don't turn (c?-v:v) into (c?-v:0) by blindly using PSIGN.
Ahmed Bougacha via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 15 13:50:34 PST 2016
ab added a comment.
In http://reviews.llvm.org/D17181#351771, @spatel wrote:
> (c ? -v : v)
>
> I think that we can improve the SSE2 (no psign) codegen and have the SSSE3 solution avoid psign completely by using a variant of:
> https://graphics.stanford.edu/~seander/bithacks.html#ConditionalNegate
>
> From what I can tell, the SSE2 savings are one integer logic op + a move. The SSSE3 case would have 3 simple integer logic ops rather than load/or/psign. I don't think it's worth chasing.
You're right! Here's a simple adaptation of that.
This also means that we can completely remove PSIGN, as this was the only user in the codebase. I'll do that when we agree.
> Side note: it's been 10 years since SSSE3 (Merom) came out...can we change the default x86 subtarget now from Yonah/SSE2?
Heh, I would love to see that, but I guess that the hardware vendors (Sony, Apple?) changed it already, and most of the others (distros?) want to stick to the minimal meaning of "x86_64".
-Ahmed
http://reviews.llvm.org/D17181
More information about the llvm-commits
mailing list