1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-02-01 05:01:59 +01:00
Eric Christopher a62270de2c Revert "Temporarily Revert "Add basic loop fusion pass.""
The reversion apparently deleted the test/Transforms directory.

Will be re-reverting again.

llvm-svn: 358552
2019-04-17 04:52:47 +00:00

95 lines
3.0 KiB
LLVM

; RUN: opt -objc-arc-expand -S < %s | FileCheck %s
target datalayout = "e-p:64:64:64"
declare i8* @llvm.objc.retain(i8*)
declare i8* @llvm.objc.autorelease(i8*)
declare i8* @llvm.objc.retainAutoreleasedReturnValue(i8*)
declare i8* @llvm.objc.autoreleaseReturnValue(i8*)
declare i8* @llvm.objc.retainAutorelease(i8*)
declare i8* @llvm.objc.retainAutoreleaseReturnValue(i8*)
declare i8* @llvm.objc.retainBlock(i8*)
declare void @use_pointer(i8*)
; CHECK: define void @test_retain(i8* %x) [[NUW:#[0-9]+]] {
; CHECK: call i8* @llvm.objc.retain(i8* %x)
; CHECK: call void @use_pointer(i8* %x)
; CHECK: }
define void @test_retain(i8* %x) nounwind {
entry:
%0 = call i8* @llvm.objc.retain(i8* %x) nounwind
call void @use_pointer(i8* %0)
ret void
}
; CHECK: define void @test_retainAutoreleasedReturnValue(i8* %x) [[NUW]] {
; CHECK: call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %x)
; CHECK: call void @use_pointer(i8* %x)
; CHECK: }
define void @test_retainAutoreleasedReturnValue(i8* %x) nounwind {
entry:
%0 = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %x) nounwind
call void @use_pointer(i8* %0)
ret void
}
; CHECK: define void @test_retainAutorelease(i8* %x) [[NUW]] {
; CHECK: call i8* @llvm.objc.retainAutorelease(i8* %x)
; CHECK: call void @use_pointer(i8* %x)
; CHECK: }
define void @test_retainAutorelease(i8* %x) nounwind {
entry:
%0 = call i8* @llvm.objc.retainAutorelease(i8* %x) nounwind
call void @use_pointer(i8* %0)
ret void
}
; CHECK: define void @test_retainAutoreleaseReturnValue(i8* %x) [[NUW]] {
; CHECK: call i8* @llvm.objc.retainAutoreleaseReturnValue(i8* %x)
; CHECK: call void @use_pointer(i8* %x)
; CHECK: }
define void @test_retainAutoreleaseReturnValue(i8* %x) nounwind {
entry:
%0 = call i8* @llvm.objc.retainAutoreleaseReturnValue(i8* %x) nounwind
call void @use_pointer(i8* %0)
ret void
}
; CHECK: define void @test_autorelease(i8* %x) [[NUW]] {
; CHECK: call i8* @llvm.objc.autorelease(i8* %x)
; CHECK: call void @use_pointer(i8* %x)
; CHECK: }
define void @test_autorelease(i8* %x) nounwind {
entry:
%0 = call i8* @llvm.objc.autorelease(i8* %x) nounwind
call void @use_pointer(i8* %0)
ret void
}
; CHECK: define void @test_autoreleaseReturnValue(i8* %x) [[NUW]] {
; CHECK: call i8* @llvm.objc.autoreleaseReturnValue(i8* %x)
; CHECK: call void @use_pointer(i8* %x)
; CHECK: }
define void @test_autoreleaseReturnValue(i8* %x) nounwind {
entry:
%0 = call i8* @llvm.objc.autoreleaseReturnValue(i8* %x) nounwind
call void @use_pointer(i8* %0)
ret void
}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; RetainBlock is not strictly forwarding. Do not touch it. ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; CHECK: define void @test_retainBlock(i8* %x) [[NUW]] {
; CHECK: call i8* @llvm.objc.retainBlock(i8* %x)
; CHECK: call void @use_pointer(i8* %0)
; CHECK: }
define void @test_retainBlock(i8* %x) nounwind {
entry:
%0 = call i8* @llvm.objc.retainBlock(i8* %x) nounwind
call void @use_pointer(i8* %0)
ret void
}