enable FP_CONTRACT on as default, and implemented with MAD

Graphics / Beignet - Guo Yejun [intel.com] - 17 March 2016 03:00 UTC

According to OpenCL spec, FP_CONTRACT is on as default, while LLVM/clang just enabled it at http://reviews.llvm.org/D14200 at Nov 2015. So we still need set this option explicitly now.

The implementation is hardware MAD instruction whose accuracy is enough for FP_CONTRACT.

Passed test: contractions of conformance test

27a95c6 enable FP_CONTRACT on as default, and implemented with MAD
backend/src/backend/program.cpp | 2 +-
backend/src/llvm/llvm_gen_backend.cpp | 12 +-----------
backend/src/llvm/llvm_scalarize.cpp | 1 +
3 files changed, 3 insertions(+), 12 deletions(-)

Upstream: cgit.freedesktop.org


  • Share