Files
clang-p2996/clang/test/CodeGen/aarch64-neon-vuqadd-float-conversion-warning.c
David Green d96161a179 [ARM/AArch64] Move REQUIRES after update_cc_test_checks line. NFC
c17d9b4b12 added REQUIRES lines to a lot of Arm and AArch64
test, but added them to the very beginning, before the existing
update_cc_test_checks lines. This just moves them later so as to not
mess up the existing ordering when the checks are regenerated.
2021-11-13 19:09:01 +00:00

29 lines
1.0 KiB
C

// RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon \
// RUN: -S -disable-O0-optnone -emit-llvm -o - %s 2>&1 | FileCheck %s
// REQUIRES: aarch64-registered-target || arm-registered-target
#include <arm_neon.h>
// Check float conversion is not accepted for unsigned int argument
int8_t test_vuqaddb_s8(){
return vuqaddb_s8(1, -1.0f);
}
int16_t test_vuqaddh_s16() {
return vuqaddh_s16(1, -1.0f);
}
int32_t test_vuqadds_s32() {
return vuqadds_s32(1, -1.0f);
}
int64_t test_vuqaddd_s64() {
return vuqaddd_s64(1, -1.0f);
}
// CHECK: warning: implicit conversion of out of range value from 'float' to 'uint8_t' (aka 'unsigned char') is undefined
// CHECK: warning: implicit conversion of out of range value from 'float' to 'uint16_t' (aka 'unsigned short') is undefined
// CHECK: warning: implicit conversion of out of range value from 'float' to 'uint32_t' (aka 'unsigned int') is undefined
// CHECK: warning: implicit conversion of out of range value from 'float' to 'uint64_t' (aka 'unsigned long') is undefined