blob: cea18a05efb298981a42bf6bf26e81fb32992ee5 [file] [log] [blame]
Dan Gohmanf2f6ce62009-09-11 18:01:28 +00001; RUN: opt < %s -constmerge -S | grep foo
2; RUN: opt < %s -constmerge -S | grep bar
Chris Lattner1159e8d2006-03-07 17:56:31 +00003
4; Don't merge constants in different sections.
5
Tanya Lattnerec9a35a2008-03-01 09:15:35 +00006@G1 = internal constant i32 1, section "foo" ; <i32*> [#uses=1]
7@G2 = internal constant i32 1, section "bar" ; <i32*> [#uses=1]
8@G3 = internal constant i32 1, section "bar" ; <i32*> [#uses=1]
Chris Lattner1159e8d2006-03-07 17:56:31 +00009
Tanya Lattnerec9a35a2008-03-01 09:15:35 +000010define void @test(i32** %P1, i32** %P2, i32** %P3) {
11 store i32* @G1, i32** %P1
12 store i32* @G2, i32** %P2
13 store i32* @G3, i32** %P3
14 ret void
Chris Lattner1159e8d2006-03-07 17:56:31 +000015}
Tanya Lattnerec9a35a2008-03-01 09:15:35 +000016