This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH PR62011]


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]