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
In the next snippet, the if statement is used to set a variable. This variable is then used in another if statement. However, LLVM now fails to detect and eliminate the dead code:
This is actually a regression:
In LLVM 12 both snippets can be optimised.
In LLVM 13 neither snippet can be optimised.
In LLVM 14 only the top snippet can be optimised.
Sometimes, DCE fails when multiple if statements are used.
For example, LLVM detects that the following if statement always evaluates to false and thus removes the dead code:
In the next snippet, the if statement is used to set a variable. This variable is then used in another if statement. However, LLVM now fails to detect and eliminate the dead code:
This is actually a regression:
In LLVM 12 both snippets can be optimised.
In LLVM 13 neither snippet can be optimised.
In LLVM 14 only the top snippet can be optimised.
This can also be seen via the following Compiler Explorer link: https://godbolt.org/z/EzKWjjMn7
The text was updated successfully, but these errors were encountered: