[Bug target/79752] incorrect code generation for __divkf3 with -O2 -mcpu=power9
acsawdey at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Feb 28 21:13:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79752
--- Comment #1 from acsawdey at gcc dot gnu.org ---
Meissner spotted the cause. Verified that this fixes it:
Index: ../trunk/gcc/config/rs6000/rs6000.md
===================================================================
--- ../trunk/gcc/config/rs6000/rs6000.md (revision 245787)
+++ ../trunk/gcc/config/rs6000/rs6000.md (working copy)
@@ -3161,7 +3161,7 @@
&& ! reg_mentioned_p (operands[3], operands[1])
&& ! reg_mentioned_p (operands[3], operands[2])"
[(set (match_dup 0)
- (div:GPR (match_dup 1)
+ (udiv:GPR (match_dup 1)
(match_dup 2)))
(set (match_dup 3)
(mult:GPR (match_dup 0)
Now to bootstrap/regtest this and post.
More information about the Gcc-bugs
mailing list