forked from M-Labs/artiq
parent
ed6d927f6c
commit
56315203a9
|
@ -66,8 +66,8 @@ class Module:
|
|||
interleaver = transforms.Interleaver(engine=self.engine)
|
||||
invariant_detection = analyses.InvariantDetection(engine=self.engine)
|
||||
|
||||
cast_monomorphizer.visit(src.typedtree)
|
||||
int_monomorphizer.visit(src.typedtree)
|
||||
cast_monomorphizer.visit(src.typedtree)
|
||||
inferencer.visit(src.typedtree)
|
||||
monomorphism_validator.visit(src.typedtree)
|
||||
escape_validator.visit(src.typedtree)
|
||||
|
|
|
@ -18,6 +18,7 @@ class CastMonomorphizer(algorithm.Visitor):
|
|||
types.is_builtin(node.func.type, "int64")):
|
||||
typ = node.type.find()
|
||||
if (not types.is_var(typ["width"]) and
|
||||
len(node.args) == 1 and
|
||||
builtins.is_int(node.args[0].type) and
|
||||
types.is_var(node.args[0].type.find()["width"])):
|
||||
if isinstance(node.args[0], asttyped.BinOpT):
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
# RUN: %python -m artiq.compiler.testbench.signature %s >%t
|
||||
# RUN: OutputCheck %s --file-to-check=%t
|
||||
|
||||
x = 0x100000000
|
||||
# CHECK-L: x: numpy.int64
|
||||
|
||||
y = int32(x)
|
||||
# CHECK-L: y: numpy.int32
|
Loading…
Reference in New Issue