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

ninja -C build check-llvm fails in Kaleidoscope tests #63204

Closed
Philius opened this issue Jun 8, 2023 · 7 comments
Closed

ninja -C build check-llvm fails in Kaleidoscope tests #63204

Philius opened this issue Jun 8, 2023 · 7 comments

Comments

@Philius
Copy link

Philius commented Jun 8, 2023

Operating system: Debian Bookworm AMD64
Memory: 16 GB
Swap: 33.554428 GB

I ran CMake as follows:

cmake -S llvm -B build -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLLVM_BUILD_EXAMPLES=1 -DLLVM_PARALLEL_LINK_JOBS=1 -DLLVM_PARALLEL_COMPILE_JOBS=16

Then

ninja -C build check-llvm

It fails:

********************
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.. 
********************
Failed Tests (4):
  LLVM :: Examples/Kaleidoscope/Chapter4.test
  LLVM :: Examples/Kaleidoscope/Chapter5.test
  LLVM :: Examples/Kaleidoscope/Chapter6.test
  LLVM :: Examples/Kaleidoscope/Chapter7.test

So it's either a problem with the tests or the programs.
There's no point looking deeper until someone else can reproduce these results.

@nikic
Copy link
Contributor

nikic commented Jun 9, 2023

Some time ago @weliveindetail tracked this down to -fno-lifetime-dse getting enabled. There is a patch to fix this at https://reviews.llvm.org/D107087.

@Philius
Copy link
Author

Philius commented Jun 10, 2023

But I'm not using MSVC - I'm in g++ land.
Let me know when a patch arrives in master.

@nikic
Copy link
Contributor

nikic commented Jun 10, 2023

Yes, the issue now also exists with GCC.

It may make sense to disable the kaleidoscope tests by default until this is fixed.

@Philius
Copy link
Author

Philius commented Jun 11, 2023

The kaleidoscope tests wrap the kaleidoscope programs.
At least on my system, the programs fail with a segfault.
I didn't (directly) enable the kaleidoscope tests, I enabled building the examples, which apparently enabled the tests.

@weliveindetail
Copy link
Contributor

Should be fixed on mainline with 9ce0641 @Philius does it work for you now?

@Philius
Copy link
Author

Philius commented Jul 6, 2023

I did a git pull --rebase, then a git reset --hard HEAD then the steps above.
Here's what I eventually got:

[4013/4014] Running the LLVM regression tests

Testing Time: 356.16s
  Skipped          :    15
  Unsupported      :   731
  Passed           : 53555
  Expectedly Failed:   164

Running build/bin/Kaleidoscope-Ch4 presents "ready>" so no segfault.
Looks like it's fixed!

@nikic
Copy link
Contributor

nikic commented Jul 6, 2023

Thanks for confirming!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants