1; RUN: not llvm-as < %s 2>&1 | FileCheck %s
2
3define 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  %double.fpmath = fadd float %f, %f, !fpmath !7
23; CHECK: fpmath accuracy must have float type
24  ret void
25}
26
27!0 = !{ float 1.0 }
28!1 = !{ }
29!2 = !{ float 1.0, float 1.0 }
30!3 = !{ i32 1 }
31!4 = !{ float -1.0 }
32!5 = !{ float 0.0 }
33!6 = !{ float 0x7FFFFFFF00000000 }
34!7 = !{ double 1.0 }
35