From: Hans-Peter Nilsson <hans-peter.nilsson@axis.com>
To: gcc-patches@gcc.gnu.org
Subject: Committed: fix for PR38016 -fno-ivopts exposes CRIS port bug
Date: Wed, 05 Nov 2008 18:29:00 -0000 [thread overview]
Message-ID: <200811051828.mA5ISYJe021783@ignucius.se.axis.com> (raw)
Not so much a new bug as the fix for PR25947 being incomplete.
This was exposed by local patch, that I consider committing here
too for OPTIMIZATION_OPTIONS (but properly commenting the cause
for each, to enable simple re-testing and removal):
Index: cris.h
===================================================================
--- cris.h (revision 22658)
+++ cris.h (working copy)
@@ -335,6 +335,9 @@ extern int target_flags;
{ \
if ((OPTIMIZE) >= 2 || (SIZE)) \
flag_omit_frame_pointer = 1; \
+ flag_gcse = 0; \
+ flag_ivopts = 0; \
+ flag_tree_reassoc = 0; \
} \
while (0)
My benchmarks say those passes don't do any good on average for
CRIS. I'd be interesting to hear what -fno-tree-reassoc does
for peoples benchmarks as it seems what good it does is negated
by far by the higher register pressure for all architectures,
see PR37916.
I understand this testsuite change is preferred to adding a
special reduced version of fp-cmp-8 (whether in the generic
parts or gcc.target/cris) or extending TORTURE_OPTIONS with
-fno-ivopts (and/or -fno-gcse). Only the former option is
needed to expose the bug, but the latter makes the test fail for
more iterations. (Actually, -fno-gcse exposes a bug too,
PR38026.) Yes, gcc.c-torture/execute/ieee still needs .x files,
it doesn't understand dg- annotations.
Tested cross to cris-axis-elf on trunk and 4.3 branch, committed
to both.
gcc:
PR target/38016
* config/cris/cris.c (cris_order_for_addsi3): Test for !REG_P, not
just MEM_P.
gcc/testsuite:
PR target/38016
* gcc.c-torture/execute/ieee/pr38016.c,
gcc.c-torture/execute/ieee/pr38016.c: New test.
Index: gcc.c-torture/execute/ieee/pr38016.c
===================================================================
--- gcc.c-torture/execute/ieee/pr38016.c (revision 0)
+++ gcc.c-torture/execute/ieee/pr38016.c (revision 0)
@@ -0,0 +1 @@
+#include "fp-cmp-8.c"
Index: gcc.c-torture/execute/ieee/pr38016.x
===================================================================
--- gcc.c-torture/execute/ieee/pr38016.x (revision 0)
+++ gcc.c-torture/execute/ieee/pr38016.x (revision 0)
@@ -0,0 +1,2 @@
+lappend additional_flags "-fno-ivopts" "-fno-gcse"
+return 0
Index: config/cris/cris.c
===================================================================
--- config/cris/cris.c (revision 141613)
+++ config/cris/cris.c (working copy)
@@ -3565,14 +3565,15 @@ cris_expand_pic_call_address (rtx *opp)
}
/* Make sure operands are in the right order for an addsi3 insn as
- generated by a define_split. A MEM as the first operand isn't
- recognized by addsi3 after reload. OPERANDS contains the operands,
- with the first at OPERANDS[N] and the second at OPERANDS[N+1]. */
+ generated by a define_split. Nothing but REG_P as the first
+ operand is recognized by addsi3 after reload. OPERANDS contains
+ the operands, with the first at OPERANDS[N] and the second at
+ OPERANDS[N+1]. */
void
cris_order_for_addsi3 (rtx *operands, int n)
{
- if (MEM_P (operands[n]))
+ if (!REG_P (operands[n]))
{
rtx tem = operands[n];
operands[n] = operands[n + 1];
brgds, H-P
reply other threads:[~2008-11-05 18:29 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200811051828.mA5ISYJe021783@ignucius.se.axis.com \
--to=hans-peter.nilsson@axis.com \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).