aboutsummaryrefslogtreecommitdiff
path: root/gcc/loop.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@gcc.gnu.org>2004-12-18 07:55:42 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2004-12-18 07:55:42 +0000
commit9f70d2bc3ae689e9fe86cd1ebd07d7b51a785e2b (patch)
tree2b690f3b251c1444c16804e71fd3a29ca5c237a2 /gcc/loop.c
parentbc6d19abb1155efe6938d3e96c409f4c10269bee (diff)
downloadgcc-9f70d2bc3ae689e9fe86cd1ebd07d7b51a785e2b.zip
gcc-9f70d2bc3ae689e9fe86cd1ebd07d7b51a785e2b.tar.gz
gcc-9f70d2bc3ae689e9fe86cd1ebd07d7b51a785e2b.tar.bz2
re PR rtl-optimization/16968 (loop optimizer miscompilation)
PR rtl-optimization/16968 * loop.c (scan_loop): Stop scanning the loop for movable insns as soon as an optimization barrier is encountered. From-SVN: r92348
Diffstat (limited to 'gcc/loop.c')
-rw-r--r--gcc/loop.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/loop.c b/gcc/loop.c
index 15039e8..faf6cb2 100644
--- a/gcc/loop.c
+++ b/gcc/loop.c
@@ -1119,6 +1119,9 @@ scan_loop (struct loop *loop, int flags)
in_libcall--;
if (NONJUMP_INSN_P (p))
{
+ /* Do not scan past an optimization barrier. */
+ if (GET_CODE (PATTERN (p)) == ASM_INPUT)
+ break;
temp = find_reg_note (p, REG_LIBCALL, NULL_RTX);
if (temp)
in_libcall++;