Add FMF to vector ops for phi

Summary: Small amendment to handle vector cases for D67564.

Reviewers: spatel, eli.friedman, hfinkel, cameron.mcinally, arsenm, jmolloy, bogner

Reviewed By: cameron.mcinally, bogner

Subscribers: llvm-commits, efriedma, reames, bogner, wdng

Differential Revision: https://reviews.llvm.org/D68748

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374794 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Michael Berg
2019-10-14 17:39:32 +00:00
parent 67d83413d0
commit 4fc0adb6ee
2 changed files with 22 additions and 1 deletions
+21
View File
@@ -882,6 +882,27 @@ exit:
ret void
}
define void @fastmathflags_vector_phi(i1 %cond, <4 x float> %f1, <4 x float> %f2, <2 x double> %d1, <2 x double> %d2, <8 x half> %h1, <8 x half> %h2) {
entry:
br i1 %cond, label %L1, label %L2
L1:
br label %exit
L2:
br label %exit
exit:
%p.nnan = phi nnan <4 x float> [ %f1, %L1 ], [ %f2, %L2 ]
; CHECK: %p.nnan = phi nnan <4 x float> [ %f1, %L1 ], [ %f2, %L2 ]
%p.ninf = phi ninf <2 x double> [ %d1, %L1 ], [ %d2, %L2 ]
; CHECK: %p.ninf = phi ninf <2 x double> [ %d1, %L1 ], [ %d2, %L2 ]
%p.contract = phi contract <8 x half> [ %h1, %L1 ], [ %h2, %L2 ]
; CHECK: %p.contract = phi contract <8 x half> [ %h1, %L1 ], [ %h2, %L2 ]
%p.nsz.reassoc = phi reassoc nsz <4 x float> [ %f1, %L1 ], [ %f2, %L2 ]
; CHECK: %p.nsz.reassoc = phi reassoc nsz <4 x float> [ %f1, %L1 ], [ %f2, %L2 ]
%p.fast = phi fast <8 x half> [ %h2, %L1 ], [ %h1, %L2 ]
; CHECK: %p.fast = phi fast <8 x half> [ %h2, %L1 ], [ %h1, %L2 ]
ret void
}
; Check various fast math flags and floating-point types on calls.
declare float @fmf1()