From 74df9f5a2f4ab38c9c3b76c76c056b6d326fec31 Mon Sep 17 00:00:00 2001 From: Nora Abi Akar <nora.abiakar@gmail.com> Date: Tue, 2 Jul 2019 14:00:34 +0200 Subject: [PATCH] pass correct index to simd procedure calls (#805) Add missing check of whether to use direct or indirect indexing for simd procedure calls. fixes #804 --- modcc/printer/cprinter.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modcc/printer/cprinter.cpp b/modcc/printer/cprinter.cpp index 856248d1..dc0b81a5 100644 --- a/modcc/printer/cprinter.cpp +++ b/modcc/printer/cprinter.cpp @@ -567,7 +567,10 @@ void SimdPrinter::visit(AssignmentExpression* e) { } void SimdPrinter::visit(CallExpression* e) { - out_ << e->name() << "(index_"; + if(is_indirect_index_) + out_ << e->name() << "(index_"; + else + out_ << e->name() << "(i_"; for (auto& arg: e->args()) { out_ << ", "; arg->accept(this); -- GitLab