aboutsummaryrefslogtreecommitdiff
path: root/gcc/loop-iv.c
diff options
context:
space:
mode:
authorChristian Bruel <christian.bruel@st.com>2007-06-08 09:58:41 +0200
committerChristian Bruel <chrbr@gcc.gnu.org>2007-06-08 09:58:41 +0200
commit4aa97413d3845089735af2d5a5fe7b01eeae6008 (patch)
tree703c2b7fb2c08be557096002e275a7a02efaf2ad /gcc/loop-iv.c
parent1fc3998daa162619e2826523d2b9efad2a3c7725 (diff)
downloadgcc-4aa97413d3845089735af2d5a5fe7b01eeae6008.zip
gcc-4aa97413d3845089735af2d5a5fe7b01eeae6008.tar.gz
gcc-4aa97413d3845089735af2d5a5fe7b01eeae6008.tar.bz2
re PR target/29953 ([SH-4] Perfomance regression in loops. cmp/eq used instead of dt)
PR target/29953 * config/sh/sh.md (doloop_end): New pattern and splitter. * loop-iv.c (simple_rhs_p): Check for hardware registers. From-SVN: r125564
Diffstat (limited to 'gcc/loop-iv.c')
-rw-r--r--gcc/loop-iv.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/loop-iv.c b/gcc/loop-iv.c
index bdf1508..0b6d46d 100644
--- a/gcc/loop-iv.c
+++ b/gcc/loop-iv.c
@@ -1293,7 +1293,7 @@ simple_rhs_p (rtx rhs)
rtx op0, op1;
if (CONSTANT_P (rhs)
- || REG_P (rhs))
+ || (REG_P (rhs) && !HARD_REGISTER_P (rhs)))
return true;
switch (GET_CODE (rhs))
@@ -1303,9 +1303,9 @@ simple_rhs_p (rtx rhs)
op0 = XEXP (rhs, 0);
op1 = XEXP (rhs, 1);
/* Allow reg + const sets only. */
- if (REG_P (op0) && CONSTANT_P (op1))
+ if (REG_P (op0) && !HARD_REGISTER_P (op0) && CONSTANT_P (op1))
return true;
- if (REG_P (op1) && CONSTANT_P (op0))
+ if (REG_P (op1) && !HARD_REGISTER_P (op1) && CONSTANT_P (op0))
return true;
return false;