public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/clyon/heads/mve-autovec)] fix mve pred16 handling in builtins
@ 2021-08-27 16:30 Christophe Lyon
  0 siblings, 0 replies; only message in thread
From: Christophe Lyon @ 2021-08-27 16:30 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:cce11e345baa67d33c00686b6387e05b72bb6744

commit cce11e345baa67d33c00686b6387e05b72bb6744
Author: Christophe Lyon <christophe.lyon@foss.st.com>
Date:   Fri Aug 27 15:17:25 2021 +0000

    fix mve pred16 handling in builtins

Diff:
---
 gcc/config/arm/arm-builtins.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/gcc/config/arm/arm-builtins.c b/gcc/config/arm/arm-builtins.c
index 932d0288bb3..b13bf12690b 100644
--- a/gcc/config/arm/arm-builtins.c
+++ b/gcc/config/arm/arm-builtins.c
@@ -3078,6 +3078,11 @@ arm_expand_builtin_args (rtx target, machine_mode map_mode, int fcode,
 	    case ARG_BUILTIN_COPY_TO_REG:
 	      if (POINTER_TYPE_P (TREE_TYPE (arg[argc])))
 		op[argc] = convert_memory_address (Pmode, op[argc]);
+
+	      /* MVE uses mve_pred16_t (aka HImode) for vectors of predicates.  */
+	      if (GET_MODE_CLASS (mode[argc]) == MODE_VECTOR_BOOL)
+		op[argc] = gen_lowpart (mode[argc], op[argc]);
+
 	      /*gcc_assert (GET_MODE (op[argc]) == mode[argc]); */
 	      if (!(*insn_data[icode].operand[opno].predicate)
 		  (op[argc], mode[argc]))


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

only message in thread, other threads:[~2021-08-27 16:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-27 16:30 [gcc(refs/users/clyon/heads/mve-autovec)] fix mve pred16 handling in builtins Christophe Lyon

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