OSDN Git Service

Optimizing: Fix TypeConversion(And(x, const)) simplification.
authorVladimir Marko <vmarko@google.com>
Mon, 14 Mar 2016 18:00:05 +0000 (18:00 +0000)
committerVladimir Marko <vmarko@google.com>
Mon, 14 Mar 2016 19:01:16 +0000 (19:01 +0000)
commit625090fe9bf47d8d735c9a66cbf491de3a3e3765
tree9bf994303cf2491ec9c676d558f3bce97b46cdb7
parent70bc6de7e27dd7d82a2bac6685e0f3096df07b83
Optimizing: Fix TypeConversion(And(x, const)) simplification.

Avoid introducing implicit conversions when simplifying the
expression TypeConversion(And(x, const)). Previously, when
we dropped the And, we could end up with a TypeConversion to
the same type which should be eliminated on subsequent pass
of the block's instructions; however, a subsequent dependent
TypeConversion in the same block would be processed earlier
and we would unexpectedly see its input as the conversion to
the same type, failing a DCHECK().

Bug: 27626509
Change-Id: I5874a9ceafbf635cf3391beea807ede8468ab5c3
compiler/optimizing/instruction_simplifier.cc
test/458-checker-instruction-simplification/src/Main.java