From f224de87871623b8854e53a441b170411dc3b97c Mon Sep 17 00:00:00 2001 From: Russel Arbore <russel.jma@gmail.com> Date: Sun, 9 Jun 2024 22:03:23 -0700 Subject: [PATCH] fix stupid llvm getelementptr index issue --- hercules_cg/src/cpu.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hercules_cg/src/cpu.rs b/hercules_cg/src/cpu.rs index dd62905d..c2490626 100644 --- a/hercules_cg/src/cpu.rs +++ b/hercules_cg/src/cpu.rs @@ -280,7 +280,7 @@ impl<'a> PartitionContext<'a> { &self.function.llvm_types[collection_ty_ids[idx].idx()]; write!( bb.data, - " %index{}.{}.stride.ptrhack = getelementptr {}, ptr null, i64 1\n %index{}.{}.stride = ptrtoint ptr %index{}.{}.stride.ptrhack to i64\n %index{}.{}.offset.ptrhack = getelementptr {}, ptr null, i64 0, i64 {}\n %index{}.{}.offset = ptrtoint ptr %index{}.{}.offset.ptrhack to i64\n", + " %index{}.{}.stride.ptrhack = getelementptr {}, ptr null, i64 1\n %index{}.{}.stride = ptrtoint ptr %index{}.{}.stride.ptrhack to i64\n %index{}.{}.offset.ptrhack = getelementptr {}, ptr null, i64 0, i32 {}\n %index{}.{}.offset = ptrtoint ptr %index{}.{}.offset.ptrhack to i64\n", id.idx(), idx, product_llvm_ty, id.idx(), idx, -- GitLab