summaryrefslogtreecommitdiff
path: root/gcc/config/arc/arc.md
diff options
context:
space:
mode:
authorClaudiu Zissulescu <claziss@gmail.com>2025-11-21 10:46:56 +0200
committerClaudiu Zissulescu <claudiu.zissulescu-ianculescu@oracle.com>2025-11-21 10:52:19 +0200
commit56595464ff06ae7bdba7848f2ae583f2cac5dcac (patch)
tree0045c6aacaa0fd6c2c6749775681b0216c7ae2cc /gcc/config/arc/arc.md
parentebabae605093e5a31c37ef6e5e3e809f13501f70 (diff)
arc: Use correct input operand for *extvsi_n_0 define_insn_and_split
Correct the split condition of the instruction to happen after reload. Relax operand 1 constrain too. gcc/ChangeLog: * config/arc/arc.md: Modify define_insn_and_split "*extvsi_n_0" gcc/testsuite/ChangeLog: * gcc.target/arc/extvsi-3.c: New test. Co-authored-by: Michiel Derhaeg <michiel@synopsys.com> Signed-off-by: Claudiu Zissulescu <claziss@gmail.com>
Diffstat (limited to 'gcc/config/arc/arc.md')
-rw-r--r--gcc/config/arc/arc.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/config/arc/arc.md b/gcc/config/arc/arc.md
index 8f7e5373fdf..55be6ce74da 100644
--- a/gcc/config/arc/arc.md
+++ b/gcc/config/arc/arc.md
@@ -6286,15 +6286,15 @@ archs4x, archs4xd"
(define_insn_and_split "*extvsi_n_0"
[(set (match_operand:SI 0 "register_operand" "=r")
- (sign_extract:SI (match_operand:SI 1 "register_operand" "0")
+ (sign_extract:SI (match_operand:SI 1 "register_operand" "r")
(match_operand:QI 2 "const_int_operand")
(const_int 0)))]
"!TARGET_BARREL_SHIFTER
&& IN_RANGE (INTVAL (operands[2]), 2,
(optimize_insn_for_size_p () ? 28 : 30))"
"#"
- "&& 1"
-[(set (match_dup 0) (and:SI (match_dup 0) (match_dup 3)))
+ "&& reload_completed"
+[(set (match_dup 0) (and:SI (match_dup 1) (match_dup 3)))
(set (match_dup 0) (xor:SI (match_dup 0) (match_dup 4)))
(set (match_dup 0) (minus:SI (match_dup 0) (match_dup 4)))]
{