]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: i386.c (ix86_split_idivmod): Use mode instead of always SImode for DIV...
authorJakub Jelinek <jakub@redhat.com>
Mon, 2 Oct 2017 18:42:08 +0000 (20:42 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 2 Oct 2017 18:42:08 +0000 (20:42 +0200)
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: r253363

gcc/ChangeLog
gcc/config/i386/i386.c

index 4591363a3be8b2a23695a9041bc62e6a2787a1e8..b9ba2f359f7788b2031954dde5235edf7a25a10f 100644 (file)
@@ -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
index 627091d19a64f874ba37fd9570684660410515cb..2f313bd646461c210769538482731ca7de5dad29 100644 (file)
@@ -19672,13 +19672,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.  */