diff options
author | Maciej W. Rozycki <macro@linux-mips.org> | 2020-12-05 18:26:25 +0000 |
---|---|---|
committer | Maciej W. Rozycki <macro@linux-mips.org> | 2020-12-05 18:26:25 +0000 |
commit | 4b70b2e07a589c4d50e14fa597eb164375a10a20 (patch) | |
tree | 893a9f47d32dad11196741d9275f0a27b009c53d /gcc/loop-doloop.c | |
parent | 64880a7c49e2f60d1ccabf6798f5b0ea8234edc1 (diff) | |
download | gcc-4b70b2e07a589c4d50e14fa597eb164375a10a20.zip gcc-4b70b2e07a589c4d50e14fa597eb164375a10a20.tar.gz gcc-4b70b2e07a589c4d50e14fa597eb164375a10a20.tar.bz2 |
loop-doloop: Add missing call to `onlyjump_p'
Keep any jump that has side effects as those must not be removed.
gcc/
* loop-doloop.c (add_test): Only remove the jump if `onlyjump_p'.
Diffstat (limited to 'gcc/loop-doloop.c')
-rw-r--r-- | gcc/loop-doloop.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/loop-doloop.c b/gcc/loop-doloop.c index 02282d4..661e502 100644 --- a/gcc/loop-doloop.c +++ b/gcc/loop-doloop.c @@ -378,7 +378,7 @@ add_test (rtx cond, edge *e, basic_block dest) bb = split_edge_and_insert (*e, seq); *e = single_succ_edge (bb); - if (any_uncondjump_p (jump)) + if (any_uncondjump_p (jump) && onlyjump_p (jump)) { /* The condition is always true. */ delete_insn (jump); |