public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/clyon/heads/mve-autovec)] arm: Fix constraint check for V8HI in mve_vector_mem_operand
@ 2022-02-22 9:08 Christophe Lyon
0 siblings, 0 replies; only message in thread
From: Christophe Lyon @ 2022-02-22 9:08 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:d7876d4fb9cb5e00b19ce40e4af2c6206484abf2
commit d7876d4fb9cb5e00b19ce40e4af2c6206484abf2
Author: Christophe Lyon <christophe.lyon@foss.st.com>
Date: Wed Dec 8 08:01:07 2021 +0000
arm: Fix constraint check for V8HI in mve_vector_mem_operand
When compiling gcc.target/arm/mve/intrinsics/mve_immediates_1_n.c with
-mthumb -mfloat-abi=hard -march=armv8.1-m.main+mve.fp+fp.dp, the compiler
crashes because:
error: insn does not satisfy its constraints:
(insn 28 14 17 2 (set (reg:V8HI 16 s0 [orig:249 u16 ] [249])
(mem/c:V8HI (pre_modify:SI (reg/f:SI 12 ip [248])
(plus:SI (reg/f:SI 12 ip [248])
(const_int 32 [0x20]))) [1 u16+0 S16 A64])) "arm_mve.h":17113:10 3011 {*mve_movv8hi}
(expr_list:REG_INC (reg/f:SI 12 ip [248])
(nil)))
during RTL pass: reload
We are trying to generate:
vldrh.16 q3, [ip], #14
but the constraint check fails because ip is not a low reg.
This patch replaces LAST_LO_REGNUM by LAST_ARM_REGNUM in
mve_vector_mem_operand and avoids the ICE.
2022-01-13 Christophe Lyon <christophe.lyon@foss.st.com>
gcc/
* config/arm/arm.c (mve_vector_mem_operand): Fix handling of V8HI.
Diff:
---
gcc/config/arm/arm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 7d56fa71806..5edca248fb7 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -13479,7 +13479,7 @@ mve_vector_mem_operand (machine_mode mode, rtx op, bool strict)
case E_V4HImode:
case E_V4HFmode:
if (val % 2 == 0 && abs (val) <= 254)
- return reg_no <= LAST_LO_REGNUM
+ return reg_no <= LAST_ARM_REGNUM
|| reg_no >= FIRST_PSEUDO_REGISTER;
return FALSE;
case E_V4SImode:
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-02-22 9:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-22 9:08 [gcc(refs/users/clyon/heads/mve-autovec)] arm: Fix constraint check for V8HI in mve_vector_mem_operand 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).