This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/21017] ppc 64bit target not using rlwinm
- From: "amodra at bigpond dot net dot au" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 Sep 2005 00:37:32 -0000
- Subject: [Bug target/21017] ppc 64bit target not using rlwinm
- References: <20050414013914.21017.anton@samba.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From amodra at bigpond dot net dot au 2005-09-06 00:37 -------
Yes, we get
(ior:SI (lshiftrt:SI (subreg:SI (reg/v:DI 119 [ x ]) 4)
(const_int 16 [0x10]))
(subreg:SI (ashift:DI (reg/v:DI 119 [ x ])
(const_int 16 [0x10])) 4))
which doesn't match the test in simplify_logical to simplify to a rotate.
The second operand of ior has been "simplified" by simplify_shift_const from
(ashift:SI (subreg:SI (reg/v:DI 119 [ x ]) 4) (const_int 16 [0x10])), which, if
it was left that way, would allow a match. I think simplify_shift_const is OK
in what it's doing, ie. it is a useful optimisation in other cases, so I'll see
about matching the subreg pattern in simplify_logical.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21017