mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-14 00:32:55 +00:00
[objc-arc] Committed test for r185770 as per dblaikie's suggestion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185782 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d56e7e198d
commit
2abe4eeaf9
@ -3,6 +3,8 @@
|
||||
@x = common global i8* null, align 8
|
||||
|
||||
declare i8* @objc_retain(i8*)
|
||||
declare i32 @objc_sync_enter(i8*)
|
||||
declare i32 @objc_sync_exit(i8*)
|
||||
|
||||
; GVN should be able to eliminate this redundant load, with ARC-specific
|
||||
; alias analysis.
|
||||
@ -20,3 +22,20 @@ entry:
|
||||
%t = load i8** @x
|
||||
ret i8* %t
|
||||
}
|
||||
|
||||
; GVN should not be able to eliminate this redundant load, with ARC-specific
|
||||
; alias analysis.
|
||||
|
||||
; CHECK: define i8* @test1
|
||||
; CHECK: load
|
||||
; CHECK: load
|
||||
; CHECK: ret i8* %t
|
||||
; CHECK: }
|
||||
define i8* @test1(i32 %n) nounwind {
|
||||
entry:
|
||||
%s = load i8** @x
|
||||
%0 = call i32 @objc_sync_enter(i8* %s)
|
||||
%t = load i8** @x
|
||||
%1 = call i32 @objc_sync_exit(i8* %s)
|
||||
ret i8* %t
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user