diff options
author | Maciej W. Rozycki <macro@linux-mips.org> | 2020-12-05 18:26:24 +0000 |
---|---|---|
committer | Maciej W. Rozycki <macro@linux-mips.org> | 2020-12-05 18:26:24 +0000 |
commit | 94f336768e199bc268c30446a63b49a53b02f648 (patch) | |
tree | e07763d50091f4a513e97be7e7e2e472dc64c3ff /gcc/ifcvt.c | |
parent | da749b98cf9d87ebed92de08ff45f8a0d7fc9d1a (diff) | |
download | gcc-94f336768e199bc268c30446a63b49a53b02f648.zip gcc-94f336768e199bc268c30446a63b49a53b02f648.tar.gz gcc-94f336768e199bc268c30446a63b49a53b02f648.tar.bz2 |
ifcvt: Add missing call to `onlyjump_p'
Do not convert a conditional jump into conditional execution (and remove
the jump as a consequence) if the jump has side effects.
gcc/
* ifcvt.c (dead_or_predicable) [!IFCVT_MODIFY_TESTS]: Bail out
if `!onlyjump_p'.
Diffstat (limited to 'gcc/ifcvt.c')
-rw-r--r-- | gcc/ifcvt.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c index a9ea7b1..0bd05dc 100644 --- a/gcc/ifcvt.c +++ b/gcc/ifcvt.c @@ -5127,6 +5127,11 @@ dead_or_predicable (basic_block test_bb, basic_block merge_bb, rtx cond; + /* If the conditional jump is more than just a conditional jump, + then we cannot do conditional execution conversion on this block. */ + if (!onlyjump_p (jump)) + goto nce; + cond = cond_exec_get_condition (jump); if (! cond) return FALSE; @@ -5154,6 +5159,7 @@ dead_or_predicable (basic_block test_bb, basic_block merge_bb, earliest = jump; } + nce: #endif /* If we allocated new pseudos (e.g. in the conditional move |