This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/34627] Incorrect branching with -Ox on hppa
- From: "dave at hiauly1 dot hia dot nrc dot ca" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Feb 2008 21:46:14 -0000
- Subject: [Bug middle-end/34627] Incorrect branching with -Ox on hppa
- References: <bug-34627-7657@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #15 from dave at hiauly1 dot hia dot nrc dot ca 2008-02-03 21:46 -------
Subject: Re: Incorrect branching with -Ox on hppa
> Instead of const0_rtx, I probably should have used CONST0_RTX(mode) ...
I've tried Steven's change on hppa2.0w-hp-hpux11.11 and can confirm
that it resolves the testsuite problem with head. I've got full
bootstraps running on 4.2 and head with the following change.
Index: combine.c
===================================================================
--- combine.c (revision 132077)
+++ combine.c (working copy)
@@ -5393,9 +5393,10 @@
/* Look for cases where we have (abs x) or (neg (abs X)). */
if (GET_MODE_CLASS (mode) == MODE_INT
+ && comparison_p
+ && XEXP (cond, 1) == CONST0_RTX (mode)
&& GET_CODE (false_rtx) == NEG
&& rtx_equal_p (true_rtx, XEXP (false_rtx, 0))
- && comparison_p
&& rtx_equal_p (true_rtx, XEXP (cond, 0))
&& ! side_effects_p (true_rtx))
switch (true_code)
Dave
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34627