aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2017-10-02 20:44:07 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2017-10-02 20:44:07 +0200
commit5874228595f3ec988cca6ac4f1e1b094c0156235 (patch)
treecafc5952007ee1fc7c1f80218bee0fbc8d85f76d
parent2bce85988254e70fbcb99920bb8d18b351fa75a0 (diff)
downloadgcc-5874228595f3ec988cca6ac4f1e1b094c0156235.zip
gcc-5874228595f3ec988cca6ac4f1e1b094c0156235.tar.gz
gcc-5874228595f3ec988cca6ac4f1e1b094c0156235.tar.bz2
backport: i386.c (ix86_split_idivmod): Use mode instead of always SImode for DIV and MOD in REG_EQUAL notes.
Backported from mainline 2017-09-30 Jakub Jelinek <jakub@redhat.com> * config/i386/i386.c (ix86_split_idivmod): Use mode instead of always SImode for DIV and MOD in REG_EQUAL notes. From-SVN: r253364
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/config/i386/i386.c8
2 files changed, 12 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index cf69cd8..86c4985 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2017-10-02 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2017-09-30 Jakub Jelinek <jakub@redhat.com>
+
+ * config/i386/i386.c (ix86_split_idivmod): Use mode instead of
+ always SImode for DIV and MOD in REG_EQUAL notes.
+
2017-10-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Backport from mainline
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 886e612..8c6a54c 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -18438,13 +18438,13 @@ ix86_split_idivmod (machine_mode mode, rtx operands[],
if (signed_p)
{
- div = gen_rtx_DIV (SImode, operands[2], operands[3]);
- mod = gen_rtx_MOD (SImode, operands[2], operands[3]);
+ div = gen_rtx_DIV (mode, operands[2], operands[3]);
+ mod = gen_rtx_MOD (mode, operands[2], operands[3]);
}
else
{
- div = gen_rtx_UDIV (SImode, operands[2], operands[3]);
- mod = gen_rtx_UMOD (SImode, operands[2], operands[3]);
+ div = gen_rtx_UDIV (mode, operands[2], operands[3]);
+ mod = gen_rtx_UMOD (mode, operands[2], operands[3]);
}
/* Extract remainder from AH. */