diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2016-06-27 19:43:15 +0000 |
---|---|---|
committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2016-06-27 19:43:15 +0000 |
commit | 1d88d3b08d331bc09e61697fa4d8c80402cd15e6 (patch) | |
tree | 5591503d5ba71da6a516c3fa2c00cedf3e5136aa /test/Verifier | |
parent | bd288e1778dccfbd7eefb77e5be916a62bd65ef4 (diff) |
Verifier: Reject non-float !fpmath
Code already assumes this is float. getFPAccuracy()
crashes on any other type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273912 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Verifier')
-rw-r--r-- | test/Verifier/fpmath.ll | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/Verifier/fpmath.ll b/test/Verifier/fpmath.ll index 2689b69d1d06..4a2e6eea6f15 100644 --- a/test/Verifier/fpmath.ll +++ b/test/Verifier/fpmath.ll @@ -19,6 +19,8 @@ define void @fpmath1(i32 %i, float %f, <2 x float> %g) { ; CHECK: fpmath accuracy not a positive number! %z = fadd float %f, %f, !fpmath !6 ; CHECK: fpmath accuracy not a positive number! + %double.fpmath = fadd float %f, %f, !fpmath !7 +; CHECK: fpmath accuracy must have float type ret void } @@ -29,3 +31,4 @@ define void @fpmath1(i32 %i, float %f, <2 x float> %g) { !4 = !{ float -1.0 } !5 = !{ float 0.0 } !6 = !{ float 0x7FFFFFFF00000000 } +!7 = !{ double 1.0 } |