Revert "[CodeGen] Mark fma as const for Android"
authorAlex Xu (Hello71) <alex_y_xu@yahoo.ca>
Mon, 10 Jan 2022 17:42:56 +0000 (09:42 -0800)
committerPirama Arumuga Nainar <pirama@google.com>
Mon, 10 Jan 2022 19:31:09 +0000 (11:31 -0800)
commitf5b387988bd4885a973f35deaf3881524f526e3f
treeeef4d482978d31c634ea98d6e89a617fba53da17
parent8e682086a067b6cca3034ec5b64ead4b49294685
Revert "[CodeGen] Mark fma as const for Android"

This code is intended to give a special exception for platforms which set errno in some math functions but not fma. This does not apply to Android, which does not set errno in any math functions (https://cs.android.com/android/platform/superproject/+/master:bionic/libc/include/math.h;drc=master;l=59). The correct implementation for Android is to set -fno-math-errno by default, which was done in https://reviews.llvm.org/D51068. Therefore, this special exception is no longer needed for Android. Deleting it slightly reduces code complexity, clang executable size, compile time, and test time.

This reverts fbfba29d74748b8fffd2f7cc654fb4c3659c8f67.

Reviewed By: pirama

Differential Revision: https://reviews.llvm.org/D116755
clang/lib/Sema/SemaDecl.cpp
clang/test/CodeGen/math-builtins.c