int mm(char *a, char *b) {
return memcmp(a,b,16);
}
Currently:
define dso_local i32 @mm(i8* nocapture readonly %a, i8* nocapture readonly %b) local_unnamed_addr #1 {
entry:
%call = tail call i32 @memcmp(i8* %a, i8* %b, i64 16) ret i32 %call
}
After patch:
define dso_local i32 @mm(i8* nocapture readonly %a, i8* nocapture readonly %b) local_unnamed_addr #1 {
entry:
%call = tail call i32 @memcmp(i8* dereferenceable(16) %a, i8* dereferenceable(16) %b, i64 16) ret i32 %call
}
Copy paste from @spatel 's patch: https://reviews.llvm.org/D64258
We should find proper place for this.