2012-07-02 20:37:59 +02:00
|
|
|
; RUN: not llvm-as < %s 2>&1 | FileCheck %s
|
2012-04-14 14:36:06 +02:00
|
|
|
|
2012-04-16 18:28:59 +02:00
|
|
|
define void @fpmath1(i32 %i, float %f, <2 x float> %g) {
|
2012-04-14 14:36:06 +02:00
|
|
|
%s = add i32 %i, %i, !fpmath !0
|
|
|
|
; CHECK: fpmath requires a floating point result!
|
|
|
|
%t = fadd float %f, %f, !fpmath !1
|
|
|
|
; CHECK: fpmath takes one operand!
|
|
|
|
%u = fadd float %f, %f, !fpmath !2
|
|
|
|
; CHECK: fpmath takes one operand!
|
|
|
|
%v = fadd float %f, %f, !fpmath !3
|
2012-04-16 18:28:59 +02:00
|
|
|
; CHECK: invalid fpmath accuracy!
|
2012-04-14 14:36:06 +02:00
|
|
|
%w = fadd float %f, %f, !fpmath !0
|
|
|
|
; Above line is correct.
|
|
|
|
%w2 = fadd <2 x float> %g, %g, !fpmath !0
|
|
|
|
; Above line is correct.
|
|
|
|
%x = fadd float %f, %f, !fpmath !4
|
2012-04-16 18:28:59 +02:00
|
|
|
; CHECK: fpmath accuracy not a positive number!
|
2012-04-14 14:36:06 +02:00
|
|
|
%y = fadd float %f, %f, !fpmath !5
|
2012-04-16 18:28:59 +02:00
|
|
|
; CHECK: fpmath accuracy not a positive number!
|
2012-04-14 14:36:06 +02:00
|
|
|
%z = fadd float %f, %f, !fpmath !6
|
2012-04-16 18:28:59 +02:00
|
|
|
; CHECK: fpmath accuracy not a positive number!
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2012-04-14 14:36:06 +02:00
|
|
|
!0 = metadata !{ float 1.0 }
|
|
|
|
!1 = metadata !{ }
|
|
|
|
!2 = metadata !{ float 1.0, float 1.0 }
|
|
|
|
!3 = metadata !{ i32 1 }
|
|
|
|
!4 = metadata !{ float -1.0 }
|
2012-04-16 18:28:59 +02:00
|
|
|
!5 = metadata !{ float 0.0 }
|
2012-04-14 14:36:06 +02:00
|
|
|
!6 = metadata !{ float 0x7FFFFFFF00000000 }
|