From ad678cb0edb5e83aec891771440bc21b45868172 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Sun, 24 Oct 1999 21:04:49 -0700 Subject: [PATCH] i386.md (*lea_0): Collapse addsi_0, addsi_lea_[123] into a single load-address pattern. * i386.md (*lea_0): Collapse addsi_0, addsi_lea_[123] into a single load-address pattern. From-SVN: r30152 --- gcc/ChangeLog | 5 ++++ gcc/config/i386/i386.md | 52 +++-------------------------------------- 2 files changed, 8 insertions(+), 49 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index dbf80de2340..b02d218826d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Sun Oct 24 21:02:46 1999 Richard Henderson + + * i386.md (*lea_0): Collapse addsi_0, addsi_lea_[123] into + a single load-address pattern. + Sun Oct 24 19:33:24 1999 Mark P. Mitchell * haifa-sched.c (schedule_insns): Don't assign LUIDs differently diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index e6c3ddc81e2..7807b7bbd97 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -2994,16 +2994,11 @@ "" "ix86_expand_binary_operator (PLUS, SImode, operands); DONE;") -(define_insn "*addsi_0" +(define_insn "*lea_0" [(set (match_operand:SI 0 "register_operand" "=r") - (plus:SI (match_operand:SI 1 "register_operand" "r") - (match_operand:SI 2 "nonmemory_operand" "rni")))] + (match_operand:SI 1 "address_operand" "p"))] "" - "* -{ - operands[1] = SET_SRC (PATTERN (insn)); - return \"lea{l}\\t{%a1, %0|%0, %a1}\"; -}" + "lea{l}\\t{%a1, %0|%0, %a1}" [(set_attr "type" "lea")]) (define_insn "*addsi_1" @@ -3120,47 +3115,6 @@ "add{l}\\t{%2, %0|%0, %2}" [(set_attr "type" "alu")]) -;; %%% Conditionally split these post-reload for better scheduling. -(define_insn "*addsi_lea_1" - [(set (match_operand:SI 0 "register_operand" "=r") - (plus:SI (plus:SI (match_operand:SI 1 "register_operand" "r") - (match_operand:SI 2 "register_operand" "%r")) - (match_operand:SI 3 "immediate_operand" "i")))] - "" - "* -{ - operands[1] = SET_SRC (PATTERN (insn)); - return \"lea{l}\\t{%a1, %0|%0, %a1}\"; -}" - [(set_attr "type" "lea")]) - -(define_insn "*addsi_lea_2" - [(set (match_operand:SI 0 "register_operand" "=r") - (plus:SI (mult:SI (match_operand:SI 1 "reg_no_sp_operand" "r") - (match_operand:SI 2 "const248_operand" "I")) - (match_operand:SI 3 "nonmemory_operand" "ir")))] - "" - "* -{ - operands[1] = SET_SRC (PATTERN (insn)); - return \"lea{l}\\t{%a1, %0|%0, %a1}\"; -}" - [(set_attr "type" "lea")]) - -(define_insn "*addsi_lea_3" - [(set (match_operand:SI 0 "register_operand" "=r") - (plus:SI (plus:SI (mult:SI (match_operand:SI 1 "reg_no_sp_operand" "r") - (match_operand:SI 2 "const248_operand" "I")) - (match_operand:SI 3 "register_operand" "%r")) - (match_operand:SI 4 "immediate_operand" "i")))] - "" - "* -{ - operands[1] = SET_SRC (PATTERN (insn)); - return \"lea{l}\\t{%a1, %0|%0, %a1}\"; -}" - [(set_attr "type" "lea")]) - (define_expand "addhi3" [(parallel [(set (match_operand:HI 0 "general_operand" "") (plus:HI (match_operand:HI 1 "nonimmediate_operand" "")