public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/62025] [4.9/4.10 Regression] Miscompilation of openssl sha512.c
Date: Tue, 12 Aug 2014 08:17:00 -0000	[thread overview]
Message-ID: <bug-62025-4-fZiEHlsgP9@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-62025-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62025

--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Jeffrey A. Law from comment #6)
> It's late and I need to catch some zzzs. But as I hinted in my prior update,
> I think we may chasing something latent.   I would recommend looking very
> closely at r204497, which my bisecting implicated as the failing commit for
> a severely hacked up test.
> 
> Reverting r204497 by hand on the trunk results in the original testcase
> working properly.  I'm too tired to really analyze, but I think it's worth a
> looksie.

I never said r207605 was the buggy change, after all, as only the EPILOGUE_USES
definition itself makes the code misbehave, it is clear it only triggers a
latent issue.  For any case we need to find out what is actually miscompiled in
the testcase and from that why.
I've tried this morning following hack on top of r207605:
--- sched-deps.c.xx    2014-08-11 12:05:39.000000000 +0200
+++ sched-deps.c    2014-08-12 09:51:48.540485357 +0200
@@ -3034,6 +3034,14 @@ sched_analyze_insn (struct deps_desc *de
       || (NONJUMP_INSN_P (insn) && control_flow_insn_p (insn)))
     reg_pending_barrier = MOVE_BARRIER;

+  if (!DEBUG_INSN_P (insn) && reload_completed && getenv ("SKIPB") && getenv
("SKIPE"))
+    {
+      static int cntskip;
+      ++cntskip;
+      if (cntskip > atoi (getenv ("SKIPB")) && cntskip < atoi (getenv
("SKIPE")))
+    reg_pending_barrier = TRUE_BARRIER;
+    }
+
   if (sched_pressure != SCHED_PRESSURE_NONE)
     {
       setup_insn_reg_uses (deps, insn);

and it seems that with:
./cc1 -m31 -O2 -march=z196 -mtune=z10 sha.c -o sha1.s -quiet -nostdinc;
SKIPB=6261 SKIPE=6263 ./cc1 -m31 -O2 -march=z196 -mtune=z10 sha.c -o sha2.s
-quiet -nostdinc
sha1.s is expectedly miscompiled, while sha2.s gives the correct result and
differs just in a single true barrier during sched2, i.e. no changes in split2
dump, and just small amount of changes in the sched2 dump.


  parent reply	other threads:[~2014-08-12  8:17 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-62025-4@http.gcc.gnu.org/bugzilla/>
2014-08-05 14:58 ` jakub at gcc dot gnu.org
2014-08-05 15:02 ` jakub at gcc dot gnu.org
2014-08-11 14:02 ` jakub at gcc dot gnu.org
2014-08-11 16:47 ` jakub at gcc dot gnu.org
2014-08-12  4:07 ` law at redhat dot com
2014-08-12  6:52 ` amker at gcc dot gnu.org
2014-08-12  6:53 ` law at redhat dot com
2014-08-12  8:17 ` jakub at gcc dot gnu.org [this message]
2014-08-12  8:55 ` jakub at gcc dot gnu.org
2014-08-12  9:57 ` jakub at gcc dot gnu.org
2014-08-12 10:38 ` amker at gcc dot gnu.org
2014-08-12 11:06 ` jakub at gcc dot gnu.org
2014-08-12 11:47 ` jakub at gcc dot gnu.org
2014-08-12 12:17 ` jakub at gcc dot gnu.org
2014-08-12 14:30 ` law at redhat dot com
2014-08-12 21:25 ` jakub at gcc dot gnu.org
2014-08-12 22:04 ` jakub at gcc dot gnu.org
2014-08-13  4:22 ` amker.cheng at gmail dot com
2014-08-13 16:25 ` [Bug target/62025] [4.9/5 " jakub at gcc dot gnu.org
2014-08-13 16:27 ` jakub at gcc dot gnu.org
2014-09-01 11:16 ` jakub at gcc dot gnu.org
2014-09-01 11:50 ` jakub at gcc dot gnu.org
2014-10-14 14:01 ` jakub at gcc dot gnu.org

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=bug-62025-4-fZiEHlsgP9@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).