Issue 149802
Summary [clang] Clang unnecessarily removes code during optimization (regression)
Labels clang
Assignees
Reporter damiandcoherent
    Putting these lines at the beginning of a function causes clang to remove the entire function. Does not happen if dummy variable inside the `if` is removed.
```
unsigned A = 32;
unsigned B = 1 << A;
if (B) { unsigned Dummy; }
```

Clang version: 15+, works fine in clang 14.
Optimization level: -O1 or higher

https://godbolt.org/z/554qxxnbz
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to