From: Aaron Sawdey Date: Wed, 1 Mar 2017 19:58:05 +0000 (+0000) Subject: re PR target/79752 (incorrect code generation for __divkf3 with -O2 -mcpu=power9) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=af15f9938b40bd59c891c75436590157385d0013;p=gcc.git re PR target/79752 (incorrect code generation for __divkf3 with -O2 -mcpu=power9) 2017-03-01 Aaron Sawdey 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 --- 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 + + 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 * 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)))