diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2018-03-06 20:41:37 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2018-03-06 20:41:37 +0000 |
commit | 49fa017b8a54c2dd061549e70716f455a0abb2c6 (patch) | |
tree | 26d9143b9f0c8efc23a075271e91492c87be6419 | |
parent | 97891b715970826522c9b52bcc467615bd2f3fcb (diff) | |
download | gcc-49fa017b8a54c2dd061549e70716f455a0abb2c6.tar.gz |
PR target/84710
* combine.c (try_combine): Use reg_or_subregno instead of handling
just paradoxical SUBREGs and REGs.
* gcc.dg/pr84710.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@258301 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/combine.c | 8 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/pr84710.c | 13 |
4 files changed, 26 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 130aec7ad02..8cf95c71786 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2018-03-06 Jakub Jelinek <jakub@redhat.com> + + PR target/84710 + * combine.c (try_combine): Use reg_or_subregno instead of handling + just paradoxical SUBREGs and REGs. + 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com> * config/arc/arc.c (arc_finalize_pic): Remove function. diff --git a/gcc/combine.c b/gcc/combine.c index a4efd11703c..c9105ed02b3 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -4283,12 +4283,8 @@ try_combine (rtx_insn *i3, rtx_insn *i2, rtx_insn *i1, rtx_insn *i0, if (GET_CODE (x) == PARALLEL) x = XVECEXP (newi2pat, 0, 0); - /* It can only be a SET of a REG or of a paradoxical SUBREG of a REG. */ - x = SET_DEST (x); - if (paradoxical_subreg_p (x)) - x = SUBREG_REG (x); - - unsigned int regno = REGNO (x); + /* It can only be a SET of a REG or of a SUBREG of a REG. */ + unsigned int regno = reg_or_subregno (SET_DEST (x)); bool done = false; for (rtx_insn *insn = NEXT_INSN (i3); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 46a329aad3e..c78c70bc931 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2018-03-06 Jakub Jelinek <jakub@redhat.com> + + PR target/84710 + * gcc.dg/pr84710.c: New test. + 2018-03-06 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/56667 diff --git a/gcc/testsuite/gcc.dg/pr84710.c b/gcc/testsuite/gcc.dg/pr84710.c new file mode 100644 index 00000000000..6477244860c --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr84710.c @@ -0,0 +1,13 @@ +/* PR target/84710 */ +/* { dg-do compile } */ +/* { dg-options "-O -fno-forward-propagate" } */ + +char a; +int b; + +void +foo (void) +{ + int d; + b = __builtin_mul_overflow ((char) d, 0xfe, &a); +} |