| | | | --- | --- | | Bugzilla Link | [48057](https://llvm.org/bz48057) | | Version | trunk | | OS | Linux | | Attachments | [Added the corresponding IR file](https://user-images.githubusercontent.com/60944935/143761369-c3ce3fa6-f9d6-477e-80b1-85baaae9b0eb.gz) | | Reporter | LLVM Bugzilla Contributor | ## Extended Description $ clang -mllvm -enable-loopinterchange=true -O2 reproducer.c -w && ./a.out 0 $ clang -mllvm -enable-loopinterchange=false -O2 reproducer.c -w && ./a.out 5 $ clang -O0 reproducer.c -w && ./a.out 5 reproducer.c: #include <stdio.h> char b[][8] = {{}, {}, {}, {}, {5}, {}, 2, 3}; int c, d; short e; static char f() { for (; c <= 7; c++) { d = 4; for (; d; d--) b[d + 2][c] && (e = b[d][0]); } } int main() { f(); printf("%d\n", e); }