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

Hans Wennborg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 4 12:49:41 PST 2017


hans 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)) {
----------------
hans wrote:
> efriedma wrote:
> > Do you need to check that `LHS.getOperand(0).getValueType() == RHS.getOperand(0).getValueType()`?
> Sorry, just hit commit before I saw this. You're right, I need to check that.
r319695


Repository:
  rL LLVM

https://reviews.llvm.org/D40792





More information about the llvm-commits mailing list