Skip to content

[X86] Skylake server/client models do not declare zeroing idioms #41327

Closed
@llvmbot

Description

@llvmbot
Bugzilla Link 41982
Version trunk
OS All
Blocks #31672
Reporter LLVM Bugzilla Contributor
CC @adibiagio,@legrosbuffle,@topperc,@RKSimon,@MattPD,@rotateright

Extended Description

This seems similar: #36019

It was marked fixed, but llvm-mca is still not recognizing xor as a zeroing idiom in this simple test case. Note that the second divl has to wait for the first to finish, despite the outputs being zeroed.

~ ❯❯❯ cat asm.s
	xorl %eax, %eax
	xorl %edx, %edx
	divl %edi
~ ❯❯❯ ~/clangmr/bin/llvm-mca -timeline -timeline-max-cycles=200  ~/asm.s                                                                                                                    ✘ 130 
<snip>


Timeline view:
                    0123456789          0123456789          0123456789          0123456789          0123456789          0123456789          0123456789          0123456789  
Index     0123456789          0123456789          0123456789          0123456789          0123456789          0123456789          0123456789          0123456789          01

[0,0]     DeER .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    ..   xorl	%eax, %eax
[0,1]     DeER .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    ..   xorl	%edx, %edx
[0,2]     .DeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeER.    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    ..   divl	%edi
[1,0]     .    .D=======================================================================eER    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    ..   xorl	%eax, %eax
[1,1]     .    .D=======================================================================eER    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    ..   xorl	%edx, %edx
[1,2]     .    . D=======================================================================eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeER   ..   divl	%edi
[2,0]     .    .    . D==============================================================================================================================================eER  ..   xorl	%eax, %eax
[2,1]     .    .    . D==============================================================================================================================================eER  ..   xorl	%edx, %edx

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions