Revert "[llvm] Improve llvm.objectsize computation by computing GEP, alloca and mallo...
[llvm-project.git] / clang / test / CodeGen / attr-coldhot.c
blobaa8c1dd1f972cdd13eed3a9ba64f1c83975cd41d
1 // RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s -check-prefixes=CHECK,O0
2 // RUN: %clang_cc1 -emit-llvm %s -o - -O1 -disable-llvm-passes | FileCheck %s -check-prefixes=CHECK,O1
4 int test1(void) __attribute__((__cold__)) {
5 return 42;
7 // Check that we set the optsize attribute on the function.
8 // CHECK: @test1{{.*}}[[ATTR:#[0-9]+]]
9 // CHECK: ret
12 // O0: attributes [[ATTR]] = { {{.*}}cold{{.*}}optnone{{.*}} }
13 // O1: attributes [[ATTR]] = { {{.*}}cold{{.*}}optsize{{.*}} }