s390: SImode pointers vs LR

Richard Henderson rth@redhat.com
Tue Jun 2 22:53:00 GMT 2015


On 06/02/2015 08:32 AM, Andreas Krebbel wrote:
> -(define_insn "*<shift><mode>3"
> +(define_insn "*<shift><mode>3_reg"
>     [(set (match_operand:GPR 0 "register_operand" "=d")
>           (SHIFT:GPR (match_operand:GPR 1 "register_operand" "<d0>")
> -                   (match_operand:SI 2 "shift_count_or_setmem_operand" "Y")))]
> +                   (match_operand:SI 2 "register_operand" "a")))]
>     ""
> -  "s<lr>l<g>\t%0,<1>%Y2"
> +  "s<lr>l<g>\t%0,<1>%2"
> +  [(set_attr "op_type"  "RS<E>")
> +   (set_attr "atype"    "reg")])
> +
> +(define_insn "*<shift><mode>3_imm"
> +  [(set (match_operand:GPR 0 "register_operand" "=d")
> +        (SHIFT:GPR (match_operand:GPR 1 "register_operand" "<d0>")
> +                   (match_operand     2 "immediate_operand" "J")))]
> +  ""
> +  "s<lr>l<g>\t%0,<1>%2"
> +  [(set_attr "op_type"  "RS<E>")
> +   (set_attr "atype"    "reg")])

These two ought not be split apart.  They're simple alternatives.  And why 
SImode?  You also shouldn't drop the mode on immediate operands.

r~

> +
> +(define_insn "*<shift><mode>3_immreg"
> +  [(set (match_operand:GPR 0 "register_operand" "=d")
> +        (SHIFT:GPR (match_operand:GPR 1 "register_operand" "<d0>")
> +		   (plus:SI
> +		    (match_operand:SI 2 "register_operand"    "a")
> +		    (match_operand    3 "immediate_operand"   "J"))))]
> +  ""
> +  "s<lr>l<g>\t%0,<1>%2(%3)"
>     [(set_attr "op_type"  "RS<E>")
>      (set_attr "atype"    "reg")])




More information about the Gcc mailing list