This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, i386]: Fix PR 91385, Zero-extended negation is not generated
- From: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: Uros Bizjak <ubizjak at gmail dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 7 Aug 2019 17:17:52 -0500
- Subject: Re: [PATCH, i386]: Fix PR 91385, Zero-extended negation is not generated
- References: <CAFULd4ar4aGmXp1owMU2V0ivM+M_O5G5+zfmi_4kJNxtLYYJug@mail.gmail.com>
On Wed, Aug 07, 2019 at 08:37:52PM +0200, Uros Bizjak wrote:
> It looks that combine lost some of its unwanted creativity. Added
> testcase will keep it that way.
Huh, I wonder why it ever did that :-) Strange.
> -;; Combine is quite creative about this pattern.
> (define_insn "*negsi2_1_zext"
> [(set (match_operand:DI 0 "register_operand" "=r")
> - (lshiftrt:DI
> - (neg:DI (ashift:DI (match_operand:DI 1 "register_operand" "0")
> - (const_int 32)))
> - (const_int 32)))
> + (zero_extend:DI
> + (neg:SI (match_operand:SI 1 "register_operand" "0"))))
> (clobber (reg:CC FLAGS_REG))]
Thanks for adding a testcase!
Segher