Skip to content

Commit 04bcdf1

Browse files
committed
UseListOrder: Additional test coverage for r214242
r214242 was subtle enough it really deserves a targeted test with comments. This adds some global variables that trigger the relevant code path. Sorry this wasn't committed with the fix. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214243 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 9b9c195 commit 04bcdf1

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

test/Bitcode/use-list-order.ll

+14
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,20 @@
33
@a = global [4 x i1] [i1 0, i1 1, i1 0, i1 1]
44
@b = alias i1* getelementptr ([4 x i1]* @a, i64 0, i64 2)
55

6+
; Check use-list order of constants used by globals.
7+
@glob1 = global i5 7
8+
@glob2 = global i5 7
9+
@glob3 = global i5 7
10+
11+
; Check use-list order between variables and aliases.
12+
@target = global i3 zeroinitializer
13+
@alias1 = alias i3* @target
14+
@alias2 = alias i3* @target
15+
@alias3 = alias i3* @target
16+
@var1 = global i3* @target
17+
@var2 = global i3* @target
18+
@var3 = global i3* @target
19+
620
define i64 @f(i64 %f) {
721
entry:
822
%sum = add i64 %f, 0

0 commit comments

Comments
 (0)