DirectXShaderCompiler/test
David Neto d324261642
Reassociation: fix counting of constant multiplicative factors (#6830)
In the middle of rewriting expressions like (A*B + A*C + D) to pull
common factor A out, the algorithm finds that there's actually only one
A. This is unexpected, and it fires an assertion.

This can occur when A is a constant, and constant -A also appears in the
terms somewhere else.

There is no harm in this situation, however, because the algorithm then
creates an addition-tree, but with a single element, and that's still
correct.

This bookkeeping issue was fixed later in LLVM, at
95abfa35d6

Unfortunately the associated test doesn't translate cleanly to DXC-era
LLVM. I've added test case reduced from our original case.

Fixed: #6829
2024-08-01 11:41:05 -04:00
..
Analysis Enable `.ll` test suffix for LLVM tests (#5887) 2023-10-18 11:55:53 -05:00
Assembler Enable `.ll` test suffix for LLVM tests (#5887) 2023-10-18 11:55:53 -05:00
Bitcode DXC Tests: Filter out unsupported test, add verbose option and improve output (#5537) 2023-08-18 10:56:52 -07:00
CodeGen Enable `.ll` test suffix for LLVM tests (#5887) 2023-10-18 11:55:53 -05:00
Feature Enable `.ll` test suffix for LLVM tests (#5887) 2023-10-18 11:55:53 -05:00
FileCheck first commit 2016-12-28 11:52:27 -08:00
HLSL/passes Reassociation: fix counting of constant multiplicative factors (#6830) 2024-08-01 11:41:05 -04:00
Instrumentation Enable `.ll` test suffix for LLVM tests (#5887) 2023-10-18 11:55:53 -05:00
Integer Disable LLVM LIT suites and tests (#4827) 2022-11-29 12:53:22 -06:00
LTO first commit 2016-12-28 11:52:27 -08:00
Linker Enable `.ll` test suffix for LLVM tests (#5887) 2023-10-18 11:55:53 -05:00
MC [llc/opt] Add an option to run all passes twice (#6666) 2024-06-24 15:03:08 -07:00
Object [llc/opt] Add an option to run all passes twice (#6666) 2024-06-24 15:03:08 -07:00
Other DXC Tests: Filter out unsupported test, add verbose option and improve output (#5537) 2023-08-18 10:56:52 -07:00
SymbolRewriter Enable `.ll` test suffix for LLVM tests (#5887) 2023-10-18 11:55:53 -05:00
TableGen Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
Transforms Reassociate: add global reassociation algorithm (#6598) 2024-05-21 11:55:40 -07:00
Unit first commit 2016-12-28 11:52:27 -08:00
Verifier Update Linux build and test workflows to use lit (#4836) 2022-12-02 12:55:14 -06:00
YAMLParser Fix last LLVM tests on Windows (#4829) 2022-12-02 15:42:58 -06:00
tools Enable `.ll` test suffix for LLVM tests (#5887) 2023-10-18 11:55:53 -05:00
.clang-format first commit 2016-12-28 11:52:27 -08:00
CMakeLists.txt Enable building LLVM testing tools (#4023) 2021-10-21 11:31:31 -05:00
Makefile.tests first commit 2016-12-28 11:52:27 -08:00
TestRunner.sh first commit 2016-12-28 11:52:27 -08:00
lit.cfg Enable `.ll` test suffix for LLVM tests (#5887) 2023-10-18 11:55:53 -05:00
lit.site.cfg.in first commit 2016-12-28 11:52:27 -08:00