public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, applied] Fixup PowerPC error from my last commit
@ 2015-11-16 22:21 Michael Meissner
  0 siblings, 0 replies; only message in thread
From: Michael Meissner @ 2015-11-16 22:21 UTC (permalink / raw)
  To: gcc-patches, dje.gcc

[-- Attachment #1: Type: text/plain, Size: 1104 bytes --]

In my last commit, I had a case where the mode iterator (VSX_L, FMOVE128_GPR)
used IFmode (IBM extended double) in code that was only meant for 128-bit types
that fit in a single vector.  In the case of VSX_L, it had a condition on the
iterator, that would never be true for IFmode.  But it didn't have the same
protection on FMOVE128_GPR, which calls an xxperm insn to reconstruct the
direct move on power8 (power8 can only move 32 or 64-bit objects directly, and
it needs to construct intermediate steps to move the value).  I have removed
IFmode from the two iterators, and for KFmode/TFmode, added a check to make
sure the type is a vector type.

Since this was breaking the build, I applied the fix directly.

2015-11-16  Michael Meissner  <meissner@linux.vnet.ibm.com>

	* config/rs6000/vsx.md (VSX_L): Do not include IBM extended double
	128-bit types, just types that fit in a single vector.
	* config/rs6000/rs6000.md (FMOVE128_GPR): Likewise.

-- 
Michael Meissner, IBM
IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA
email: meissner@linux.vnet.ibm.com, phone: +1 (978) 899-4797

[-- Attachment #2: gcc-power9.official-11b --]
[-- Type: text/plain, Size: 1492 bytes --]

Index: gcc/config/rs6000/vsx.md
===================================================================
--- gcc/config/rs6000/vsx.md	(revision 230430)
+++ gcc/config/rs6000/vsx.md	(working copy)
@@ -46,8 +46,6 @@ (define_mode_iterator VSX_DF [V2DF DF])
 (define_mode_iterator VSX_F [V4SF V2DF])
 
 ;; Iterator for logical types supported by VSX
-;; Note, IFmode won't actually be used since it isn't a VSX type, but it simplifies
-;; the code by using 128-bit iterators for floating point.
 (define_mode_iterator VSX_L [V16QI
 			     V8HI
 			     V4SI
@@ -57,8 +55,7 @@ (define_mode_iterator VSX_L [V16QI
 			     V1TI
 			     TI
 			     (KF	"FLOAT128_VECTOR_P (KFmode)")
-			     (TF	"FLOAT128_VECTOR_P (TFmode)")
-			     (IF	"FLOAT128_VECTOR_P (IFmode)")])
+			     (TF	"FLOAT128_VECTOR_P (TFmode)")])
 
 ;; Iterator for memory move.  Handle TImode specially to allow
 ;; it to use gprs as well as vsx registers.
Index: gcc/config/rs6000/rs6000.md
===================================================================
--- gcc/config/rs6000/rs6000.md	(revision 230430)
+++ gcc/config/rs6000/rs6000.md	(working copy)
@@ -409,9 +409,8 @@ (define_mode_iterator FMOVE128_GPR [(TI 
 				    (V2DI  "")
 				    (V2DF  "")
 				    (V1TI  "")
-				    (KF    "")
-				    (TF    "")
-				    (IF    "")])
+				    (KF    "FLOAT128_VECTOR_P (KFmode)")
+				    (TF    "FLOAT128_VECTOR_P (TFmode)")])
 
 ; Iterator for 128-bit VSX types for pack/unpack
 (define_mode_iterator FMOVE128_VSX [V1TI KF])

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-11-16 22:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-16 22:21 [PATCH, applied] Fixup PowerPC error from my last commit Michael Meissner

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).