[llvm] [X86][CodeGen] Support lowering for CCMP/CTEST (PR #91747)
Phoebe Wang via llvm-commits
llvm-commits at lists.llvm.org
Sat May 25 20:34:03 PDT 2024
================
@@ -1600,10 +1609,20 @@ void X86DAGToDAGISel::PostprocessISelDAG() {
#undef FROM_TO
#undef CASE_ND
// Need to swap the memory and register operand.
- SDValue Ops[] = {And.getOperand(1), And.getOperand(2),
- And.getOperand(3), And.getOperand(4),
- And.getOperand(5), And.getOperand(0),
- And.getOperand(6) /* Chain */};
+ SmallVector<SDValue> Ops = {And.getOperand(1), And.getOperand(2),
+ And.getOperand(3), And.getOperand(4),
+ And.getOperand(5), And.getOperand(0)};
+ // CC, Cflags.
+ if (IsCTESTCC) {
+ Ops.push_back(N->getOperand(2));
+ Ops.push_back(N->getOperand(3));
+ }
+ // Chain
----------------
phoebewang wrote:
Change to "Chain of the memory load"?
The `And` doesn't indicate it has a chain at the first glance.
https://github.com/llvm/llvm-project/pull/91747
More information about the llvm-commits
mailing list