Lines Matching refs:memcmp
1 ; Test that the memcmp library call simplifier works correctly.
12 declare i32 @memcmp(i8*, i8*, i32)
14 ; Check memcmp(mem, mem, size) -> 0.
20 %ret = call i32 @memcmp(i8* %mem, i8* %mem, i32 %size)
24 ; Check memcmp(mem1, mem2, 0) -> 0.
30 %ret = call i32 @memcmp(i8* %mem1, i8* %mem2, i32 0)
34 ;; Check memcmp(mem1, mem2, 1) -> *(unsigned char*)mem1 - *(unsigned char*)mem2.
45 %ret = call i32 @memcmp(i8* %mem1, i8* %mem2, i32 1)
49 ; Check memcmp(mem1, mem2, size) -> cnst, where all arguments are constants.
57 %ret = call i32 @memcmp(i8* %mem1, i8* %mem2, i32 3)
67 %ret = call i32 @memcmp(i8* %mem1, i8* %mem2, i32 3)
77 %ret = call i32 @memcmp(i8* %mem1, i8* %mem2, i32 3)
81 ; Check memcmp(mem1, mem2, 8)==0 -> *(int64_t*)mem1 == *(int64_t*)mem2
94 %call = call i32 @memcmp(i8* %xptr, i8* %yptr, i32 8)
99 ; Check memcmp(mem1, mem2, 4)==0 -> *(int32_t*)mem1 == *(int32_t*)mem2
112 %call = call i32 @memcmp(i8* %xptr, i8* %yptr, i32 4)
117 ; Check memcmp(mem1, mem2, 2)==0 -> *(int16_t*)mem1 == *(int16_t*)mem2
130 %call = call i32 @memcmp(i8* %xptr, i8* %yptr, i32 2)
135 ; Check memcmp(mem1, mem2, size)==0 -> bcmp(mem1, mem2, size)==0
139 ; NOBCMP-NEXT: [[CALL:%.*]] = call i32 @memcmp(i8* %mem1, i8* %mem2, i32 %size)
148 %call = call i32 @memcmp(i8* %mem1, i8* %mem2, i32 %size)