I have a kernel with a if statement without else (only true execution).
I compile the code with default -O3 and i have divergent_branch=0 and branch efficiency=100%.
I have the same result even if i disable optimization with -O0.
When i change if with else statement with instructions or a simple ;-mark i have values in divergent_branch and efficiency metric decrease.
Whats the difference between if without else and if/else with else do nothing (simple ;-mark)?
I supposed the first case must have divergent branch for cases that have not true condition.
In this case some threads execute the true and others do nothing.