[PATCH] D122113: [X86] Simplify the interface to getCondNoFromDesc.

Kan Shengchen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 20 21:57:15 PDT 2022


skan added inline comments.


================
Comment at: llvm/lib/Target/X86/X86InstrInfo.cpp:2593
-  unsigned NumDefs = MCID.getNumDefs();
-  // Assume that condition code is always the last operand
-  unsigned CondNo = NumOperands - 1;
----------------
Keep the comments here?


================
Comment at: llvm/lib/Target/X86/X86InstrInfo.cpp:2606
-  return static_cast<X86::CondCode>(
-      MI.getOperand(static_cast<unsigned>(CondNo)).getImm());
 }
----------------
Did you get an warning from compiler when removing this `static_cast`?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D122113



More information about the llvm-commits mailing list