blob: 48431434cc613f70711a3c8425aeca6e3f92a8b7 [file] [log] [blame]
Anders Carlsson303023d2010-11-30 06:19:18 +00001; Test that the PutsOptimizer works correctly
2; RUN: opt < %s -simplify-libcalls -S | FileCheck %s
3
4target datalayout = "-p:64:64:64"
5
6@.str = private constant [1 x i8] zeroinitializer
7
8declare i32 @puts(i8*)
9
10define void @foo() {
11entry:
12; CHECK: call i32 @putchar(i32 10)
13 %call = call i32 @puts(i8* getelementptr inbounds ([1 x i8]* @.str, i32 0, i32 0))
14 ret void
15}