diff options
author | Owen Anderson <resistor@mac.com> | 2007-07-23 22:18:05 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2007-07-23 22:18:05 +0000 |
commit | f309070ca4e4830e8dbe031ed415a00ae6d61ec9 (patch) | |
tree | 431161e968f4477c9ae0ab0980fed1ed95a8711c /test | |
parent | 6b8894bb67d9f3a0940ac888ec56ac40e5d6c17a (diff) | |
download | external_llvm-f309070ca4e4830e8dbe031ed415a00ae6d61ec9.zip external_llvm-f309070ca4e4830e8dbe031ed415a00ae6d61ec9.tar.gz external_llvm-f309070ca4e4830e8dbe031ed415a00ae6d61ec9.tar.bz2 |
Add testcases for FastDLE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40449 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/Transforms/DeadLoadElimination/dg.exp | 3 | ||||
-rw-r--r-- | test/Transforms/DeadLoadElimination/simple.ll | 7 | ||||
-rw-r--r-- | test/Transforms/DeadLoadElimination/volatile.ll | 7 |
3 files changed, 17 insertions, 0 deletions
diff --git a/test/Transforms/DeadLoadElimination/dg.exp b/test/Transforms/DeadLoadElimination/dg.exp new file mode 100644 index 0000000..879685c --- /dev/null +++ b/test/Transforms/DeadLoadElimination/dg.exp @@ -0,0 +1,3 @@ +load_lib llvm.exp + +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] diff --git a/test/Transforms/DeadLoadElimination/simple.ll b/test/Transforms/DeadLoadElimination/simple.ll new file mode 100644 index 0000000..acfee2b --- /dev/null +++ b/test/Transforms/DeadLoadElimination/simple.ll @@ -0,0 +1,7 @@ +; RUN: llvm-as < %s | opt -fdle | llvm-dis | not grep DEAD + +define void @test(i32* %Q, i32* %P) { + %A = load i32* %Q + %DEAD = load i32* %Q ; <i32> [#uses=1] + ret void +} diff --git a/test/Transforms/DeadLoadElimination/volatile.ll b/test/Transforms/DeadLoadElimination/volatile.ll new file mode 100644 index 0000000..39d883b --- /dev/null +++ b/test/Transforms/DeadLoadElimination/volatile.ll @@ -0,0 +1,7 @@ +; RUN: llvm-as < %s | opt -fdle | llvm-dis | grep NOTDEAD + +define void @test(i32* %Q, i32* %P) { + %A = load i32* %Q + %NOTDEAD = volatile load i32* %Q ; <i32> [#uses=1] + ret void +} |