diff --git a/test/Transforms/NewGVN/fpmath.ll b/test/Transforms/NewGVN/fpmath.ll index 2ff8fffe899..6933ba3344c 100644 --- a/test/Transforms/NewGVN/fpmath.ll +++ b/test/Transforms/NewGVN/fpmath.ll @@ -41,5 +41,16 @@ define double @test4(double %x, double %y) { ret double %foo } +define double @test5(double %x) { +; CHECK: @test5(double %x) +; CHECK: %neg1 = fneg double %x, !fpmath !0 +; CHECK: %neg2 = fneg double %x, !fpmath !1 +; CHECK: %foo = fadd double %neg1, %neg2 + %neg1 = fneg double %x, !fpmath !0 + %neg2 = fneg double %x, !fpmath !1 + %foo = fadd double %neg1, %neg2 + ret double %foo +} + !0 = !{ float 5.0 } !1 = !{ float 2.5 }