clang: Treat ieee mode as the default for denormal-fp-math
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Wed, 6 Nov 2019 04:48:18 +0000 (20:48 -0800)
committerMatt Arsenault <arsenm2@gmail.com>
Thu, 5 Mar 2020 04:34:02 +0000 (23:34 -0500)
commitc64ca93053af235bac0ca4dcdcd21c8882478310
treea6353b88ba3ed6ae59e8e426f93e4288dff4addc
parentc94a4133bb690a0d713cf93e941f2740b0fb3d9c
clang: Treat ieee mode as the default for denormal-fp-math

The IR hasn't switched the default yet, so explicitly add the ieee
attributes.

I'm still not really sure how the target default denormal mode should
interact with -fno-unsafe-math-optimizations. The target may have
selected the default mode to be non-IEEE based on the flags or based
on its true behavior, but we don't know which is the case. Since the
only users of a non-IEEE mode without a flag still support IEEE mode,
just reset to IEEE.
clang/include/clang/Basic/CodeGenOptions.h
clang/include/clang/Driver/ToolChain.h
clang/lib/Driver/ToolChains/Clang.cpp
clang/test/CodeGenCUDA/flush-denormals.cu
clang/test/CodeGenCUDA/propagate-metadata.cu
clang/test/CodeGenOpenCL/amdgpu-features.cl
clang/test/Driver/cuda-flush-denormals-to-zero.cu
clang/test/Driver/denormal-fp-math.c
clang/test/Driver/fp-model.c