[PATCH] D118118: [SDAG] Preserve unpredictable metadata, teach X86CmovConversion to respect this metadata

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat May 20 09:51:02 PDT 2023


nikic added inline comments.


================
Comment at: llvm/lib/Target/X86/X86CmovConversion.cpp:312
+      if (I.getFlag(MachineInstr::MIFlag::Unpredictable))
+        continue;
+  
----------------
Is it safe to just skip it entirely, or do we need to treat it as a non-cmov instruction?


================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:26486
   SDValue Ops[] = { Op2, Op1, CC, Cond };
   return DAG.getNode(X86ISD::CMOV, DL, Op.getValueType(), Ops);
 }
----------------
Is it possible to directly pass the flags here instead? Seems odd to use FlagInserter for a single instruction.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D118118/new/

https://reviews.llvm.org/D118118



More information about the llvm-commits mailing list