From ab6adeb8a148ddd313e1220939bd2eb3bc63a328 Mon Sep 17 00:00:00 2001 From: "Duncan P. N. Exon Smith" Date: Thu, 31 Jul 2014 18:33:12 +0000 Subject: UseListOrder: Handle self-users Correctly sort self-users (such as PHI nodes). I added a targeted test in `test/Bitcode/use-list-order.ll` and the final missing RUN line to tests in `test/Assembly`. This is part of PR5680. llvm-svn: 214417 --- llvm/test/Bitcode/use-list-order.ll | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'llvm/test/Bitcode') diff --git a/llvm/test/Bitcode/use-list-order.ll b/llvm/test/Bitcode/use-list-order.ll index 3d3a06ca9de..293650f4082 100644 --- a/llvm/test/Bitcode/use-list-order.ll +++ b/llvm/test/Bitcode/use-list-order.ll @@ -118,3 +118,16 @@ entry: %local = load i4* @globalAndFunction ret i4 %local } + +; Check for when an instruction is its own user. +define void @selfUser() { +entry: + ret void + +loop1: + br label %loop2 + +loop2: + %var = phi i32 [ %var, %loop1 ], [ %var, %loop2 ] + br label %loop1 +} -- cgit v1.2.3