From 86193437f52876301fa25397f5ec36b9bd8125ea Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Fri, 5 Sep 2014 16:48:27 +0800 Subject: [PATCH] compiler/ir_values: fix gcd64 --- artiq/compiler/ir_values.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/artiq/compiler/ir_values.py b/artiq/compiler/ir_values.py index 1b3a8e6fb..6b9e5d1f8 100644 --- a/artiq/compiler/ir_values.py +++ b/artiq/compiler/ir_values.py @@ -208,12 +208,12 @@ class VBool(VInt): # Fraction type def _gcd64(builder, a, b): - gcd_f = builder.module.get_function_named("__gcd64") + gcd_f = builder.basic_block.function.module.get_function_named("__gcd64") return builder.call(gcd_f, [a, b]) def _frac_normalize(builder, numerator, denominator): - gcd = _gcd64(numerator, denominator) + gcd = _gcd64(builder, numerator, denominator) numerator = builder.sdiv(numerator, gcd) denominator = builder.sdiv(denominator, gcd) return numerator, denominator