add type assert in f2i & i2f

This commit is contained in:
Joshua Warner 2014-05-03 19:58:00 -06:00 committed by Joshua Warner
parent c843a97e23
commit c9313d5802

View File

@ -2709,8 +2709,7 @@ class MyCompiler: public Compiler {
virtual ir::Value* f2i(ir::Type aType, ir::Type resType, ir::Value* a)
{
// TODO: enable when possible
// assert(&c, aType == a->type);
assert(&c, aType == a->type);
assert(&c, isFloatValue(a));
assert(&c, resType.flavor() != ir::Type::Float);
assert(&c, aType.flavor() == ir::Type::Float);
@ -2726,8 +2725,7 @@ class MyCompiler: public Compiler {
virtual ir::Value* i2f(ir::Type aType, ir::Type resType, ir::Value* a)
{
// TODO: enable when possible
// assert(&c, aType == a->type);
assert(&c, aType == a->type);
assert(&c, isGeneralValue(a));
assert(&c, resType.flavor() == ir::Type::Float);
assert(&c, aType.flavor() != ir::Type::Float);