818 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc < %s -mtriple=x86_64-pc-linux-gnu | FileCheck %s --check-prefix=GNU3; RUN: llc < %s -mtriple=x86_64-pc-windows-msvc | FileCheck %s --check-prefix=WIN4; RUN: llc < %s -mtriple=x86_64-apple-darwin | FileCheck %s --check-prefix=MAC5; RUN: llc < %s -mtriple=i686-linux-gnu -global-isel -global-isel-abort=1 | FileCheck %s --check-prefixes=GISEL-X866; RUN: llc < %s -mtriple=x86_64-linux-gnu -global-isel -global-isel-abort=1 | FileCheck %s --check-prefixes=GISEL-X647 8; PR35672 - https://bugs.llvm.org/show_bug.cgi?id=356729; FIXME: We would not need the function-level attributes if FMF were propagated to DAG nodes for this case.10 11define float @exp_f32(float %x) #0 {12; GNU-LABEL: exp_f32:13; GNU: # %bb.0:14; GNU-NEXT: jmp expf@PLT # TAILCALL15;16; WIN-LABEL: exp_f32:17; WIN: # %bb.0:18; WIN-NEXT: jmp expf # TAILCALL19;20; MAC-LABEL: exp_f32:21; MAC: ## %bb.0:22; MAC-NEXT: jmp _expf ## TAILCALL23;24; GISEL-X86-LABEL: exp_f32:25; GISEL-X86: # %bb.0:26; GISEL-X86-NEXT: subl $12, %esp27; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax28; GISEL-X86-NEXT: movl %eax, (%esp)29; GISEL-X86-NEXT: calll expf30; GISEL-X86-NEXT: addl $12, %esp31; GISEL-X86-NEXT: retl32;33; GISEL-X64-LABEL: exp_f32:34; GISEL-X64: # %bb.0:35; GISEL-X64-NEXT: pushq %rax36; GISEL-X64-NEXT: callq expf37; GISEL-X64-NEXT: popq %rax38; GISEL-X64-NEXT: retq39 %r = tail call nnan ninf float @llvm.exp.f32(float %x)40 ret float %r41}42 43define double @exp_f64(double %x) #0 {44; GNU-LABEL: exp_f64:45; GNU: # %bb.0:46; GNU-NEXT: jmp exp@PLT # TAILCALL47;48; WIN-LABEL: exp_f64:49; WIN: # %bb.0:50; WIN-NEXT: jmp exp # TAILCALL51;52; MAC-LABEL: exp_f64:53; MAC: ## %bb.0:54; MAC-NEXT: jmp _exp ## TAILCALL55;56; GISEL-X86-LABEL: exp_f64:57; GISEL-X86: # %bb.0:58; GISEL-X86-NEXT: subl $12, %esp59; GISEL-X86-NEXT: leal {{[0-9]+}}(%esp), %eax60; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx61; GISEL-X86-NEXT: movl 4(%eax), %eax62; GISEL-X86-NEXT: xorl %edx, %edx63; GISEL-X86-NEXT: addl %esp, %edx64; GISEL-X86-NEXT: movl %ecx, (%esp)65; GISEL-X86-NEXT: movl %eax, 4(%edx)66; GISEL-X86-NEXT: calll exp67; GISEL-X86-NEXT: addl $12, %esp68; GISEL-X86-NEXT: retl69;70; GISEL-X64-LABEL: exp_f64:71; GISEL-X64: # %bb.0:72; GISEL-X64-NEXT: pushq %rax73; GISEL-X64-NEXT: callq exp74; GISEL-X64-NEXT: popq %rax75; GISEL-X64-NEXT: retq76 %r = tail call nnan ninf double @llvm.exp.f64(double %x)77 ret double %r78}79 80define x86_fp80 @exp_f80(x86_fp80 %x) #0 {81; GNU-LABEL: exp_f80:82; GNU: # %bb.0:83; GNU-NEXT: subq $24, %rsp84; GNU-NEXT: fldt {{[0-9]+}}(%rsp)85; GNU-NEXT: fstpt (%rsp)86; GNU-NEXT: callq expl@PLT87; GNU-NEXT: addq $24, %rsp88; GNU-NEXT: retq89;90; WIN-LABEL: exp_f80:91; WIN: # %bb.0:92; WIN-NEXT: pushq %rsi93; WIN-NEXT: subq $64, %rsp94; WIN-NEXT: movq %rcx, %rsi95; WIN-NEXT: fldt (%rdx)96; WIN-NEXT: fstpt {{[0-9]+}}(%rsp)97; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx98; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rdx99; WIN-NEXT: callq expl100; WIN-NEXT: fldt {{[0-9]+}}(%rsp)101; WIN-NEXT: fstpt (%rsi)102; WIN-NEXT: movq %rsi, %rax103; WIN-NEXT: addq $64, %rsp104; WIN-NEXT: popq %rsi105; WIN-NEXT: retq106;107; MAC-LABEL: exp_f80:108; MAC: ## %bb.0:109; MAC-NEXT: subq $24, %rsp110; MAC-NEXT: fldt {{[0-9]+}}(%rsp)111; MAC-NEXT: fstpt (%rsp)112; MAC-NEXT: callq _expl113; MAC-NEXT: addq $24, %rsp114; MAC-NEXT: retq115;116; GISEL-X86-LABEL: exp_f80:117; GISEL-X86: # %bb.0:118; GISEL-X86-NEXT: subl $12, %esp119; GISEL-X86-NEXT: fldt {{[0-9]+}}(%esp)120; GISEL-X86-NEXT: fstpt (%esp)121; GISEL-X86-NEXT: calll expl122; GISEL-X86-NEXT: addl $12, %esp123; GISEL-X86-NEXT: retl124;125; GISEL-X64-LABEL: exp_f80:126; GISEL-X64: # %bb.0:127; GISEL-X64-NEXT: subq $24, %rsp128; GISEL-X64-NEXT: fldt {{[0-9]+}}(%rsp)129; GISEL-X64-NEXT: fstpt (%rsp)130; GISEL-X64-NEXT: callq expl131; GISEL-X64-NEXT: addq $24, %rsp132; GISEL-X64-NEXT: retq133 %r = tail call nnan ninf x86_fp80 @llvm.exp.f80(x86_fp80 %x)134 ret x86_fp80 %r135}136 137define float @exp2_f32(float %x) #0 {138; GNU-LABEL: exp2_f32:139; GNU: # %bb.0:140; GNU-NEXT: jmp exp2f@PLT # TAILCALL141;142; WIN-LABEL: exp2_f32:143; WIN: # %bb.0:144; WIN-NEXT: jmp exp2f # TAILCALL145;146; MAC-LABEL: exp2_f32:147; MAC: ## %bb.0:148; MAC-NEXT: jmp _exp2f ## TAILCALL149;150; GISEL-X86-LABEL: exp2_f32:151; GISEL-X86: # %bb.0:152; GISEL-X86-NEXT: subl $12, %esp153; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax154; GISEL-X86-NEXT: movl %eax, (%esp)155; GISEL-X86-NEXT: calll exp2f156; GISEL-X86-NEXT: addl $12, %esp157; GISEL-X86-NEXT: retl158;159; GISEL-X64-LABEL: exp2_f32:160; GISEL-X64: # %bb.0:161; GISEL-X64-NEXT: pushq %rax162; GISEL-X64-NEXT: callq exp2f163; GISEL-X64-NEXT: popq %rax164; GISEL-X64-NEXT: retq165 %r = tail call nnan ninf float @llvm.exp2.f32(float %x)166 ret float %r167}168 169define double @exp2_f64(double %x) #0 {170; GNU-LABEL: exp2_f64:171; GNU: # %bb.0:172; GNU-NEXT: jmp exp2@PLT # TAILCALL173;174; WIN-LABEL: exp2_f64:175; WIN: # %bb.0:176; WIN-NEXT: jmp exp2 # TAILCALL177;178; MAC-LABEL: exp2_f64:179; MAC: ## %bb.0:180; MAC-NEXT: jmp _exp2 ## TAILCALL181;182; GISEL-X86-LABEL: exp2_f64:183; GISEL-X86: # %bb.0:184; GISEL-X86-NEXT: subl $12, %esp185; GISEL-X86-NEXT: leal {{[0-9]+}}(%esp), %eax186; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx187; GISEL-X86-NEXT: movl 4(%eax), %eax188; GISEL-X86-NEXT: xorl %edx, %edx189; GISEL-X86-NEXT: addl %esp, %edx190; GISEL-X86-NEXT: movl %ecx, (%esp)191; GISEL-X86-NEXT: movl %eax, 4(%edx)192; GISEL-X86-NEXT: calll exp2193; GISEL-X86-NEXT: addl $12, %esp194; GISEL-X86-NEXT: retl195;196; GISEL-X64-LABEL: exp2_f64:197; GISEL-X64: # %bb.0:198; GISEL-X64-NEXT: pushq %rax199; GISEL-X64-NEXT: callq exp2200; GISEL-X64-NEXT: popq %rax201; GISEL-X64-NEXT: retq202 %r = tail call nnan ninf double @llvm.exp2.f64(double %x)203 ret double %r204}205 206define x86_fp80 @exp2_f80(x86_fp80 %x) #0 {207; GNU-LABEL: exp2_f80:208; GNU: # %bb.0:209; GNU-NEXT: subq $24, %rsp210; GNU-NEXT: fldt {{[0-9]+}}(%rsp)211; GNU-NEXT: fstpt (%rsp)212; GNU-NEXT: callq exp2l@PLT213; GNU-NEXT: addq $24, %rsp214; GNU-NEXT: retq215;216; WIN-LABEL: exp2_f80:217; WIN: # %bb.0:218; WIN-NEXT: pushq %rsi219; WIN-NEXT: subq $64, %rsp220; WIN-NEXT: movq %rcx, %rsi221; WIN-NEXT: fldt (%rdx)222; WIN-NEXT: fstpt {{[0-9]+}}(%rsp)223; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx224; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rdx225; WIN-NEXT: callq exp2l226; WIN-NEXT: fldt {{[0-9]+}}(%rsp)227; WIN-NEXT: fstpt (%rsi)228; WIN-NEXT: movq %rsi, %rax229; WIN-NEXT: addq $64, %rsp230; WIN-NEXT: popq %rsi231; WIN-NEXT: retq232;233; MAC-LABEL: exp2_f80:234; MAC: ## %bb.0:235; MAC-NEXT: subq $24, %rsp236; MAC-NEXT: fldt {{[0-9]+}}(%rsp)237; MAC-NEXT: fstpt (%rsp)238; MAC-NEXT: callq _exp2l239; MAC-NEXT: addq $24, %rsp240; MAC-NEXT: retq241;242; GISEL-X86-LABEL: exp2_f80:243; GISEL-X86: # %bb.0:244; GISEL-X86-NEXT: subl $12, %esp245; GISEL-X86-NEXT: fldt {{[0-9]+}}(%esp)246; GISEL-X86-NEXT: fstpt (%esp)247; GISEL-X86-NEXT: calll exp2l248; GISEL-X86-NEXT: addl $12, %esp249; GISEL-X86-NEXT: retl250;251; GISEL-X64-LABEL: exp2_f80:252; GISEL-X64: # %bb.0:253; GISEL-X64-NEXT: subq $24, %rsp254; GISEL-X64-NEXT: fldt {{[0-9]+}}(%rsp)255; GISEL-X64-NEXT: fstpt (%rsp)256; GISEL-X64-NEXT: callq exp2l257; GISEL-X64-NEXT: addq $24, %rsp258; GISEL-X64-NEXT: retq259 %r = tail call nnan ninf x86_fp80 @llvm.exp2.f80(x86_fp80 %x)260 ret x86_fp80 %r261}262 263define float @log_f32(float %x) #0 {264; GNU-LABEL: log_f32:265; GNU: # %bb.0:266; GNU-NEXT: jmp logf@PLT # TAILCALL267;268; WIN-LABEL: log_f32:269; WIN: # %bb.0:270; WIN-NEXT: jmp logf # TAILCALL271;272; MAC-LABEL: log_f32:273; MAC: ## %bb.0:274; MAC-NEXT: jmp _logf ## TAILCALL275;276; GISEL-X86-LABEL: log_f32:277; GISEL-X86: # %bb.0:278; GISEL-X86-NEXT: subl $12, %esp279; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax280; GISEL-X86-NEXT: movl %eax, (%esp)281; GISEL-X86-NEXT: calll logf282; GISEL-X86-NEXT: addl $12, %esp283; GISEL-X86-NEXT: retl284;285; GISEL-X64-LABEL: log_f32:286; GISEL-X64: # %bb.0:287; GISEL-X64-NEXT: pushq %rax288; GISEL-X64-NEXT: callq logf289; GISEL-X64-NEXT: popq %rax290; GISEL-X64-NEXT: retq291 %r = tail call nnan ninf float @llvm.log.f32(float %x)292 ret float %r293}294 295define double @log_f64(double %x) #0 {296; GNU-LABEL: log_f64:297; GNU: # %bb.0:298; GNU-NEXT: jmp log@PLT # TAILCALL299;300; WIN-LABEL: log_f64:301; WIN: # %bb.0:302; WIN-NEXT: jmp log # TAILCALL303;304; MAC-LABEL: log_f64:305; MAC: ## %bb.0:306; MAC-NEXT: jmp _log ## TAILCALL307;308; GISEL-X86-LABEL: log_f64:309; GISEL-X86: # %bb.0:310; GISEL-X86-NEXT: subl $12, %esp311; GISEL-X86-NEXT: leal {{[0-9]+}}(%esp), %eax312; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx313; GISEL-X86-NEXT: movl 4(%eax), %eax314; GISEL-X86-NEXT: xorl %edx, %edx315; GISEL-X86-NEXT: addl %esp, %edx316; GISEL-X86-NEXT: movl %ecx, (%esp)317; GISEL-X86-NEXT: movl %eax, 4(%edx)318; GISEL-X86-NEXT: calll log319; GISEL-X86-NEXT: addl $12, %esp320; GISEL-X86-NEXT: retl321;322; GISEL-X64-LABEL: log_f64:323; GISEL-X64: # %bb.0:324; GISEL-X64-NEXT: pushq %rax325; GISEL-X64-NEXT: callq log326; GISEL-X64-NEXT: popq %rax327; GISEL-X64-NEXT: retq328 %r = tail call nnan ninf double @llvm.log.f64(double %x)329 ret double %r330}331 332define x86_fp80 @log_f80(x86_fp80 %x) #0 {333; GNU-LABEL: log_f80:334; GNU: # %bb.0:335; GNU-NEXT: subq $24, %rsp336; GNU-NEXT: fldt {{[0-9]+}}(%rsp)337; GNU-NEXT: fstpt (%rsp)338; GNU-NEXT: callq logl@PLT339; GNU-NEXT: addq $24, %rsp340; GNU-NEXT: retq341;342; WIN-LABEL: log_f80:343; WIN: # %bb.0:344; WIN-NEXT: pushq %rsi345; WIN-NEXT: subq $64, %rsp346; WIN-NEXT: movq %rcx, %rsi347; WIN-NEXT: fldt (%rdx)348; WIN-NEXT: fstpt {{[0-9]+}}(%rsp)349; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx350; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rdx351; WIN-NEXT: callq logl352; WIN-NEXT: fldt {{[0-9]+}}(%rsp)353; WIN-NEXT: fstpt (%rsi)354; WIN-NEXT: movq %rsi, %rax355; WIN-NEXT: addq $64, %rsp356; WIN-NEXT: popq %rsi357; WIN-NEXT: retq358;359; MAC-LABEL: log_f80:360; MAC: ## %bb.0:361; MAC-NEXT: subq $24, %rsp362; MAC-NEXT: fldt {{[0-9]+}}(%rsp)363; MAC-NEXT: fstpt (%rsp)364; MAC-NEXT: callq _logl365; MAC-NEXT: addq $24, %rsp366; MAC-NEXT: retq367;368; GISEL-X86-LABEL: log_f80:369; GISEL-X86: # %bb.0:370; GISEL-X86-NEXT: subl $12, %esp371; GISEL-X86-NEXT: fldt {{[0-9]+}}(%esp)372; GISEL-X86-NEXT: fstpt (%esp)373; GISEL-X86-NEXT: calll logl374; GISEL-X86-NEXT: addl $12, %esp375; GISEL-X86-NEXT: retl376;377; GISEL-X64-LABEL: log_f80:378; GISEL-X64: # %bb.0:379; GISEL-X64-NEXT: subq $24, %rsp380; GISEL-X64-NEXT: fldt {{[0-9]+}}(%rsp)381; GISEL-X64-NEXT: fstpt (%rsp)382; GISEL-X64-NEXT: callq logl383; GISEL-X64-NEXT: addq $24, %rsp384; GISEL-X64-NEXT: retq385 %r = tail call nnan ninf x86_fp80 @llvm.log.f80(x86_fp80 %x)386 ret x86_fp80 %r387}388 389define float @log2_f32(float %x) #0 {390; GNU-LABEL: log2_f32:391; GNU: # %bb.0:392; GNU-NEXT: jmp log2f@PLT # TAILCALL393;394; WIN-LABEL: log2_f32:395; WIN: # %bb.0:396; WIN-NEXT: jmp log2f # TAILCALL397;398; MAC-LABEL: log2_f32:399; MAC: ## %bb.0:400; MAC-NEXT: jmp _log2f ## TAILCALL401;402; GISEL-X86-LABEL: log2_f32:403; GISEL-X86: # %bb.0:404; GISEL-X86-NEXT: subl $12, %esp405; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax406; GISEL-X86-NEXT: movl %eax, (%esp)407; GISEL-X86-NEXT: calll log2f408; GISEL-X86-NEXT: addl $12, %esp409; GISEL-X86-NEXT: retl410;411; GISEL-X64-LABEL: log2_f32:412; GISEL-X64: # %bb.0:413; GISEL-X64-NEXT: pushq %rax414; GISEL-X64-NEXT: callq log2f415; GISEL-X64-NEXT: popq %rax416; GISEL-X64-NEXT: retq417 %r = tail call nnan ninf float @llvm.log2.f32(float %x)418 ret float %r419}420 421define double @log2_f64(double %x) #0 {422; GNU-LABEL: log2_f64:423; GNU: # %bb.0:424; GNU-NEXT: jmp log2@PLT # TAILCALL425;426; WIN-LABEL: log2_f64:427; WIN: # %bb.0:428; WIN-NEXT: jmp log2 # TAILCALL429;430; MAC-LABEL: log2_f64:431; MAC: ## %bb.0:432; MAC-NEXT: jmp _log2 ## TAILCALL433;434; GISEL-X86-LABEL: log2_f64:435; GISEL-X86: # %bb.0:436; GISEL-X86-NEXT: subl $12, %esp437; GISEL-X86-NEXT: leal {{[0-9]+}}(%esp), %eax438; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx439; GISEL-X86-NEXT: movl 4(%eax), %eax440; GISEL-X86-NEXT: xorl %edx, %edx441; GISEL-X86-NEXT: addl %esp, %edx442; GISEL-X86-NEXT: movl %ecx, (%esp)443; GISEL-X86-NEXT: movl %eax, 4(%edx)444; GISEL-X86-NEXT: calll log2445; GISEL-X86-NEXT: addl $12, %esp446; GISEL-X86-NEXT: retl447;448; GISEL-X64-LABEL: log2_f64:449; GISEL-X64: # %bb.0:450; GISEL-X64-NEXT: pushq %rax451; GISEL-X64-NEXT: callq log2452; GISEL-X64-NEXT: popq %rax453; GISEL-X64-NEXT: retq454 %r = tail call nnan ninf double @llvm.log2.f64(double %x)455 ret double %r456}457 458define x86_fp80 @log2_f80(x86_fp80 %x) #0 {459; GNU-LABEL: log2_f80:460; GNU: # %bb.0:461; GNU-NEXT: subq $24, %rsp462; GNU-NEXT: fldt {{[0-9]+}}(%rsp)463; GNU-NEXT: fstpt (%rsp)464; GNU-NEXT: callq log2l@PLT465; GNU-NEXT: addq $24, %rsp466; GNU-NEXT: retq467;468; WIN-LABEL: log2_f80:469; WIN: # %bb.0:470; WIN-NEXT: pushq %rsi471; WIN-NEXT: subq $64, %rsp472; WIN-NEXT: movq %rcx, %rsi473; WIN-NEXT: fldt (%rdx)474; WIN-NEXT: fstpt {{[0-9]+}}(%rsp)475; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx476; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rdx477; WIN-NEXT: callq log2l478; WIN-NEXT: fldt {{[0-9]+}}(%rsp)479; WIN-NEXT: fstpt (%rsi)480; WIN-NEXT: movq %rsi, %rax481; WIN-NEXT: addq $64, %rsp482; WIN-NEXT: popq %rsi483; WIN-NEXT: retq484;485; MAC-LABEL: log2_f80:486; MAC: ## %bb.0:487; MAC-NEXT: subq $24, %rsp488; MAC-NEXT: fldt {{[0-9]+}}(%rsp)489; MAC-NEXT: fstpt (%rsp)490; MAC-NEXT: callq _log2l491; MAC-NEXT: addq $24, %rsp492; MAC-NEXT: retq493;494; GISEL-X86-LABEL: log2_f80:495; GISEL-X86: # %bb.0:496; GISEL-X86-NEXT: subl $12, %esp497; GISEL-X86-NEXT: fldt {{[0-9]+}}(%esp)498; GISEL-X86-NEXT: fstpt (%esp)499; GISEL-X86-NEXT: calll log2l500; GISEL-X86-NEXT: addl $12, %esp501; GISEL-X86-NEXT: retl502;503; GISEL-X64-LABEL: log2_f80:504; GISEL-X64: # %bb.0:505; GISEL-X64-NEXT: subq $24, %rsp506; GISEL-X64-NEXT: fldt {{[0-9]+}}(%rsp)507; GISEL-X64-NEXT: fstpt (%rsp)508; GISEL-X64-NEXT: callq log2l509; GISEL-X64-NEXT: addq $24, %rsp510; GISEL-X64-NEXT: retq511 %r = tail call nnan ninf x86_fp80 @llvm.log2.f80(x86_fp80 %x)512 ret x86_fp80 %r513}514 515define float @log10_f32(float %x) #0 {516; GNU-LABEL: log10_f32:517; GNU: # %bb.0:518; GNU-NEXT: jmp log10f@PLT # TAILCALL519;520; WIN-LABEL: log10_f32:521; WIN: # %bb.0:522; WIN-NEXT: jmp log10f # TAILCALL523;524; MAC-LABEL: log10_f32:525; MAC: ## %bb.0:526; MAC-NEXT: jmp _log10f ## TAILCALL527;528; GISEL-X86-LABEL: log10_f32:529; GISEL-X86: # %bb.0:530; GISEL-X86-NEXT: subl $12, %esp531; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax532; GISEL-X86-NEXT: movl %eax, (%esp)533; GISEL-X86-NEXT: calll log10f534; GISEL-X86-NEXT: addl $12, %esp535; GISEL-X86-NEXT: retl536;537; GISEL-X64-LABEL: log10_f32:538; GISEL-X64: # %bb.0:539; GISEL-X64-NEXT: pushq %rax540; GISEL-X64-NEXT: callq log10f541; GISEL-X64-NEXT: popq %rax542; GISEL-X64-NEXT: retq543 %r = tail call nnan ninf float @llvm.log10.f32(float %x)544 ret float %r545}546 547define double @log10_f64(double %x) #0 {548; GNU-LABEL: log10_f64:549; GNU: # %bb.0:550; GNU-NEXT: jmp log10@PLT # TAILCALL551;552; WIN-LABEL: log10_f64:553; WIN: # %bb.0:554; WIN-NEXT: jmp log10 # TAILCALL555;556; MAC-LABEL: log10_f64:557; MAC: ## %bb.0:558; MAC-NEXT: jmp _log10 ## TAILCALL559;560; GISEL-X86-LABEL: log10_f64:561; GISEL-X86: # %bb.0:562; GISEL-X86-NEXT: subl $12, %esp563; GISEL-X86-NEXT: leal {{[0-9]+}}(%esp), %eax564; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx565; GISEL-X86-NEXT: movl 4(%eax), %eax566; GISEL-X86-NEXT: xorl %edx, %edx567; GISEL-X86-NEXT: addl %esp, %edx568; GISEL-X86-NEXT: movl %ecx, (%esp)569; GISEL-X86-NEXT: movl %eax, 4(%edx)570; GISEL-X86-NEXT: calll log10571; GISEL-X86-NEXT: addl $12, %esp572; GISEL-X86-NEXT: retl573;574; GISEL-X64-LABEL: log10_f64:575; GISEL-X64: # %bb.0:576; GISEL-X64-NEXT: pushq %rax577; GISEL-X64-NEXT: callq log10578; GISEL-X64-NEXT: popq %rax579; GISEL-X64-NEXT: retq580 %r = tail call nnan ninf double @llvm.log10.f64(double %x)581 ret double %r582}583 584define x86_fp80 @log10_f80(x86_fp80 %x) #0 {585; GNU-LABEL: log10_f80:586; GNU: # %bb.0:587; GNU-NEXT: subq $24, %rsp588; GNU-NEXT: fldt {{[0-9]+}}(%rsp)589; GNU-NEXT: fstpt (%rsp)590; GNU-NEXT: callq log10l@PLT591; GNU-NEXT: addq $24, %rsp592; GNU-NEXT: retq593;594; WIN-LABEL: log10_f80:595; WIN: # %bb.0:596; WIN-NEXT: pushq %rsi597; WIN-NEXT: subq $64, %rsp598; WIN-NEXT: movq %rcx, %rsi599; WIN-NEXT: fldt (%rdx)600; WIN-NEXT: fstpt {{[0-9]+}}(%rsp)601; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx602; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rdx603; WIN-NEXT: callq log10l604; WIN-NEXT: fldt {{[0-9]+}}(%rsp)605; WIN-NEXT: fstpt (%rsi)606; WIN-NEXT: movq %rsi, %rax607; WIN-NEXT: addq $64, %rsp608; WIN-NEXT: popq %rsi609; WIN-NEXT: retq610;611; MAC-LABEL: log10_f80:612; MAC: ## %bb.0:613; MAC-NEXT: subq $24, %rsp614; MAC-NEXT: fldt {{[0-9]+}}(%rsp)615; MAC-NEXT: fstpt (%rsp)616; MAC-NEXT: callq _log10l617; MAC-NEXT: addq $24, %rsp618; MAC-NEXT: retq619;620; GISEL-X86-LABEL: log10_f80:621; GISEL-X86: # %bb.0:622; GISEL-X86-NEXT: subl $12, %esp623; GISEL-X86-NEXT: fldt {{[0-9]+}}(%esp)624; GISEL-X86-NEXT: fstpt (%esp)625; GISEL-X86-NEXT: calll log10l626; GISEL-X86-NEXT: addl $12, %esp627; GISEL-X86-NEXT: retl628;629; GISEL-X64-LABEL: log10_f80:630; GISEL-X64: # %bb.0:631; GISEL-X64-NEXT: subq $24, %rsp632; GISEL-X64-NEXT: fldt {{[0-9]+}}(%rsp)633; GISEL-X64-NEXT: fstpt (%rsp)634; GISEL-X64-NEXT: callq log10l635; GISEL-X64-NEXT: addq $24, %rsp636; GISEL-X64-NEXT: retq637 %r = tail call nnan ninf x86_fp80 @llvm.log10.f80(x86_fp80 %x)638 ret x86_fp80 %r639}640 641define float @pow_f32(float %x) #0 {642; GNU-LABEL: pow_f32:643; GNU: # %bb.0:644; GNU-NEXT: movaps %xmm0, %xmm1645; GNU-NEXT: jmp powf@PLT # TAILCALL646;647; WIN-LABEL: pow_f32:648; WIN: # %bb.0:649; WIN-NEXT: movaps %xmm0, %xmm1650; WIN-NEXT: jmp powf # TAILCALL651;652; MAC-LABEL: pow_f32:653; MAC: ## %bb.0:654; MAC-NEXT: movaps %xmm0, %xmm1655; MAC-NEXT: jmp _powf ## TAILCALL656;657; GISEL-X86-LABEL: pow_f32:658; GISEL-X86: # %bb.0:659; GISEL-X86-NEXT: subl $12, %esp660; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax661; GISEL-X86-NEXT: movl %eax, (%esp)662; GISEL-X86-NEXT: movl %eax, {{[0-9]+}}(%esp)663; GISEL-X86-NEXT: calll powf664; GISEL-X86-NEXT: addl $12, %esp665; GISEL-X86-NEXT: retl666;667; GISEL-X64-LABEL: pow_f32:668; GISEL-X64: # %bb.0:669; GISEL-X64-NEXT: pushq %rax670; GISEL-X64-NEXT: movaps %xmm0, %xmm1671; GISEL-X64-NEXT: callq powf672; GISEL-X64-NEXT: popq %rax673; GISEL-X64-NEXT: retq674 %r = tail call nnan ninf float @llvm.pow.f32(float %x, float %x)675 ret float %r676}677 678define double @pow_f64(double %x) #0 {679; GNU-LABEL: pow_f64:680; GNU: # %bb.0:681; GNU-NEXT: movaps %xmm0, %xmm1682; GNU-NEXT: jmp pow@PLT # TAILCALL683;684; WIN-LABEL: pow_f64:685; WIN: # %bb.0:686; WIN-NEXT: movaps %xmm0, %xmm1687; WIN-NEXT: jmp pow # TAILCALL688;689; MAC-LABEL: pow_f64:690; MAC: ## %bb.0:691; MAC-NEXT: movaps %xmm0, %xmm1692; MAC-NEXT: jmp _pow ## TAILCALL693;694; GISEL-X86-LABEL: pow_f64:695; GISEL-X86: # %bb.0:696; GISEL-X86-NEXT: subl $28, %esp697; GISEL-X86-NEXT: leal {{[0-9]+}}(%esp), %eax698; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx699; GISEL-X86-NEXT: movl 4(%eax), %eax700; GISEL-X86-NEXT: xorl %edx, %edx701; GISEL-X86-NEXT: addl %esp, %edx702; GISEL-X86-NEXT: movl %ecx, (%esp)703; GISEL-X86-NEXT: movl %eax, 4(%edx)704; GISEL-X86-NEXT: movl $8, %edx705; GISEL-X86-NEXT: addl %esp, %edx706; GISEL-X86-NEXT: movl %ecx, {{[0-9]+}}(%esp)707; GISEL-X86-NEXT: movl %eax, 4(%edx)708; GISEL-X86-NEXT: calll pow709; GISEL-X86-NEXT: addl $28, %esp710; GISEL-X86-NEXT: retl711;712; GISEL-X64-LABEL: pow_f64:713; GISEL-X64: # %bb.0:714; GISEL-X64-NEXT: pushq %rax715; GISEL-X64-NEXT: movaps %xmm0, %xmm1716; GISEL-X64-NEXT: callq pow717; GISEL-X64-NEXT: popq %rax718; GISEL-X64-NEXT: retq719 %r = tail call nnan ninf double @llvm.pow.f64(double %x, double %x)720 ret double %r721}722 723define x86_fp80 @pow_f80(x86_fp80 %x) #0 {724; GNU-LABEL: pow_f80:725; GNU: # %bb.0:726; GNU-NEXT: subq $40, %rsp727; GNU-NEXT: fldt {{[0-9]+}}(%rsp)728; GNU-NEXT: fld %st(0)729; GNU-NEXT: fstpt {{[0-9]+}}(%rsp)730; GNU-NEXT: fstpt (%rsp)731; GNU-NEXT: callq powl@PLT732; GNU-NEXT: addq $40, %rsp733; GNU-NEXT: retq734;735; WIN-LABEL: pow_f80:736; WIN: # %bb.0:737; WIN-NEXT: pushq %rsi738; WIN-NEXT: subq $80, %rsp739; WIN-NEXT: movq %rcx, %rsi740; WIN-NEXT: fldt (%rdx)741; WIN-NEXT: fld %st(0)742; WIN-NEXT: fstpt {{[0-9]+}}(%rsp)743; WIN-NEXT: fstpt {{[0-9]+}}(%rsp)744; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx745; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rdx746; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %r8747; WIN-NEXT: callq powl748; WIN-NEXT: fldt {{[0-9]+}}(%rsp)749; WIN-NEXT: fstpt (%rsi)750; WIN-NEXT: movq %rsi, %rax751; WIN-NEXT: addq $80, %rsp752; WIN-NEXT: popq %rsi753; WIN-NEXT: retq754;755; MAC-LABEL: pow_f80:756; MAC: ## %bb.0:757; MAC-NEXT: subq $40, %rsp758; MAC-NEXT: fldt {{[0-9]+}}(%rsp)759; MAC-NEXT: fld %st(0)760; MAC-NEXT: fstpt {{[0-9]+}}(%rsp)761; MAC-NEXT: fstpt (%rsp)762; MAC-NEXT: callq _powl763; MAC-NEXT: addq $40, %rsp764; MAC-NEXT: retq765;766; GISEL-X86-LABEL: pow_f80:767; GISEL-X86: # %bb.0:768; GISEL-X86-NEXT: subl $28, %esp769; GISEL-X86-NEXT: fldt {{[0-9]+}}(%esp)770; GISEL-X86-NEXT: fld %st(0)771; GISEL-X86-NEXT: fstpt (%esp)772; GISEL-X86-NEXT: fstpt {{[0-9]+}}(%esp)773; GISEL-X86-NEXT: calll powl774; GISEL-X86-NEXT: addl $28, %esp775; GISEL-X86-NEXT: retl776;777; GISEL-X64-LABEL: pow_f80:778; GISEL-X64: # %bb.0:779; GISEL-X64-NEXT: subq $40, %rsp780; GISEL-X64-NEXT: fldt {{[0-9]+}}(%rsp)781; GISEL-X64-NEXT: fld %st(0)782; GISEL-X64-NEXT: fstpt (%rsp)783; GISEL-X64-NEXT: fstpt {{[0-9]+}}(%rsp)784; GISEL-X64-NEXT: callq powl785; GISEL-X64-NEXT: addq $40, %rsp786; GISEL-X64-NEXT: retq787 %r = tail call nnan ninf x86_fp80 @llvm.pow.f80(x86_fp80 %x, x86_fp80 %x)788 ret x86_fp80 %r789}790 791declare float @llvm.exp.f32(float) #1792declare double @llvm.exp.f64(double) #1793declare x86_fp80 @llvm.exp.f80(x86_fp80) #1794 795declare float @llvm.exp2.f32(float) #1796declare double @llvm.exp2.f64(double) #1797declare x86_fp80 @llvm.exp2.f80(x86_fp80) #1798 799declare float @llvm.log.f32(float) #1800declare double @llvm.log.f64(double) #1801declare x86_fp80 @llvm.log.f80(x86_fp80) #1802 803declare float @llvm.log2.f32(float) #1804declare double @llvm.log2.f64(double) #1805declare x86_fp80 @llvm.log2.f80(x86_fp80) #1806 807declare float @llvm.log10.f32(float) #1808declare double @llvm.log10.f64(double) #1809declare x86_fp80 @llvm.log10.f80(x86_fp80) #1810 811declare float @llvm.pow.f32(float, float) #1812declare double @llvm.pow.f64(double, double) #1813declare x86_fp80 @llvm.pow.f80(x86_fp80, x86_fp80) #1814 815attributes #0 = { nounwind "no-infs-fp-math"="true" "no-nans-fp-math"="true" }816attributes #1 = { nounwind readnone speculatable }817 818