blob: a8ff941a124a41a701c88d88fb5bb82b4f3eb6d8 [file] [log] [blame]
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5
// RUN: %clang_cc1 -triple armv7-linux-androideabi24 -emit-llvm -fsanitize=signed-integer-overflow -O3 %s -o - -fsanitize-recover=signed-integer-overflow -w | FileCheck %s --check-prefixes=RECOVER
// REQUIRES: aarch64-registered-target
#define LLONG_MIN (-__LONG_LONG_MAX__-1LL)
// RECOVER-LABEL: define dso_local noundef i32 @main(
// RECOVER-SAME: ) local_unnamed_addr #[[ATTR0:[0-9]+]] {
// RECOVER-NEXT: [[ENTRY:.*:]]
// RECOVER-NEXT: [[TMP:%.*]] = alloca i64, align 8
// RECOVER-NEXT: store i64 -9223372036854775808, ptr [[TMP]], align 8, !nosanitize [[META3:![0-9]+]]
// RECOVER-NEXT: [[TMP0:%.*]] = ptrtoint ptr [[TMP]] to i32, !nosanitize [[META3]]
// RECOVER-NEXT: call void @__ubsan_handle_negate_overflow(ptr nonnull @[[GLOB1:[0-9]+]], i32 [[TMP0]]) #[[ATTR2:[0-9]+]], !nosanitize [[META3]]
// RECOVER-NEXT: ret i32 0
//
int main() {
__builtin_llabs(LLONG_MIN);
return 0;
}
//.
// RECOVER: [[META3]] = !{}
//.