In hexagon convertToHardwareLoop, don't deref end() iterator
authorMatthew Curtis <mcurtis@codeaurora.org>
Fri, 7 Dec 2012 21:03:15 +0000 (21:03 +0000)
committerMatthew Curtis <mcurtis@codeaurora.org>
Fri, 7 Dec 2012 21:03:15 +0000 (21:03 +0000)
commitade50dc6c7d18ba2e47aab7e535c709de76fe152
tree5818f3fcb468e1a73c315d2b11e637e996edbbf0
parent6cd738f33934a93b114d7dd9e4291f87f445c5c4
In hexagon convertToHardwareLoop, don't deref end() iterator

In particular, check if MachineBasicBlock::iterator is end() before
using it to call getDebugLoc();

See also this thread on llvm-commits:
   http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20121112/155914.html

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169634 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/Hexagon/HexagonHardwareLoops.cpp
test/CodeGen/Hexagon/postinc-load.ll