Skip to content

Commit

Permalink
[NFC][NewGVN] Explicitly check fpmath metadata in fpmath.ll
Browse files Browse the repository at this point in the history
Suggested in D63933.

llvm-svn: 364685
  • Loading branch information
mcinally committed Jun 28, 2019
1 parent 573b241 commit b671535
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions llvm/test/Transforms/NewGVN/fpmath.ll
Expand Up @@ -13,7 +13,7 @@ define double @test1(double %x, double %y) {

define double @test2(double %x, double %y) {
; CHECK: @test2(double %x, double %y)
; CHECK: %add1 = fadd double %x, %y, !fpmath !0
; CHECK: %add1 = fadd double %x, %y, !fpmath ![[MD0:[0-9]+]]
; CHECK: %foo = fadd double %add1, %add1
%add1 = fadd double %x, %y, !fpmath !0
%add2 = fadd double %x, %y, !fpmath !0
Expand All @@ -23,7 +23,7 @@ define double @test2(double %x, double %y) {

define double @test3(double %x, double %y) {
; CHECK: @test3(double %x, double %y)
; CHECK: %add1 = fadd double %x, %y, !fpmath !1
; CHECK: %add1 = fadd double %x, %y, !fpmath ![[MD1:[0-9]+]]
; CHECK: %foo = fadd double %add1, %add1
%add1 = fadd double %x, %y, !fpmath !1
%add2 = fadd double %x, %y, !fpmath !0
Expand All @@ -33,7 +33,7 @@ define double @test3(double %x, double %y) {

define double @test4(double %x, double %y) {
; CHECK: @test4(double %x, double %y)
; CHECK: %add1 = fadd double %x, %y, !fpmath !1
; CHECK: %add1 = fadd double %x, %y, !fpmath ![[MD1]]
; CHECK: %foo = fadd double %add1, %add1
%add1 = fadd double %x, %y, !fpmath !0
%add2 = fadd double %x, %y, !fpmath !1
Expand All @@ -43,13 +43,16 @@ define double @test4(double %x, double %y) {

define double @test5(double %x) {
; CHECK: @test5(double %x)
; CHECK: %neg1 = fneg double %x, !fpmath !1
; CHECK: %neg1 = fneg double %x, !fpmath ![[MD1]]
; CHECK: %foo = fadd double %neg1, %neg1
%neg1 = fneg double %x, !fpmath !0
%neg2 = fneg double %x, !fpmath !1
%foo = fadd double %neg1, %neg2
ret double %foo
}

; CHECK: ![[MD0]] = !{float 5.000000e+00}
; CHECK: ![[MD1]] = !{float 2.500000e+00}

!0 = !{ float 5.0 }
!1 = !{ float 2.5 }

0 comments on commit b671535

Please sign in to comment.