This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH PR62011]
- From: Yuri Rumyantsev <ysrumyan at gmail dot com>
- To: Uros Bizjak <ubizjak at gmail dot com>
- Cc: Jakub Jelinek <jakub at redhat dot com>, "H.J. Lu" <hjl dot tools at gmail dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 18 Aug 2014 11:48:45 +0400
- Subject: Re: [PATCH PR62011]
- Authentication-results: sourceware.org; auth=none
- References: <CAEoMCqRQgLeT9EpwxmX99wi=Fzc3CN2ZE4dQGATTVd8xmV1nNA at mail dot gmail dot com> <CAMe9rOqbe3Pjv=T5rid_UQje+vQEXXR8GjLcEWx+Yr7c3KCQAg at mail dot gmail dot com> <CAEoMCqT8LMm27N8tEiY3Q=W1b2g6s5SR9KT4P1MhsV8q3Mm6MA at mail dot gmail dot com> <CAEoMCqTWviiyX=LcL-pMCUhniqazcmtHpb47LCjL8vadHxrFaA at mail dot gmail dot com> <20140815115440 dot GS1784 at tucnak dot redhat dot com> <CAEoMCqS-gsjhLL5wOE3TjRmLQcre_y2aMorXzsO-4kBjby4vhA at mail dot gmail dot com> <CAFULd4b8EwhcbVYUA5OZrZO3qqgiWQpsxqmkFhiqNQszZUzDgA at mail dot gmail dot com>
Uros,
Your patch is not complete since yo missed two another bit
manipulation instruction - lzcnt and tzcnt which have the same
deficiency. Moreover, I don't think that we need to do it for INTEL
target since it is related to SILVERMONT target rather than BIG COREs.
Should I modify your patch or you do it yourself?
Thanks.
Yuri.
2014-08-15 18:06 GMT+04:00 Uros Bizjak <ubizjak@gmail.com>:
> On Fri, Aug 15, 2014 at 2:26 PM, Yuri Rumyantsev <ysrumyan@gmail.com> wrote:
>
>> Is it important to have correct value for length attribute for Big Cores?
>> As I new this attribute is used for code layout alignment.
>>
>> 2014-08-15 15:54 GMT+04:00 Jakub Jelinek <jakub@redhat.com>:
>>> On Fri, Aug 15, 2014 at 03:45:33PM +0400, Yuri Rumyantsev wrote:
>>>> gcc/ChangeLog
>>>> 2014-08-15 Yuri Rumyantsev <ysrumyan@gmail.com>
>>>>
>>>> PR target/62011
>>>> * config/i386/i386-protos.h (ix86_avoid_false_dep_for_bm): New function
>>>> prototype.
>>>> * config/i386/i386.c (ix86_avoid_false_dep_for_bm): New function.
>>>> * config/i386/i386.h (TARGET_AVOID_FALSE_DEP_FOR_BM) New macros.
>>>> * config/i386/i386.md (ctz<mode>2, clz<mode>2_lzcnt, popcount<mode>2,
>>>> *popcount<mode>2_cmp, *popcountsi2_cmp_zext): Output zeroing
>>>> destination register for unary bit-manipulation instructions
>>>> if required.
>>>> * config/i386/x86-tune.def (X86_TUNE_AVOID_FALSE_DEP_FOR_BM): New.
>
> I am testing a different approach, outlined in the attached patch. In
> the patch, insn is split after reload to separate insns.
>
> As far as popcnt is concerned, we don't need _cmp pattern, the generic
> code is clever enough to substuitute "if (popcnt (a))" with "if (a)".
>
> Uros.