+2018-01-04 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/83628
+ * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
+ instead of MULT rtx. Update all corresponding splitters.
+ (*saddl_se): Ditto.
+ (*ssub<modesuffix>): Ditto.
+ (*ssubl_se): Ditto.
+ (*cmp_sadd_di): Update split patterns.
+ (*cmp_sadd_si): Ditto.
+ (*cmp_sadd_sidi): Ditto.
+ (*cmp_ssub_di): Ditto.
+ (*cmp_ssub_si): Ditto.
+ (*cmp_ssub_sidi): Ditto.
+ * config/alpha/predicates.md (const23_operand): New predicate.
+ * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
+ Look for ASHIFT, not MULT inner operand.
+ (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
+
2018-01-04 Martin Liska <mliska@suse.cz>
PR gcov-profile/83669
2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
- * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
- unaligned VSX load/store on P8/P9.
- (expand_block_clear): Allow the use of unaligned VSX
+ * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
+ unaligned VSX load/store on P8/P9.
+ (expand_block_clear): Allow the use of unaligned VSX
load/store on P8/P9.
2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
"! sext_add_operand (operands[2], SImode) && INTVAL (operands[2]) > 0
&& INTVAL (operands[2]) % 4 == 0"
[(set (match_dup 3) (match_dup 4))
- (set (match_dup 0) (sign_extend:DI (plus:SI (mult:SI (match_dup 3)
- (match_dup 5))
+ (set (match_dup 0) (sign_extend:DI (plus:SI (ashift:SI (match_dup 3)
+ (match_dup 5))
(match_dup 1))))]
{
HOST_WIDE_INT val = INTVAL (operands[2]) / 4;
val /= 2, mult = 8;
operands[4] = GEN_INT (val);
- operands[5] = GEN_INT (mult);
+ operands[5] = GEN_INT (exact_log2 (mult));
})
(define_split
(define_insn "*sadd<modesuffix>"
[(set (match_operand:I48MODE 0 "register_operand" "=r,r")
(plus:I48MODE
- (mult:I48MODE (match_operand:I48MODE 1 "reg_not_elim_operand" "r,r")
- (match_operand:I48MODE 2 "const48_operand" "I,I"))
+ (ashift:I48MODE (match_operand:I48MODE 1 "reg_not_elim_operand" "r,r")
+ (match_operand:I48MODE 2 "const23_operand" "I,I"))
(match_operand:I48MODE 3 "sext_add_operand" "rI,O")))]
""
"@
- s%2add<modesuffix> %1,%3,%0
- s%2sub<modesuffix> %1,%n3,%0")
+ s%P2add<modesuffix> %1,%3,%0
+ s%P2sub<modesuffix> %1,%n3,%0")
(define_insn "*saddl_se"
[(set (match_operand:DI 0 "register_operand" "=r,r")
(sign_extend:DI
- (plus:SI (mult:SI (match_operand:SI 1 "reg_not_elim_operand" "r,r")
- (match_operand:SI 2 "const48_operand" "I,I"))
+ (plus:SI (ashift:SI (match_operand:SI 1 "reg_not_elim_operand" "r,r")
+ (match_operand:SI 2 "const23_operand" "I,I"))
(match_operand:SI 3 "sext_add_operand" "rI,O"))))]
""
"@
- s%2addl %1,%3,%0
- s%2subl %1,%n3,%0")
+ s%P2addl %1,%3,%0
+ s%P2subl %1,%n3,%0")
(define_split
[(set (match_operand:DI 0 "register_operand")
(sign_extend:DI
- (plus:SI (mult:SI (match_operator:SI 1 "comparison_operator"
+ (plus:SI (ashift:SI (match_operator:SI 1 "comparison_operator"
[(match_operand 2)
(match_operand 3)])
- (match_operand:SI 4 "const48_operand"))
+ (match_operand:SI 4 "const23_operand"))
(match_operand:SI 5 "sext_add_operand"))))
(clobber (match_operand:DI 6 "reg_not_elim_operand"))]
""
[(set (match_dup 6) (match_dup 7))
(set (match_dup 0)
- (sign_extend:DI (plus:SI (mult:SI (match_dup 8) (match_dup 4))
+ (sign_extend:DI (plus:SI (ashift:SI (match_dup 8) (match_dup 4))
(match_dup 5))))]
{
operands[7] = gen_rtx_fmt_ee (GET_CODE (operands[1]), DImode,
(define_insn "*ssub<modesuffix>"
[(set (match_operand:I48MODE 0 "register_operand" "=r")
(minus:I48MODE
- (mult:I48MODE (match_operand:I48MODE 1 "reg_not_elim_operand" "r")
- (match_operand:I48MODE 2 "const48_operand" "I"))
+ (ashift:I48MODE (match_operand:I48MODE 1 "reg_not_elim_operand" "r")
+ (match_operand:I48MODE 2 "const23_operand" "I"))
(match_operand:I48MODE 3 "reg_or_8bit_operand" "rI")))]
""
- "s%2sub<modesuffix> %1,%3,%0")
+ "s%P2sub<modesuffix> %1,%3,%0")
(define_insn "*ssubl_se"
[(set (match_operand:DI 0 "register_operand" "=r")
(sign_extend:DI
- (minus:SI (mult:SI (match_operand:SI 1 "reg_not_elim_operand" "r")
- (match_operand:SI 2 "const48_operand" "I"))
+ (minus:SI (ashift:SI (match_operand:SI 1 "reg_not_elim_operand" "r")
+ (match_operand:SI 2 "const23_operand" "I"))
(match_operand:SI 3 "reg_or_8bit_operand" "rI"))))]
""
- "s%2subl %1,%3,%0")
+ "s%P2subl %1,%3,%0")
(define_insn "subv<mode>3"
[(set (match_operand:I48MODE 0 "register_operand" "=r")
[(set (match_dup 5)
(match_op_dup:DI 1 [(match_dup 2) (const_int 0)]))
(set (match_dup 0)
- (plus:DI (mult:DI (match_dup 5) (match_dup 3))
+ (plus:DI (ashift:DI (match_dup 5) (match_dup 3))
(match_dup 4)))]
{
+ operands[3] = GEN_INT (exact_log2 (INTVAL (operands [3])));
if (can_create_pseudo_p ())
operands[5] = gen_reg_rtx (DImode);
else if (reg_overlap_mentioned_p (operands[5], operands[4]))
[(set (match_dup 5)
(match_op_dup:DI 1 [(match_dup 2) (const_int 0)]))
(set (match_dup 0)
- (plus:SI (mult:SI (match_dup 6) (match_dup 3))
+ (plus:SI (ashift:SI (match_dup 6) (match_dup 3))
(match_dup 4)))]
{
+ operands[3] = GEN_INT (exact_log2 (INTVAL (operands [3])));
if (can_create_pseudo_p ())
operands[5] = gen_reg_rtx (DImode);
else if (reg_overlap_mentioned_p (operands[5], operands[4]))
[(set (match_dup 5)
(match_op_dup:DI 1 [(match_dup 2) (const_int 0)]))
(set (match_dup 0)
- (sign_extend:DI (plus:SI (mult:SI (match_dup 6) (match_dup 3))
+ (sign_extend:DI (plus:SI (ashift:SI (match_dup 6) (match_dup 3))
(match_dup 4))))]
{
+ operands[3] = GEN_INT (exact_log2 (INTVAL (operands [3])));
if (can_create_pseudo_p ())
operands[5] = gen_reg_rtx (DImode);
else if (reg_overlap_mentioned_p (operands[5], operands[4]))
[(set (match_dup 5)
(match_op_dup:DI 1 [(match_dup 2) (const_int 0)]))
(set (match_dup 0)
- (minus:DI (mult:DI (match_dup 5) (match_dup 3))
+ (minus:DI (ashift:DI (match_dup 5) (match_dup 3))
(match_dup 4)))]
{
+ operands[3] = GEN_INT (exact_log2 (INTVAL (operands [3])));
if (can_create_pseudo_p ())
operands[5] = gen_reg_rtx (DImode);
else if (reg_overlap_mentioned_p (operands[5], operands[4]))
[(set (match_dup 5)
(match_op_dup:DI 1 [(match_dup 2) (const_int 0)]))
(set (match_dup 0)
- (minus:SI (mult:SI (match_dup 6) (match_dup 3))
+ (minus:SI (ashift:SI (match_dup 6) (match_dup 3))
(match_dup 4)))]
{
+ operands[3] = GEN_INT (exact_log2 (INTVAL (operands [3])));
if (can_create_pseudo_p ())
operands[5] = gen_reg_rtx (DImode);
else if (reg_overlap_mentioned_p (operands[5], operands[4]))
[(set (match_dup 5)
(match_op_dup:DI 1 [(match_dup 2) (const_int 0)]))
(set (match_dup 0)
- (sign_extend:DI (minus:SI (mult:SI (match_dup 6) (match_dup 3))
+ (sign_extend:DI (minus:SI (ashift:SI (match_dup 6) (match_dup 3))
(match_dup 4))))]
{
+ operands[3] = GEN_INT (exact_log2 (INTVAL (operands [3])));
if (can_create_pseudo_p ())
operands[5] = gen_reg_rtx (DImode);
else if (reg_overlap_mentioned_p (operands[5], operands[4]))