Index: clang/lib/CodeGen/CGCall.cpp =================================================================== --- clang/lib/CodeGen/CGCall.cpp +++ clang/lib/CodeGen/CGCall.cpp @@ -1832,11 +1832,6 @@ if (LangOpts.getFPExceptionMode() == LangOptions::FPE_Ignore) FuncAttrs.addAttribute("no-trapping-math", "true"); - // Strict (compliant) code is the default, so only add this attribute to - // indicate that we are trying to workaround a problem case. - if (!CodeGenOpts.StrictFloatCastOverflow) - FuncAttrs.addAttribute("strict-float-cast-overflow", "false"); - // TODO: Are these all needed? // unsafe/inf/nan/nsz are handled by instruction-level FastMathFlags. if (LangOpts.NoHonorInfs) Index: clang/test/CodeGen/no-junk-ftrunc.c =================================================================== --- clang/test/CodeGen/no-junk-ftrunc.c +++ clang/test/CodeGen/no-junk-ftrunc.c @@ -1,11 +1,12 @@ // RUN: %clang_cc1 -S -fno-strict-float-cast-overflow %s -emit-llvm -o - | FileCheck %s --check-prefix=NOSTRICT // When compiling with non-standard semantics, use intrinsics to inhibit the optimizer. +// This used to require a function attribute, so we check that it is NOT here anymore. // NOSTRICT-LABEL: main // NOSTRICT: call i32 @llvm.fptosi.sat.i32.f64 // NOSTRICT: call i32 @llvm.fptoui.sat.i32.f64 -// NOSTRICT: attributes #0 = {{.*}}"strict-float-cast-overflow"="false"{{.*}} +// NOSTRICT-NOT: strict-float-cast-overflow // The workaround attribute is not applied by default.