You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Agreed, definitely a regression from my patch. I'd missed a hasOneUse check somewhere in the process of splitting and rebasing this. Will have a fix landed shortly, sorry for the breakage.
p.s. The bug is actually introduced before the patch fingered. That's simply the first one which exposes this particular use case.
[indvars] Fix pr52276 (missing one use check)
The recently added logic to canonicalize exit conditions to unsigned relies on facts which hold about the use (i.e. exit test). Applying this blindly to the icmp is not legal, as there may be another use which never reaches the exit. Restrict ourselves to case where we have a single use.
Please reopen if needed. I confirmed the reduced test case was fixed, but not the original C example.
Extended Description
This appears to be a recent regression.
[679] % clangtk -v
clang version 14.0.0 (https://github.com/llvm/llvm-project.git 2410fb4)
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
Selected multilib: .;@m64
[680] %
[680] % clangtk -O0 small.c; ./a.out
[681] %
[681] % clangtk -O1 small.c
[682] % timeout -s 9 10 ./a.out
Killed
[683] %
[683] % cat small.c
int a, b;
int main() {
while ((a > 0) < ~a)
b++;
return 0;
}
The text was updated successfully, but these errors were encountered: