aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUros Bizjak <ubizjak@gmail.com>2019-03-28 20:33:22 +0100
committerUros Bizjak <uros@gcc.gnu.org>2019-03-28 20:33:22 +0100
commitddfd99ac13bf63ba7cb9ca30cd9b16d41f5c664a (patch)
tree198907e8e1491170b4d29b1d6500a2b121d2c7a8
parent198c27e98311d1d3561f154e75a9df23bff8bacf (diff)
downloadgcc-ddfd99ac13bf63ba7cb9ca30cd9b16d41f5c664a.zip
gcc-ddfd99ac13bf63ba7cb9ca30cd9b16d41f5c664a.tar.gz
gcc-ddfd99ac13bf63ba7cb9ca30cd9b16d41f5c664a.tar.bz2
re PR rtl-optimization/89865 (FAIL: gcc.target/i386/pr49095.c scan-assembler-times \\\\), % 45)
PR target/89865 * config/i386/i386.md (RMW operation with LEA peephole): Use LEAMODE mode attribute instead of SWI mode iterator for LEA pattern. From-SVN: r270004
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/i386/i386.md30
2 files changed, 23 insertions, 14 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 2ce4215..9bd3092 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,12 @@
2019-03-28 Uroš Bizjak <ubizjak@gmail.com>
+ PR target/89865
+ * config/i386/i386.md (RMW operation with LEA peephole):
+ Use LEAMODE mode attribute instead of SWI mode iterator for
+ LEA pattern.
+
+2019-03-28 Uroš Bizjak <ubizjak@gmail.com>
+
PR target/89848
* config/i386/i386.c (dimode_scalar_chain::make_vector_copies):
Also process XEXP (src, 0) of a shift insn.
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index 90f1660..46277f1 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -18684,14 +18684,16 @@
(define_peephole2
[(set (match_operand:SWI 0 "register_operand")
(match_operand:SWI 1 "memory_operand"))
- (set (match_operand:SWI 3 "register_operand")
- (plus:SWI (match_dup 0)
- (match_operand:SWI 2 "<nonmemory_operand>")))
- (set (match_dup 1) (match_dup 3))
- (set (reg FLAGS_REG) (compare (match_dup 3) (const_int 0)))]
+ (set (match_operand:<LEAMODE> 3 "register_operand")
+ (plus:<LEAMODE> (match_operand:<LEAMODE> 4 "register_operand")
+ (match_operand:<LEAMODE> 2 "<nonmemory_operand>")))
+ (set (match_dup 1) (match_operand:SWI 5 "register_operand"))
+ (set (reg FLAGS_REG) (compare (match_dup 5) (const_int 0)))]
"(TARGET_READ_MODIFY_WRITE || optimize_insn_for_size_p ())
+ && REGNO (operands[4]) == REGNO (operands[0])
+ && REGNO (operands[5]) == REGNO (operands[3])
&& peep2_reg_dead_p (4, operands[3])
- && (rtx_equal_p (operands[0], operands[3])
+ && ((REGNO (operands[0]) == REGNO (operands[3]))
|| peep2_reg_dead_p (2, operands[0]))
&& !reg_overlap_mentioned_p (operands[0], operands[1])
&& !reg_overlap_mentioned_p (operands[3], operands[1])
@@ -18700,17 +18702,17 @@
|| immediate_operand (operands[2], QImode)
|| any_QIreg_operand (operands[2], QImode))
&& ix86_match_ccmode (peep2_next_insn (3), CCGOCmode)"
- [(parallel [(set (match_dup 4) (match_dup 6))
- (set (match_dup 1) (match_dup 5))])]
+ [(parallel [(set (match_dup 6) (match_dup 8))
+ (set (match_dup 1) (match_dup 7))])]
{
- operands[4] = SET_DEST (PATTERN (peep2_next_insn (3)));
- operands[5]
+ operands[6] = SET_DEST (PATTERN (peep2_next_insn (3)));
+ operands[7]
= gen_rtx_PLUS (<MODE>mode,
copy_rtx (operands[1]),
- operands[2]);
- operands[6]
- = gen_rtx_COMPARE (GET_MODE (operands[4]),
- copy_rtx (operands[5]),
+ gen_lowpart (<MODE>mode, operands[2]));
+ operands[8]
+ = gen_rtx_COMPARE (GET_MODE (operands[6]),
+ copy_rtx (operands[7]),
const0_rtx);
})