diff options
author | David Daney <ddaney@caviumnetworks.com> | 2009-07-25 20:20:59 +0000 |
---|---|---|
committer | David Daney <daney@gcc.gnu.org> | 2009-07-25 20:20:59 +0000 |
commit | ba21aba3e53b2f9e9e365eb8bfe6f40b88cd6dca (patch) | |
tree | 50bc9f05a47650fd5770e4d73e9ea1350eda9775 /gcc/cfgcleanup.c | |
parent | 504ed63a1a4f3f35a5fc774f547e4849f53dc2b4 (diff) | |
download | gcc-ba21aba3e53b2f9e9e365eb8bfe6f40b88cd6dca.tar.gz |
cfgcleanup.c (old_insns_match_p): Handle the case of empty blocks.
2009-07-25 David Daney <ddaney@caviumnetworks.com>
* cfgcleanup.c (old_insns_match_p): Handle the case of empty
blocks.
2009-07-25 David Daney <ddaney@caviumnetworks.com>
* gcc.dg/builtin-unreachable-4.c: New test.
From-SVN: r150089
Diffstat (limited to 'gcc/cfgcleanup.c')
-rw-r--r-- | gcc/cfgcleanup.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c index 757a0ffe4ca..01ddf999ed3 100644 --- a/gcc/cfgcleanup.c +++ b/gcc/cfgcleanup.c @@ -953,7 +953,12 @@ old_insns_match_p (int mode ATTRIBUTE_UNUSED, rtx i1, rtx i2) if (GET_CODE (i1) != GET_CODE (i2)) return false; - p1 = PATTERN (i1); + /* __builtin_unreachable() may lead to empty blocks (ending with + NOTE_INSN_BASIC_BLOCK). They may be crossjumped. */ + if (NOTE_INSN_BASIC_BLOCK_P (i1) && NOTE_INSN_BASIC_BLOCK_P (i2)) + return true; + + p1 = PATTERN (i1); p2 = PATTERN (i2); if (GET_CODE (p1) != GET_CODE (p2)) |