[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 20:55:59 PDT 2025


================
@@ -122,7 +123,8 @@ bool X86FixupSetCCPass::runOnMachineFunction(MachineFunction &MF) {
       // register.
       Register ZeroReg = MRI->createVirtualRegister(RC);
       if (ST->hasZU()) {
-        MI.setDesc(TII->get(X86::SETZUCCr));
+        if (MI.getOpcode() != X86::SETZUCCr)
+          MI.setDesc(TII->get(X86::SETZUCCr));
----------------
phoebewang wrote:

I don't understand why NDD matters here. apx/setzucc.ll doesn't enable NDD either.

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


More information about the llvm-commits mailing list