summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoracsawdey <acsawdey@138bc75d-0d04-0410-961f-82ee72b054a4>2017-03-01 19:58:05 +0000
committeracsawdey <acsawdey@138bc75d-0d04-0410-961f-82ee72b054a4>2017-03-01 19:58:05 +0000
commit26eefb3f2204d9658519c84fc847b02501ffb712 (patch)
tree734b3f1f8788c7d385470b73b72a64029b6a3462
parentaad6a189284a79f782cbc45e60fb38bffe2ce9b2 (diff)
downloadgcc-26eefb3f2204d9658519c84fc847b02501ffb712.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@245817 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/rs6000/rs6000.md4
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d791c18247b..f2fb7ff72a0 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md
index 06c0a8b8c3e..466075a8c75 100644
--- a/gcc/config/rs6000/rs6000.md
+++ b/gcc/config/rs6000/rs6000.md
@@ -3161,8 +3161,8 @@
&& ! 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)))