Reference: https://academic.oup.com/comjnl/article-pdf/20/1/45/975771/200045.pdf
Abnormal selection pattern is an if/if-else pattern, where branch(es) are not dominated by the pattern header. In other words, it's an if/if-else, where something else jumps directly into "true" or "false" branch, besides the "if" condition checking code itself.
In the real code, this pattern occurs quite often, because it's pretty low-hanging optimization for code like:
if (cond1) goto l1
...
l1:
$r0 = 0
return
...
if (cond2) goto l2
...
l2:
$r0 = 0
return
It's only natural to transform it to:
if (cond1) goto l2
...
if (cond2) goto l2
...
l2:
$r0 = 0
return
Reference: https://academic.oup.com/comjnl/article-pdf/20/1/45/975771/200045.pdf
Abnormal selection pattern is an
if/if-elsepattern, where branch(es) are not dominated by the pattern header. In other words, it's an if/if-else, where something else jumps directly into "true" or "false" branch, besides the "if" condition checking code itself.In the real code, this pattern occurs quite often, because it's pretty low-hanging optimization for code like:
It's only natural to transform it to: