the ICode optimizer doesn't DCE-away trivial branches #7560
Comments
Imported From: https://issues.scala-lang.org/browse/SI-7560?orig=1 |
@magarciaEPFL said: If you need help fixing this bug, take a look at how the new optimizer ( http://magarciaepfl.github.io/scala/ ) does it, in particular: Quoting from its documentation:
|
@adriaanm said: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The discussion at scala/scala#2620
uncovered that the ICode-based optimizer's DCE doesn't eliminate a redundant conditional jump,
where both branches lead to one and the same instruction.
The example showing the above is
test/files/jvm/bytecode-test-example/Foo_1.scala
reproduced below:With GenASM and
-optimise
we get the two conditional jumps thatbytecode-test-example.check
expects:including a useless
(useless because, whether the conditional jump is taken or not,
L1
is the target anyway)The text was updated successfully, but these errors were encountered: