diff options
author | Vedant Kumar <vsk@apple.com> | 2017-10-03 01:27:24 +0000 |
---|---|---|
committer | Vedant Kumar <vsk@apple.com> | 2017-10-03 01:27:24 +0000 |
commit | 5cf80880ea53e998f1d72781378287e5916c57d1 (patch) | |
tree | dc3167cf254968fec68be6429860ebd1630dd92a /test | |
parent | 1d05c89b9e096cc8464448681fb05f5f9f705451 (diff) | |
download | clang-5cf80880ea53e998f1d72781378287e5916c57d1.tar.gz |
[ubsan] Save a ptrtoint when emitting alignment checks
The alignment check emits a ptrtoint instruction which can be reused in
the call to the diagnostic handler.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@314749 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/CodeGen/catch-undef-behavior.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/test/CodeGen/catch-undef-behavior.c b/test/CodeGen/catch-undef-behavior.c index e67f0a1f8e..7915ed9db1 100644 --- a/test/CodeGen/catch-undef-behavior.c +++ b/test/CodeGen/catch-undef-behavior.c @@ -59,8 +59,7 @@ int bar(int *a) { // CHECK-COMMON-NEXT: %[[MISALIGN:.*]] = and i64 %[[PTRINT]], 3 // CHECK-COMMON-NEXT: icmp eq i64 %[[MISALIGN]], 0 - // CHECK-UBSAN: %[[ARG:.*]] = ptrtoint - // CHECK-UBSAN-NEXT: call void @__ubsan_handle_type_mismatch_v1(i8* bitcast ({{.*}} @[[LINE_200]] to i8*), i64 %[[ARG]]) + // CHECK-UBSAN: call void @__ubsan_handle_type_mismatch_v1(i8* bitcast ({{.*}} @[[LINE_200]] to i8*), i64 %[[PTRINT]]) // CHECK-TRAP: call void @llvm.trap() [[NR_NUW]] // CHECK-TRAP-NEXT: unreachable |