[PATCH][8/n] Remove GENERIC stmt combining from SCCVN

Eric Botcazou ebotcazou@adacore.com
Sun Jul 5 16:05:00 GMT 2015


> The following moves some bitwise patterns from the match-and-simplify
> branch, extending them with proper conditional converts and removing
> the corresponding patterns from fold-const.c

There is a pasto/thinko in the last pattern:

/* Convert ~X ^ C to X ^ ~C.  */
(simplify
 (bit_xor (convert? (bit_not @0)) INTEGER_CST@1)
 (bit_xor (convert @0) (bit_not @1)))

That's incorrect if the types don't have the same precision, as in the other 
cases, and is responsible for PR tree-optimization/66757.

Tested on x86_64-suse-linux, OK for the mainline?


2015-07-05 Eric Botcazou  <ebotcazou@adacore.com>

	PR tree-optimization/66757
	* match.pd: Add missing condition to ~X ^ C -> X ^ ~C.

2015-07-05 Eric Botcazou  <ebotcazou@adacore.com>

	* gcc.c-torture/execute/pr66757.c: New test.

-- 
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr66757.diff
Type: text/x-patch
Size: 481 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20150705/075280aa/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr66757.c
Type: text/x-csrc
Size: 217 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20150705/075280aa/attachment-0001.bin>


More information about the Gcc-patches mailing list