[DAG] Add TODO comment regarding ADD(X,X) -> SHL(X,1) canonicalization
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 30 Apr 2020 10:22:01 +0000 (11:22 +0100)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 30 Apr 2020 11:57:16 +0000 (12:57 +0100)
As discussed on D78935

llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

index 9042f51..9b00ff8 100644 (file)
@@ -6098,6 +6098,7 @@ static SDValue extractShiftForRotate(SelectionDAG &DAG, SDValue OppShift,
   ConstantSDNode *OppShiftCst = isConstOrConstSplat(OppShift.getOperand(1));
 
   // (add v v) -> (shl v 1)
+  // TODO: Should this be a general DAG canonicalization?
   if (OppShift.getOpcode() == ISD::SRL && OppShiftCst &&
       ExtractFrom.getOpcode() == ISD::ADD &&
       ExtractFrom.getOperand(0) == ExtractFrom.getOperand(1) &&