https://bugs.llvm.org/show_bug.cgi?id=43475
Bug ID: 43475
Summary: [AArch64] Inconsistent __FLT_EVAL_METHOD__ value with
GCC
Product: clang
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Driver
Assignee: unassignedclangb...@nondot.org
Reporter: npick...@gmail.com
CC: llvm-bugs@lists.llvm.org, neeil...@live.com,
richard-l...@metafoo.co.uk
$ aarch64-elf-gcc -mcpu=cortex-a55 -dM -E - < /dev/null | grep
__FLT_EVAL_METHOD__
#define __FLT_EVAL_METHOD__ 16
$ clang -target aarch64-elf -mcpu=cortex-a55 -dM -E - < /dev/null | grep
__FLT_EVAL_METHOD__
#define __FLT_EVAL_METHOD__ 0
GCC will check fp16 is supported or not to decide the value of
__FLT_EVAL_METHOD__:
static enum flt_eval_method
aarch64_excess_precision (enum excess_precision_type type)
{
switch (type)
{
case EXCESS_PRECISION_TYPE_FAST:
case EXCESS_PRECISION_TYPE_STANDARD:
/* We can calculate either in 16-bit range and precision or
32-bit range and precision. Make that decision based on whether
we have native support for the ARMv8.2-A 16-bit floating-point
instructions or not. */
return (TARGET_FP_F16INST
? FLT_EVAL_METHOD_PROMOTE_TO_FLOAT16
: FLT_EVAL_METHOD_PROMOTE_TO_FLOAT);
case EXCESS_PRECISION_TYPE_IMPLICIT:
return FLT_EVAL_METHOD_PROMOTE_TO_FLOAT16;
default:
gcc_unreachable ();
}
return FLT_EVAL_METHOD_UNPREDICTABLE;
}
But clang/LLVM for AArch64 seems like didn't override
TargetInfo::getFloatEvalMethod().
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs