summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/MI
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2016-05-06 21:47:41 +0000
committerMatthias Braun <matze@braunis.de>2016-05-06 21:47:41 +0000
commit71474e8d22ee5d35597456796334b965d0241530 (patch)
tree24d869357d4258bc0a2a14141acaf413a2083c10 /llvm/unittests/MI
parent4a3c3b66d7466ff7d04d92c976a9416876feb422 (diff)
downloadbcm5719-llvm-71474e8d22ee5d35597456796334b965d0241530.tar.gz
bcm5719-llvm-71474e8d22ee5d35597456796334b965d0241530.zip
LiveIntervalAnalysis: Fix handleMove() extending liverange for undef inputs
Fix handleMove() incorrectly extending liveranges when an undef input of a vreg was moved past the (current) end of the liverange. llvm-svn: 268805
Diffstat (limited to 'llvm/unittests/MI')
-rw-r--r--llvm/unittests/MI/LiveIntervalTest.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/unittests/MI/LiveIntervalTest.cpp b/llvm/unittests/MI/LiveIntervalTest.cpp
index 104bd7fe7fb..afd3b51793b 100644
--- a/llvm/unittests/MI/LiveIntervalTest.cpp
+++ b/llvm/unittests/MI/LiveIntervalTest.cpp
@@ -300,6 +300,17 @@ TEST(LiveIntervalTest, MoveDownKillFollowing) {
});
}
+TEST(LiveIntervalTest, MoveUndefUse) {
+ liveIntervalTest(
+" %0 = IMPLICIT_DEF\n"
+" NOOP implicit undef %0\n"
+" NOOP implicit %0\n"
+" NOOP\n",
+ [](MachineFunction &MF, LiveIntervals &LIS) {
+ testHandleMove(MF, LIS, 1, 3);
+ });
+}
+
int main(int argc, char **argv) {
::testing::InitGoogleTest(&argc, argv);
initLLVM();
OpenPOWER on IntegriCloud