1 ; RUN: llc < %s -mtriple=i386-apple-darwin9 -mattr=+sse2 | FileCheck %s --check-prefix=X32
2 ; RUN: llc < %s -mtriple=x86_64-apple-darwin -mattr=+sse2 | FileCheck %s --check-prefix=X64
3 ; RUN: llc < %s -mtriple=x86_64-apple-darwin -mattr=-sse3 | FileCheck %s --check-prefix=X64_BAD
5 ; Sibcall optimization of expanded libcalls.
8 define double @foo(double %a) nounwind readonly ssp {
15 %0 = tail call double @sin(double %a) nounwind readonly
19 define float @bar(float %a) nounwind readonly ssp {
26 %0 = tail call float @sinf(float %a) nounwind readonly
31 declare float @sinf(float) nounwind readonly
33 declare double @sin(double) nounwind readonly
38 @"\01L_OBJC_SELECTOR_REFERENCES_2" = external hidden global i8*, section "__DATA, __objc_selrefs, literal_pointers, no_dead_strip"
40 define hidden { double, double } @foo2(%0* %self, i8* nocapture %_cmd) uwtable optsize ssp {
45 %1 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_2", align 8, !invariant.load !0
46 %2 = bitcast %0* %self to i8*
47 %3 = tail call { double, double } bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to { double, double } (i8*, i8*)*)(i8* %2, i8* %1) optsize
48 %4 = extractvalue { double, double } %3, 0
49 %5 = extractvalue { double, double } %3, 1
50 %6 = tail call double @floor(double %4) optsize
51 %7 = tail call double @floor(double %5) optsize
52 %insert.i.i = insertvalue { double, double } undef, double %6, 0
53 %insert5.i.i = insertvalue { double, double } %insert.i.i, double %7, 1
54 ret { double, double } %insert5.i.i
57 declare i8* @objc_msgSend(i8*, i8*, ...)
59 declare double @floor(double) optsize