[llvm] [X86][APX] Exclusively emit setzucc to avoid false dependency (PR #142092)

Feng Zou via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 13 00:58:45 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))
----------------
fzou1 wrote:

Updated.

https://github.com/llvm/llvm-project/pull/142092


More information about the llvm-commits mailing list