aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2018-12-17 13:12:48 +0000
committergingerBill <bill@gingerbill.org>2018-12-17 13:12:48 +0000
commit3a05a2e562f59768eea8e2c0dacb77c4247cea1b (patch)
tree1d9450aa2e8db92cedb9175b1071179a163fcbc6 /src
parent68384a452fc04ee3e7970f979eb6f3b489aab142 (diff)
Fix `not` for bit sets
Diffstat (limited to 'src')
-rw-r--r--src/ir_print.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ir_print.cpp b/src/ir_print.cpp
index 457fc57a7..74da92bf0 100644
--- a/src/ir_print.cpp
+++ b/src/ir_print.cpp
@@ -1609,7 +1609,7 @@ void ir_print_instr(irFileBuffer *f, irModule *m, irValue *value) {
case irInstr_UnaryOp: {
irInstrUnaryOp *uo = &value->Instr.UnaryOp;
- Type *type = base_type(ir_type(uo->expr));
+ Type *type = base_type(ir_type(uo->expr));
Type *elem_type = type;
ir_fprintf(f, "%%%d = ", value->index);
@@ -1623,7 +1623,7 @@ void ir_print_instr(irFileBuffer *f, irModule *m, irValue *value) {
break;
case Token_Xor:
case Token_Not:
- GB_ASSERT(is_type_integer(type) || is_type_boolean(type));
+ GB_ASSERT(is_type_integer(type) || is_type_boolean(type) || is_type_bit_set(type));
ir_write_str_lit(f, "xor");
break;
default:
@@ -1644,7 +1644,7 @@ void ir_print_instr(irFileBuffer *f, irModule *m, irValue *value) {
break;
case Token_Xor:
case Token_Not:
- GB_ASSERT(is_type_integer(type) || is_type_boolean(type));
+ GB_ASSERT(is_type_integer(type) || is_type_boolean(type) || is_type_bit_set(type));
ir_write_str_lit(f, "-1");
break;
}