brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 96b34d8 Raw
39 lines · plain
1; RUN: llc %s -mtriple=sparc -o - | FileCheck --check-prefix=CHECK --check-prefix=DEFAULT %s2; RUN: llc %s -mtriple=sparc -mattr=no-fmuls -o - | FileCheck --check-prefix=CHECK --check-prefix=NO-FMULS %s3; RUN: llc %s -mtriple=sparc -mattr=no-fsmuld -o - | FileCheck --check-prefix=CHECK --check-prefix=NO-FSMULD %s4; RUN: llc %s -mtriple=sparc -mattr=no-fsmuld,no-fmuls -o - | FileCheck --check-prefix=CHECK --check-prefix=NO-BOTH %s5 6;;; Test case ensures that the no-fsmuld and no-fmuls features disable7;;; the relevant instruction, and alternative sequences get emitted8;;; instead.9 10; CHECK-LABEL: test_float_mul:11; DEFAULT:     fmuls12; NO-FSMULD:   fmuls13; NO-FMULS:    fsmuld14; NO-FMULS:    fdtos15; NO-BOTH:     fstod16; NO-BOTH:     fstod17; NO-BOTH:     fmuld18; NO-BOTH:     fdtos19define float @test_float_mul(float %a, float %b) {20entry:21  %mul = fmul float %a, %b22 23  ret float %mul24}25 26; CHECK-LABEL: test_float_mul_double:27; DEFAULT:     fsmuld28; NO-FSMULD:   fstod29; NO-FSMULD:   fstod30; NO-FSMULD:   fmuld31define double @test_float_mul_double(float %a, float %b) {32entry:33  %a_double = fpext float %a to double34  %b_double = fpext float %b to double35  %mul = fmul double %a_double, %b_double36 37  ret double %mul38}39