https://llvm.org/bugs/show_bug.cgi?id=27550
Bug ID: 27550
Summary: [ARM] fp16 neon intrinsics are available even the
target doesn't support fp16
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
The following code:
#include <arm_neon.h>
float16x4_t f(float32x4_t x) {
return vcvt_f16_f32(x);
}
compiled with:
clang -target armv7-linux-gnueabi -mfpu=neon rep.c
-I/usr/include/arm-linux-gnueabihf -mfloat-abi=hard
triggers an assert in instruction selection:
fatal error: error in backend: Cannot select: intrinsic
%llvm.arm.neon.vcvtfp2hf
This is because we're using the vcvt_f16_f32 intrinsic and defined the fpu to
be neon (not neon-fp16), and therefore the target doesn't support the f16 vcvt
instruction.
We should be emitting an error in the frontend instead.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs