diff options
| author | Roman Divacky <rdivacky@FreeBSD.org> | 2010-02-16 09:30:23 +0000 |
|---|---|---|
| committer | Roman Divacky <rdivacky@FreeBSD.org> | 2010-02-16 09:30:23 +0000 |
| commit | 6fe5c7aa327e188b7176daa5595bbf075a6b94df (patch) | |
| tree | 4cfca640904d1896e25032757a61f8959c066919 /test/Transforms/ConstantMerge | |
| parent | 989df958a10f0beb90b89ccadd8351cbe51d90b1 (diff) | |
Notes
Diffstat (limited to 'test/Transforms/ConstantMerge')
| -rw-r--r-- | test/Transforms/ConstantMerge/2006-03-07-DontMergeDiffSections.ll | 16 | ||||
| -rw-r--r-- | test/Transforms/ConstantMerge/dont-merge.ll | 30 |
2 files changed, 30 insertions, 16 deletions
diff --git a/test/Transforms/ConstantMerge/2006-03-07-DontMergeDiffSections.ll b/test/Transforms/ConstantMerge/2006-03-07-DontMergeDiffSections.ll deleted file mode 100644 index cea18a05efb29..0000000000000 --- a/test/Transforms/ConstantMerge/2006-03-07-DontMergeDiffSections.ll +++ /dev/null @@ -1,16 +0,0 @@ -; RUN: opt < %s -constmerge -S | grep foo -; RUN: opt < %s -constmerge -S | grep bar - -; Don't merge constants in different sections. - -@G1 = internal constant i32 1, section "foo" ; <i32*> [#uses=1] -@G2 = internal constant i32 1, section "bar" ; <i32*> [#uses=1] -@G3 = internal constant i32 1, section "bar" ; <i32*> [#uses=1] - -define void @test(i32** %P1, i32** %P2, i32** %P3) { - store i32* @G1, i32** %P1 - store i32* @G2, i32** %P2 - store i32* @G3, i32** %P3 - ret void -} - diff --git a/test/Transforms/ConstantMerge/dont-merge.ll b/test/Transforms/ConstantMerge/dont-merge.ll new file mode 100644 index 0000000000000..877cf8dc67104 --- /dev/null +++ b/test/Transforms/ConstantMerge/dont-merge.ll @@ -0,0 +1,30 @@ +; RUN: opt < %s -constmerge -S | FileCheck %s + +; Don't merge constants with specified sections. + +@T1G1 = internal constant i32 1, section "foo" +@T1G2 = internal constant i32 1, section "bar" +@T1G3 = internal constant i32 1, section "bar" + +; CHECK: @T1G1 +; CHECK: @T1G2 +; CHECK: @T1G3 + +define void @test1(i32** %P1, i32** %P2, i32** %P3) { + store i32* @T1G1, i32** %P1 + store i32* @T1G2, i32** %P2 + store i32* @T1G3, i32** %P3 + ret void +} + +@T2a = internal constant i32 224 +@T2b = internal addrspace(30) constant i32 224 + +; CHECK: @T2a +; CHECK: @T2b + +define void @test2(i32** %P1, i32 addrspace(30)** %P2) { + store i32* @T2a, i32** %P1 + store i32 addrspace(30)* @T2b, i32 addrspace(30)** %P2 + ret void +} |
