[llvm] [X86][APX] Exclusively emit setzucc to avoid false dependency (PR #142092)
Phoebe Wang via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 12 17:56:02 PDT 2025
================
@@ -79,10 +79,11 @@ bool X86FixupSetCCPass::runOnMachineFunction(MachineFunction &MF) {
if (MI.definesRegister(X86::EFLAGS, /*TRI=*/nullptr))
FlagsDefMI = &MI;
- // Find a setcc that is used by a zext.
+ // Find a setcc/setzucc (if ZU is enabled) that is used by a zext.
// This doesn't have to be the only use, the transformation is safe
// regardless.
- if (MI.getOpcode() != X86::SETCCr)
+ if (MI.getOpcode() != X86::SETCCr &&
+ (!ST->hasZU() || MI.getOpcode() != X86::SETZUCCr))
----------------
phoebewang wrote:
`hasZU` is not needed.
https://github.com/llvm/llvm-project/pull/142092
More information about the llvm-commits
mailing list