public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel.crashing.org>
To: David Edelsohn <dje.gcc@gmail.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] rs6000: Handle "d" output in the bd*z patterns (PR70098)
Date: Sun, 13 Mar 2016 18:52:00 -0000	[thread overview]
Message-ID: <20160313185213.GA10657@gate.crashing.org> (raw)
In-Reply-To: <CAGWvnymHBzUiH5_qDTyvwZK2_tKazTsiVibB-h+xEQmF=1aWuQ@mail.gmail.com>

On Sat, Mar 12, 2016 at 09:59:12AM -0500, David Edelsohn wrote:
> > 2016-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
> >
> >         PR target/70098
> >         * config/rs6000/rs6000.md (*ctr<mode>_internal1, *ctr<mode>_internal2,
> >         *ctr<mode>_internal5, *ctr<mode>_internal6): Also allow "d" as output.
> >         (define_split for the GPR case): Use int_reg_operand instead of
> >         gpc_reg_operand for the output.
> >
> > gcc/testsuite/
> >         PR target/70098
> >         * g++.dg/pr70098.C: New testcase.
> 
> This is okay.
> 
> The testcase will need some XFAILs.

That wasn't so easy.  I came up with the following; okay as well?
(I'll fold it before committing).


Segher


gcc/testsuite/
	* lib/target-supports.exp (check_effective_target_powerpc64_no_dm):
	New function.


diff --git a/gcc/testsuite/g++.dg/pr70098.C b/gcc/testsuite/g++.dg/pr70098.C
index c7b4f63..f5eb48f 100644
--- a/gcc/testsuite/g++.dg/pr70098.C
+++ b/gcc/testsuite/g++.dg/pr70098.C
@@ -2,6 +2,8 @@
 // { dg-do compile }
 // { dg-options -O2 }
 // { dg-require-effective-target c++11 }
+// { dg-xfail-if "PR70098" { lp64 && powerpc64_no_dm } }
+// { dg-prune-output ".*internal compiler error.*" }
 
 template < typename > struct traits;
 template < typename, int _Rows, int _Cols, int = 0, int = _Rows,
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 5af139b..49b82c3 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -1629,6 +1629,19 @@ proc check_effective_target_avx_runtime { } {
     return 0
 }
 
+# Return 1 if we are compiling for 64-bit PowerPC but we do not use direct
+# move instructions for moves from GPR to FPR.
+
+proc check_effective_target_powerpc64_no_dm { } {
+    # The "mulld" checks if we are generating PowerPC64 code.  The "lfd"
+    # checks if we do not use direct moves, but use the old-fashioned
+    # slower move-via-the-stack.
+    return [check_no_messages_and_pattern powerpc64_no_dm \
+	{\mmulld\M.*\mlfd} assembly {
+	    double f(long long x) { return x*x; }
+	} {-O2}]
+}
+
 # Return 1 if the target supports executing power8 vector instructions, 0
 # otherwise.  Cache the result.
 

  reply	other threads:[~2016-03-13 18:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-12 13:55 Segher Boessenkool
2016-03-12 14:59 ` David Edelsohn
2016-03-13 18:52   ` Segher Boessenkool [this message]
2016-03-13 21:55     ` David Edelsohn
2016-03-13 22:16       ` Segher Boessenkool

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=20160313185213.GA10657@gate.crashing.org \
    --to=segher@kernel.crashing.org \
    --cc=dje.gcc@gmail.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).