[LLParser] Remove unnecessary error check making sure NUW/NSW flags aren't set on a non-integer operation.

Summary: This check appears to be a leftover from when add/sub/mul could be either integer or fp. The NSW/NUW flags are only set for add/sub/mul/shl earlier. And we check that those operations only have integer types just below this. So it seems unnecessary to explicitly error for NUW/NSW being used on a add/sub/mul that have the wrong type that would later error for that.

Reviewers: spatel, dblaikie, jyknight, arsenm

Reviewed By: spatel

Subscribers: wdng, llvm-commits, hiraditya

Tags: #llvm

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

llvm-svn: 359987
This commit is contained in:
Craig Topper 2019-05-05 17:19:23 +00:00
parent 8279695d66
commit f6e07c472d
1 changed files with 0 additions and 6 deletions

View File

@ -3393,12 +3393,6 @@ bool LLParser::ParseValID(ValID &ID, PerFunctionState *PFS) {
return true;
if (Val0->getType() != Val1->getType())
return Error(ID.Loc, "operands of constexpr must have same type");
if (!Val0->getType()->isIntOrIntVectorTy()) {
if (NUW)
return Error(ModifierLoc, "nuw only applies to integer operations");
if (NSW)
return Error(ModifierLoc, "nsw only applies to integer operations");
}
// Check that the type is valid for the operator.
switch (Opc) {
case Instruction::Add: