diff options
Diffstat (limited to 'llvm')
4 files changed, 11 insertions, 3 deletions
diff --git a/llvm/test/Regression/Transforms/GlobalConstifier/basictest.llx b/llvm/test/Regression/Transforms/GlobalConstifier/basictest.llx index 8305b8130a4..46fac76433b 100644 --- a/llvm/test/Regression/Transforms/GlobalConstifier/basictest.llx +++ b/llvm/test/Regression/Transforms/GlobalConstifier/basictest.llx @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s | opt -constify | llvm-dis | not grep global +; RUN: llvm-as < %s | opt -globalopt | llvm-dis | not grep global %X = internal global int 4 diff --git a/llvm/test/Regression/Transforms/GlobalConstifier/deadglobal.llx b/llvm/test/Regression/Transforms/GlobalConstifier/deadglobal.llx new file mode 100644 index 00000000000..c0819c0c648 --- /dev/null +++ b/llvm/test/Regression/Transforms/GlobalConstifier/deadglobal.llx @@ -0,0 +1,8 @@ +; RUN: llvm-as < %s | opt -globalopt | llvm-dis | not grep internal + +%G = internal global int 123 + +void %foo() { + store int 1, int* %G + ret void +} diff --git a/llvm/test/Regression/Transforms/GlobalConstifier/phi-select.llx b/llvm/test/Regression/Transforms/GlobalConstifier/phi-select.llx index 633ecd920eb..29890600def 100644 --- a/llvm/test/Regression/Transforms/GlobalConstifier/phi-select.llx +++ b/llvm/test/Regression/Transforms/GlobalConstifier/phi-select.llx @@ -1,7 +1,7 @@ ; Test that PHI nodes and select instructions do not necessarily make stuff ; non-constant. -; RUN: llvm-as < %s | opt -constify | llvm-dis | not grep global +; RUN: llvm-as < %s | opt -globalopt | llvm-dis | not grep global %X = internal global int 4 %Y = internal global int 5 diff --git a/llvm/test/Regression/Transforms/GlobalConstifier/trivialstore.llx b/llvm/test/Regression/Transforms/GlobalConstifier/trivialstore.llx index c84d1fc1338..af2d61287c2 100644 --- a/llvm/test/Regression/Transforms/GlobalConstifier/trivialstore.llx +++ b/llvm/test/Regression/Transforms/GlobalConstifier/trivialstore.llx @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s | opt -constify | llvm-dis | not grep G +; RUN: llvm-as < %s | opt -globalopt | llvm-dis | not grep G %G = internal global int 17 |