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
Invariant load hoisting causes LNT miscompiles #29355
Comments
I managed to pinpoint further. LNT fails with the following command line: mysandbox/bin/lnt runtest nt --sandbox /tmp/bar --cc /home/grosser/Projects/polly/build/bin/clang --cxx /home/grosser/Projects/polly/build/bin/clang++ --test-suite test-suite/ -j4 --only-test MultiSource/Applications/JM/lencod --mllvm=-polly --multisample=1 --mllvm=-polly-process-unprofitable --mllvm=-polly-invariant-load-hoisting --mllvm=-debug-only=polly-scops --mllvm=-polly-only-func=dct_luma_16x16 --mllvm=-polly-only-region=for.body32 The scop in question has the following invariant loads:
Interestingly, the scop itself just consists of a single basic block, which is always executed at least once. So the only situation under which the execution context could be empty without us loading garbage from memory is a situation where we fall back to the original code. However, the run-time check only contains (besides the alias checks) a couple of overflow conditions that are unlikely to trigger: 0 == (p_0 + p_1 <= -2147483649 || p_0 + p_1 >= 2147483648 || p_2 >= 2147483633 || p_0 <= -1) #29354 showed also an empty execution context, such that the fix we applied at this point (https://llvm.org/svn/llvm-project/polly/trunk@279047) could have caused a regression here. However, I confirmed this is not the case, as the empty execution context remains even with r279047 reverted. |
With r286781 we see at the following compile-time crash: #1 0x00007fd8d41d2626 SignalHandler(int) (/home/grosser/.data-unbackupped/polly-build/bin/../lib/libLLVMSupport.so.40+0xf1626) |
Extended Description
With 278673 -polly -polly-process-unprofitable LNT shows the following miscompile:
FAIL: lencod.execution_time
This miscompile disappears when disabling invariant load hoisting. It is not yet confirmed that this is due to invariant load hoisting. More investigation is needed to confirm this.
The text was updated successfully, but these errors were encountered: