diff options
author | Bill Wendling <isanbard@gmail.com> | 2013-02-25 07:15:16 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2013-02-25 07:15:16 +0000 |
commit | d620e09c13b1ca32434ce440abf5bb0f3d0979c5 (patch) | |
tree | 7741519fb7d204ac5f8303922943f752d4903cab | |
parent | 0a8dead5303bd0cabebf07ab4e8d4f838787e8f1 (diff) |
Add more attributes from the command line to functions.
This is an ongoing process. Any command line option which a back-end cares about
should be added here.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176009 91177308-0d34-0410-b5e6-96231b3b80d8
44 files changed, 444 insertions, 449 deletions
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp index 33b0475c56..1802fe747a 100644 --- a/lib/CodeGen/CGCall.cpp +++ b/lib/CodeGen/CGCall.cpp @@ -23,6 +23,7 @@ #include "clang/AST/DeclObjC.h" #include "clang/Basic/TargetInfo.h" #include "clang/Frontend/CodeGenOptions.h" +#include "llvm/ADT/StringExtras.h" #include "llvm/IR/Attributes.h" #include "llvm/IR/DataLayout.h" #include "llvm/IR/InlineAsm.h" @@ -1023,9 +1024,66 @@ void CodeGenModule::ConstructAttributeList(const CGFunctionInfo &FI, FuncAttrs.addAttribute(llvm::Attribute::NoBuiltin); } else { // Attributes that should go on the function, but not the call site. + if (!CodeGenOpts.CodeModel.empty()) + FuncAttrs.addAttribute("code-model", CodeGenOpts.CodeModel); + if (!CodeGenOpts.RelocationModel.empty()) + FuncAttrs.addAttribute("relocation-model", CodeGenOpts.RelocationModel); + + if (CodeGenOpts.FloatABI == "soft" || CodeGenOpts.FloatABI == "softfp") + FuncAttrs.addAttribute("float-abi", "soft"); + else if (CodeGenOpts.FloatABI == "hard") + FuncAttrs.addAttribute("float-abi", "hard"); + + if (!CodeGenOpts.DisableFPElim) { + /* ignore */ ; + } else if (CodeGenOpts.OmitLeafFramePointer) { + FuncAttrs.addAttribute("no-frame-pointer-elim-non-leaf"); + } else { + FuncAttrs.addAttribute("no-frame-pointer-elim"); + FuncAttrs.addAttribute("no-frame-pointer-elim-non-leaf"); + } + + switch (CodeGenOpts.getFPContractMode()) { + case CodeGenOptions::FPC_Off: + FuncAttrs.addAttribute("fp-contract-model", "strict"); + break; + case CodeGenOptions::FPC_On: + FuncAttrs.addAttribute("fp-contract-model", "standard"); + break; + case CodeGenOptions::FPC_Fast: + FuncAttrs.addAttribute("fp-contract-model", "fast"); + break; + } + + if (CodeGenOpts.LessPreciseFPMAD) + FuncAttrs.addAttribute("less-precise-fpmad"); + if (CodeGenOpts.NoInfsFPMath) + FuncAttrs.addAttribute("no-infs-fp-math"); + if (CodeGenOpts.NoNaNsFPMath) + FuncAttrs.addAttribute("no-nans-fp-math"); + if (CodeGenOpts.NoZeroInitializedInBSS) + FuncAttrs.addAttribute("no-zero-init-in-bss"); + if (CodeGenOpts.UnsafeFPMath) + FuncAttrs.addAttribute("unsafe-fp-math"); + if (CodeGenOpts.SoftFloat) + FuncAttrs.addAttribute("use-soft-float"); + if (CodeGenOpts.StackAlignment) + FuncAttrs.addAttribute("stack-align-override", + llvm::utostr(CodeGenOpts.StackAlignment)); + if (CodeGenOpts.StackRealignment) + FuncAttrs.addAttribute("realign-stack"); + if (CodeGenOpts.DisableTailCalls) + FuncAttrs.addAttribute("disable-tail-calls"); + if (!CodeGenOpts.TrapFuncName.empty()) + FuncAttrs.addAttribute("trap-func-name", CodeGenOpts.TrapFuncName); + if (LangOpts.PIELevel != 0) + FuncAttrs.addAttribute("pie"); + if (CodeGenOpts.SSPBufferSize) + FuncAttrs.addAttribute("ssp-buffers-size", + llvm::utostr(CodeGenOpts.SSPBufferSize)); + if (!TargetOpts.CPU.empty()) FuncAttrs.addAttribute("target-cpu", TargetOpts.CPU); - if (TargetOpts.Features.size()) { llvm::SubtargetFeatures Features; for (std::vector<std::string>::const_iterator diff --git a/test/CodeGen/2008-04-08-NoExceptions.c b/test/CodeGen/2008-04-08-NoExceptions.c index 7d533b7a3a..1213492d1d 100644 --- a/test/CodeGen/2008-04-08-NoExceptions.c +++ b/test/CodeGen/2008-04-08-NoExceptions.c @@ -2,12 +2,11 @@ void f(void); void g(void) { - // CHECK: define void @g() #0 + // CHECK: define void @g() [[NUW:#[0-9]+]] // CHECK-NOT: call void @f() nounwind f(); } -// CHECK-NOT: declare void @f() #0 +// CHECK-NOT: declare void @f() [[NUW]] -// CHECK: attributes #0 = { nounwind {{.*}} } -// CHECK: attributes #1 = { "target-features"={{.*}} } +// CHECK: attributes [[NUW]] = { nounwind{{.*}} } diff --git a/test/CodeGen/address-space-field1.c b/test/CodeGen/address-space-field1.c index 9f23b24aca..c6b31812a1 100644 --- a/test/CodeGen/address-space-field1.c +++ b/test/CodeGen/address-space-field1.c @@ -1,6 +1,6 @@ // RUN: %clang_cc1 -emit-llvm -triple x86_64-apple-darwin10 < %s -o - | FileCheck %s // CHECK:%struct.S = type { i32, i32 } -// CHECK:define void @test_addrspace(%struct.S addrspace(1)* %p1, %struct.S addrspace(2)* %p2) #0 +// CHECK:define void @test_addrspace(%struct.S addrspace(1)* %p1, %struct.S addrspace(2)* %p2) [[NUW:#[0-9]+]] // CHECK: [[p1addr:%.*]] = alloca %struct.S addrspace(1)* // CHECK: [[p2addr:%.*]] = alloca %struct.S addrspace(2)* // CHECK: store %struct.S addrspace(1)* %p1, %struct.S addrspace(1)** [[p1addr]] @@ -37,4 +37,4 @@ void test_addrspace(__addr1 S* p1, __addr2 S*p2) { p1->b = p2->a; } -// CHECK: attributes #0 = { nounwind "target-features"={{.*}} } +// CHECK: attributes [[NUW]] = { nounwind{{.*}} } diff --git a/test/CodeGen/alias.c b/test/CodeGen/alias.c index 113b26def2..a8380a37c5 100644 --- a/test/CodeGen/alias.c +++ b/test/CodeGen/alias.c @@ -14,7 +14,7 @@ void f0(void) { } extern void f1(void); extern void f1(void) __attribute((alias("f0"))); // CHECKBASIC: @f1 = alias void ()* @f0 -// CHECKBASIC: define void @f0() #0 { +// CHECKBASIC: define void @f0() [[NUW:#[0-9]+]] { // Make sure that aliases cause referenced values to be emitted. // PR3200 @@ -34,19 +34,17 @@ static int inner_weak(int a) { return 0; } extern __typeof(inner) inner_a __attribute__((alias("inner"))); static __typeof(inner_weak) inner_weak_a __attribute__((weakref, alias("inner_weak"))); // CHECKCC: @inner_a = alias i32 (i32)* @inner -// CHECKCC: define internal arm_aapcs_vfpcc i32 @inner(i32 %a) #0 { +// CHECKCC: define internal arm_aapcs_vfpcc i32 @inner(i32 %a) [[NUW:#[0-9]+]] { int outer(int a) { return inner(a); } -// CHECKCC: define arm_aapcs_vfpcc i32 @outer(i32 %a) #0 { +// CHECKCC: define arm_aapcs_vfpcc i32 @outer(i32 %a) [[NUW]] { // CHECKCC: call arm_aapcs_vfpcc i32 @inner(i32 %{{.*}}) int outer_weak(int a) { return inner_weak_a(a); } -// CHECKCC: define arm_aapcs_vfpcc i32 @outer_weak(i32 %a) #0 { +// CHECKCC: define arm_aapcs_vfpcc i32 @outer_weak(i32 %a) [[NUW]] { // CHECKCC: call arm_aapcs_vfpcc i32 @inner_weak(i32 %{{.*}}) -// CHECKCC: define internal arm_aapcs_vfpcc i32 @inner_weak(i32 %a) #0 { +// CHECKCC: define internal arm_aapcs_vfpcc i32 @inner_weak(i32 %a) [[NUW]] { -// CHECKBASIC: attributes #0 = { nounwind "target-features"={{.*}} } -// CHECKBASIC: attributes #1 = { inlinehint nounwind "target-features"={{.*}} } +// CHECKBASIC: attributes [[NUW]] = { nounwind{{.*}} } -// CHECKCC: attributes #0 = { nounwind } -// CHECKCC: attributes #1 = { inlinehint nounwind } +// CHECKCC: attributes [[NUW]] = { nounwind{{.*}} } diff --git a/test/CodeGen/attr-naked.c b/test/CodeGen/attr-naked.c index 8490d463a2..c07dd8d373 100644 --- a/test/CodeGen/attr-naked.c +++ b/test/CodeGen/attr-naked.c @@ -4,15 +4,15 @@ void t1() __attribute__((naked)); // Basic functionality check // (Note that naked needs to imply noinline to work properly.) -// CHECK: define void @t1() #0 { +// CHECK: define void @t1() [[NAKED:#[0-9]+]] { void t1() { } // Make sure this doesn't explode in the verifier. // (It doesn't really make sense, but it isn't invalid.) -// CHECK: define void @t2() #0 { +// CHECK: define void @t2() [[NAKED]] { __attribute((naked, always_inline)) void t2() { } -// CHECK: attributes #0 = { naked noinline nounwind "target-features"={{.*}} } +// CHECK: attributes [[NAKED]] = { naked noinline nounwind{{.*}} } diff --git a/test/CodeGen/attributes.c b/test/CodeGen/attributes.c index 49746ba523..356a17996a 100644 --- a/test/CodeGen/attributes.c +++ b/test/CodeGen/attributes.c @@ -36,39 +36,39 @@ int t17() { return t15() + t16; } -// CHECK: define void @t1() #2 { +// CHECK: define void @t1() [[NR:#[0-9]+]] { void t1() __attribute__((noreturn)); void t1() { while (1) {} } -// CHECK: define void @t2() #0 { +// CHECK: define void @t2() [[NUW:#[0-9]+]] { void t2() __attribute__((nothrow)); void t2() {} -// CHECK: define weak void @t3() #0 { +// CHECK: define weak void @t3() [[NUW]] { void t3() __attribute__((weak)); void t3() {} -// CHECK: define hidden void @t4() #0 { +// CHECK: define hidden void @t4() [[NUW]] { void t4() __attribute__((visibility("hidden"))); void t4() {} -// CHECK: define void @t7() #2 { +// CHECK: define void @t7() [[NR]] { void t7() __attribute__((noreturn, nothrow)); void t7() { while (1) {} } -// CHECK: define void @t10() #0 section "SECT" { +// CHECK: define void @t10() [[NUW]] section "SECT" { void t10(void) __attribute__((section("SECT"))); void t10(void) {} -// CHECK: define void @t11() #0 section "SECT" { +// CHECK: define void @t11() [[NUW]] section "SECT" { void __attribute__((section("SECT"))) t11(void) {} -// CHECK: define i32 @t19() #0 { +// CHECK: define i32 @t19() [[NUW]] { extern int t19(void) __attribute__((weak_import)); int t19(void) { return 10; } -// CHECK:define void @t20() #0 { +// CHECK:define void @t20() [[NUW]] { // CHECK: call void @abort() // CHECK-NEXT: unreachable void t20(void) { @@ -88,8 +88,7 @@ void t21(void) { void __attribute__((section(".foo"))) t22(void); void __attribute__((section(".bar"))) t22(void) {} -// CHECK: define void @t22() #0 section ".bar" +// CHECK: define void @t22() [[NUW]] section ".bar" -// CHECK: attributes #0 = { nounwind "target-features"={{.*}} } -// CHECK: attributes #1 = { "target-features"={{.*}} } -// CHECK: attributes #2 = { noreturn nounwind "target-features"={{.*}} } +// CHECK: attributes [[NUW]] = { nounwind{{.*}} } +// CHECK: attributes [[NR]] = { noreturn nounwind{{.*}} } diff --git a/test/CodeGen/builtin-attributes.c b/test/CodeGen/builtin-attributes.c index 79026cb54b..c5c35c3899 100644 --- a/test/CodeGen/builtin-attributes.c +++ b/test/CodeGen/builtin-attributes.c @@ -58,5 +58,4 @@ int f3(double x) { return e; } -// CHECK: attributes [[NUW]] = { nounwind } -// CHECK: attributes #1 = { noreturn } +// CHECK: attributes [[NUW]] = { nounwind{{.*}} } diff --git a/test/CodeGen/function-attributes.c b/test/CodeGen/function-attributes.c index 1398d344fb..25ca9163a1 100644 --- a/test/CodeGen/function-attributes.c +++ b/test/CodeGen/function-attributes.c @@ -1,12 +1,12 @@ // RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm -Os -o - %s | FileCheck %s -// CHECK: define signext i8 @f0(i32 %x) #0 -// CHECK: define zeroext i8 @f1(i32 %x) #0 -// CHECK: define void @f2(i8 signext %x) #0 -// CHECK: define void @f3(i8 zeroext %x) #0 -// CHECK: define signext i16 @f4(i32 %x) #0 -// CHECK: define zeroext i16 @f5(i32 %x) #0 -// CHECK: define void @f6(i16 signext %x) #0 -// CHECK: define void @f7(i16 zeroext %x) #0 +// CHECK: define signext i8 @f0(i32 %x) [[NUW:#[0-9]+]] +// CHECK: define zeroext i8 @f1(i32 %x) [[NUW]] +// CHECK: define void @f2(i8 signext %x) [[NUW]] +// CHECK: define void @f3(i8 zeroext %x) [[NUW]] +// CHECK: define signext i16 @f4(i32 %x) [[NUW]] +// CHECK: define zeroext i16 @f5(i32 %x) [[NUW]] +// CHECK: define void @f6(i16 signext %x) [[NUW]] +// CHECK: define void @f7(i16 zeroext %x) [[NUW]] signed char f0(int x) { return x; } @@ -25,25 +25,25 @@ void f6(signed short x) { } void f7(unsigned short x) { } // CHECK: define void @f8() -// CHECK: #1 +// CHECK: [[AI:#[0-9]+]] // CHECK: { void __attribute__((always_inline)) f8(void) { } // CHECK: call void @f9_t() -// CHECK: [[F9:#[0-9]+]] +// CHECK: [[NR:#[0-9]+]] // CHECK: } void __attribute__((noreturn)) f9_t(void); void f9(void) { f9_t(); } // CHECK: call void @f9a() -// CHECK: [[F9]] +// CHECK: [[NR]] // CHECK: } _Noreturn void f9a(void); void f9b(void) { f9a(); } // FIXME: We should be setting nounwind on calls. // CHECK: call i32 @f10_t() -// CHECK: [[F10_T:#[0-9]+]] +// CHECK: [[NUW_RN:#[0-9]+]] // CHECK: { int __attribute__((const)) f10_t(void); int f10(void) { return f10_t(); } @@ -55,7 +55,7 @@ int f12(int arg) { return arg ? 0 : f10_t(); } -// CHECK: define void @f13() #0 +// CHECK: define void @f13() [[NUW]] void f13(void) __attribute__((pure)) __attribute__((const)); void f13(void){} @@ -82,24 +82,24 @@ void f14(int a) { // <rdar://problem/7102668> [irgen] clang isn't setting the optsize bit on functions // CHECK: define void @f15 -// CHECK: #0 +// CHECK: [[NUW]] // CHECK: { void f15(void) { } // PR5254 // CHECK: define void @f16 -// CHECK: #6 +// CHECK: [[ALIGN:#[0-9]+]] // CHECK: { void __attribute__((force_align_arg_pointer)) f16(void) { } // PR11038 // CHECK: define void @f18() -// CHECK: #7 +// CHECK: [[RT:#[0-9]+]] // CHECK: { // CHECK: call void @f17() -// CHECK: [[F17:#[0-9]+]] +// CHECK: [[RT_CALL:#[0-9]+]] // CHECK: ret void __attribute__ ((returns_twice)) void f17(void); __attribute__ ((returns_twice)) void f18(void) { @@ -109,7 +109,7 @@ __attribute__ ((returns_twice)) void f18(void) { // CHECK: define void @f19() // CHECK: { // CHECK: call i32 @setjmp(i32* null) -// CHECK: [[F17]] +// CHECK: [[RT_CALL]] // CHECK: ret void typedef int jmp_buf[((9 * 2) + 3 + 16)]; int setjmp(jmp_buf); @@ -117,15 +117,10 @@ void f19(void) { setjmp(0); } -// CHECK: attributes #0 = { nounwind optsize readnone "target-features"={{.*}} } -// CHECK: attributes #1 = { alwaysinline nounwind optsize readnone "target-features"={{.*}} } -// CHECK: attributes #2 = { noreturn nounwind optsize "target-features"={{.*}} } -// CHECK: attributes #3 = { noreturn optsize "target-features"={{.*}} } -// CHECK: attributes #4 = { nounwind optsize "target-features"={{.*}} } -// CHECK: attributes #5 = { optsize "target-features"={{.*}} } -// CHECK: attributes #6 = { nounwind optsize readnone alignstack=16 "target-features"={{.*}} } -// CHECK: attributes #7 = { nounwind optsize returns_twice "target-features"={{.*}} } -// CHECK: attributes #8 = { optsize returns_twice "target-features"={{.*}} -// CHECK: attributes [[F9]] = { noreturn nounwind optsize } -// CHECK: attributes [[F10_T]] = { nounwind optsize readnone } -// CHECK: attributes [[F17]] = { nounwind optsize returns_twice } +// CHECK: attributes [[NUW]] = { nounwind optsize readnone{{.*}} } +// CHECK: attributes [[AI]] = { alwaysinline nounwind optsize readnone{{.*}} } +// CHECK: attributes [[ALIGN]] = { nounwind optsize readnone alignstack=16{{.*}} } +// CHECK: attributes [[RT]] = { nounwind optsize returns_twice{{.*}} } +// CHECK: attributes [[NR]] = { noreturn nounwind optsize } +// CHECK: attributes [[NUW_RN]] = { nounwind optsize readnone } +// CHECK: attributes [[RT_CALL]] = { nounwind optsize returns_twice } diff --git a/test/CodeGen/incomplete-function-type-2.c b/test/CodeGen/incomplete-function-type-2.c index b696f77765..41dd5fec4b 100644 --- a/test/CodeGen/incomplete-function-type-2.c +++ b/test/CodeGen/incomplete-function-type-2.c @@ -2,7 +2,7 @@ // PR14355: don't crash // Keep this test in its own file because CodeGenTypes has global state. -// CHECK: define void @test10_foo({}* %p1.coerce) #0 { +// CHECK: define void @test10_foo({}* %p1.coerce) [[NUW:#[0-9]+]] { struct test10_B; typedef struct test10_B test10_F3(double); void test10_foo(test10_F3 p1); @@ -16,4 +16,4 @@ void test10_foo(test10_F3 p1) p1(0.0); } -// CHECK: attributes #0 = { nounwind "target-features"={{.*}} } +// CHECK: attributes [[NUW]] = { nounwind{{.*}} } diff --git a/test/CodeGen/libcall-declarations.c b/test/CodeGen/libcall-declarations.c index c24839a7ee..d07590ff11 100644 --- a/test/CodeGen/libcall-declarations.c +++ b/test/CodeGen/libcall-declarations.c @@ -86,111 +86,110 @@ void *use[] = { sqrtf, tan, tanl, tanf, trunc, truncl, truncf }; -// CHECK-NOERRNO: declare double @acos(double) #0 -// CHECK-NOERRNO: declare x86_fp80 @acosl(x86_fp80) #0 -// CHECK-NOERRNO: declare float @acosf(float) #0 -// CHECK-NOERRNO: declare double @asin(double) #0 -// CHECK-NOERRNO: declare x86_fp80 @asinl(x86_fp80) #0 -// CHECK-NOERRNO: declare float @asinf(float) #0 -// CHECK-NOERRNO: declare double @atan(double) #0 -// CHECK-NOERRNO: declare x86_fp80 @atanl(x86_fp80) #0 -// CHECK-NOERRNO: declare float @atanf(float) #0 -// CHECK-NOERRNO: declare double @atan2(double, double) #0 -// CHECK-NOERRNO: declare x86_fp80 @atan2l(x86_fp80, x86_fp80) #0 -// CHECK-NOERRNO: declare float @atan2f(float, float) #0 -// CHECK-NOERRNO: declare double @ceil(double) #0 -// CHECK-NOERRNO: declare x86_fp80 @ceill(x86_fp80) #0 -// CHECK-NOERRNO: declare float @ceilf(float) #0 -// CHECK-NOERRNO: declare double @copysign(double, double) #0 -// CHECK-NOERRNO: declare x86_fp80 @copysignl(x86_fp80, x86_fp80) #0 -// CHECK-NOERRNO: declare float @copysignf(float, float) #0 -// CHECK-NOERRNO: declare double @cos(double) #0 -// CHECK-NOERRNO: declare x86_fp80 @cosl(x86_fp80) #0 -// CHECK-NOERRNO: declare float @cosf(float) #0 -// CHECK-NOERRNO: declare double @exp(double) #0 -// CHECK-NOERRNO: declare x86_fp80 @expl(x86_fp80) #0 -// CHECK-NOERRNO: declare float @expf(float) #0 -// CHECK-NOERRNO: declare double @exp2(double) #0 -// CHECK-NOERRNO: declare x86_fp80 @exp2l(x86_fp80) #0 -// CHECK-NOERRNO: declare float @exp2f(float) #0 -// CHECK-NOERRNO: declare double @fabs(double) #0 -// CHECK-NOERRNO: declare x86_fp80 @fabsl(x86_fp80) #0 -// CHECK-NOERRNO: declare float @fabsf(float) #0 -// CHECK-NOERRNO: declare double @floor(double) #0 -// CHECK-NOERRNO: declare x86_fp80 @floorl(x86_fp80) #0 -// CHECK-NOERRNO: declare float @floorf(float) #0 -// CHECK-NOERRNO: declare double @fma(double, double, double) #0 -// CHECK-NOERRNO: declare x86_fp80 @fmal(x86_fp80, x86_fp80, x86_fp80) #0 -// CHECK-NOERRNO: declare float @fmaf(float, float, float) #0 -// CHECK-NOERRNO: declare double @fmax(double, double) #0 -// CHECK-NOERRNO: declare x86_fp80 @fmaxl(x86_fp80, x86_fp80) #0 -// CHECK-NOERRNO: declare float @fmaxf(float, float) #0 -// CHECK-NOERRNO: declare double @fmin(double, double) #0 -// CHECK-NOERRNO: declare x86_fp80 @fminl(x86_fp80, x86_fp80) #0 -// CHECK-NOERRNO: declare float @fminf(float, float) #0 -// CHECK-NOERRNO: declare double @log(double) #0 -// CHECK-NOERRNO: declare x86_fp80 @logl(x86_fp80) #0 -// CHECK-NOERRNO: declare float @logf(float) #0 -// CHECK-NOERRNO: declare double @log2(double) #0 -// CHECK-NOERRNO: declare x86_fp80 @log2l(x86_fp80) #0 -// CHECK-NOERRNO: declare float @log2f(float) #0 -// CHECK-NOERRNO: declare double @nearbyint(double) #0 -// CHECK-NOERRNO: declare x86_fp80 @nearbyintl(x86_fp80) #0 -// CHECK-NOERRNO: declare float @nearbyintf(float) #0 -// CHECK-NOERRNO: declare double @pow(double, double) #0 -// CHECK-NOERRNO: declare x86_fp80 @powl(x86_fp80, x86_fp80) #0 -// CHECK-NOERRNO: declare float @powf(float, float) #0 -// CHECK-NOERRNO: declare double @rint(double) #0 -// CHECK-NOERRNO: declare x86_fp80 @rintl(x86_fp80) #0 -// CHECK-NOERRNO: declare float @rintf(float) #0 -// CHECK-NOERRNO: declare double @round(double) #0 -// CHECK-NOERRNO: declare x86_fp80 @roundl(x86_fp80) #0 -// CHECK-NOERRNO: declare float @roundf(float) #0 -// CHECK-NOERRNO: declare double @sin(double) #0 -// CHECK-NOERRNO: declare x86_fp80 @sinl(x86_fp80) #0 -// CHECK-NOERRNO: declare float @sinf(float) #0 -// CHECK-NOERRNO: declare double @sqrt(double) #0 -// CHECK-NOERRNO: declare x86_fp80 @sqrtl(x86_fp80) #0 -// CHECK-NOERRNO: declare float @sqrtf(float) #0 -// CHECK-NOERRNO: declare double @tan(double) #0 -// CHECK-NOERRNO: declare x86_fp80 @tanl(x86_fp80) #0 -// CHECK-NOERRNO: declare float @tanf(float) #0 -// CHECK-NOERRNO: declare double @trunc(double) #0 -// CHECK-NOERRNO: declare x86_fp80 @truncl(x86_fp80) #0 -// CHECK-NOERRNO: declare float @truncf(float) #0 +// CHECK-NOERRNO: declare double @acos(double) [[NUW:#[0-9]+]] +// CHECK-NOERRNO: declare x86_fp80 @acosl(x86_fp80) [[NUW]] +// CHECK-NOERRNO: declare float @acosf(float) [[NUW]] +// CHECK-NOERRNO: declare double @asin(double) [[NUW]] +// CHECK-NOERRNO: declare x86_fp80 @asinl(x86_fp80) [[NUW]] +// CHECK-NOERRNO: declare float @asinf(float) [[NUW]] +// CHECK-NOERRNO: declare double @atan(double) [[NUW]] +// CHECK-NOERRNO: declare x86_fp80 @atanl(x86_fp80) [[NUW]] +// CHECK-NOERRNO: declare float @atanf(float) [[NUW]] +// CHECK-NOERRNO: declare double @atan2(double, double) [[NUW]] +// CHECK-NOERRNO: declare x86_fp80 @atan2l(x86_fp80, x86_fp80) [[NUW]] +// CHECK-NOERRNO: declare float @atan2f(float, float) [[NUW]] +// CHECK-NOERRNO: declare double @ceil(double) [[NUW]] +// CHECK-NOERRNO: declare x86_fp80 @ceill(x86_fp80) [[NUW]] +// CHECK-NOERRNO: declare float @ceilf(float) [[NUW]] +// CHECK-NOERRNO: declare double @copysign(double, double) [[NUW]] +// CHECK-NOERRNO: declare x86_fp80 @copysignl(x86_fp80, x86_fp80) [[NUW]] +// CHECK-NOERRNO: declare float @copysignf(float, float) [[NUW]] +// CHECK-NOERRNO: declare double @cos(double) [[NUW]] +// CHECK-NOERRNO: declare x86_fp80 @cosl(x86_fp80) [[NUW]] +// CHECK-NOERRNO: declare float @cosf(float) [[NUW]] +// CHECK-NOERRNO: declare double @exp(double) [[NUW]] +// CHECK-NOERRNO: declare x86_fp80 @expl(x86_fp80) [[NUW]] +// CHECK-NOERRNO: declare float @expf(float) [[NUW]] +// CHECK-NOERRNO: declare double @exp2(double) [[NUW]] +// CHECK-NOERRNO: declare x86_fp80 @exp2l(x86_fp80) [[NUW]] +// CHECK-NOERRNO: declare float @exp2f(float) [[NUW]] +// CHECK-NOERRNO: declare double @fabs(double) [[NUW]] +// CHECK-NOERRNO: declare x86_fp80 @fabsl(x86_fp80) [[NUW]] +// CHECK-NOERRNO: declare float @fabsf(float) [[NUW]] +// CHECK-NOERRNO: declare double @floor(double) [[NUW]] +// CHECK-NOERRNO: declare x86_fp80 @floorl(x86_fp80) [[NUW]] +// CHECK-NOERRNO: declare float @floorf(float) [[NUW]] +// CHECK-NOERRNO: declare double @fma(double, double, double) [[NUW]] +// CHECK-NOERRNO: declare x86_fp80 @fmal(x86_fp80, x86_fp80, x86_fp80) [[NUW]] +// CHECK-NOERRNO: declare float @fmaf(float, float, float) [[NUW]] +// CHECK-NOERRNO: declare double @fmax(double, double) [[NUW]] +// CHECK-NOERRNO: declare x86_fp80 @fmaxl(x86_fp80, x86_fp80) [[NUW]] +// CHECK-NOERRNO: declare float @fmaxf(float, float) [[NUW]] +// CHECK-NOERRNO: declare double @fmin(double, double) [[NUW]] +// CHECK-NOERRNO: declare x86_fp80 @fminl(x86_fp80, x86_fp80) [[NUW]] +// CHECK-NOERRNO: declare float @fminf(float, float) [[NUW]] +// CHECK-NOERRNO: declare double @log(double) [[NUW]] +// CHECK-NOERRNO: declare x86_fp80 @logl(x86_fp80) [[NUW]] +// CHECK-NOERRNO: declare float @logf(float) [[NUW]] +// CHECK-NOERRNO: declare double @log2(double) [[NUW]] +// CHECK-NOERRNO: declare x86_fp80 @log2l(x86_fp80) [[NUW]] +// CHECK-NOERRNO: declare float @log2f(float) [[NUW]] +// CHECK-NOERRNO: declare double @nearbyint(double) [[NUW]] +// CHECK-NOERRNO: declare x86_fp80 @nearbyintl(x86_fp80) [[NUW]] +// CHECK-NOERRNO: declare float @nearbyintf(float) [[NUW]] +// CHECK-NOERRNO: declare double @pow(double, double) [[NUW]] +// CHECK-NOERRNO: declare x86_fp80 @powl(x86_fp80, x86_fp80) [[NUW]] +// CHECK-NOERRNO: declare float @powf(float, float) [[NUW]] +// CHECK-NOERRNO: declare double @rint(double) [[NUW]] +// CHECK-NOERRNO: declare x86_fp80 @rintl(x86_fp80) [[NUW]] +// CHECK-NOERRNO: declare float @rintf(float) [[NUW]] +// CHECK-NOERRNO: declare double @round(double) [[NUW]] +// CHECK-NOERRNO: declare x86_fp80 @roundl(x86_fp80) [[NUW]] +// CHECK-NOERRNO: declare float @roundf(float) [[NUW]] +// CHECK-NOERRNO: declare double @sin(double) [[NUW]] +// CHECK-NOERRNO: declare x86_fp80 @sinl(x86_fp80) [[NUW]] +// CHECK-NOERRNO: declare float @sinf(float) [[NUW]] +// CHECK-NOERRNO: declare double @sqrt(double) [[NUW]] +// CHECK-NOERRNO: declare x86_fp80 @sqrtl(x86_fp80) [[NUW]] +// CHECK-NOERRNO: declare float @sqrtf(float) [[NUW]] +// CHECK-NOERRNO: declare double @tan(double) [[NUW]] +// CHECK-NOERRNO: declare x86_fp80 @tanl(x86_fp80) [[NUW]] +// CHECK-NOERRNO: declare float @tanf(float) [[NUW]] +// CHECK-NOERRNO: declare double @trunc(double) [[NUW]] +// CHECK-NOERRNO: declare x86_fp80 @truncl(x86_fp80) [[NUW]] +// CHECK-NOERRNO: declare float @truncf(float) [[NUW]] -// CHECK-ERRNO: declare double @ceil(double) #1 -// CHECK-ERRNO: declare x86_fp80 @ceill(x86_fp80) #1 -// CHECK-ERRNO: declare float @ceilf(float) #1 -// CHECK-ERRNO: declare double @copysign(double, double) #1 -// CHECK-ERRNO: declare x86_fp80 @copysignl(x86_fp80, x86_fp80) #1 -// CHECK-ERRNO: declare float @copysignf(float, float) #1 -// CHECK-ERRNO: declare double @fabs(double) #1 -// CHECK-ERRNO: declare x86_fp80 @fabsl(x86_fp80) #1 -// CHECK-ERRNO: declare float @fabsf(float) #1 -// CHECK-ERRNO: declare double @floor(double) #1 -// CHECK-ERRNO: declare x86_fp80 @floorl(x86_fp80) #1 -// CHECK-ERRNO: declare float @floorf(float) #1 -// CHECK-ERRNO: declare double @fmax(double, double) #1 -// CHECK-ERRNO: declare x86_fp80 @fmaxl(x86_fp80, x86_fp80) #1 -// CHECK-ERRNO: declare float @fmaxf(float, float) #1 -// CHECK-ERRNO: declare double @fmin(double, double) #1 -// CHECK-ERRNO: declare x86_fp80 @fminl(x86_fp80, x86_fp80) #1 -// CHECK-ERRNO: declare float @fminf(float, float) #1 -// CHECK-ERRNO: declare double @nearbyint(double) #1 -// CHECK-ERRNO: declare x86_fp80 @nearbyintl(x86_fp80) #1 -// CHECK-ERRNO: declare float @nearbyintf(float) #1 -// CHECK-ERRNO: declare double @rint(double) #1 -// CHECK-ERRNO: declare x86_fp80 @rintl(x86_fp80) #1 -// CHECK-ERRNO: declare float @rintf(float) #1 -// CHECK-ERRNO: declare double @round(double) #1 -// CHECK-ERRNO: declare x86_fp80 @roundl(x86_fp80) #1 -// CHECK-ERRNO: declare float @roundf(float) #1 -// CHECK-ERRNO: declare double @trunc(double) #1 -// CHECK-ERRNO: declare x86_fp80 @truncl(x86_fp80) #1 -// CHECK-ERRNO: declare float @truncf(float) #1 +// C |