Merging r259645:
[oota-llvm.git] / test / Verifier / fpmath.ll
1 ; RUN: not llvm-as < %s 2>&1 | FileCheck %s
2
3 define void @fpmath1(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: invalid fpmath accuracy!
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 accuracy not a positive number!
18   %y = fadd float %f, %f, !fpmath !5
19 ; CHECK: fpmath accuracy not a positive number!
20   %z = fadd float %f, %f, !fpmath !6
21 ; CHECK: fpmath accuracy not a positive number!
22   ret void
23 }
24
25 !0 = !{ float 1.0 }
26 !1 = !{ }
27 !2 = !{ float 1.0, float 1.0 }
28 !3 = !{ i32 1 }
29 !4 = !{ float -1.0 }
30 !5 = !{ float 0.0 }
31 !6 = !{ float 0x7FFFFFFF00000000 }