1 ; RUN: llc -O2 -tail-dup-size=100 -enable-tail-merge=0 < %s | FileCheck %s
2 target triple = "nvptx64-nvidia-cuda"
5 declare void @llvm.nvvm.barrier0()
7 ; syncthreads shouldn't be duplicated.
8 ; CHECK: .func call_syncthreads
11 define void @call_syncthreads(i32* %a, i32* %b, i1 %cond, i1 %cond2) nounwind {
12 br i1 %cond, label %L1, label %L2
13 br i1 %cond2, label %Ret, label %L1
23 call void @llvm.nvvm.barrier0()
27 ; Check that call_syncthreads really does trigger tail duplication.
28 ; CHECK: .func call_foo
31 define void @call_foo(i32* %a, i32* %b, i1 %cond, i1 %cond2) nounwind {
32 br i1 %cond, label %L1, label %L2
33 br i1 %cond2, label %Ret, label %L1