mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
f6c9646a94
We're moving ARC optimisation and ARC emission in clang away from runtime methods and towards intrinsics. This is the part which actually uses the intrinsics in the ARC optimizer when both analyzing the existing calls and emitting new ones. Differential Revision: https://reviews.llvm.org/D55348 Reviewers: ahatanak llvm-svn: 349534
15 lines
373 B
LLVM
15 lines
373 B
LLVM
; RUN: opt -objc-arc-contract -S < %s | FileCheck %s
|
|
|
|
declare i8* @llvm.objc.initWeak(i8**, i8*)
|
|
|
|
; Convert objc_initWeak(p, null) to *p = null.
|
|
|
|
; CHECK: define i8* @test0(i8** %p) {
|
|
; CHECK-NEXT: store i8* null, i8** %p
|
|
; CHECK-NEXT: ret i8* null
|
|
; CHECK-NEXT: }
|
|
define i8* @test0(i8** %p) {
|
|
%t = call i8* @llvm.objc.initWeak(i8** %p, i8* null)
|
|
ret i8* %t
|
|
}
|