This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/40956] GCSE opportunity in if statement
- From: "davidxl at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Dec 2009 19:37:12 -0000
- Subject: [Bug target/40956] GCSE opportunity in if statement
- References: <bug-40956-17659@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from davidxl at gcc dot gnu dot org 2009-12-23 19:37 -------
This bug is ARM specific (thumb) mode. In x86, the hoisting is unnecessary as
the move instruction support the imm form.
The issue here is more in the GIMPLE canonicalization (target specific). In
this case, the IR should be in the following form to expose the hoisting.
if (...) {
temp = 0;
*p = temp;
}
else
{
temp = 0;
*(p+1) = temp;
}
--
davidxl at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|DUPLICATE |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40956