2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-25 03:08:27 +08:00

py2llvm/base_types: fix not on bool

This commit is contained in:
Sebastien Bourdeauducq 2014-10-13 19:49:29 +08:00
parent 7c4450a963
commit 6b173d0a9a
2 changed files with 2 additions and 8 deletions

View File

@ -74,7 +74,7 @@ class VInt(VGeneric):
return r
def o_not(self, builder):
return self.o_bool(builder, True)
return self.o_bool(builder, inv=True)
def o_neg(self, builder):
r = VInt(self.nbits)
@ -185,12 +185,6 @@ class VBool(VInt):
def set_const_value(self, builder, b):
VInt.set_const_value(self, builder, int(b))
def o_bool(self, builder):
r = VBool()
if builder is not None:
r.auto_store(builder, self.auto_load(builder))
return r
class VFloat(VGeneric):
def get_llvm_type(self):

View File

@ -188,7 +188,7 @@ def array_test():
def corner_cases():
two = True + True - False
two = True + True - (not True)
three = two + True//True - False*True
two_float = three - True/True
one_float = two_float - (1.0 == bool(0.1))