-
Notifications
You must be signed in to change notification settings - Fork 11.8k
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
Clang crash: Assertion `TableSize >= Values.size() && "Can't fit values in table!"' failed. #71329
Labels
Comments
github-actions
bot
added
the
clang
Clang issues not falling into any other category
label
Nov 5, 2023
I'll take a look, thanks for your report simple the case, https://gcc.godbolt.org/z/3sGcoqzMs
|
EugeneZelenko
added
llvm:optimizations
crash
Prefer [crash-on-valid] or [crash-on-invalid]
and removed
clang
Clang issues not falling into any other category
labels
Nov 6, 2023
This was referenced Nov 6, 2023
Let's revert to green in the meantime. |
zmodem
added a commit
that referenced
this issue
Nov 7, 2023
vfdff
added a commit
to vfdff/llvm-project
that referenced
this issue
Nov 8, 2023
…tion When the small mask value little than 64, we can eliminate the checking for upper limit of the range by enlarge the lookup table size to the maximum index value. (Then the final table size grows to the next pow2 value) ``` bool f(unsigned x) { switch (x % 8) { case 0: return 1; case 1: return 0; case 2: return 0; case 3: return 1; case 4: return 1; case 5: return 0; case 6: return 1; // This would remove the range check: case 7: return 0; } return 0; } ``` Use WouldFitInRegister instead of fitsInLegalInteger to support more result type beside bool. Fixes llvm#65120 Note: For '%add = add nuw i32 %x, 1', we can infer the LowerBound is 1, but the UpperBound is wrapped to 0 in computeConstantRange. so we can't assume the UpperBound is valid bound when its value is 0. Fix llvm#71329.
qihangkong
pushed a commit
to rvgpu/llvm
that referenced
this issue
Apr 18, 2024
…mall mask operation (#70542)" This caused llvm/llvm-project#71329 > Fix the compile crash when the default result has no result for > llvm/llvm-project#65835 > > Fixes llvm/llvm-project#65120 > Reviewed By: zmodem, nikic This reverts commit 7c4180a.
qihangkong
pushed a commit
to rvgpu/llvm
that referenced
this issue
Apr 18, 2024
…1351) Fix the crash for the last land PR70542. Note: For '%add = add nuw i32 %x, 1', we can only infer the LowerBound is 1, but the UpperBound is wrapped to 0 in computeConstantRange. so we can't assume the UpperBound is valid bound when its value is 0. Fix llvm/llvm-project#71329. Reviewed By: zmodem, nikic
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
clang at -O1 crashes on the test case.
Bisected to 7c4180a, which was committed by @vfdff
Compiler explorer: https://godbolt.org/z/Eh65EPrTM
The text was updated successfully, but these errors were encountered: