brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.0 KiB · f4b8625 Raw
43 lines · plain
1; RUN: llc < %s -mtriple=mipsel -mcpu=mips32r2 -mattr=+micromips | FileCheck %s2; RUN: llc < %s -mtriple=mips -mcpu=mips32r2 -mattr=+micromips | FileCheck %s3; RUN: llc < %s -mtriple=mips -mcpu=mips32r6 -mattr=+micromips | FileCheck %s4; RUN: llc -mtriple=mips -mcpu=mips32                           -asm-show-inst < %s | FileCheck %s --check-prefix=MIPS325; RUN: llc -mtriple=mips -mcpu=mips32r2 -mattr=+fp64            -asm-show-inst < %s | FileCheck %s --check-prefix=MIPS32FP646; RUN: llc -mtriple=mips -mcpu=mips32r3 -mattr=+micromips       -asm-show-inst < %s | FileCheck %s --check-prefix=MM7; RUN: llc -mtriple=mips -mcpu=mips32r3 -mattr=+micromips,+fp64 -asm-show-inst < %s | FileCheck %s --check-prefix=MMFP648; RUN: llc -mtriple=mips -mcpu=mips32r6 -mattr=+micromips       -asm-show-inst < %s | FileCheck %s --check-prefix=MMR69 10define float @sqrt_fn(float %value) #0 {11entry:12  %sqrtf = tail call float @sqrtf(float %value) #013  ret float %sqrtf14}15 16declare float @sqrtf(float)17 18; CHECK: sqrt.s $f0, $f1219 20 21define float @sqrt_s(float %a) {22; MIPS32:     sqrt.s  {{.*}}               # <MCInst #{{[0-9]+}} FSQRT_S23; MIPS32FP64: sqrt.s  {{.*}}               # <MCInst #{{[0-9]+}} FSQRT_S24; MM:         sqrt.s  {{.*}}               # <MCInst #{{[0-9]+}} FSQRT_S_MM25; MMFP64:     sqrt.s  {{.*}}               # <MCInst #{{[0-9]+}} FSQRT_S_MM26; MMR6:       sqrt.s  {{.*}}               # <MCInst #{{[0-9]+}} FSQRT_S_MM27  %ret = call float @llvm.sqrt.f32(float %a)28  ret float %ret29}30 31define double @sqrt_d(double %a) {32; MIPS32:     sqrt.d  {{.*}}               # <MCInst #{{[0-9]+}} FSQRT_D3233; MIPS32FP64: sqrt.d  {{.*}}               # <MCInst #{{[0-9]+}} FSQRT_D6434; MM:         sqrt.d  {{.*}}               # <MCInst #{{[0-9]+}} FSQRT_D32_MM35; MMFP64:     sqrt.d  {{.*}}               # <MCInst #{{[0-9]+}} FSQRT_D64_MM36; MMR6:       sqrt.d  {{.*}}               # <MCInst #{{[0-9]+}} FSQRT_D64_MM37  %ret = call double @llvm.sqrt.f64(double %a)38  ret double %ret39}40 41declare float @llvm.sqrt.f32(float %a)42declare double @llvm.sqrt.f64(double %a)43