Fix fast-isel to avoid selecting the return instruction if a
[oota-llvm.git] / test / CodeGen / X86 / tailcall-fastisel.ll
1 ; RUN: llc < %s -march=x86-64 -tailcallopt -fast-isel | grep TAILCALL
2
3 ; Fast-isel shouldn't attempt to handle this tail call, and it should
4 ; cleanly terminate instruction selection in the block after it's
5 ; done to avoid emitting invalid MachineInstrs.
6
7 %0 = type { i64, i32, i8* }
8
9 define fastcc i8* @"visit_array_aux<`Reference>"(%0 %arg, i32 %arg1) nounwind {
10 fail:                                             ; preds = %entry
11   %tmp20 = tail call fastcc i8* @"visit_array_aux<`Reference>"(%0 %arg, i32 undef) ; <i8*> [#uses=1]
12   ret i8* %tmp20
13 }