Skip to content

Commit 22afca2

Browse files
committed
[NFC][GVN] Pre-commit unary FNeg tests to fpmath.ll
llvm-svn: 364587
1 parent 223df5b commit 22afca2

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

llvm/test/Transforms/GVN/fpmath.ll

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,16 @@ define double @test4(double %x, double %y) {
4141
ret double %foo
4242
}
4343

44+
define double @test5(double %x, double %y) {
45+
; CHECK: @test5(double %x, double %y)
46+
; CHECK: %neg1 = fneg double %x, !fpmath !0
47+
; CHECK: %neg2 = fneg double %x, !fpmath !1
48+
; CHECK: %foo = fadd double %neg1, %neg2
49+
%neg1 = fneg double %x, !fpmath !0
50+
%neg2 = fneg double %x, !fpmath !1
51+
%foo = fadd double %neg1, %neg2
52+
ret double %foo
53+
}
54+
4455
!0 = !{ float 5.0 }
4556
!1 = !{ float 2.5 }

0 commit comments

Comments
 (0)