diff options
author | Mingyao Yang <mingyao@google.com> | 2015-03-03 16:15:23 -0800 |
---|---|---|
committer | Mingyao Yang <mingyao@google.com> | 2015-03-03 16:15:23 -0800 |
commit | 8928cab7c1a00f38b9c9a575998093d1b4138805 (patch) | |
tree | 991a48e144df77b9afec226cc3ef8e571c1b4d6b /compiler/optimizing | |
parent | 49ccb6e6e126bbb7af5e16e608e080fd07968caf (diff) | |
download | art-8928cab7c1a00f38b9c9a575998093d1b4138805.zip art-8928cab7c1a00f38b9c9a575998093d1b4138805.tar.gz art-8928cab7c1a00f38b9c9a575998093d1b4138805.tar.bz2 |
Add a change that should be part of "enhance gvn for commutative ops."
Change-Id: Id1a30afb095b2c7e27a4ef8a1ef7293022c1aaed
Diffstat (limited to 'compiler/optimizing')
-rw-r--r-- | compiler/optimizing/code_generator_x86.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/optimizing/code_generator_x86.cc b/compiler/optimizing/code_generator_x86.cc index 116dd15..3c8f62c 100644 --- a/compiler/optimizing/code_generator_x86.cc +++ b/compiler/optimizing/code_generator_x86.cc @@ -922,7 +922,7 @@ void InstructionCodeGeneratorX86::VisitCondition(HCondition* comp) { if (rhs.IsRegister()) { __ cmpl(lhs.AsRegister<Register>(), rhs.AsRegister<Register>()); } else if (rhs.IsConstant()) { - int32_t constant = rhs.GetConstant()->AsIntConstant()->GetValue(); + int32_t constant = CodeGenerator::GetInt32ValueOf(rhs.GetConstant()); if (constant == 0) { __ testl(lhs.AsRegister<Register>(), lhs.AsRegister<Register>()); } else { |