Remove handling for const Bools that are neither 0 nor 1

It looks like whatever was introducing these has been fixed.
Esse commit está contido em:
Guilherme Ottoni
2013-07-17 17:53:20 -07:00
commit de Sara Golemon
commit f107113ed3
2 arquivos alterados com 0 adições e 4 exclusões
-2
Ver Arquivo
@@ -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 {
-2
Ver Arquivo
@@ -231,8 +231,6 @@ public:
}
template<typename T> 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);
}