120 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc -enable-ppc-gen-scalar-mass -O3 -mtriple=powerpc64le-unknown-linux-gnu < %s | FileCheck --check-prefix=CHECK-LNX %s3; RUN: llc -enable-ppc-gen-scalar-mass -O3 -mcpu=ppc -mtriple=powerpc-ibm-aix-xcoff < %s | FileCheck --check-prefix=CHECK-AIX %s4 5define void @cos_f64(ptr %arg) {6; CHECK-LNX-LABEL: cos_f64:7; CHECK-LNX: # %bb.0: # %bb8; CHECK-LNX-NEXT: mflr 09; CHECK-LNX-NEXT: .cfi_def_cfa_offset 4810; CHECK-LNX-NEXT: .cfi_offset lr, 1611; CHECK-LNX-NEXT: .cfi_offset f31, -812; CHECK-LNX-NEXT: stfd 31, -8(1) # 8-byte Folded Spill13; CHECK-LNX-NEXT: stdu 1, -48(1)14; CHECK-LNX-NEXT: addis 3, 2, .LCPI0_0@toc@ha15; CHECK-LNX-NEXT: std 0, 64(1)16; CHECK-LNX-NEXT: xssqrtdp 31, 017; CHECK-LNX-NEXT: lfs 1, .LCPI0_0@toc@l(3)18; CHECK-LNX-NEXT: bl __xl_cos19; CHECK-LNX-NEXT: nop20; CHECK-LNX-NEXT: xsmuldp 0, 31, 121; CHECK-LNX-NEXT: .p2align 422; CHECK-LNX-NEXT: .LBB0_1: # %bb223; CHECK-LNX-NEXT: #24; CHECK-LNX-NEXT: stfd 0, 0(3)25; CHECK-LNX-NEXT: b .LBB0_126;27; CHECK-AIX-LABEL: cos_f64:28; CHECK-AIX: # %bb.0: # %bb29; CHECK-AIX-NEXT: mflr 030; CHECK-AIX-NEXT: stwu 1, -64(1)31; CHECK-AIX-NEXT: stw 0, 72(1)32; CHECK-AIX-NEXT: stfd 31, 56(1) # 8-byte Folded Spill33; CHECK-AIX-NEXT: bl .sqrt[PR]34; CHECK-AIX-NEXT: nop35; CHECK-AIX-NEXT: lwz 3, L..C0(2) # %const.036; CHECK-AIX-NEXT: fmr 31, 137; CHECK-AIX-NEXT: lfs 0, 0(3)38; CHECK-AIX-NEXT: fmr 1, 039; CHECK-AIX-NEXT: bl .__xl_cos[PR]40; CHECK-AIX-NEXT: nop41; CHECK-AIX-NEXT: fmul 0, 31, 142; CHECK-AIX-NEXT: L..BB0_1: # %bb243; CHECK-AIX-NEXT: #44; CHECK-AIX-NEXT: stfd 0, 0(3)45; CHECK-AIX-NEXT: b L..BB0_146bb:47 %i1 = getelementptr i8, ptr %arg, i64 undef48 br label %bb249 50bb2:51 %i3 = getelementptr inbounds i8, ptr %i1, i64 undef52 store double undef, ptr %i3, align 853 %i7 = tail call afn double @llvm.sqrt.f64(double undef)54 %i8 = fmul afn double undef, 0x401921FB54442D2855 %i9 = tail call afn double @llvm.cos.f64(double %i8) #256 %i10 = fmul afn double %i7, %i957 store double %i10, ptr %i1, align 858 br label %bb259}60 61define void @log_f64(ptr %arg) {62; CHECK-LNX-LABEL: log_f64:63; CHECK-LNX: # %bb.0: # %bb64; CHECK-LNX-NEXT: mflr 065; CHECK-LNX-NEXT: .cfi_def_cfa_offset 4866; CHECK-LNX-NEXT: .cfi_offset lr, 1667; CHECK-LNX-NEXT: .cfi_offset f31, -868; CHECK-LNX-NEXT: stfd 31, -8(1) # 8-byte Folded Spill69; CHECK-LNX-NEXT: stdu 1, -48(1)70; CHECK-LNX-NEXT: addis 3, 2, .LCPI1_0@toc@ha71; CHECK-LNX-NEXT: std 0, 64(1)72; CHECK-LNX-NEXT: xssqrtdp 31, 073; CHECK-LNX-NEXT: lfs 1, .LCPI1_0@toc@l(3)74; CHECK-LNX-NEXT: bl __xl_log75; CHECK-LNX-NEXT: nop76; CHECK-LNX-NEXT: xsmuldp 0, 31, 177; CHECK-LNX-NEXT: .p2align 478; CHECK-LNX-NEXT: .LBB1_1: # %bb279; CHECK-LNX-NEXT: #80; CHECK-LNX-NEXT: stfd 0, 0(3)81; CHECK-LNX-NEXT: b .LBB1_182;83; CHECK-AIX-LABEL: log_f64:84; CHECK-AIX: # %bb.0: # %bb85; CHECK-AIX-NEXT: mflr 086; CHECK-AIX-NEXT: stwu 1, -64(1)87; CHECK-AIX-NEXT: stw 0, 72(1)88; CHECK-AIX-NEXT: stfd 31, 56(1) # 8-byte Folded Spill89; CHECK-AIX-NEXT: bl .sqrt[PR]90; CHECK-AIX-NEXT: nop91; CHECK-AIX-NEXT: lwz 3, L..C1(2) # %const.092; CHECK-AIX-NEXT: fmr 31, 193; CHECK-AIX-NEXT: lfs 0, 0(3)94; CHECK-AIX-NEXT: fmr 1, 095; CHECK-AIX-NEXT: bl .__xl_log[PR]96; CHECK-AIX-NEXT: nop97; CHECK-AIX-NEXT: fmul 0, 31, 198; CHECK-AIX-NEXT: L..BB1_1: # %bb299; CHECK-AIX-NEXT: #100; CHECK-AIX-NEXT: stfd 0, 0(3)101; CHECK-AIX-NEXT: b L..BB1_1102bb:103 %i1 = getelementptr i8, ptr %arg, i64 undef104 br label %bb2105 106bb2:107 %i3 = getelementptr inbounds i8, ptr %i1, i64 undef108 store double undef, ptr %i3, align 8109 %i7 = tail call afn double @llvm.sqrt.f64(double undef)110 %i8 = fmul afn double undef, 0x401921FB54442D28111 %i9 = tail call afn double @llvm.log.f64(double %i8) #2112 %i10 = fmul afn double %i7, %i9113 store double %i10, ptr %i1, align 8114 br label %bb2115}116 117declare double @llvm.sqrt.f64(double)118declare double @llvm.cos.f64(double)119declare double @llvm.log.f64(double)120