add Compiler::truncateThenExtend
use Compiler::truncateThenExtend in more places
remove redundant Compiler::load srcSelectType parameter
expose Value::type and add asserts
add asserts
move Compiler::Operand to ir::Value
remove useless static_casts to retrieve ir::Value::type