[llvm] [X86][CodeGen] Support lowering for CCMP/CTEST (PR #91747)

via llvm-commits llvm-commits at lists.llvm.org
Fri May 24 09:32:56 PDT 2024


================
@@ -1588,8 +1596,9 @@ void X86DAGToDAGISel::PostprocessISelDAG() {
           if (And->hasAnyUseOfValue(1))
             continue;
           unsigned NewOpc;
+          unsigned NumOps = N->getNumOperands();
 #define FROM_TO(A, B)                                                          \
-  CASE_ND(A) NewOpc = X86::B;                                                  \
+  CASE_ND(A) NewOpc = NumOps > 2 ? X86::C##B : X86::B;                         \
----------------
goldsteinn wrote:

IMO just make `CTEST*` argument to `FROM_TO`.

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


More information about the llvm-commits mailing list