diff options
author | pinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-11-03 20:01:11 +0000 |
---|---|---|
committer | pinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-11-03 20:01:11 +0000 |
commit | c73ab5c3a23a1017d0933ba26352c1b6bd746ece (patch) | |
tree | c8ab09c6904c340aa47a4de712cf27d753b2ada0 /gcc/loop-doloop.c | |
parent | 24d2c876914b1353f5be3304ecf62a31bd725aaf (diff) | |
download | gcc-c73ab5c3a23a1017d0933ba26352c1b6bd746ece.tar.gz |
2008-11-03 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR rtl-opt/37782
* loop-doloop.c (doloop_modify): Add from_mode argument that says what
mode count is in.
(doloop_optimize): Update call to doloop_modify.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@141558 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/loop-doloop.c')
-rw-r--r-- | gcc/loop-doloop.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/gcc/loop-doloop.c b/gcc/loop-doloop.c index 25369dd4a4d..1f5856f581b 100644 --- a/gcc/loop-doloop.c +++ b/gcc/loop-doloop.c @@ -335,11 +335,12 @@ add_test (rtx cond, edge *e, basic_block dest) end of the loop. CONDITION is the condition separated from the DOLOOP_SEQ. COUNT is the number of iterations of the LOOP. ZERO_EXTEND_P says to zero extend COUNT after the increment of it to - word_mode. */ + word_mode from FROM_MODE. */ static void doloop_modify (struct loop *loop, struct niter_desc *desc, - rtx doloop_seq, rtx condition, rtx count, bool zero_extend_p) + rtx doloop_seq, rtx condition, rtx count, + bool zero_extend_p, enum machine_mode from_mode) { rtx counter_reg; rtx tmp, noloop = NULL_RTX; @@ -413,11 +414,11 @@ doloop_modify (struct loop *loop, struct niter_desc *desc, } if (increment_count) - count = simplify_gen_binary (PLUS, mode, count, const1_rtx); + count = simplify_gen_binary (PLUS, from_mode, count, const1_rtx); if (zero_extend_p) count = simplify_gen_unary (ZERO_EXTEND, word_mode, - count, mode); + count, from_mode); /* Insert initialization of the count register into the loop header. */ start_sequence (); @@ -672,7 +673,8 @@ doloop_optimize (struct loop *loop) return false; } - doloop_modify (loop, desc, doloop_seq, condition, count, zero_extend_p); + doloop_modify (loop, desc, doloop_seq, condition, count, + zero_extend_p, mode); return true; } |