1 ; RUN: opt -S -passes=instcombine <%s | FileCheck %s
2 ; rdar://problem/16165191
3 ; llvm.compiler.used functions should not be renamed
5 target triple = "x86_64-apple-darwin11"
7 @llvm.compiler.used = appending global [1 x ptr] [
9 ], section "llvm.metadata"
10 @llvm.used = appending global [1 x ptr] [
12 ], section "llvm.metadata"
14 @str = private unnamed_addr constant [13 x i8] c"hello world\0A\00"
16 define i32 @uses_printf(i32 %i) {
18 call i32 (ptr, ...) @printf(ptr @str)
22 define internal i32 @printf(ptr readonly nocapture %fmt, ...) {
24 %ret = call i32 @bar(ptr %fmt)
28 ; CHECK: define {{.*}} @puts(
29 define internal i32 @puts(ptr %s) {
31 %ret = call i32 @bar(ptr %s)