Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable_unary_reductions(graph) in -Jred cause runtime errors of 18 llvm-test-suite tests #304

Open
sjalander opened this issue Dec 5, 2023 · 0 comments
Labels

Comments

@sjalander
Copy link
Collaborator

Recreate
Modify jlm/llvm/opt/reduction.cpp (line 134)

static void
reduce(RvsdgModule & rm, util::StatisticsCollector & statisticsCollector)
{

and disable all optimizations except the load_reduction, i.e.,
// enable_mux_reductions(graph);
// enable_store_reductions(graph);
// enable_load_reductions(graph);
// enable_gamma_reductions(graph);
enable_unary_reductions(graph);
// enable_binary_reductions(graph);

Compile the file separately to avoid having to comment out unused functions:
/usr/lib/llvm-16/bin/clang++ -c --std=c++17 -gdwarf-4 -g -DJLM_DEBUG -DJLM_ENABLE_ASSERTS -I. -I/usr/lib/llvm-16/include -I. -I/usr/lib/llvm-16/include -o build/jlm/llvm/opt/reduction.la jlm/llvm/opt/reduction.cpp

Then compile jlm with debug:
make jlm-debug -j nproc

Then run the llvm-test-suite
make llvm-run-red

Output
Failed Tests (18):
test-suite :: SingleSource/Regression/C/gcc-c-torture/execute/GCC-C-execute-20001009-1.test
test-suite :: SingleSource/Regression/C/gcc-c-torture/execute/GCC-C-execute-20020614-1.test
test-suite :: SingleSource/Regression/C/gcc-c-torture/execute/GCC-C-execute-920908-2.test
test-suite :: SingleSource/Regression/C/gcc-c-torture/execute/GCC-C-execute-921016-1.test
test-suite :: SingleSource/Regression/C/gcc-c-torture/execute/GCC-C-execute-arith-rand-ll.test
test-suite :: SingleSource/Regression/C/gcc-c-torture/execute/GCC-C-execute-arith-rand.test
test-suite :: SingleSource/Regression/C/gcc-c-torture/execute/GCC-C-execute-bf-sign-1.test
test-suite :: SingleSource/Regression/C/gcc-c-torture/execute/GCC-C-execute-bitfld-1.test
test-suite :: SingleSource/Regression/C/gcc-c-torture/execute/GCC-C-execute-pr16790-1.test
test-suite :: SingleSource/Regression/C/gcc-c-torture/execute/GCC-C-execute-pr48973-1.test
test-suite :: SingleSource/Regression/C/gcc-c-torture/execute/GCC-C-execute-pr48973-2.test
test-suite :: SingleSource/Regression/C/gcc-c-torture/execute/GCC-C-execute-pr49123.test
test-suite :: SingleSource/Regression/C/gcc-c-torture/execute/GCC-C-execute-pr55750.test
test-suite :: SingleSource/Regression/C/gcc-c-torture/execute/GCC-C-execute-pr58726.test
test-suite :: SingleSource/Regression/C/gcc-c-torture/execute/GCC-C-execute-pr61306-2.test
test-suite :: SingleSource/Regression/C/gcc-c-torture/execute/GCC-C-execute-struct-ini-2.test
test-suite :: SingleSource/UnitTests/2005-05-13-SDivTwo.test
test-suite :: SingleSource/UnitTests/2006-01-23-UnionInit.test

@phate phate added the bug label Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants