1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00
llvm-mirror/test/Transforms/SimplifyLibCalls/Puts.ll
2010-11-30 06:19:18 +00:00

16 lines
371 B
LLVM

; Test that the PutsOptimizer works correctly
; RUN: opt < %s -simplify-libcalls -S | FileCheck %s
target datalayout = "-p:64:64:64"
@.str = private constant [1 x i8] zeroinitializer
declare i32 @puts(i8*)
define void @foo() {
entry:
; CHECK: call i32 @putchar(i32 10)
%call = call i32 @puts(i8* getelementptr inbounds ([1 x i8]* @.str, i32 0, i32 0))
ret void
}