fpmath.ll 954 B

12345678910111213141516171819202122232425262728293031
  1. ; RUN: not llvm-as < %s 2>&1 | FileCheck %s
  2. define void @fpmath1(i32 %i, float %f, <2 x float> %g) {
  3. %s = add i32 %i, %i, !fpmath !0
  4. ; CHECK: fpmath requires a floating point result!
  5. %t = fadd float %f, %f, !fpmath !1
  6. ; CHECK: fpmath takes one operand!
  7. %u = fadd float %f, %f, !fpmath !2
  8. ; CHECK: fpmath takes one operand!
  9. %v = fadd float %f, %f, !fpmath !3
  10. ; CHECK: invalid fpmath accuracy!
  11. %w = fadd float %f, %f, !fpmath !0
  12. ; Above line is correct.
  13. %w2 = fadd <2 x float> %g, %g, !fpmath !0
  14. ; Above line is correct.
  15. %x = fadd float %f, %f, !fpmath !4
  16. ; CHECK: fpmath accuracy not a positive number!
  17. %y = fadd float %f, %f, !fpmath !5
  18. ; CHECK: fpmath accuracy not a positive number!
  19. %z = fadd float %f, %f, !fpmath !6
  20. ; CHECK: fpmath accuracy not a positive number!
  21. ret void
  22. }
  23. !0 = !{ float 1.0 }
  24. !1 = !{ }
  25. !2 = !{ float 1.0, float 1.0 }
  26. !3 = !{ i32 1 }
  27. !4 = !{ float -1.0 }
  28. !5 = !{ float 0.0 }
  29. !6 = !{ float 0x7FFFFFFF00000000 }