[llvm] 99adc0a - [X86][mem-fold][NFC] Simplify code by transform A != 0 - > A
Shengchen Kan via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 8 18:32:20 PDT 2023
Author: Shengchen Kan
Date: 2023-04-09T09:29:41+08:00
New Revision: 99adc0ac3ff0e498fc272c4f8b3c8051ffdcaaac
URL: https://github.com/llvm/llvm-project/commit/99adc0ac3ff0e498fc272c4f8b3c8051ffdcaaac
DIFF: https://github.com/llvm/llvm-project/commit/99adc0ac3ff0e498fc272c4f8b3c8051ffdcaaac.diff
LOG: [X86][mem-fold][NFC] Simplify code by transform A != 0 - > A
Added:
Modified:
llvm/utils/TableGen/X86FoldTablesEmitter.cpp
Removed:
################################################################################
diff --git a/llvm/utils/TableGen/X86FoldTablesEmitter.cpp b/llvm/utils/TableGen/X86FoldTablesEmitter.cpp
index b116675a6216a..688f9bd38ee23 100644
--- a/llvm/utils/TableGen/X86FoldTablesEmitter.cpp
+++ b/llvm/utils/TableGen/X86FoldTablesEmitter.cpp
@@ -285,7 +285,7 @@ class IsMatch {
const Record *MemRec = MemInst->TheDef;
// EVEX_B means
diff erent things for memory and register forms.
- if (RegRI.HasEVEX_B != 0 || MemRI.HasEVEX_B != 0)
+ if (RegRI.HasEVEX_B || MemRI.HasEVEX_B)
return false;
if (!mayFoldFromLeftToRight(RegRI.Form, MemRI.Form))
More information about the llvm-commits
mailing list