mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-26 00:56:05 +00:00

Turning on `enable_noundef_analysis` flag allows better codegen by removing freeze instructions. I modified clang by renaming `enable_noundef_analysis` flag to `disable-noundef-analysis` and turning it off by default. Test updates are made as a separate patch: D108453 Reviewed By: eugenis Differential Revision: https://reviews.llvm.org/D105169
15 lines
620 B
C++
15 lines
620 B
C++
// 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
|
|
// RUN: %clang_cc1 -triple x86_64-apple-darwin11 -include-pch %t -emit-llvm -O2 -fblocks -fno-escaping-block-tail-calls -o - %s | FileCheck %s
|
|
|
|
// Check that -fno-escaping-block-tail-calls doesn't disable tail-call
|
|
// optimization if the block is non-escaping.
|
|
|
|
// CHECK-LABEL: define internal noundef i32 @___ZN1S1mEv_block_invoke(
|
|
// CHECK: %[[CALL:.*]] = tail call noundef i32 @_ZN1S3fooER2S0(
|
|
// CHECK-NEXT: ret i32 %[[CALL]]
|
|
|
|
void test() {
|
|
S s;
|
|
s.m();
|
|
}
|