mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
Teach SimplifyLibCalls to fold memcmp calls with constant arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86141 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -17,6 +17,10 @@ define void @test(i8* %P, i8* %Q, i32 %N, i32* %IP, i1* %BP) {
|
||||
%D = call i32 @memcmp( i8* %P, i8* %Q, i32 2 ) ; <i32> [#uses=1]
|
||||
%E = icmp eq i32 %D, 0 ; <i1> [#uses=1]
|
||||
volatile store i1 %E, i1* %BP
|
||||
%F = call i32 @memcmp(i8* getelementptr ([4 x i8]* @hel, i32 0, i32 0),
|
||||
i8* getelementptr ([8 x i8]* @hello_u, i32 0, i32 0),
|
||||
i32 3)
|
||||
volatile store i32 %F, i32* %IP
|
||||
ret void
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user