aboutsummaryrefslogtreecommitdiff
path: root/test/Transforms/GlobalOpt/cleanup-pointer-root-users.ll
blob: 0d5cbf533303268dfbfbd0f8954243b689eaff17 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
; RUN: opt -globalopt -S -o - < %s | FileCheck %s

@test1 = internal global i8* null

define void @test1a() {
; CHECK: @test1a
; CHECK-NOT: store
; CHECK-NEXT: ret void
  store i8* null, i8** @test1
  ret void
}

define void @test1b(i8* %p) {
; CHECK: @test1b
; CHECK-NEXT: store
; CHECK-NEXT: ret void
  store i8* %p, i8** @test1
  ret void
}