[PATCH 2/2] Fix xxeval predicates.

In doing the patch to move the XX* built-in functions from altivec.md to
vsx.md, 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.

gcc/
2021-05-18  Michael Meissner  <meiss...@linux.ibm.com>

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

diff --git a/gcc/config/rs6000/vsx.md b/gcc/config/rs6000/vsx.md
index a859038d399..15a8c0e22d8 100644
--- a/gcc/config/rs6000/vsx.md
+++ b/gcc/config/rs6000/vsx.md
@@ -6410,9 +6410,9 @@ (define_insn "xxpermx_inst"
 ;; XXEVAL built-in function support
 (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