fhahn added a comment.

In D86844#2481922 <https://reviews.llvm.org/D86844#2481922>, @xbolva00 wrote:

>   int a, b;
>   
>   int f(void) {
>       while (1) {
>           if (a != b) return 1;
>       }
>       return 0;
>   }
>   
>   int g(int a, int b) {
>       while (1) {
>           if (a != b) return 1;
>       }
>       return 0;
>   }
>
> LLVM does not catch these cases; gcc does.
>
> https://godbolt.org/z/jW7son

Looks like `must progress` does not get added? If it gets added to the IR the 
loops get removed: https://godbolt.org/z/77v17P


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D86844/new/

https://reviews.llvm.org/D86844

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to