summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/tbaa-struct.cpp
diff options
context:
space:
mode:
authorDavid Bolvansky <david.bolvansky@gmail.com>2019-08-13 09:11:49 +0000
committerDavid Bolvansky <david.bolvansky@gmail.com>2019-08-13 09:11:49 +0000
commit39130314feeda2d3e0f8966c3809e9cd73ff6b22 (patch)
treeacb2b831e8a280cc449b00d930e6fec49f4a1144 /clang/test/CodeGen/tbaa-struct.cpp
parent09eb71ced3b80211f3997bd7bc2844c61cd265c7 (diff)
downloadbcm5719-llvm-39130314feeda2d3e0f8966c3809e9cd73ff6b22.tar.gz
bcm5719-llvm-39130314feeda2d3e0f8966c3809e9cd73ff6b22.zip
[SimplifyLibCalls] Add dereferenceable bytes from known callsites
Summary: 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 } Reviewers: jdoerfert, efriedma Reviewed By: jdoerfert Subscribers: javed.absar, spatel, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66079 llvm-svn: 368657
Diffstat (limited to 'clang/test/CodeGen/tbaa-struct.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud