diff mbox series

[5/6] xstormy16: Fix xs_hi_nonmemory_operand

Message ID 20240620133418.350772-6-richard.sandiford@arm.com
State New
Headers show
Series Add a late-combine pass | expand

Commit Message

Richard Sandiford June 20, 2024, 1:34 p.m. UTC
All uses of xs_hi_nonmemory_operand allow constraint "i",
which means that they allow consts, symbol_refs and label_refs.
The definition of xs_hi_nonmemory_operand accounted for consts,
but not for symbol_refs and label_refs.

gcc/
	* config/stormy16/predicates.md (xs_hi_nonmemory_operand): Handle
	symbol_ref and label_ref.
---
 gcc/config/stormy16/predicates.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jeff Law June 21, 2024, 2:33 p.m. UTC | #1
On 6/20/24 7:34 AM, Richard Sandiford wrote:
> All uses of xs_hi_nonmemory_operand allow constraint "i",
> which means that they allow consts, symbol_refs and label_refs.
> The definition of xs_hi_nonmemory_operand accounted for consts,
> but not for symbol_refs and label_refs.
> 
> gcc/
> 	* config/stormy16/predicates.md (xs_hi_nonmemory_operand): Handle
> 	symbol_ref and label_ref.
OK for the trunk anytime.
jeff
diff mbox series

Patch

diff --git a/gcc/config/stormy16/predicates.md b/gcc/config/stormy16/predicates.md
index 67c2ddc107c..085c9c5ed2d 100644
--- a/gcc/config/stormy16/predicates.md
+++ b/gcc/config/stormy16/predicates.md
@@ -152,7 +152,7 @@  (define_predicate "xstormy16_carry_plus_operand"
 })
 
 (define_predicate "xs_hi_nonmemory_operand"
-  (match_code "const_int,reg,subreg,const")
+  (match_code "const_int,reg,subreg,const,symbol_ref,label_ref")
 {
   return nonmemory_operand (op, mode);
 })