[llvm] [X86][CodeGen] Support lowering for CCMP/CTEST (PR #91747)
Shengchen Kan via llvm-commits
llvm-commits at lists.llvm.org
Sat May 25 19:38:43 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; \
----------------
KanRobert wrote:
We can't. The `FROM` is the operand of TEST/CTEST and is same for them. Adding `FROM_TO` for `CTEST*` would make `case FROM` duplicated.
https://github.com/llvm/llvm-project/pull/91747
More information about the llvm-commits
mailing list