[PATCH] Improve MIN_EXPR/MAX_EXPR constant folding

Eric Botcazou ebotcazou@adacore.com
Mon Jan 16 13:43:00 GMT 2006


> Pre-approved for mainline with those changes, but feel free to post
> a revised version if you can think of further improvements.

Revised version attached, bootstrapped/regtested on x86_64-suse-linux.


2006-01-16  Eric Botcazou  <ebotcazou@adacore.com>
            Roger Sayle  <roger@eyesopen.com> 

	* fold-const.c (fold_minmax): New static function.
	(fold_binary) <MIN_EXPR>: Call it.
	<MAX_EXPR>: Likewise.
	* stor-layout.c (place_field): Use DECL_SIZE consistently
	in the computation of the new record size.


2006-01-16  Eric Botcazou  <ebotcazou@adacore.com>
            Andrew Pinski  <pinskia@physics.uc.edu>

	* gcc.dg/minmax-1.c: New test.


-- 
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: minmax-1.c
Type: text/x-csrc
Size: 1303 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20060116/8d3b0e66/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: eb28-011-2_41.diff
Type: text/x-diff
Size: 3206 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20060116/8d3b0e66/attachment-0001.bin>


More information about the Gcc-patches mailing list