Rename "fpaccuracy" metadata to the more generic "fpmath". That's because I'm
[oota-llvm.git] / test / Verifier / fpmath.ll
1 ; RUN: not llvm-as < %s |& FileCheck %s
2
3 define void @foo(i32 %i, float %f, <2 x float> %g) {
4   %s = add i32 %i, %i, !fpmath !0
5 ; CHECK: fpmath requires a floating point result!
6   %t = fadd float %f, %f, !fpmath !1
7 ; CHECK: fpmath takes one operand!
8   %u = fadd float %f, %f, !fpmath !2
9 ; CHECK: fpmath takes one operand!
10   %v = fadd float %f, %f, !fpmath !3
11 ; CHECK: fpmath ULPs not a floating point number!
12   %w = fadd float %f, %f, !fpmath !0
13 ; Above line is correct.
14   %w2 = fadd <2 x float> %g, %g, !fpmath !0
15 ; Above line is correct.
16   %x = fadd float %f, %f, !fpmath !4
17 ; CHECK: fpmath ULPs is negative!
18   %y = fadd float %f, %f, !fpmath !5
19 ; CHECK: fpmath ULPs is negative!
20   %z = fadd float %f, %f, !fpmath !6
21 ; CHECK: fpmath ULPs not a normal number!
22   ret void
23 }
24
25 !0 = metadata !{ float 1.0 }
26 !1 = metadata !{ }
27 !2 = metadata !{ float 1.0, float 1.0 }
28 !3 = metadata !{ i32 1 }
29 !4 = metadata !{ float -1.0 }
30 !5 = metadata !{ float -0.0 }
31 !6 = metadata !{ float 0x7FFFFFFF00000000 }