llvm-6502/test/Transforms/SimplifyLibCalls/Puts.ll
Patrik Hägglund 834518f1ce Disallow the undocumented practice of starting the datalayout string with '-'.
Update some test cases accordingly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168516 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-23 14:51:42 +00:00

16 lines
370 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
}