This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Committed] PR19800: Don't call gen_lowpart in simplify-rtx.c
- From: Roger Sayle <roger at eyesopen dot com>
- To: Andreas Schwab <schwab at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 7 Feb 2005 06:55:59 -0700 (MST)
- Subject: Re: [Committed] PR19800: Don't call gen_lowpart in simplify-rtx.c
On Mon, 7 Feb 2005, Andreas Schwab wrote:
> This (together with the previous change) is causing miscompilation
> of the stage2 compiler on ia64.
Just to let you know I'm currently investigating on
ia64-unknown-linux-gnu. Unfortunately, (i) my IA-64 box is a bit slow,
(ii) installing gnat on the host to bootstrap from will take a while,
(iii) working from Ada is difficult and (iv) reducing a miscompilation
in the compiler to a small test case makes things worse.
However, I suspect that the cause is a poor interaction between the
RTL optimizers and the ia64.md machine description involving BImode.
I'm guessing the following short-term work-around should be sufficient
to get things working again without reverting the patches and regressing
IA-32.
Index: simplify-rtx.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/simplify-rtx.c,v
retrieving revision 1.226
diff -c -3 -p -r1.226 simplify-rtx.c
*** simplify-rtx.c 7 Feb 2005 05:39:05 -0000 1.226
--- simplify-rtx.c 7 Feb 2005 15:39:20 -0000
*************** simplify_relational_operation_1 (enum rt
*** 2886,2891 ****
--- 2886,2894 ----
&& op1 == const0_rtx
&& GET_MODE_CLASS (mode) == MODE_INT
&& cmp_mode != VOIDmode
+ /* ??? Work-around optimizer issues on ia64. */
+ && cmp_mode != BImode
+ && mode != BImode
&& nonzero_bits (op0, cmp_mode) == 1
&& STORE_FLAG_VALUE == 1)
{
This area is such a mine-field, no wonder bit-field manipulations
are so poorly optimized in GCC 4.0. Sorry again for the breakage.
Roger
--