diff options
author | Owen Anderson <resistor@mac.com> | 2011-06-27 18:34:12 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2011-06-27 18:34:12 +0000 |
commit | 702110159a53481227b01fed81fa4eec0ad3cc46 (patch) | |
tree | 3f2524e699a770f04898a330f0e8789ae7345202 /lib | |
parent | 73f50d9bc3bd46cc0abeba9bb0d46977ba1aea42 (diff) |
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
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.h b/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.h index 3ad2bd6ca6..9c27b2ea02 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(); |