From: Owen Anderson Date: Mon, 27 Jun 2011 18:34:12 +0000 (+0000) Subject: The index stored in the RegDefIter is one after the current index. When getting... X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=702110159a53481227b01fed81fa4eec0ad3cc46;p=oota-llvm.git The index stored in the RegDefIter is one after the current index. When getting the index, decrement it so that it points to the current element. Fixes an off-by-one bug encountered when trying to make use of MVT::untyped. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133923 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.h b/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.h index 3ad2bd6ca64..9c27b2ea02e 100644 --- a/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.h +++ b/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.h @@ -140,7 +140,7 @@ namespace llvm { } unsigned GetIdx() const { - return DefIdx; + return DefIdx-1; } void Advance();