fma-disable.ll 785 B

123456789101112131415161718192021222324
  1. ; RUN: llc < %s -march=nvptx -mcpu=sm_20 -nvptx-fma-level=1 | FileCheck %s -check-prefix=FMA
  2. ; RUN: llc < %s -march=nvptx -mcpu=sm_20 -nvptx-fma-level=0 | FileCheck %s -check-prefix=MUL
  3. ; RUN: llc < %s -march=nvptx64 -mcpu=sm_20 -nvptx-fma-level=1 | FileCheck %s -check-prefix=FMA
  4. ; RUN: llc < %s -march=nvptx64 -mcpu=sm_20 -nvptx-fma-level=0 | FileCheck %s -check-prefix=MUL
  5. define ptx_device float @test_mul_add_f(float %x, float %y, float %z) {
  6. entry:
  7. ; FMA: fma.rn.f32
  8. ; MUL: mul.rn.f32
  9. ; MUL: add.rn.f32
  10. %a = fmul float %x, %y
  11. %b = fadd float %a, %z
  12. ret float %b
  13. }
  14. define ptx_device double @test_mul_add_d(double %x, double %y, double %z) {
  15. entry:
  16. ; FMA: fma.rn.f64
  17. ; MUL: mul.rn.f64
  18. ; MUL: add.rn.f64
  19. %a = fmul double %x, %y
  20. %b = fadd double %a, %z
  21. ret double %b
  22. }