[Hexagon] Check for underflow/wrap in hardware loop pass
authorBrendon Cahoon <bcahoon@codeaurora.org>
Thu, 14 May 2015 14:15:08 +0000 (14:15 +0000)
committerBrendon Cahoon <bcahoon@codeaurora.org>
Thu, 14 May 2015 14:15:08 +0000 (14:15 +0000)
commit23b0065f29198c58a446c49a1f4de9c2e01d2606
tree6a881c85772edf3640cdfae3654e89d38d7419a9
parent7c7cbd26699aac513b741f10ad1fac95569ac7df
[Hexagon] Check for underflow/wrap in hardware loop pass

If the loop trip count may underflow or wrap, the compiler should
not generate a hardware loop since the trip count will be
incorrect.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237365 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/Hexagon/HexagonHardwareLoops.cpp
test/CodeGen/Hexagon/hwloop-pos-ivbump1.ll [new file with mode: 0644]
test/CodeGen/Hexagon/hwloop-recursion.ll [new file with mode: 0644]
test/CodeGen/Hexagon/hwloop-wrap.ll [new file with mode: 0644]
test/CodeGen/Hexagon/hwloop-wrap2.ll [new file with mode: 0644]