[prev in list] [next in list] [prev in thread] [next in thread]
List: gcc-bugs
Subject: [Bug target/79752] incorrect code generation for __divkf3 with -O2 -mcpu=power9
From: "meissner at linux dot vnet.ibm.com" <gcc-bugzilla () gcc ! gnu ! org>
Date: 2017-02-28 23:29:10
Message-ID: bug-79752-4-DTJlM7Lg3s () http ! gcc ! gnu ! org/bugzilla/
[Download RAW message or body]
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79752
--- Comment #2 from Michael Meissner <meissner at linux dot vnet.ibm.com> ---
On Tue, Feb 28, 2017 at 09:13:42PM +0000, acsawdey at gcc dot gnu.org wrote:
> 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.
One minor formatting nit. When you change div -> udiv, you will need to
indent the (match_dup 20 on the next line by one space.=
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic