From 803bca2fdc60a30a9672454b75d40abd5719bd82 Mon Sep 17 00:00:00 2001 From: Stephan Seitz <stephan.seitz@fau.de> Date: Sun, 22 Sep 2019 00:03:10 +0200 Subject: [PATCH] llvm: use zext to extend i32,i16 to i64 --- pystencils/llvm/llvm.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pystencils/llvm/llvm.py b/pystencils/llvm/llvm.py index cf2207c0..68d95c8b 100644 --- a/pystencils/llvm/llvm.py +++ b/pystencils/llvm/llvm.py @@ -217,8 +217,10 @@ class LLVMPrinter(Printer): # (From, to) decision = { + (create_composite_type_from_string("int32"), + create_composite_type_from_string("int64")): functools.partial(self.builder.zext, node, self.integer), (create_composite_type_from_string("int16"), - create_composite_type_from_string("int64")): lambda: ir.Constant(self.integer, node), + create_composite_type_from_string("int64")): functools.partial(self.builder.zext, node, self.integer), (create_composite_type_from_string("int"), create_composite_type_from_string("double")): functools.partial(self.builder.sitofp, node, self.fp_type), (create_composite_type_from_string("int16"), -- GitLab