[PATCH] Allow setcc (sext setcc) [0|1] [eq|ne] -> setcc

Chandler Carruth chandlerc at gmail.com
Sat Jul 19 23:43:30 PDT 2014


================
Comment at: lib/CodeGen/SelectionDAG/TargetLowering.cpp:1204
@@ +1203,3 @@
+// setcc (setcc), [0|1], [eq|ne]  -> setcc
+static SDValue setCCSetCCCombine(const TargetLowering *TLI,
+                                 TargetLowering::DAGCombinerInfo &DCI,
----------------
I would call it 'nestedSetCCCombine'?

================
Comment at: lib/CodeGen/SelectionDAG/TargetLowering.cpp:1496
@@ +1495,3 @@
+          return Ret;
+      } else if (N0.getOpcode() == ISD::SIGN_EXTEND) {
+        // setcc (sext (setcc)), [0|1], [eq|ne]  -> setcc
----------------
Why only sign_extend? if zext or anyext can't happen here, it seems worth a comment.

http://reviews.llvm.org/D4600






More information about the llvm-commits mailing list