From b4e0dd8eb74ae9911b0fcb274c77a294a2961cf8 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Thu, 22 Jan 2004 03:32:20 +0000 Subject: [PATCH] i386.md: Simplify certain comparisons of const_int. * config/i386/i386.md: Simplify certain comparisons of const_int. From-SVN: r76335 --- gcc/ChangeLog | 5 +++++ gcc/config/i386/i386.md | 36 ++++++++++++------------------------ 2 files changed, 17 insertions(+), 24 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2017da34ec9..80af02b0ee4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2004-01-21 Kazu Hirata + + * config/i386/i386.md: Simplify certain comparisons of + const_int. + 2004-01-21 Andrew Pinski PR target/13785 diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 0be95d0a62f..938a40ef613 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -10638,8 +10638,7 @@ default: if (REG_P (operands[2])) return "sal{q}\t{%b2, %0|%0, %b2}"; - else if (GET_CODE (operands[2]) == CONST_INT - && INTVAL (operands[2]) == 1 + else if (operands[2] == const1_rtx && (TARGET_SHIFT1 || optimize_size)) return "sal{q}\t%0"; else @@ -10695,8 +10694,7 @@ default: if (REG_P (operands[2])) return "sal{q}\t{%b2, %0|%0, %b2}"; - else if (GET_CODE (operands[2]) == CONST_INT - && INTVAL (operands[2]) == 1 + else if (operands[2] == const1_rtx && (TARGET_SHIFT1 || optimize_size)) return "sal{q}\t%0"; else @@ -10843,8 +10841,7 @@ default: if (REG_P (operands[2])) return "sal{l}\t{%b2, %0|%0, %b2}"; - else if (GET_CODE (operands[2]) == CONST_INT - && INTVAL (operands[2]) == 1 + else if (operands[2] == const1_rtx && (TARGET_SHIFT1 || optimize_size)) return "sal{l}\t%0"; else @@ -10924,8 +10921,7 @@ default: if (REG_P (operands[2])) return "sal{l}\t{%b2, %k0|%k0, %b2}"; - else if (GET_CODE (operands[2]) == CONST_INT - && INTVAL (operands[2]) == 1 + else if (operands[2] == const1_rtx && (TARGET_SHIFT1 || optimize_size)) return "sal{l}\t%k0"; else @@ -10983,8 +10979,7 @@ default: if (REG_P (operands[2])) return "sal{l}\t{%b2, %0|%0, %b2}"; - else if (GET_CODE (operands[2]) == CONST_INT - && INTVAL (operands[2]) == 1 + else if (operands[2] == const1_rtx && (TARGET_SHIFT1 || optimize_size)) return "sal{l}\t%0"; else @@ -11022,8 +11017,7 @@ default: if (REG_P (operands[2])) return "sal{l}\t{%b2, %k0|%k0, %b2}"; - else if (GET_CODE (operands[2]) == CONST_INT - && INTVAL (operands[2]) == 1 + else if (operands[2] == const1_rtx && (TARGET_SHIFT1 || optimize_size)) return "sal{l}\t%k0"; else @@ -11067,8 +11061,7 @@ default: if (REG_P (operands[2])) return "sal{w}\t{%b2, %0|%0, %b2}"; - else if (GET_CODE (operands[2]) == CONST_INT - && INTVAL (operands[2]) == 1 + else if (operands[2] == const1_rtx && (TARGET_SHIFT1 || optimize_size)) return "sal{w}\t%0"; else @@ -11105,8 +11098,7 @@ default: if (REG_P (operands[2])) return "sal{w}\t{%b2, %0|%0, %b2}"; - else if (GET_CODE (operands[2]) == CONST_INT - && INTVAL (operands[2]) == 1 + else if (operands[2] == const1_rtx && (TARGET_SHIFT1 || optimize_size)) return "sal{w}\t%0"; else @@ -11147,8 +11139,7 @@ default: if (REG_P (operands[2])) return "sal{w}\t{%b2, %0|%0, %b2}"; - else if (GET_CODE (operands[2]) == CONST_INT - && INTVAL (operands[2]) == 1 + else if (operands[2] == const1_rtx && (TARGET_SHIFT1 || optimize_size)) return "sal{w}\t%0"; else @@ -11203,8 +11194,7 @@ else return "sal{b}\t{%b2, %0|%0, %b2}"; } - else if (GET_CODE (operands[2]) == CONST_INT - && INTVAL (operands[2]) == 1 + else if (operands[2] == const1_rtx && (TARGET_SHIFT1 || optimize_size)) { if (get_attr_mode (insn) == MODE_SI) @@ -11259,8 +11249,7 @@ else return "sal{b}\t{%b2, %0|%0, %b2}"; } - else if (GET_CODE (operands[2]) == CONST_INT - && INTVAL (operands[2]) == 1 + else if (operands[2] == const1_rtx && (TARGET_SHIFT1 || optimize_size)) { if (get_attr_mode (insn) == MODE_SI) @@ -11311,8 +11300,7 @@ default: if (REG_P (operands[2])) return "sal{b}\t{%b2, %0|%0, %b2}"; - else if (GET_CODE (operands[2]) == CONST_INT - && INTVAL (operands[2]) == 1 + else if (operands[2] == const1_rtx && (TARGET_SHIFT1 || optimize_size)) return "sal{b}\t%0"; else -- 2.30.2