We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
It seems to be a recent regression and might be related to #49668 .
[618] % clangtk -v clang version 13.0.0 (https://github.com/llvm/llvm-project.git 4789fc7) Target: x86_64-unknown-linux-gnu Thread model: posix InstalledDir: /local/suz-local/opfuzz/bin Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/8 Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6 Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.5.0 Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7 Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.5.0 Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/8 Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.5.0 Candidate multilib: .;@m64 Candidate multilib: 32;@m32 Candidate multilib: x32;@MX32 Selected multilib: .;@m64 [619] % [619] % clangtk -O1 small.c; ./a.out -4 [620] % clangtk -Os small.c [621] % ./a.out -2 [622] % [622] % cat small.c int printf (const char *, ...); char a, f; int b, d; static int *c = &b; unsigned char g(unsigned char h, int i) { return h << i; } void j(int **h) { j(&c); } int main() { *c = 0; d = b | -2; f = g(d, a == 0); printf("%d\n", f); return 0; }
The text was updated successfully, but these errors were encountered:
The bug is in instcombine. Still stepping through, but I suspect it was caused by: https://reviews.llvm.org/rG1b24f35f843c
Sorry, something went wrong.
*** Bug #49668 has been marked as a duplicate of this bug. ***
Thanks for finding the bug and easy reproducer!
Should be fixed with: https://reviews.llvm.org/rGe82db87fb102
Thanks for finding the bug and easy reproducer! Should be fixed with: https://reviews.llvm.org/rGe82db87fb102
Thanks for the fix, Sanjay!
No branches or pull requests
Extended Description
It seems to be a recent regression and might be related to #49668 .
[618] % clangtk -v
clang version 13.0.0 (https://github.com/llvm/llvm-project.git 4789fc7)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /local/suz-local/opfuzz/bin
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/8
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.5.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.5.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/8
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.5.0
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@MX32
Selected multilib: .;@m64
[619] %
[619] % clangtk -O1 small.c; ./a.out
-4
[620] % clangtk -Os small.c
[621] % ./a.out
-2
[622] %
[622] % cat small.c
int printf (const char *, ...);
char a, f;
int b, d;
static int *c = &b;
unsigned char g(unsigned char h, int i) { return h << i; }
void j(int **h) { j(&c); }
int main() {
*c = 0;
d = b | -2;
f = g(d, a == 0);
printf("%d\n", f);
return 0;
}
The text was updated successfully, but these errors were encountered: