Reapply "UseListOrder: Order GlobalValue uses after initializers"

This reverts commit r214249, reapplying r214242 and r214243, now that
r214270 has fixed the UB.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214271 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan P. N. Exon Smith
2014-07-30 01:22:16 +00:00
parent c128f3b34c
commit cd29d80204
4 changed files with 71 additions and 14 deletions

View File

@ -3,6 +3,20 @@
@a = global [4 x i1] [i1 0, i1 1, i1 0, i1 1]
@b = alias i1* getelementptr ([4 x i1]* @a, i64 0, i64 2)
; Check use-list order of constants used by globals.
@glob1 = global i5 7
@glob2 = global i5 7
@glob3 = global i5 7
; Check use-list order between variables and aliases.
@target = global i3 zeroinitializer
@alias1 = alias i3* @target
@alias2 = alias i3* @target
@alias3 = alias i3* @target
@var1 = global i3* @target
@var2 = global i3* @target
@var3 = global i3* @target
define i64 @f(i64 %f) {
entry:
%sum = add i64 %f, 0