diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2014-07-30 01:22:16 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2014-07-30 01:22:16 +0000 |
commit | 3cbca2055adb7f0ccedac3a01c5ca799c635a2bf (patch) | |
tree | 895ab03772e243acdb61fb84a1bd6f2eb5f5d516 /llvm/test | |
parent | ba4576daeb43f40ad8f5821c87f65fcea6a0732b (diff) | |
download | bcm5719-llvm-3cbca2055adb7f0ccedac3a01c5ca799c635a2bf.tar.gz bcm5719-llvm-3cbca2055adb7f0ccedac3a01c5ca799c635a2bf.zip |
Reapply "UseListOrder: Order GlobalValue uses after initializers"
This reverts commit r214249, reapplying r214242 and r214243, now that
r214270 has fixed the UB.
llvm-svn: 214271
Diffstat (limited to 'llvm/test')
-rw-r--r-- | llvm/test/Bitcode/local-linkage-default-visibility.3.4.ll | 1 | ||||
-rw-r--r-- | llvm/test/Bitcode/old-aliases.ll | 1 | ||||
-rw-r--r-- | llvm/test/Bitcode/use-list-order.ll | 14 |
3 files changed, 16 insertions, 0 deletions
diff --git a/llvm/test/Bitcode/local-linkage-default-visibility.3.4.ll b/llvm/test/Bitcode/local-linkage-default-visibility.3.4.ll index 45a7b1213a8..c1a9fbefe69 100644 --- a/llvm/test/Bitcode/local-linkage-default-visibility.3.4.ll +++ b/llvm/test/Bitcode/local-linkage-default-visibility.3.4.ll @@ -1,4 +1,5 @@ ; RUN: llvm-dis < %s.bc | FileCheck %s +; RUN: llvm-uselistorder < %s.bc -preserve-bc-use-list-order -num-shuffles=5 ; local-linkage-default-visibility.3.4.ll.bc was generated by passing this file ; to llvm-as-3.4. The test checks that LLVM upgrades visibility of symbols diff --git a/llvm/test/Bitcode/old-aliases.ll b/llvm/test/Bitcode/old-aliases.ll index 7a0eea2f3f2..13b6d3efa23 100644 --- a/llvm/test/Bitcode/old-aliases.ll +++ b/llvm/test/Bitcode/old-aliases.ll @@ -1,4 +1,5 @@ ; RUN: llvm-dis < %s.bc | FileCheck %s +; RUN: llvm-uselistorder < %s.bc -preserve-bc-use-list-order -num-shuffles=5 ; old-aliases.bc consist of this file assembled with an old llvm-as (3.5 trunk) ; from when aliases contained a ConstantExpr. diff --git a/llvm/test/Bitcode/use-list-order.ll b/llvm/test/Bitcode/use-list-order.ll index ac7307b2711..33cc13edb05 100644 --- a/llvm/test/Bitcode/use-list-order.ll +++ b/llvm/test/Bitcode/use-list-order.ll @@ -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 |