[llvm] [X86][CodeGen] Support flags copy lowering for NDD ADC/SBB/RCL/RCR (PR #79280)

via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 26 00:17:17 PST 2024


================
@@ -806,7 +811,8 @@ void X86FlagsCopyLoweringPass::rewriteArithmetic(
   // Insert an instruction that will set the flag back to the desired value.
   Register TmpReg = MRI->createVirtualRegister(PromoteRC);
   auto AddI =
-      BuildMI(MBB, MI.getIterator(), MI.getDebugLoc(), TII->get(X86::ADD8ri))
+      BuildMI(MBB, MI.getIterator(), MI.getDebugLoc(),
+              TII->get(Subtarget->hasNDD() ? X86::ADD8ri_ND : X86::ADD8ri))
----------------
XinWang10 wrote:

Do we need to use macro like GET_NDD_IF_ENABLED(OPC_ND, OPC).

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


More information about the llvm-commits mailing list