diff options
Diffstat (limited to 'llvm/test/Bitcode/use-list-order.ll')
-rw-r--r-- | llvm/test/Bitcode/use-list-order.ll | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/test/Bitcode/use-list-order.ll b/llvm/test/Bitcode/use-list-order.ll index bb71a8586b7..fb18b462da5 100644 --- a/llvm/test/Bitcode/use-list-order.ll +++ b/llvm/test/Bitcode/use-list-order.ll @@ -17,6 +17,11 @@ @var2 = global i3* @target @var3 = global i3* @target +; Check use-list order for a global when used both by a global and in a +; function. +@globalAndFunction = global i4 4 +@globalAndFunctionGlobalUser = global i4* @globalAndFunction + define i64 @f(i64 %f) { entry: %sum = add i64 %f, 0 @@ -94,3 +99,9 @@ first: %gotosecond = icmp slt i32 %gh, -9 br i1 %gotosecond, label %second, label %exit } + +define i4 @globalAndFunctionFunctionUser() { +entry: + %local = load i4* @globalAndFunction + ret i4 %local +} |