PATCH: PR target/42542: Vectorizer produces incorrect results on max of signed intergers

Paolo Bonzini bonzini@gnu.org
Tue Jan 5 15:55:00 GMT 2010


>> I see no other way to fixup the underflow. Some comments below:

You can always subtract (or XOR) the sign bit to turn an unsigned value 
to the corresponding signed value.  The attached patch (on top of the 
code before H.J.'s patch) fixes the C testcase in the PR, but I didn't 
test it further and I don't have time unfortunately.

BTW, ia64_expand_vecint_compare is also similarly wrong, but the same 
trick would work there too.

Paolo
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pr42542-mine.patch
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20100105/1548316a/attachment.ksh>


More information about the Gcc-patches mailing list