[llvm] r185782 - [objc-arc] Committed test for r185770 as per dblaikie's suggestion.
Michael Gottesman
mgottesman at apple.com
Sun Jul 7 19:13:48 PDT 2013
Author: mgottesman
Date: Sun Jul 7 21:13:47 2013
New Revision: 185782
URL: http://llvm.org/viewvc/llvm-project?rev=185782&view=rev
Log:
[objc-arc] Committed test for r185770 as per dblaikie's suggestion.
Modified:
llvm/trunk/test/Transforms/ObjCARC/gvn.ll
Modified: llvm/trunk/test/Transforms/ObjCARC/gvn.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ObjCARC/gvn.ll?rev=185782&r1=185781&r2=185782&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/ObjCARC/gvn.ll (original)
+++ llvm/trunk/test/Transforms/ObjCARC/gvn.ll Sun Jul 7 21:13:47 2013
@@ -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
+}
More information about the llvm-commits
mailing list