Skip to content

[X86] Recognize VPXORDZrr as a zero-idiom on Znver4 #108314

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions llvm/lib/Target/X86/X86ScheduleZnver4.td
Original file line number Diff line number Diff line change
Expand Up @@ -1855,6 +1855,14 @@ def Zn4WriteVZeroIdiomLogicX : SchedWriteVariant<[
// NOTE: PXORrr,PANDNrr are not zero-cycle!
def : InstRW<[Zn4WriteVZeroIdiomLogicX], (instrs VPXORrr, VPANDNrr)>;

// TODO: This should be extended to incorporate all of the AVX512 zeroing
// idioms that can be executed by the renamer.
def Zn4WriteVZeroIdiomLogicZ : SchedWriteVariant<[
SchedVar<MCSchedPredicate<ZeroIdiomPredicate>, [Zn4WriteZeroLatency]>,
SchedVar<NoSchedPred, [WriteVecLogicZ]>
]>;
def : InstRW<[Zn4WriteVZeroIdiomLogicZ], (instrs VPXORDZrr)>;

def Zn4WriteVZeroIdiomLogicY : SchedWriteVariant<[
SchedVar<MCSchedPredicate<ZeroIdiomPredicate>, [Zn4WriteZeroLatency]>,
SchedVar<NoSchedPred, [WriteVecLogicY]>
Expand Down Expand Up @@ -1930,6 +1938,12 @@ def : IsZeroIdiomFunction<[
VPSUBUSBYrr, VPSUBUSWYrr,
VPCMPGTBYrr, VPCMPGTWYrr, VPCMPGTDYrr, VPCMPGTQYrr
], ZeroIdiomPredicate>,

// AVX ZMM Zero-idioms.
// TODO: This should be expanded to incorporate all AVX512 zeroing idioms.
DepBreakingClass<[
VPXORDZrr
], ZeroIdiomPredicate>,
]>;

def : IsDepBreakingFunction<[
Expand Down
Loading
Loading