diff options
author | Tom de Vries <tom@codesourcery.com> | 2018-03-20 09:14:07 +0000 |
---|---|---|
committer | Tom de Vries <vries@gcc.gnu.org> | 2018-03-20 09:14:07 +0000 |
commit | b0b592fc7b750423b8310756a24a06b2ac7e412c (patch) | |
tree | 5c3a9b59b3b4d6127fc57e45e0a1f3b47e64e9b8 | |
parent | ae6dca8c651783208564001c56786f3abc762cf3 (diff) | |
download | gcc-b0b592fc7b750423b8310756a24a06b2ac7e412c.zip gcc-b0b592fc7b750423b8310756a24a06b2ac7e412c.tar.gz gcc-b0b592fc7b750423b8310756a24a06b2ac7e412c.tar.bz2 |
[nvptx] Fix prevent_branch_around_nothing
2018-03-20 Tom de Vries <tom@codesourcery.com>
PR target/84954
* config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
seen_label if seen_label is already set.
From-SVN: r258674
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/nvptx/nvptx.c | 9 |
2 files changed, 11 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f782976..460802d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2018-03-20 Tom de Vries <tom@codesourcery.com> + + PR target/84954 + * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update + seen_label if seen_label is already set. + 2018-03-20 Jakub Jelinek <jakub@redhat.com> PR target/84945 diff --git a/gcc/config/nvptx/nvptx.c b/gcc/config/nvptx/nvptx.c index a6f4443..7b0b182 100644 --- a/gcc/config/nvptx/nvptx.c +++ b/gcc/config/nvptx/nvptx.c @@ -4419,14 +4419,15 @@ prevent_branch_around_nothing (void) rtx_insn *seen_label = NULL; for (rtx_insn *insn = get_insns (); insn; insn = NEXT_INSN (insn)) { - if (seen_label == NULL) + if (INSN_P (insn) && condjump_p (insn)) { - if (INSN_P (insn) && condjump_p (insn)) - seen_label = label_ref_label (nvptx_condjump_label (insn, false)); - + seen_label = label_ref_label (nvptx_condjump_label (insn, false)); continue; } + if (seen_label == NULL) + continue; + if (NOTE_P (insn) || DEBUG_INSN_P (insn)) continue; |