[llvm] 070233d - [X86][mem-fold] Speed up test by not re-generating the .inc file

Shengchen Kan via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 10 21:05:20 PDT 2023


Author: Shengchen Kan
Date: 2023-04-11T12:05:13+08:00
New Revision: 070233dab0fdc6098a8b645774003fb0511e5962

URL: https://github.com/llvm/llvm-project/commit/070233dab0fdc6098a8b645774003fb0511e5962
DIFF: https://github.com/llvm/llvm-project/commit/070233dab0fdc6098a8b645774003fb0511e5962.diff

LOG: [X86][mem-fold] Speed up test by not re-generating the .inc file

Reviewed By: pengfei

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

Added: 
    llvm/test/TableGen/x86-fold-tables.test

Modified: 
    llvm/test/TableGen/lit.local.cfg

Removed: 
    llvm/test/TableGen/x86-fold-tables.td


################################################################################
diff  --git a/llvm/test/TableGen/lit.local.cfg b/llvm/test/TableGen/lit.local.cfg
index 1dbd83e71d816..ba0a5eeb911f5 100644
--- a/llvm/test/TableGen/lit.local.cfg
+++ b/llvm/test/TableGen/lit.local.cfg
@@ -1,2 +1,3 @@
-config.suffixes = ['.td']
+config.suffixes = ['.td', '.test']
 config.excludes = ['Common']
+config.substitutions.append(('%llvm_lib_dir', f'{config.llvm_lib_dir}'))

diff  --git a/llvm/test/TableGen/x86-fold-tables.td b/llvm/test/TableGen/x86-fold-tables.test
similarity index 59%
rename from llvm/test/TableGen/x86-fold-tables.td
rename to llvm/test/TableGen/x86-fold-tables.test
index d6e59bea0000b..aedb4c32ec939 100644
--- a/llvm/test/TableGen/x86-fold-tables.td
+++ b/llvm/test/TableGen/x86-fold-tables.test
@@ -3,5 +3,4 @@
 //      fix the vulnerable rules in X86FoldTablesEmitter.cpp until the 
diff  is reasonable
 //   2. cp <generated_file> x86-fold-tables.inc
 
-// RUN: llvm-tblgen -gen-x86-fold-tables -asmwriternum=1 %p/../../lib/Target/X86/X86.td -I %p/../../lib/Target/X86 -I %p/../../include -o %t
-// RUN: 
diff  %p/x86-fold-tables.inc %t
+// RUN: 
diff  %p/x86-fold-tables.inc %llvm_lib_dir/Target/X86/X86GenFoldTables.inc


        


More information about the llvm-commits mailing list