]> 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:44:07 +0000 (20:44 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 2 Oct 2017 18:44:07 +0000 (20:44 +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: r253364

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

index cf69cd80a669e8410c36ab11399b8b87bf68afb1..86c498509f763d49eed9f6cd77071540a82a9046 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 886e612f0e4a2ccfc8dd77a796b78df6c009e14f..8c6a54cb3d9b81c664f66b209d4036b719a96556 100644 (file)
@@ -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.  */