~ubuntu-branches/ubuntu/quantal/llvm-3.1/quantal

« back to all changes in this revision

Viewing changes to test/Transforms/SimplifyLibCalls/2009-05-30-memcmp-byte.ll

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2012-03-29 19:09:51 UTC
  • Revision ID: package-import@ubuntu.com-20120329190951-aq83ivog4cg8bxun
Tags: upstream-3.1~svn153643
ImportĀ upstreamĀ versionĀ 3.1~svn153643

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
; RUN: opt < %s -simplify-libcalls -instcombine -S | grep {ret i32 -65}
 
2
; PR4284
 
3
 
 
4
define i32 @test() nounwind {
 
5
entry:
 
6
        %c0 = alloca i8, align 1                ; <i8*> [#uses=2]
 
7
        %c2 = alloca i8, align 1                ; <i8*> [#uses=2]
 
8
        store i8 64, i8* %c0
 
9
        store i8 -127, i8* %c2
 
10
        %call = call i32 @memcmp(i8* %c0, i8* %c2, i32 1)               ; <i32> [#uses=1]
 
11
        ret i32 %call
 
12
}
 
13
 
 
14
declare i32 @memcmp(i8*, i8*, i32)