mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
fbfb1b286f
This is done to avoid odd test failures, like the one fixed in r171243. My previous regex was not good enough to find these. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171343 91177308-0d34-0410-b5e6-96231b3b80d8
26 lines
713 B
LLVM
26 lines
713 B
LLVM
; RUN: opt -tailcallelim -S < %s | FileCheck %s
|
|
; XFAIL: *
|
|
|
|
declare void @use(i8* nocapture, i8* nocapture)
|
|
|
|
define i8* @foo(i8* nocapture %A, i1 %cond) {
|
|
; CHECK: tailrecurse:
|
|
; CHECK: %A.tr = phi i8* [ %A, %0 ], [ %B, %cond_true ]
|
|
; CHECK: %cond.tr = phi i1 [ %cond, %0 ], [ false, %cond_true ]
|
|
%B = alloca i8
|
|
; CHECK: %B = alloca i8
|
|
br i1 %cond, label %cond_true, label %cond_false
|
|
; CHECK: br i1 %cond.tr, label %cond_true, label %cond_false
|
|
cond_true:
|
|
; CHECK: cond_true:
|
|
; CHECK: br label %tailrecurse
|
|
call i8* @foo(i8* %B, i1 false)
|
|
ret i8* null
|
|
cond_false:
|
|
; CHECK: cond_false
|
|
call void @use(i8* %A, i8* %B)
|
|
; CHECK: tail call void @use(i8* %A.tr, i8* %B)
|
|
ret i8* null
|
|
; CHECK: ret i8* null
|
|
}
|