blob: 4cfed2a39797bd9949ca3f545d7642580b5deb0d [file] [log] [blame]
Duncan Sands5e5c5f82012-04-14 12:36:06 +00001; RUN: not llvm-as < %s |& FileCheck %s
2
3define 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 }