Displaying 1 result from an estimated 1 matches for "enum4".
Did you mean:
enum
2015 Sep 30
2
Optimizing jumps to identical code blocks
...t
simplify accordingly.
I created a gist here:
https://gist.github.com/ranma42/d2e6d50999e801ffd4ed
(based on two examples available in Rust issues:
https://github.com/rust-lang/rust/pull/24270#issuecomment-136681741
https://github.com/rust-lang/rust/issues/13623#issuecomment-136700526 )
In "enum4.s"
cmpl $1, %eax
je LBB0_5
cmpl $2, %eax
je LBB0_5
cmpl $3, %eax
LBB0_5:
could be removed.
(Further optimization would be possible by observing that the two 32-bit
comparison could be unified into a single 64-bit comparison, but I believe
this is a differen...