Fix xxeval predicates (PR 99921).

I originally posted this patch in May and in June.  I'm reposting it now.

I noticed that the xxeval built-in function used the altivec_register_operand
predicate.  Since it takes vsx registers, this might force the register
allocate to issue a move when it could use a traditional floating point
register.  This patch fixes that.

I have done builds on little endian power9, little endian power10, and big
endian power8 systems, and this patch caused no regressions.  Can I check it
into the master branch?

2021-08-12  Michael Meissner  <meiss...@linux.ibm.com>

gcc/
        PR target/99921
        * config/rs6000/altivec.md (xxeval): Use register_predicate
        instead of altivec_register_predicate.
---
 gcc/config/rs6000/altivec.md | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/gcc/config/rs6000/altivec.md b/gcc/config/rs6000/altivec.md
index d70c17e6bc2..fd86c300981 100644
--- a/gcc/config/rs6000/altivec.md
+++ b/gcc/config/rs6000/altivec.md
@@ -3875,9 +3875,9 @@ (define_insn "vperm_v16qiv8hi"
 
 (define_insn "xxeval"
   [(set (match_operand:V2DI 0 "register_operand" "=wa")
-       (unspec:V2DI [(match_operand:V2DI 1 "altivec_register_operand" "wa")
-                     (match_operand:V2DI 2 "altivec_register_operand" "wa")
-                     (match_operand:V2DI 3 "altivec_register_operand" "wa")
+       (unspec:V2DI [(match_operand:V2DI 1 "register_operand" "wa")
+                     (match_operand:V2DI 2 "register_operand" "wa")
+                     (match_operand:V2DI 3 "register_operand" "wa")
                      (match_operand:QI 4 "u8bit_cint_operand" "n")]
                     UNSPEC_XXEVAL))]
    "TARGET_POWER10"
-- 
2.31.1


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

Reply via email to