From: Alan Modra <amodra@gmail.com>
To: Segher Boessenkool <segher@kernel.crashing.org>
Cc: Peter Bergner <bergner@vnet.ibm.com>,
David Edelsohn <dje.gcc@gmail.com>,
GCC Patches <gcc-patches@gcc.gnu.org>,
Ulrich Weigand <uweigand@de.ibm.com>,
Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Subject: Re: [PATCH, rs6000] Fix PR target/71733, ICE with -mcpu=power9 -mno-vsx
Date: Thu, 14 Jul 2016 02:44:00 -0000 [thread overview]
Message-ID: <20160714024410.GD1632@bubble.grove.modra.org> (raw)
In-Reply-To: <20160713114621.GA9048@gate.crashing.org>
On Wed, Jul 13, 2016 at 06:46:22AM -0500, Segher Boessenkool wrote:
> On Wed, Jul 13, 2016 at 02:57:01PM +0930, Alan Modra wrote:
> > This is what I've bootstrapped and regression tested on
> > powerpc64le-linux. I'm using Peter's testcases from this thread
> > rather than the one in the original patch submission, because that one
> > relies on -O0 not reducing the function down to a nop. OK to apply?
>
> This is okay. Does it need a backport? Okay for 6 as well, then.
Yes, gcc-6 needs the patch too.
> We all agreed the question marks would be a good idea, but you say it
> causes some testcases to fail. Could you investigate please?
After much head-scratching (danger of splinters) I noticed that I'd
written '*?r' in the patch rather than '?*r'. That explained failures
like gcc.target/powerpc/ppc-vector-memset.c using gprs rather than vrs
for the memset expansion. According to md.text, '*' says the
following char should be ignored when choosing register preferences.
(Which is a bug, since the advent of multi-char constraints, and
potentially affects us with our use of constraint strings like "?*wb".)
Anyway, what was ignored for reg allocation was the '?', not 'r'.
Also, '*Y' is a bit pointless since 'Y' isn't a register constraint.
The '*' belongs on the corresponding operand 1 'r'.
I also saw ICEs in rs6000_split_multireg_move on a number of
gcc.dg/vmx testcases, but the ICEs disappeared with the constraints
fixed. I can't give you the exact rtl involved now since my debug
session had a connection timeout, but it was this assert:
gcc_assert (GET_CODE (XEXP (dst, 0)) == PLUS
&& REG_P (basereg)
&& REG_P (offsetreg)
&& REGNO (basereg) != REGNO (offsetreg));
and we had an altivec MEM with an AND address for the destination of a
SET with gprs for the source. Probably quite easily fixed by
stripping off the AND.
The following has now been bootstrapped and regression tested on
powerpc64le-linux. OK for mainline?
* gcc/config/rs6000/altivec.md (altivec_mov<mode>): Disparage
gpr alternatives. Correct '*' placement on Y,r alternative.
Add '*' on operand 1 of r,r alternative.
diff --git a/gcc/config/rs6000/altivec.md b/gcc/config/rs6000/altivec.md
index aa01ac9..9193f07 100644
--- a/gcc/config/rs6000/altivec.md
+++ b/gcc/config/rs6000/altivec.md
@@ -222,8 +222,8 @@
;; Vector move instructions.
(define_insn "*altivec_mov<mode>"
- [(set (match_operand:VM2 0 "nonimmediate_operand" "=Z,v,v,*Y,*r,*r,v,v,*r")
- (match_operand:VM2 1 "input_operand" "v,Z,v,r,Y,r,j,W,W"))]
+ [(set (match_operand:VM2 0 "nonimmediate_operand" "=Z,v,v,?Y,?*r,?*r,v,v,?*r")
+ (match_operand:VM2 1 "input_operand" "v,Z,v,*r,Y,*r,j,W,W"))]
"VECTOR_MEM_ALTIVEC_P (<MODE>mode)
&& (register_operand (operands[0], <MODE>mode)
|| register_operand (operands[1], <MODE>mode))"
--
Alan Modra
Australia Development Lab, IBM
next prev parent reply other threads:[~2016-07-14 2:44 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-06 2:27 Peter Bergner
2016-07-06 17:54 ` David Edelsohn
2016-07-06 18:02 ` Peter Bergner
2016-07-09 15:27 ` Peter Bergner
2016-07-11 6:37 ` Alan Modra
2016-07-11 9:09 ` Segher Boessenkool
2016-07-11 13:26 ` Ulrich Weigand
2016-07-12 10:41 ` Alan Modra
2016-07-12 12:03 ` Ulrich Weigand
2016-07-12 13:48 ` Alan Modra
2016-07-12 14:17 ` Ulrich Weigand
2016-07-13 0:57 ` Alan Modra
2016-07-13 5:27 ` Alan Modra
2016-07-13 11:46 ` Segher Boessenkool
2016-07-14 2:44 ` Alan Modra [this message]
2016-07-14 2:52 ` Alan Modra
2016-07-14 13:55 ` Segher Boessenkool
2016-07-21 1:51 ` Peter Bergner
2016-07-21 8:26 ` Alan Modra
2016-07-21 11:24 ` Peter Bergner
2016-07-06 19:20 ` Michael Meissner
2016-07-06 22:01 ` Peter Bergner
2016-07-06 23:29 ` Michael Meissner
2016-07-09 14:31 ` Peter Bergner
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=20160714024410.GD1632@bubble.grove.modra.org \
--to=amodra@gmail.com \
--cc=bergner@vnet.ibm.com \
--cc=dje.gcc@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=segher@kernel.crashing.org \
--cc=uweigand@de.ibm.com \
--cc=wschmidt@linux.vnet.ibm.com \
/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).