From f107113ed343f50764438fea1dff99ab4d5beb99 Mon Sep 17 00:00:00 2001 From: Guilherme Ottoni Date: Wed, 17 Jul 2013 17:53:20 -0700 Subject: [PATCH] Remove handling for const Bools that are neither 0 nor 1 It looks like whatever was introducing these has been fixed. --- hphp/runtime/vm/jit/code-gen.cpp | 2 -- hphp/runtime/vm/jit/ir-factory.h | 2 -- 2 files changed, 4 deletions(-) diff --git a/hphp/runtime/vm/jit/code-gen.cpp b/hphp/runtime/vm/jit/code-gen.cpp index 5a1287e10..2772d71b6 100755 --- a/hphp/runtime/vm/jit/code-gen.cpp +++ b/hphp/runtime/vm/jit/code-gen.cpp @@ -666,7 +666,6 @@ PhysReg CodeGenerator::prepXMMReg(const SSATmp* tmp, int64_t val = tmp->getValRawInt(); if (!tmp->isA(Type::Dbl)) { assert(tmp->isA(Type::Bool | Type::Int)); - if (tmp->isA(Type::Bool)) val = val != 0; // see task #2401790 val = convIntToDouble(val); } emitLoadImm(as, val, m_rScratch); @@ -2204,7 +2203,6 @@ void CodeGenerator::emitConvBoolOrIntToDbl(IRInstruction* inst) { assert(dstReg != InvalidReg); if (src->isConst()) { int64_t constVal = src->getValRawInt(); - if (src->isA(Type::Bool)) constVal = constVal != 0; // see task #2401790 constVal = convIntToDouble(constVal); emitLoadImm(m_as, constVal, dstReg); } else { diff --git a/hphp/runtime/vm/jit/ir-factory.h b/hphp/runtime/vm/jit/ir-factory.h index a718021c1..a7585e036 100644 --- a/hphp/runtime/vm/jit/ir-factory.h +++ b/hphp/runtime/vm/jit/ir-factory.h @@ -231,8 +231,6 @@ public: } template SSATmp* cns(T val, Type type) { - // Normalize bool values to 0 or 1 - if (type.equals(Type::Bool)) val = (T)(val != 0); ConstData cdata(val); return findConst(cdata, type); }