• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: opt < %s -globalopt -S | FileCheck %s
2; CHECK-NOT: store
3
4@llvm.global_ctors = appending global [1 x { i32, void ()* }] [ { i32, void ()* } { i32 65535, void ()* @_GLOBAL__I__Z3foov } ]          ; <[1 x { i32, void ()* }]*> [#uses=0]
5@X.0 = internal global i32 undef                ; <i32*> [#uses=2]
6
7define i32 @_Z3foov() {
8entry:
9        %tmp.1 = load i32, i32* @X.0         ; <i32> [#uses=1]
10        ret i32 %tmp.1
11}
12
13define internal void @_GLOBAL__I__Z3foov() {
14entry:
15        store i32 1, i32* @X.0
16        ret void
17}
18