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

llvm-svn: 374794
This commit is contained in:
Michael Berg
2019-10-14 17:39:32 +00:00
parent 1d32d8b176
commit 5af0201c2a
2 changed files with 22 additions and 1 deletions

View File

@@ -4641,7 +4641,7 @@ Error BitcodeReader::parseFunctionBody(Function *F) {
// There is an optional final record for fast-math-flags if this phi has a
// floating-point type.
size_t NumArgs = (Record.size() - 1) / 2;
if ((Record.size() - 1) % 2 == 1 && !Ty->isFloatingPointTy())
if ((Record.size() - 1) % 2 == 1 && !Ty->isFPOrFPVectorTy())
return error("Invalid record");
PHINode *PN = PHINode::Create(Ty, NumArgs);