projects
/
oota-llvm.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Don't wipe out global variables that are probably storing pointers to heap
[oota-llvm.git]
/
test
/
Transforms
/
GlobalOpt
/
cleanup-pointer-root-users.ll
1
; RUN: opt -globalopt -S -o - < %s | FileCheck %s
2
3
@test1 = internal global i8* null
4
5
define void @test1a() {
6
; CHECK: @test1a
7
; CHECK-NOT: store
8
; CHECK-NEXT: ret void
9
store i8* null, i8** @test1
10
ret void
11
}
12
13
define void @test1b(i8* %p) {
14
; CHECK: @test1b
15
; CHECK-NEXT: store
16
; CHECK-NEXT: ret void
17
store i8* %p, i8** @test1
18
ret void
19
}
20