mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-27 15:29:51 +00:00
This conversion was done with the following bash script: find test/Transforms -name "*.ll" | \ while read NAME; do echo "$NAME" if ! grep -q "^; *RUN: *llc" $NAME; then TEMP=`mktemp -t temp` cp $NAME $TEMP sed -n "s/^define [^@]*@\([A-Za-z0-9_]*\)(.*$/\1/p" < $NAME | \ while read FUNC; do sed -i '' "s/;\(.*\)\([A-Za-z0-9_]*\):\( *\)define\([^@]*\)@$FUNC\([( ]*\)\$/;\1\2-LABEL:\3define\4@$FUNC(/g" $TEMP done mv $TEMP $NAME fi done git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186269 91177308-0d34-0410-b5e6-96231b3b80d8
32 lines
1.0 KiB
LLVM
32 lines
1.0 KiB
LLVM
; RUN: opt -objc-arc -S < %s | FileCheck %s
|
|
|
|
; Don't hoist @objc_release past a use of its pointer, even
|
|
; if the use has function type, because clang uses function types
|
|
; in dubious ways.
|
|
; rdar://10551239
|
|
|
|
; CHECK-LABEL: define void @test0(
|
|
; CHECK: %otherBlock = phi void ()* [ %b1, %if.then ], [ null, %entry ]
|
|
; CHECK-NEXT: call void @use_fptr(void ()* %otherBlock)
|
|
; CHECK-NEXT: %tmp11 = bitcast void ()* %otherBlock to i8*
|
|
; CHECK-NEXT: call void @objc_release(i8* %tmp11)
|
|
|
|
define void @test0(i1 %tobool, void ()* %b1) {
|
|
entry:
|
|
br i1 %tobool, label %if.end, label %if.then
|
|
|
|
if.then: ; preds = %entry
|
|
br label %if.end
|
|
|
|
if.end: ; preds = %if.then, %entry
|
|
%otherBlock = phi void ()* [ %b1, %if.then ], [ null, %entry ]
|
|
call void @use_fptr(void ()* %otherBlock)
|
|
%tmp11 = bitcast void ()* %otherBlock to i8*
|
|
call void @objc_release(i8* %tmp11) nounwind
|
|
ret void
|
|
}
|
|
|
|
declare void @use_fptr(void ()*)
|
|
declare void @objc_release(i8*)
|
|
|