aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/AsmParser/LLLexer.cpp
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2024-05-27 16:05:17 +0200
committerGitHub <noreply@github.com>2024-05-27 16:05:17 +0200
commit8cdecd4d3aedea7bc5f27d1f69da216100cb2815 (patch)
treefb5b5a1d15766c4187abfabc4a6248c18bf7f1a3 /llvm/lib/AsmParser/LLLexer.cpp
parent49b760ff2c7da60f4308708f56688ca99874605f (diff)
downloadllvm-8cdecd4d3aedea7bc5f27d1f69da216100cb2815.zip
llvm-8cdecd4d3aedea7bc5f27d1f69da216100cb2815.tar.gz
llvm-8cdecd4d3aedea7bc5f27d1f69da216100cb2815.tar.bz2
[IR] Add getelementptr nusw and nuw flags (#90824)
This implements the `nusw` and `nuw` flags for `getelementptr` as proposed at https://discourse.llvm.org/t/rfc-add-nusw-and-nuw-flags-for-getelementptr/78672. The three possible flags are encapsulated in the new `GEPNoWrapFlags` class. Currently this class has a ctor from bool, interpreted as the InBounds flag. This ctor should be removed in the future, as code gets migrated to handle all flags. There are a few places annotated with `TODO(gep_nowrap)`, where I've had to touch code but opted to not infer or precisely preserve the new flags, so as to keep this as NFC as possible and make sure any changes of that kind get test coverage when they are made.
Diffstat (limited to 'llvm/lib/AsmParser/LLLexer.cpp')
-rw-r--r--llvm/lib/AsmParser/LLLexer.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/AsmParser/LLLexer.cpp b/llvm/lib/AsmParser/LLLexer.cpp
index 8ded07f..20a1bd2 100644
--- a/llvm/lib/AsmParser/LLLexer.cpp
+++ b/llvm/lib/AsmParser/LLLexer.cpp
@@ -566,6 +566,7 @@ lltok::Kind LLLexer::LexIdentifier() {
KEYWORD(fast);
KEYWORD(nuw);
KEYWORD(nsw);
+ KEYWORD(nusw);
KEYWORD(exact);
KEYWORD(disjoint);
KEYWORD(inbounds);