Propagate debug loc info for MULHS.
authorBill Wendling <isanbard@gmail.com>
Fri, 30 Jan 2009 03:00:18 +0000 (03:00 +0000)
committerBill Wendling <isanbard@gmail.com>
Fri, 30 Jan 2009 03:00:18 +0000 (03:00 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63375 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/DAGCombiner.cpp

index 9794644bc92e16b5d3a190c4fe451ae8f5149f4f..6511233dd1925339930ee99acda936b496d35c4f 100644 (file)
@@ -1603,8 +1603,8 @@ SDValue DAGCombiner::visitMULHS(SDNode *N) {
     return N1;
   // fold (mulhs x, 1) -> (sra x, size(x)-1)
   if (N1C && N1C->getAPIntValue() == 1)
-    return DAG.getNode(ISD::SRA, N0.getValueType(), N0, 
-                       DAG.getConstant(N0.getValueType().getSizeInBits()-1,
+    return DAG.getNode(ISD::SRA, N->getDebugLoc(), N0.getValueType(), N0,
+                       DAG.getConstant(N0.getValueType().getSizeInBits() - 1,
                                        TLI.getShiftAmountTy()));
   // fold (mulhs x, undef) -> 0
   if (N0.getOpcode() == ISD::UNDEF || N1.getOpcode() == ISD::UNDEF)