[PATCH] D40792: DAG: Match truncated rotation (PR35487)

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 4 12:40:01 PST 2017


efriedma added inline comments.


================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:4657
+  if (LHS.getOpcode() == ISD::TRUNCATE && RHS.getOpcode() == ISD::TRUNCATE) {
+    assert(LHS.getValueType() == RHS.getValueType());
+    if (SDNode *Rot = MatchRotate(LHS.getOperand(0), RHS.getOperand(0), DL)) {
----------------
Do you need to check that `LHS.getOperand(0).getValueType() == RHS.getOperand(0).getValueType()`?


https://reviews.llvm.org/D40792





More information about the llvm-commits mailing list