This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/28632] VRP should understand bitwise OR and AND
- From: "vda dot linux at googlemail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Aug 2008 11:28:27 -0000
- Subject: [Bug tree-optimization/28632] VRP should understand bitwise OR and AND
- References: <bug-28632-12956@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #8 from vda dot linux at googlemail dot com 2008-08-04 11:28 -------
Created an attachment (id=16010)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16010&action=view)
Example program which is compiled differently with this patch.
The difference is here:
movl (%edx), %eax #,
call bb_simple_perror_msg #
.L40:
- orl $1, 12(%esp) #, errs
+ movl $1, 12(%esp) #, errs
.L19:
addl $4, 24(%esp) #, argv.78
movl 24(%esp), %eax # argv.78,
With improved VRP on (a | b), gcc now can deduce that in this program, errs |=
1 is always equivalent to errs = 1.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28632