gcc.old: vax: PR port-vax/57646 patch provided by Kalvis Duckmanton [18/21]

use the extzv instruction pattern for logical shifts right
This commit is contained in:
rin 2023-10-07 12:10:02 +00:00
parent 89d7e2380b
commit 6246f04f35
1 changed files with 5 additions and 1 deletions

View File

@ -733,7 +733,7 @@
(minus:QI (const_int 32)
(match_dup 4)))
(set (match_operand:SI 0 "nonimmediate_operand" "=g")
(zero_extract:SI (match_operand:SI 1 "register_operand" "r")
(zero_extract:SI (match_operand:SI 1 "general_operand" "g")
(match_dup 3)
(match_operand:SI 2 "register_operand" "g")))]
""
@ -741,6 +741,10 @@
{
operands[3] = gen_reg_rtx (QImode);
operands[4] = gen_lowpart (QImode, operands[2]);
operands[4] = gen_rtx_MINUS (QImode, GEN_INT (32), operands[4]);
emit_move_insn (operands[3], operands[4]);
emit_insn (gen_extzv (operands[0], operands[1], operands[3], operands[2]));
DONE;
}")
;; Rotate right on the VAX works by negating the shift count.