From e7a7f50943a66a00f41eaa5fa0e6bb5bcb65a389 Mon Sep 17 00:00:00 2001 From: Cameron McInally Date: Fri, 28 Jun 2019 21:39:08 +0000 Subject: [PATCH] [NFC][NewGVN] Explicitly check fpmath metadata in fpmath.ll Suggested in D63933. llvm-svn: 364685 --- test/Transforms/NewGVN/fpmath.ll | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/test/Transforms/NewGVN/fpmath.ll b/test/Transforms/NewGVN/fpmath.ll index 8098bbfc1ce..0d7dc9dc105 100644 --- a/test/Transforms/NewGVN/fpmath.ll +++ b/test/Transforms/NewGVN/fpmath.ll @@ -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 @@ -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 @@ -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 @@ -43,7 +43,7 @@ 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 @@ -51,5 +51,8 @@ define double @test5(double %x) { ret double %foo } +; CHECK: ![[MD0]] = !{float 5.000000e+00} +; CHECK: ![[MD1]] = !{float 2.500000e+00} + !0 = !{ float 5.0 } !1 = !{ float 2.5 }