re PR target/79752 (incorrect code generation for __divkf3 with -O2 -mcpu=power9)
authorAaron Sawdey <acsawdey@linux.vnet.ibm.com>
Wed, 1 Mar 2017 19:58:05 +0000 (19:58 +0000)
committerAaron Sawdey <acsawdey@gcc.gnu.org>
Wed, 1 Mar 2017 19:58:05 +0000 (13:58 -0600)
2017-03-01  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>

        PR target/79752
        * config/rs6000/rs6000.md (peephole2 for udiv/umod): Should emit
        udiv rather than div since input pattern is unsigned.

From-SVN: r245817

gcc/ChangeLog
gcc/config/rs6000/rs6000.md

index d791c18..f2fb7ff 100644 (file)
@@ -1,3 +1,9 @@
+2017-03-01  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
+
+       PR target/79752
+       * config/rs6000/rs6000.md (peephole2 for udiv/umod): Should emit
+       udiv rather than div since input pattern is unsigned.
+
 2017-03-01  Uros Bizjak  <ubizjak@gmail.com>
 
        * config/i386/i386.c (print_reg): Warn for values of
index 06c0a8b..466075a 100644 (file)
    && ! reg_mentioned_p (operands[3], operands[1])
    && ! reg_mentioned_p (operands[3], operands[2])"
   [(set (match_dup 0)
-       (div:GPR (match_dup 1)
-                (match_dup 2)))
+       (udiv:GPR (match_dup 1)
+                 (match_dup 2)))
    (set (match_dup 3)
        (mult:GPR (match_dup 0)
                  (match_dup 2)))