forgot about the not operator 🥀
This commit is contained in:
@@ -218,6 +218,9 @@ class Compiler:
|
||||
case "==":
|
||||
value = self.builder.icmp_signed('==', left_value, right_value)
|
||||
Type = ir.IntType(1)
|
||||
case "!=":
|
||||
value = self.builder.icmp_signed('!=', left_value, right_value)
|
||||
Type = ir.IntType(1)
|
||||
elif isinstance(right_type, ir.FloatType) and isinstance(left_type, ir.FloatType):
|
||||
Type = self.type_map["Float"]
|
||||
match operator:
|
||||
@@ -249,6 +252,9 @@ class Compiler:
|
||||
case "==":
|
||||
value = self.builder.fcmp_ordered('==', left_value, right_value)
|
||||
Type = ir.IntType(1)
|
||||
case "!=":
|
||||
value = self.builder.fcmp_ordered('!=', left_value, right_value)
|
||||
Type = ir.IntType(1)
|
||||
|
||||
return value, Type
|
||||
# endregion
|
||||
|
||||
Reference in New Issue
Block a user