annotate clang/test/PCH/no-escaping-block-tail-calls.cpp @ 236:c4bab56944e8 llvm-original

LLVM 16
author kono
date Wed, 09 Nov 2022 17:45:10 +0900
parents 1d019706d866
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // RUN: %clang_cc1 -x c++-header -triple x86_64-apple-darwin11 -emit-pch -O2 -fblocks -fno-escaping-block-tail-calls -o %t %S/no-escaping-block-tail-calls.h
anatofuz
parents:
diff changeset
2 // RUN: %clang_cc1 -triple x86_64-apple-darwin11 -include-pch %t -emit-llvm -O2 -fblocks -fno-escaping-block-tail-calls -o - %s | FileCheck %s
anatofuz
parents:
diff changeset
3
anatofuz
parents:
diff changeset
4 // Check that -fno-escaping-block-tail-calls doesn't disable tail-call
anatofuz
parents:
diff changeset
5 // optimization if the block is non-escaping.
anatofuz
parents:
diff changeset
6
236
c4bab56944e8 LLVM 16
kono
parents: 150
diff changeset
7 // CHECK-LABEL: define internal noundef i32 @___ZN1S1mEv_block_invoke(
c4bab56944e8 LLVM 16
kono
parents: 150
diff changeset
8 // CHECK: %[[CALL:.*]] = tail call noundef i32 @_ZN1S3fooER2S0(
150
anatofuz
parents:
diff changeset
9 // CHECK-NEXT: ret i32 %[[CALL]]
anatofuz
parents:
diff changeset
10
anatofuz
parents:
diff changeset
11 void test() {
anatofuz
parents:
diff changeset
12 S s;
anatofuz
parents:
diff changeset
13 s.m();
anatofuz
parents:
diff changeset
14 }