a576cd4813d3627d29db665636f755a2b8bc6718
[oota-llvm.git] / test / Transforms / InstCombine / no-builtin.ll
1 ; RUN: opt < %s -instcombine -S | FileCheck %s
2 @.str = private unnamed_addr constant [14 x i8] c"hello world!\0A\00", align 1
3
4 ; CHECK: @foo
5 ; CHECK: printf
6 define void @foo() nounwind ssp uwtable "no-builtin" {
7 entry:
8   %call = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([14 x i8]* @.str, i32 0, i32 0))
9   ret void
10 }
11
12 ; CHECK: @bar
13 ; CHECK: puts
14 define void @bar() nounwind ssp uwtable {
15 entry:
16   %call = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([14 x i8]* @.str, i32 0, i32 0))
17   ret void
18 }
19
20 declare i32 @printf(i8*, ...)
21
22 attributes #0 = { nounwind ssp uwtable "no-builtin" }
23 attributes #1 = { nounwind ssp uwtable }