diff --git a/llvm/utils/emacs/tablegen-mode.el b/llvm/utils/emacs/tablegen-mode.el
--- a/llvm/utils/emacs/tablegen-mode.el
+++ b/llvm/utils/emacs/tablegen-mode.el
@@ -18,7 +18,8 @@
(defvar tablegen-font-lock-keywords
(let ((kw (regexp-opt '("class" "defm" "def" "field" "include" "in"
- "let" "multiclass" "foreach")
+ "let" "multiclass" "foreach" "if" "then" "else"
+ "defvar" "defset")
'words))
(type-kw (regexp-opt '("bit" "bits" "code" "dag" "int" "list" "string")
'words))
diff --git a/llvm/utils/kate/llvm-tablegen.xml b/llvm/utils/kate/llvm-tablegen.xml
--- a/llvm/utils/kate/llvm-tablegen.xml
+++ b/llvm/utils/kate/llvm-tablegen.xml
@@ -5,6 +5,10 @@
- foreach
- field
+ - if
+ - then
+ - else
+ - defvar
- in
diff --git a/llvm/utils/vim/syntax/tablegen.vim b/llvm/utils/vim/syntax/tablegen.vim
--- a/llvm/utils/vim/syntax/tablegen.vim
+++ b/llvm/utils/vim/syntax/tablegen.vim
@@ -14,7 +14,7 @@
syn case match
-syn keyword tgKeyword def let in code dag field include defm foreach
+syn keyword tgKeyword def let in code dag field include defm foreach defset defvar if then else
syn keyword tgType class int string list bit bits multiclass
syn match tgNumber /\<\d\+\>/
diff --git a/llvm/utils/vscode/tablegen/syntaxes/TableGen.tmLanguage b/llvm/utils/vscode/tablegen/syntaxes/TableGen.tmLanguage
--- a/llvm/utils/vscode/tablegen/syntaxes/TableGen.tmLanguage
+++ b/llvm/utils/vscode/tablegen/syntaxes/TableGen.tmLanguage
@@ -18,7 +18,7 @@
match
- \b(def|let|in|code|dag|string|list|bits|bit|field|include|defm|foreach|class|multiclass|int)\b
+ \b(def|let|in|code|dag|string|list|bits|bit|field|include|defm|foreach|class|multiclass|int|defvar|defset|if|then|else)\b
name
keyword.control.tablegen