diff options
author | Jeff Law <law@redhat.com> | 2014-02-27 12:28:40 -0700 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 2014-02-27 12:28:40 -0700 |
commit | 7a76df7f955128bb5c70d67bf428b8996ad48d42 (patch) | |
tree | 930d8b6251525e36998b1ad6eca6ae6a0a95fc3f /gcc/combine.c | |
parent | 728acca06e395451f2aa26ffbadb8b90af24c90b (diff) | |
download | gcc-7a76df7f955128bb5c70d67bf428b8996ad48d42.zip gcc-7a76df7f955128bb5c70d67bf428b8996ad48d42.tar.gz gcc-7a76df7f955128bb5c70d67bf428b8996ad48d42.tar.bz2 |
re PR rtl-optimization/52714 (ICE in fixup_reorder_chain, at cfglayout.c:880)
PR rtl-optimization/52714
* combine.c (try_combine): When splitting an unrecognized PARALLEL
into two independent simple sets, if I3 is a jump, ensure the
pattern we place into I3 is a (set (pc) ...)
PR rtl-optimization/52714
* gcc.c-torture/compile/pr52714.c: New test.
From-SVN: r208204
Diffstat (limited to 'gcc/combine.c')
-rw-r--r-- | gcc/combine.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/combine.c b/gcc/combine.c index 1b598b4..fc473b6 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -3712,6 +3712,9 @@ try_combine (rtx i3, rtx i2, rtx i1, rtx i0, int *new_direct_jump_p, #ifdef HAVE_cc0 && !reg_referenced_p (cc0_rtx, set0) #endif + /* If I3 is a jump, ensure that set0 is a jump so that + we do not create invalid RTL. */ + && (!JUMP_P (i3) || SET_DEST (set0) == pc_rtx) ) { newi2pat = set1; @@ -3726,6 +3729,9 @@ try_combine (rtx i3, rtx i2, rtx i1, rtx i0, int *new_direct_jump_p, #ifdef HAVE_cc0 && !reg_referenced_p (cc0_rtx, set1) #endif + /* If I3 is a jump, ensure that set1 is a jump so that + we do not create invalid RTL. */ + && (!JUMP_P (i3) || SET_DEST (set1) == pc_rtx) ) { newi2pat = set0; |