diff options
author | Craig Topper <craig.topper@intel.com> | 2019-05-05 17:19:23 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@intel.com> | 2019-05-05 17:19:23 +0000 |
commit | f6e07c472d38c436d2c31320cde4ef9557ec0f86 (patch) | |
tree | 65527383f80296704d794f01fef85f23751e309a /llvm/lib/AsmParser/LLParser.cpp | |
parent | 8279695d666d582877bd4329f090bbacf152c8ee (diff) | |
download | bcm5719-llvm-f6e07c472d38c436d2c31320cde4ef9557ec0f86.tar.gz bcm5719-llvm-f6e07c472d38c436d2c31320cde4ef9557ec0f86.zip |
[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
Diffstat (limited to 'llvm/lib/AsmParser/LLParser.cpp')
-rw-r--r-- | llvm/lib/AsmParser/LLParser.cpp | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp index 30144f40e25..a58925c5a71 100644 --- a/llvm/lib/AsmParser/LLParser.cpp +++ b/llvm/lib/AsmParser/LLParser.cpp @@ -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: |