llvm-project/llvm/test/TableGen/x86-fold-tables.td
Daniel Paoliello 7eb8238a32
[TableGen] Handle Windows line endings in x86-fold-tables.td test (#112997)
The x86-fold-tables.td has been failing for me and [in
CI](https://buildkite.com/llvm-project/github-pull-requests/builds/111277#0192a122-c5c9-4e4e-bc5b-7532fec99ae4)
if Git happens to decide to check out the baseline file with Windows
line endings.

This fix for this is to add the `--strip-trailing-cr` option to diff to
normalize the line endings before comparing them.
2024-10-21 09:58:59 -07:00

8 lines
468 B
TableGen

// Steps to fix this test if it fails:
// 1. Update X86ManualFoldTables.def to manually correct the entries in fold tables, or
// 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 --strip-trailing-cr %p/x86-fold-tables.inc %t