From 967233ae9f984f713d2f15d9f208574d95ed9b0a Mon Sep 17 00:00:00 2001 From: George Hodgkins Date: Mon, 23 Feb 2026 10:37:37 -0700 Subject: [PATCH 01/24] Remove typed pointers from tket-qsystem --- tket-qsystem/src/llvm/array_utils.rs | 124 +++++++++------------------ tket-qsystem/src/llvm/debug.rs | 24 +++--- tket-qsystem/src/llvm/prelude.rs | 11 +-- tket-qsystem/src/llvm/result.rs | 42 +++++---- 4 files changed, 75 insertions(+), 126 deletions(-) diff --git a/tket-qsystem/src/llvm/array_utils.rs b/tket-qsystem/src/llvm/array_utils.rs index 430c5c2b0..2ed0a15ee 100644 --- a/tket-qsystem/src/llvm/array_utils.rs +++ b/tket-qsystem/src/llvm/array_utils.rs @@ -2,7 +2,7 @@ // TODO move to hugr-llvm crate // https://github.com/quantinuum/tket2/issues/899 -use anyhow::Result; +use anyhow::{anyhow, Result}; use hugr::extension::prelude::usize_t; use hugr::llvm::emit::EmitFuncContext; use hugr::llvm::extension::collections::array::{ @@ -32,6 +32,7 @@ pub trait ArrayLowering { &self, builder: &Builder<'c>, val: BasicValueEnum<'c>, + elem_type: BasicTypeEnum<'c>, ) -> Result>; /// Turns a pointer to the first array element into an array value in the given lowering. @@ -76,9 +77,10 @@ impl ArrayLowering for StackArrayLowerin &self, builder: &Builder<'c>, val: BasicValueEnum<'c>, + _elem_type: BasicTypeEnum<'c>, ) -> Result> { - let (elem_ptr, _) = build_array_alloca(builder, val.into_array_value())?; - Ok(elem_ptr) + build_array_alloca(builder, val.into_array_value()) + .map_err(|e| anyhow!("Could not build array alloca: {e}")) } fn array_from_ptr<'c, H: HugrView>( @@ -89,16 +91,8 @@ impl ArrayLowering for StackArrayLowerin length: u32, ) -> Result> { let builder = ctx.builder(); - let ptr = builder - .build_bit_cast( - ptr, - elem_type - .array_type(length) - .ptr_type(AddressSpace::default()), - "", - )? - .into_pointer_value(); - let array = builder.build_load(ptr, "")?.into_array_value(); + let array_ty = elem_type.array_type(length); + let array = builder.build_load(array_ty, ptr, "")?.into_array_value(); Ok(array.into()) } } @@ -127,9 +121,10 @@ impl ArrayLowering for HeapArrayLowering &self, builder: &Builder<'c>, val: BasicValueEnum<'c>, + elem_type: BasicTypeEnum<'c>, ) -> Result> { let (array_ptr, offset) = decompose_array_fat_pointer(builder, val)?; - let elem_ptr = unsafe { builder.build_in_bounds_gep(array_ptr, &[offset], "")? }; + let elem_ptr = unsafe { builder.build_in_bounds_gep(elem_type, array_ptr, &[offset], "")? }; Ok(elem_ptr) } @@ -153,26 +148,19 @@ impl ArrayLowering for HeapArrayLowering /// Helper function to allocate an array on the stack. /// -/// Returns two pointers: The first one is a pointer to the first element of the -/// array (i.e. it is of type `array.get_element_type().ptr_type()`) whereas the -/// second one points to the whole array value, i.e. it is of type `array.ptr_type()`. -// Note: copied from -// https://github.com/quantinuum/hugr/blob/bf3889fa206fbb5a22a5ae4b9ea5f8cc0468b4b7/hugr-llvm/src/extension/collections/array.rs#L186 +/// Returns a pointer to the newly allocated array. pub fn build_array_alloca<'c>( builder: &Builder<'c>, array: ArrayValue<'c>, -) -> Result<(PointerValue<'c>, PointerValue<'c>), BuilderError> { +) -> Result, BuilderError> { let array_ty = array.get_type(); let array_len: IntValue<'c> = { let ctx = builder.get_insert_block().unwrap().get_context(); ctx.i32_type().const_int(u64::from(array_ty.len()), false) }; let ptr = builder.build_array_alloca(array_ty.get_element_type(), array_len, "")?; - let array_ptr = builder - .build_bit_cast(ptr, array_ty.ptr_type(AddressSpace::default()), "")? - .into_pointer_value(); - builder.build_store(array_ptr, array)?; - Result::Ok((ptr, array_ptr)) + builder.build_store(ptr, array)?; + Result::Ok(ptr) } /// Helper function to load an array from a pointer. @@ -182,16 +170,9 @@ pub fn build_int_array_load<'c>( elem_type: IntType<'c>, length: u32, ) -> Result, BuilderError> { - let ptr = builder - .build_bit_cast( - array_ptr, - elem_type - .array_type(length) - .ptr_type(AddressSpace::default()), - "", - )? - .into_pointer_value(); - let array = builder.build_load(ptr, "")?.into_array_value(); + + let array_ty = elem_type.array_type(length); + let array = builder.build_load(array_ty, array_ptr, "")?.into_array_value(); Result::Ok(array) } @@ -207,6 +188,17 @@ pub enum ElemType { Bool, } +impl ElemType { + pub fn llvm_type<'a>(&self, ctx: &'a Context) -> BasicTypeEnum<'a> { + match *self { + ElemType::Int | ElemType::Uint => ctx.i64_type().into(), + ElemType::Float => ctx.f64_type().into(), + ElemType::Bool => ctx.bool_type().into(), + } + } +} + + /// Helper function to create a dense array struct type. /// /// The struct contains four fields: @@ -220,28 +212,18 @@ pub enum ElemType { /// primary data in memory and contains boolean values to indicate the presence /// of data in the primary array. Dense arrays have mask values of all zeros. pub fn struct_1d_arr_t<'a>(ctx: &'a Context, data_type: &'a ElemType) -> StructType<'a> { - let data_ptr_t = match data_type { - ElemType::Int | ElemType::Uint => ctx.i64_type().ptr_type(AddressSpace::default()), - ElemType::Float => ctx.f64_type().ptr_type(AddressSpace::default()), - ElemType::Bool => ctx.bool_type().ptr_type(AddressSpace::default()), - }; + let ptr_t = ctx.ptr_type(AddressSpace::default()); ctx.struct_type( &[ ctx.i32_type().into(), // x ctx.i32_type().into(), // y - data_ptr_t.into(), /* pointer to first array - * elem */ - ctx.bool_type().ptr_type(AddressSpace::default()).into(), // pointer to first mask elem + ptr_t.into(), // pointer to first element + ptr_t.into(), // pointer to first mask element ], true, ) } -/// Helper function to create a `PointerType` to a dense array. -pub fn struct_1d_arr_ptr_t<'a>(ctx: &'a Context, data_type: &'a ElemType) -> PointerType<'a> { - struct_1d_arr_t(ctx, data_type).ptr_type(AddressSpace::default()) -} - /// Helper function to allocate and initialize a dense array struct on the stack. /// /// Returns a `PointerVal` to the struct and the `StructVal` itself. All of @@ -256,22 +238,15 @@ pub fn struct_1d_arr_alloc<'a>( let out_arr_type = struct_1d_arr_t(ctx, data_type); let out_arr_ptr = builder.build_alloca(out_arr_type, "out_arr_alloca")?; - let x_field = builder.build_struct_gep(out_arr_ptr, 0, "x_ptr")?; - let y_field = builder.build_struct_gep(out_arr_ptr, 1, "y_ptr")?; - let arr_field = builder.build_struct_gep(out_arr_ptr, 2, "arr_ptr")?; - let mask_field = builder.build_struct_gep(out_arr_ptr, 3, "mask_ptr")?; + let ptr_t = ctx.ptr_type(AddressSpace::default()); + let x_field = builder.build_struct_gep(ptr_t, out_arr_ptr, 0, "x_ptr")?; + let y_field = builder.build_struct_gep(ptr_t, out_arr_ptr, 1, "y_ptr")?; + let arr_field = builder.build_struct_gep(ptr_t, out_arr_ptr, 2, "arr_ptr")?; + let mask_field = builder.build_struct_gep(ptr_t, out_arr_ptr, 3, "mask_ptr")?; let x_val = ctx.i32_type().const_int(length.into(), false); let y_val = ctx.i32_type().const_int(1, false); - let bit_cast_type = match data_type { - ElemType::Bool => ctx.bool_type().ptr_type(AddressSpace::default()), - ElemType::Int | ElemType::Uint => ctx.i64_type().ptr_type(AddressSpace::default()), - ElemType::Float => ctx.f64_type().ptr_type(AddressSpace::default()), - }; - let casted_arr_ptr = builder - .build_bit_cast(array_ptr, bit_cast_type, "")? - .into_pointer_value(); - let (mask_ptr, _) = build_array_alloca( + let mask_ptr = build_array_alloca( builder, ctx.bool_type().const_array( vec![ctx.bool_type().const_int(0, false); length.try_into().unwrap()].as_slice(), @@ -280,10 +255,10 @@ pub fn struct_1d_arr_alloc<'a>( builder.build_store(x_field, x_val)?; builder.build_store(y_field, y_val)?; - builder.build_store(arr_field, casted_arr_ptr)?; + builder.build_store(arr_field, array_ptr)?; builder.build_store(mask_field, mask_ptr)?; - let out_arr = builder.build_load(out_arr_ptr, "")?.into_struct_value(); + let out_arr = builder.build_load(out_arr_type, out_arr_ptr, "")?.into_struct_value(); Result::Ok((out_arr_ptr, out_arr)) } @@ -303,11 +278,9 @@ mod tests { make_bb(&context, &module, &builder); - let (ptr, array_ptr) = - build_array(&context, &builder).expect("Array allocation should succeed"); + let ptr = build_array(&context, &builder).expect("Array allocation should succeed"); - assert!(!ptr.is_null(), "Element pointer should not be null"); - assert!(!array_ptr.is_null(), "Array pointer should not be null"); + assert!(!ptr.is_null(), "Pointer should not be null"); builder .build_return(None) @@ -394,23 +367,6 @@ mod tests { } } - /// Test that struct_1d_arr_ptr_t returns the correct pointer type. - #[test] - fn test_struct_1d_arr_ptr_t() { - let context = Context::create(); - - // Test for each element type - let int_ptr = struct_1d_arr_ptr_t(&context, &ElemType::Int); - let uint_ptr = struct_1d_arr_ptr_t(&context, &ElemType::Uint); - let float_ptr = struct_1d_arr_ptr_t(&context, &ElemType::Float); - let bool_ptr = struct_1d_arr_ptr_t(&context, &ElemType::Bool); - - // Test that all element types return struct pointer types - for ptr in [int_ptr, uint_ptr, float_ptr, bool_ptr] { - assert!(ptr.get_element_type().is_struct_type()); - } - } - /// Test that struct_1d_arr_alloc properly allocates and initializes a dense array struct. #[test] fn test_struct_1d_arr_alloc() { diff --git a/tket-qsystem/src/llvm/debug.rs b/tket-qsystem/src/llvm/debug.rs index 89d49b205..442236370 100644 --- a/tket-qsystem/src/llvm/debug.rs +++ b/tket-qsystem/src/llvm/debug.rs @@ -7,11 +7,12 @@ use hugr::llvm::CodegenExtsBuilder; use hugr::llvm::custom::CodegenExtension; use hugr::llvm::emit::{EmitFuncContext, EmitOpArgs}; use hugr::llvm::inkwell::AddressSpace; +use hugr::llvm::inkwell::types::BasicType; use hugr::ops::ExtensionOp; use hugr::{HugrView, Node}; use tket::extension::debug::{DEBUG_EXTENSION_ID, STATE_RESULT_OP_ID, StateResult}; -use super::array_utils::{ArrayLowering, ElemType, struct_1d_arr_alloc, struct_1d_arr_ptr_t}; +use super::array_utils::{ArrayLowering, ElemType, struct_1d_arr_alloc}; static TAG_PREFIX: &str = "USER:"; @@ -54,8 +55,9 @@ impl DebugCodegenExtension { // Types (qubits are just i64s). let iw_ctx = ctx.iw_context(); let void_t = iw_ctx.void_type(); - let i8_ptr_t = iw_ctx.i8_type().ptr_type(AddressSpace::default()); + let i8_t = iw_ctx.i8_type(); let i64_t = iw_ctx.i64_type(); + let ptr_t = iw_ctx.ptr_type(AddressSpace::default()); // Tag arguments. let state_result = StateResult::from_extension_op(args.node().as_ref())?; @@ -64,14 +66,13 @@ impl DebugCodegenExtension { bail!("Empty state result tag received"); } let tag_ptr = emit_global_string(ctx, tag, "res_", format!("{TAG_PREFIX}STATE:"))?; + // The first byte of the string contains its length. Load that value + // and zext it into i64. let tag_len = { - let mut l = builder - .build_load(tag_ptr.into_pointer_value(), "tag_len")? + let l = builder + .build_load(i8_t, tag_ptr.into_pointer_value(), "tag_len")? .into_int_value(); - if l.get_type() != i64_t { - l = builder.build_int_z_extend(l, i64_t, "tag_len")?; - } - l + builder.build_int_z_extend(l, i64_t, "tag_len")? }; // Qubit array argument. @@ -80,7 +81,8 @@ impl DebugCodegenExtension { .inputs .try_into() .map_err(|_| anyhow!(format!("StateResult expects a qubit array argument")))?; - let qubits_array = self.array_lowering.array_to_ptr(builder, qubits)?; + let qubits_array = self.array_lowering.array_to_ptr( + builder, qubits, i64_t.as_basic_type_enum())?; let (qubits_ptr, _) = struct_1d_arr_alloc( iw_ctx, builder, @@ -94,9 +96,9 @@ impl DebugCodegenExtension { "print_state_result", void_t.fn_type( &[ - i8_ptr_t.into(), + ptr_t.into(), i64_t.into(), - struct_1d_arr_ptr_t(iw_ctx, &ElemType::Int).into(), + ptr_t.into(), ], false, ), diff --git a/tket-qsystem/src/llvm/prelude.rs b/tket-qsystem/src/llvm/prelude.rs index 953d87196..c0763741c 100644 --- a/tket-qsystem/src/llvm/prelude.rs +++ b/tket-qsystem/src/llvm/prelude.rs @@ -116,7 +116,7 @@ impl QISPreludeCodegen { let func_type = iwc.void_type().fn_type( &[ iwc.i32_type().into(), - iwc.i8_type().ptr_type(AddressSpace::default()).into(), + iwc.ptr_type(AddressSpace::default()).into(), ], false, ); @@ -196,14 +196,7 @@ pub fn emit_global_string<'c, H: HugrView>( }) .unwrap() }; - Ok(ctx - .builder() - .build_pointer_cast( - global.as_pointer_value(), - ctx.iw_context().i8_type().ptr_type(AddressSpace::default()), - "", - )? - .as_basic_value_enum()) + Ok(global.as_pointer_value().as_basic_value_enum()) } #[cfg(test)] diff --git a/tket-qsystem/src/llvm/result.rs b/tket-qsystem/src/llvm/result.rs index 249c877e5..486761cf7 100644 --- a/tket-qsystem/src/llvm/result.rs +++ b/tket-qsystem/src/llvm/result.rs @@ -12,13 +12,13 @@ use hugr::llvm::types::HugrSumType; use inkwell::AddressSpace; use inkwell::builder::Builder; use inkwell::context::Context; -use inkwell::types::{FloatType, IntType, PointerType, VoidType}; +use inkwell::types::{FloatType, IntType, PointerType, VoidType, BasicMetadataTypeEnum}; use inkwell::values::{BasicValueEnum, FunctionValue, IntValue}; use tket::hugr::extension::simple_op::MakeExtensionOp; use tket::hugr::ops::ExtensionOp; use tket::hugr::{HugrView, Node}; -use super::array_utils::{ArrayLowering, ElemType, struct_1d_arr_alloc, struct_1d_arr_ptr_t}; +use super::array_utils::{ArrayLowering, ElemType, struct_1d_arr_alloc}; static TAG_PREFIX: &str = "USER:"; @@ -60,10 +60,14 @@ impl<'c, H: HugrView, AL: ArrayLowering + Clone> ResultEmitter<'c, self.0.typing_session().iw_context() } - fn int_t(&self) -> IntType<'c> { + fn i64_t(&self) -> IntType<'c> { self.iw_context().i64_type() } + fn i8_t(&self) -> IntType<'c> { + self.iw_context().i8_type() + } + fn float_t(&self) -> FloatType<'c> { self.iw_context().f64_type() } @@ -72,10 +76,8 @@ impl<'c, H: HugrView, AL: ArrayLowering + Clone> ResultEmitter<'c, self.iw_context().bool_type() } - fn i8_ptr_t(&self) -> PointerType<'c> { - self.iw_context() - .i8_type() - .ptr_type(AddressSpace::default()) + fn ptr_t(&self) -> PointerType<'c> { + self.iw_context().ptr_type(AddressSpace::default()) } fn void_t(&self) -> VoidType<'c> { @@ -88,18 +90,18 @@ impl<'c, H: HugrView, AL: ArrayLowering + Clone> ResultEmitter<'c, fn get_func_print(&self, op: &ResultOp) -> Result> { // The first two parameters are the same for all print function variants - let mut params = vec![self.i8_ptr_t().into(), self.int_t().into()]; + let mut params : Vec = vec![self.ptr_t().into(), self.i64_t().into()]; let symbol = match op.result_op { ResultOpDef::Bool => { params.push(self.bool_t().into()); "print_bool" } ResultOpDef::Int => { - params.push(self.int_t().into()); + params.push(self.i64_t().into()); "print_int" } ResultOpDef::UInt => { - params.push(self.int_t().into()); + params.push(self.i64_t().into()); "print_uint" } ResultOpDef::F64 => { @@ -107,19 +109,19 @@ impl<'c, H: HugrView, AL: ArrayLowering + Clone> ResultEmitter<'c, "print_float" } ResultOpDef::ArrBool => { - params.push(struct_1d_arr_ptr_t(self.iw_context(), &ElemType::Bool).into()); + params.push(self.ptr_t().into()); "print_bool_arr" } ResultOpDef::ArrInt => { - params.push(struct_1d_arr_ptr_t(self.iw_context(), &ElemType::Int).into()); + params.push(self.ptr_t().into()); "print_int_arr" } ResultOpDef::ArrUInt => { - params.push(struct_1d_arr_ptr_t(self.iw_context(), &ElemType::Uint).into()); + params.push(self.ptr_t().into()); "print_uint_arr" } ResultOpDef::ArrF64 => { - params.push(struct_1d_arr_ptr_t(self.iw_context(), &ElemType::Float).into()); + params.push(self.ptr_t().into()); "print_float_arr" } }; @@ -146,14 +148,9 @@ impl<'c, H: HugrView, AL: ArrayLowering + Clone> ResultEmitter<'c, let mut l = self .0 .builder() - .build_load(tag_ptr.into_pointer_value(), "tag_len")? + .build_load(self.i8_t(), tag_ptr.into_pointer_value(), "tag_len")? .into_int_value(); - if self.int_t() != l.get_type() { - l = self - .builder() - .build_int_z_extend(l, self.int_t(), "tag_len")?; - } - l + self.builder().build_int_z_extend(l, self.i64_t(), "tag_len")? }; Ok((tag_ptr, tag_len)) @@ -173,7 +170,8 @@ impl<'c, H: HugrView, AL: ArrayLowering + Clone> ResultEmitter<'c, }; let print_fn = self.get_func_print(op)?; - let array = self.1.array_to_ptr(self.builder(), val)?; + let array = self.1.array_to_ptr(self.builder(), val, + data_type.llvm_type(self.iw_context()))?; let (array_ptr, _) = struct_1d_arr_alloc( self.iw_context(), self.builder(), From b635ddbdec87d70abbab1eb7e5ffc2606e75500e Mon Sep 17 00:00:00 2001 From: George Hodgkins Date: Mon, 23 Feb 2026 12:20:13 -0700 Subject: [PATCH 02/24] Remove typed pointers from qis-compiler, fix tests --- qis-compiler/rust/array.rs | 6 +- qis-compiler/rust/gpu.rs | 123 ++++++++------------------- qis-compiler/rust/selene_specific.rs | 2 +- tket-qsystem/src/llvm/array_utils.rs | 66 ++++++-------- tket-qsystem/src/llvm/debug.rs | 3 +- tket-qsystem/src/llvm/result.rs | 5 +- 6 files changed, 68 insertions(+), 137 deletions(-) diff --git a/qis-compiler/rust/array.rs b/qis-compiler/rust/array.rs index ab442b1ad..a60fbeb10 100644 --- a/qis-compiler/rust/array.rs +++ b/qis-compiler/rust/array.rs @@ -24,7 +24,6 @@ impl ArrayCodegen for SeleneHeapArrayCodegen { ) -> Result> { let iw_ctx = ctx.typing_session().iw_context(); let malloc_sig = iw_ctx - .i8_type() .ptr_type(AddressSpace::default()) .fn_type(&[iw_ctx.i64_type().into()], false); let malloc = ctx.get_extern_func("heap_alloc", malloc_sig)?; @@ -42,7 +41,7 @@ impl ArrayCodegen for SeleneHeapArrayCodegen { ptr: PointerValue<'c>, ) -> Result<()> { let iw_ctx = ctx.typing_session().iw_context(); - let ptr_ty = iw_ctx.i8_type().ptr_type(AddressSpace::default()); + let ptr_ty = iw_ctx.ptr_type(AddressSpace::default()); let ptr = ctx.builder().build_bit_cast(ptr, ptr_ty, "")?; let free_sig = iw_ctx.void_type().fn_type(&[ptr_ty.into()], false); @@ -69,7 +68,6 @@ impl BorrowArrayCodegen for SeleneHeapBorrowArrayCodegen Result> { let iw_ctx = ctx.typing_session().iw_context(); let malloc_sig = iw_ctx - .i8_type() .ptr_type(AddressSpace::default()) .fn_type(&[iw_ctx.i64_type().into()], false); let malloc = ctx.get_extern_func("heap_alloc", malloc_sig)?; @@ -87,7 +85,7 @@ impl BorrowArrayCodegen for SeleneHeapBorrowArrayCodegen, ) -> Result<()> { let iw_ctx = ctx.typing_session().iw_context(); - let ptr_ty = iw_ctx.i8_type().ptr_type(AddressSpace::default()); + let ptr_ty = iw_ctx.ptr_type(AddressSpace::default()); let ptr = ctx.builder().build_bit_cast(ptr, ptr_ty, "")?; let free_sig = iw_ctx.void_type().fn_type(&[ptr_ty.into()], false); diff --git a/qis-compiler/rust/gpu.rs b/qis-compiler/rust/gpu.rs index 65eed5516..17709d3ef 100644 --- a/qis-compiler/rust/gpu.rs +++ b/qis-compiler/rust/gpu.rs @@ -88,7 +88,7 @@ //! to other result types in future. use crate::selene_specific; -use anyhow::{Result, bail}; +use anyhow::{Result, ensure, bail}; use hugr::extension::prelude::option_type; use hugr::llvm::{CodegenExtension, CodegenExtsBuilder, inkwell}; use hugr::std_extensions::arithmetic::int_types::int_type; @@ -167,7 +167,7 @@ impl GpuCodegen { iwc.i8_type().fn_type( &[ iwc.i64_type().into(), - iwc.i64_type().ptr_type(AddressSpace::default()).into(), + iwc.ptr_type(AddressSpace::default()).into(), ], false, ), @@ -187,7 +187,7 @@ impl GpuCodegen { .into_int_value(); verify_gpu_call(ctx, success, "gpu_init")?; - let gpu_ref = builder.build_load(gpu_ref_ptr, "gpu_ref")?; + let gpu_ref = builder.build_load(iwc.i64_type(), gpu_ref_ptr, "gpu_ref")?; let result_t = ts.llvm_sum_type(option_type(int_type(6)))?; // Although the result is an option type, we always return true // in this lowering: failure is already handled. @@ -271,7 +271,7 @@ impl GpuCodegen { // Grab the set flag to check if it is initialized. let is_set = ctx .builder() - .build_load(set_flag.as_pointer_value(), "function_id")? + .build_load(iwc.i8_type(), set_flag.as_pointer_value(), "function_id")? .into_int_value(); let needs_lookup = ctx.builder().build_int_compare( inkwell::IntPredicate::EQ, @@ -291,7 +291,7 @@ impl GpuCodegen { ctx.builder().position_at_end(read_cache_block); let stored_func_id = ctx .builder() - .build_load(stored_id.as_pointer_value(), "function_id")? + .build_load(iwc.i64_type(), stored_id.as_pointer_value(), "function_id")? .into_int_value(); ctx.builder().build_return(Some(&stored_func_id))?; @@ -304,8 +304,8 @@ impl GpuCodegen { "gpu_get_function_id", iwc.i8_type().fn_type( &[ - iwc.i8_type().ptr_type(AddressSpace::default()).into(), - iwc.i64_type().ptr_type(AddressSpace::default()).into(), + iwc.ptr_type(AddressSpace::default()).into(), + iwc.ptr_type(AddressSpace::default()).into(), ], false, ), @@ -331,7 +331,7 @@ impl GpuCodegen { // Otherwise, store the function id and set the flag let func_id = ctx .builder() - .build_load(function_id_ptr, "function_id")? + .build_load(iwc.i64_type(), function_id_ptr, "function_id")? .into_int_value(); ctx.builder() .build_store(stored_id.as_pointer_value(), func_id)?; @@ -405,11 +405,9 @@ impl GpuCodegen { gpu_ref.get_type().into(), func.get_type().into(), iwc.i64_type().into(), - iwc.i8_type() - .ptr_type(inkwell::AddressSpace::default()) + iwc.ptr_type(inkwell::AddressSpace::default()) .into(), - iwc.i8_type() - .ptr_type(inkwell::AddressSpace::default()) + iwc.ptr_type(inkwell::AddressSpace::default()) .into(), ], false, @@ -422,11 +420,7 @@ impl GpuCodegen { // create an i8 array of length blob_size and populate it with // the packed arguments - let (blob, blob_size) = pack_arguments(ctx, fn_args)?; - let i64_zero = iwc.i64_type().const_zero(); - let blob_ptr = unsafe { - builder.build_in_bounds_gep(blob, &[i64_zero, i64_zero], "gpu_input_blob_ptr")? - }; + let (blob_ptr, blob_size) = pack_arguments(ctx, fn_args)?; // pass the blob size, blob pointer, and signature string to gpu_call as // arguments @@ -467,7 +461,7 @@ impl GpuCodegen { let i8_t = iwc.i8_type().as_basic_type_enum(); let i64_t = iwc.i64_type().as_basic_type_enum(); let f64_t = iwc.f64_type().as_basic_type_enum(); - let result_ptr_t = iwc.i8_type().ptr_type(AddressSpace::default()); + let result_ptr_t = iwc.ptr_type(AddressSpace::default()); // Results can currently come in as ints or floats. // When this expands we can allocate an appropriate buffer @@ -507,54 +501,21 @@ impl GpuCodegen { // Check status and handle error if needed verify_gpu_call(ctx, call, "gpu_get_result_64bits")?; - match ctx.llvm_type(single_result)? { - i if i == i64_t => { - // The result type is an integer, so we can just load - // it directly. - let int_result = ctx - .builder() - .build_load(int_result_ptr, "int_result")? - .into_int_value(); - op.outputs.finish( - ctx.builder(), - [ - gpu_ref.as_basic_value_enum(), - int_result.as_basic_value_enum(), - ], - )?; - } - f if f == f64_t => { - // The result type is a float, so we need to reinterpret - // the result pointer from a pointer to int to a pointer - // to float, then load it. - let float_result_ptr = ctx - .builder() - .build_bit_cast( - int_result_ptr, - iwc.f64_type().ptr_type(AddressSpace::default()), - "float_result_ptr", - )? - .into_pointer_value(); - - let float_result = ctx - .builder() - .build_load(float_result_ptr, "float_result")? - .into_float_value(); - op.outputs.finish( - ctx.builder(), - [ - gpu_ref.as_basic_value_enum(), - float_result.as_basic_value_enum(), - ], - )?; - } - _ => { - bail!( - "ReadResult operation with a single output expects either i64 or f64, got: {:?}", - ctx.llvm_type(single_result)? - ); - } - } + // load the result from the result pointer + let result_ty = ctx.llvm_type(single_result)?; + ensure!(result_ty == i64_t || result_ty == f64_t, + "ReadResult operation with a single output expects either \ + i64 or f64, got: {result_ty:?}" + ); + + let result = ctx.builder().build_load(result_ty, result_ptr, "result")?; + op.outputs.finish( + ctx.builder(), + [ + gpu_ref.as_basic_value_enum(), + result.as_basic_value_enum(), + ], + )?; } other => { bail!("ReadResult operation expects either zero or one, got: {other:?}") @@ -660,7 +621,7 @@ fn emit_api_validation<'c, H: HugrView>( let already_validated = builder.build_int_compare( inkwell::IntPredicate::NE, builder - .build_load(stored.as_pointer_value(), "validated")? + .build_load(iwc.i8_type(), stored.as_pointer_value(), "validated")? .into_int_value(), iwc.i8_type().const_zero(), "already_validated", @@ -744,8 +705,7 @@ fn emit_panic_with_gpu_error<'c, H: HugrView>( // Try to get the error message from the GPU library. let gpu_get_error = ctx.get_extern_func( "gpu_get_error", - iwc.i8_type() - .ptr_type(AddressSpace::default()) + iwc.ptr_type(AddressSpace::default()) .fn_type(&[], false), )?; @@ -761,7 +721,7 @@ fn emit_panic_with_gpu_error<'c, H: HugrView>( ctx.builder().build_int_compare( inkwell::IntPredicate::EQ, error_message, - iwc.i8_type().ptr_type(AddressSpace::default()).const_null(), + iwc.ptr_type(AddressSpace::default()).const_null(), "is_null", )?, ctx.builder() @@ -948,6 +908,7 @@ fn pack_arguments<'c, H: HugrView>( for &arg in fn_args { let dest_ptr = unsafe { builder.build_in_bounds_gep( + blob_ty, blob, &[ iwc.i64_type().const_zero(), @@ -966,32 +927,18 @@ fn pack_arguments<'c, H: HugrView>( } BasicTypeEnum::IntType(i) if i.get_bit_width() == 64 => { // Store the integer into an aligned i64 temporary, - // then copy its bytes into the blob in an unaligned manner. + // then copy its bytes into the blob with 1-byte alignment let tmp = builder.build_alloca(iwc.i64_type(), "arg_i64_tmp")?; builder.build_store(tmp, arg)?; - let src_i8 = builder.build_pointer_cast( - tmp, - iwc.i8_type() - .array_type(8) - .ptr_type(AddressSpace::default()), - "arg_i8_ptr", - )?; - builder.build_memcpy(dest_ptr, 1, src_i8, 1, iwc.i64_type().const_int(8, false))?; + builder.build_memcpy(dest_ptr, 1, tmp, 1, iwc.i64_type().const_int(8, false))?; offset += 8; } BasicTypeEnum::FloatType(_) => { // Store the float into an aligned f64 temporary, - // then copy its bytes into the blob in an unaligned manner. + // then copy its bytes into the blob with 1-byte alginment let tmp = builder.build_alloca(iwc.f64_type(), "arg_f64_tmp")?; builder.build_store(tmp, arg)?; - let src_i8 = builder.build_pointer_cast( - tmp, - iwc.i8_type() - .array_type(8) - .ptr_type(AddressSpace::default()), - "arg_i8_ptr", - )?; - builder.build_memcpy(dest_ptr, 1, src_i8, 1, iwc.i64_type().const_int(8, false))?; + builder.build_memcpy(dest_ptr, 1, tmp, 1, iwc.i64_type().const_int(8, false))?; offset += 8; } // We have already validated types when sizing the blob, diff --git a/qis-compiler/rust/selene_specific.rs b/qis-compiler/rust/selene_specific.rs index 790f15690..e10ef32bf 100644 --- a/qis-compiler/rust/selene_specific.rs +++ b/qis-compiler/rust/selene_specific.rs @@ -22,7 +22,7 @@ pub fn panic_str_fn<'c>( let panic_str_type = iwc.void_type().fn_type( &[ iwc.i32_type().into(), - iwc.i8_type().ptr_type(AddressSpace::default()).into(), + iwc.ptr_type(AddressSpace::default()).into(), ], false, ); diff --git a/tket-qsystem/src/llvm/array_utils.rs b/tket-qsystem/src/llvm/array_utils.rs index 2ed0a15ee..3e572bf72 100644 --- a/tket-qsystem/src/llvm/array_utils.rs +++ b/tket-qsystem/src/llvm/array_utils.rs @@ -16,7 +16,7 @@ use hugr::{HugrView, Node}; use inkwell::AddressSpace; use inkwell::builder::{Builder, BuilderError}; use inkwell::context::Context; -use inkwell::types::{IntType, PointerType, StructType}; +use inkwell::types::{IntType, StructType}; use inkwell::values::{ArrayValue, IntValue, PointerValue, StructValue}; /// Specifies different array lowering strategies. @@ -33,6 +33,7 @@ pub trait ArrayLowering { builder: &Builder<'c>, val: BasicValueEnum<'c>, elem_type: BasicTypeEnum<'c>, + length: u32, ) -> Result>; /// Turns a pointer to the first array element into an array value in the given lowering. @@ -78,6 +79,7 @@ impl ArrayLowering for StackArrayLowerin builder: &Builder<'c>, val: BasicValueEnum<'c>, _elem_type: BasicTypeEnum<'c>, + _length: u32, ) -> Result> { build_array_alloca(builder, val.into_array_value()) .map_err(|e| anyhow!("Could not build array alloca: {e}")) @@ -122,9 +124,11 @@ impl ArrayLowering for HeapArrayLowering builder: &Builder<'c>, val: BasicValueEnum<'c>, elem_type: BasicTypeEnum<'c>, + length: u32, ) -> Result> { let (array_ptr, offset) = decompose_array_fat_pointer(builder, val)?; - let elem_ptr = unsafe { builder.build_in_bounds_gep(elem_type, array_ptr, &[offset], "")? }; + let array_ty = elem_type.array_type(length); + let elem_ptr = unsafe { builder.build_in_bounds_gep(array_ty, array_ptr, &[offset], "")? }; Ok(elem_ptr) } @@ -189,6 +193,7 @@ pub enum ElemType { } impl ElemType { + /// Get the corresponding `inkwell::types::BasicTypeEnum` pub fn llvm_type<'a>(&self, ctx: &'a Context) -> BasicTypeEnum<'a> { match *self { ElemType::Int | ElemType::Uint => ctx.i64_type().into(), @@ -211,7 +216,7 @@ impl ElemType { /// The fourth field points to an array of masking data of the same size as the /// primary data in memory and contains boolean values to indicate the presence /// of data in the primary array. Dense arrays have mask values of all zeros. -pub fn struct_1d_arr_t<'a>(ctx: &'a Context, data_type: &'a ElemType) -> StructType<'a> { +pub fn struct_1d_arr_t<'a>(ctx: &'a Context) -> StructType<'a> { let ptr_t = ctx.ptr_type(AddressSpace::default()); ctx.struct_type( &[ @@ -232,17 +237,16 @@ pub fn struct_1d_arr_alloc<'a>( ctx: &'a Context, builder: &Builder<'a>, length: u32, - data_type: &'a ElemType, array_ptr: PointerValue<'a>, ) -> Result<(PointerValue<'a>, StructValue<'a>), BuilderError> { - let out_arr_type = struct_1d_arr_t(ctx, data_type); + let out_arr_type = struct_1d_arr_t(ctx); let out_arr_ptr = builder.build_alloca(out_arr_type, "out_arr_alloca")?; let ptr_t = ctx.ptr_type(AddressSpace::default()); - let x_field = builder.build_struct_gep(ptr_t, out_arr_ptr, 0, "x_ptr")?; - let y_field = builder.build_struct_gep(ptr_t, out_arr_ptr, 1, "y_ptr")?; - let arr_field = builder.build_struct_gep(ptr_t, out_arr_ptr, 2, "arr_ptr")?; - let mask_field = builder.build_struct_gep(ptr_t, out_arr_ptr, 3, "mask_ptr")?; + let x_field = builder.build_struct_gep(out_arr_type, out_arr_ptr, 0, "x_ptr")?; + let y_field = builder.build_struct_gep(out_arr_type, out_arr_ptr, 1, "y_ptr")?; + let arr_field = builder.build_struct_gep(out_arr_type, out_arr_ptr, 2, "arr_ptr")?; + let mask_field = builder.build_struct_gep(out_arr_type, out_arr_ptr, 3, "mask_ptr")?; let x_val = ctx.i32_type().const_int(length.into(), false); let y_val = ctx.i32_type().const_int(1, false); @@ -305,7 +309,7 @@ mod tests { fn build_array<'c>( context: &'c Context, builder: &Builder<'c>, - ) -> Result<(PointerValue<'c>, PointerValue<'c>), BuilderError> { + ) -> Result, BuilderError> { // Create test array let i32_type = context.i32_type(); let array = @@ -323,8 +327,7 @@ mod tests { make_bb(&context, &module, &builder); - let (array_ptr, _) = - build_array(&context, &builder).expect("Array allocation should succeed"); + let array_ptr = build_array(&context, &builder).expect("Array allocation should succeed"); let i32_type = context.i32_type(); let array_length = 2; let loaded_array = build_int_array_load(&builder, array_ptr, i32_type, array_length) @@ -342,29 +345,14 @@ mod tests { #[test] fn test_struct_1d_arr_t() { let context = Context::create(); - - // Test for each element type - let int_struct = struct_1d_arr_t(&context, &ElemType::Int); - let uint_struct = struct_1d_arr_t(&context, &ElemType::Uint); - let float_struct = struct_1d_arr_t(&context, &ElemType::Float); - let bool_struct = struct_1d_arr_t(&context, &ElemType::Bool); - - let structs = [int_struct, uint_struct, float_struct, bool_struct]; - - for s in &structs { - // All structs should have 4 fields - assert_eq!(s.get_field_types().len(), 4); - - // Check the field types (first two fields should be i32 for all structs) - assert!(s.get_field_types()[0].is_int_type()); - assert!(s.get_field_types()[1].is_int_type()); - - // Third field should be a pointer to the corresponding data type - assert!(s.get_field_types()[2].is_pointer_type()); - - // Fourth field should be a pointer to bool type for all structs - assert!(s.get_field_types()[3].is_pointer_type()); - } + let struct_ty = struct_1d_arr_t(&context); + + // Fields should be (int, int, ptr, ptr) + assert_eq!(struct_ty.get_field_types().len(), 4); + assert!(struct_ty.get_field_types()[0].is_int_type()); + assert!(struct_ty.get_field_types()[1].is_int_type()); + assert!(struct_ty.get_field_types()[2].is_pointer_type()); + assert!(struct_ty.get_field_types()[3].is_pointer_type()); } /// Test that struct_1d_arr_alloc properly allocates and initializes a dense array struct. @@ -376,13 +364,13 @@ mod tests { make_bb(&context, &module, &builder); - let (array_ptr, _) = build_array(&context, &builder).unwrap(); + let array_ptr = build_array(&context, &builder).unwrap(); // Test the function with different element types let elem_types = [ElemType::Int, ElemType::Float, ElemType::Bool]; for elem_type in elem_types.iter() { let (struct_ptr, _) = - struct_1d_arr_alloc(&context, &builder, 2, elem_type, array_ptr).unwrap(); + struct_1d_arr_alloc(&context, &builder, 2, array_ptr).unwrap(); assert!(!struct_ptr.is_null(), "Struct pointer should not be null"); } @@ -413,12 +401,12 @@ mod tests { let elem_ty = emit_ctx.iw_context().i32_type().into(); let size = 2; - let (array_ptr, _) = build_array(emit_ctx.iw_context(), emit_ctx.builder()).unwrap(); + let array_ptr = build_array(emit_ctx.iw_context(), emit_ctx.builder()).unwrap(); let array = array_lowering .array_from_ptr(&mut emit_ctx, array_ptr, elem_ty, size) .unwrap(); let new_array_ptr = array_lowering - .array_to_ptr(emit_ctx.builder(), array) + .array_to_ptr(emit_ctx.builder(), array, elem_ty, size) .unwrap(); assert_eq!(array_ptr.get_type(), new_array_ptr.get_type()); let new_array = array_lowering diff --git a/tket-qsystem/src/llvm/debug.rs b/tket-qsystem/src/llvm/debug.rs index 442236370..3b0955ba0 100644 --- a/tket-qsystem/src/llvm/debug.rs +++ b/tket-qsystem/src/llvm/debug.rs @@ -82,12 +82,11 @@ impl DebugCodegenExtension { .try_into() .map_err(|_| anyhow!(format!("StateResult expects a qubit array argument")))?; let qubits_array = self.array_lowering.array_to_ptr( - builder, qubits, i64_t.as_basic_type_enum())?; + builder, qubits, i64_t.as_basic_type_enum(), array_len.try_into()?)?; let (qubits_ptr, _) = struct_1d_arr_alloc( iw_ctx, builder, array_len.try_into()?, - &ElemType::Int, qubits_array, )?; diff --git a/tket-qsystem/src/llvm/result.rs b/tket-qsystem/src/llvm/result.rs index 486761cf7..2b0c05ca3 100644 --- a/tket-qsystem/src/llvm/result.rs +++ b/tket-qsystem/src/llvm/result.rs @@ -145,7 +145,7 @@ impl<'c, H: HugrView, AL: ArrayLowering + Clone> ResultEmitter<'c, let tag_ptr = emit_global_string(self.0, tag, "res_", format!("{TAG_PREFIX}{type_tag}"))?; let tag_len = { - let mut l = self + let l = self .0 .builder() .build_load(self.i8_t(), tag_ptr.into_pointer_value(), "tag_len")? @@ -171,12 +171,11 @@ impl<'c, H: HugrView, AL: ArrayLowering + Clone> ResultEmitter<'c, let print_fn = self.get_func_print(op)?; let array = self.1.array_to_ptr(self.builder(), val, - data_type.llvm_type(self.iw_context()))?; + data_type.llvm_type(self.iw_context()), length.try_into()?)?; let (array_ptr, _) = struct_1d_arr_alloc( self.iw_context(), self.builder(), length.try_into()?, - data_type, array, )?; self.builder().build_call( From b6c53f84824790515beb4b87e8a481a16be50e32 Mon Sep 17 00:00:00 2001 From: George Hodgkins Date: Mon, 23 Feb 2026 13:25:43 -0700 Subject: [PATCH 03/24] Pin version for integration testing, squash some warnings --- Cargo.lock | 597 +++++++++++---------------- Cargo.toml | 10 +- tket-qsystem/src/llvm/array_utils.rs | 12 +- tket-qsystem/src/llvm/debug.rs | 2 +- 4 files changed, 242 insertions(+), 379 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e67f42b44..bd76c6671 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -55,9 +55,9 @@ checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" [[package]] name = "anstream" -version = "1.0.0" +version = "0.6.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d" +checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a" dependencies = [ "anstyle", "anstyle-parse", @@ -76,9 +76,9 @@ checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78" [[package]] name = "anstyle-parse" -version = "1.0.0" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52ce7f38b242319f7cabaa6813055467063ecdc9d355bbb4ce0c68908cd8130e" +checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" dependencies = [ "utf8parse", ] @@ -105,9 +105,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.102" +version = "1.0.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c" +checksum = "5f0e0fee31ef5ed1ba1316088939cea399010ed7731dba877ed44aeb407a75ea" [[package]] name = "approx" @@ -166,7 +166,7 @@ dependencies = [ "petgraph 0.6.5", "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.114", ] [[package]] @@ -218,14 +218,14 @@ dependencies = [ "regex", "rustc-hash 2.1.1", "shlex", - "syn 2.0.117", + "syn 2.0.114", ] [[package]] name = "bitflags" -version = "2.11.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "843867be96c8daad0d758b57df9392b6d8d271134fce549de6ce169ff98a92af" +checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" [[package]] name = "bitvec" @@ -290,9 +290,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "capnp" -version = "0.25.2" +version = "0.25.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c982cc37b8f646c753f3b0a24d4d40ca2eac8a9c2b9ea6fff524be67ddc184cb" +checksum = "1ae0593da254d02d0e69525b5eec7a59586753aa3bd2e54842eca33c6786330c" dependencies = [ "embedded-io", ] @@ -317,16 +317,16 @@ dependencies = [ "quote", "serde", "serde_json", - "syn 2.0.117", + "syn 2.0.114", "tempfile", "toml", ] [[package]] name = "cc" -version = "1.2.57" +version = "1.2.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a0dd1ca384932ff3641c8718a02769f1698e7563dc6974ffd03346116310423" +checksum = "aebf35691d1bfb0ac386a69bac2fde4dd276fb618cf8bf4f5318fe285e821bb2" dependencies = [ "find-msvc-tools", "jobserver", @@ -368,9 +368,9 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.44" +version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c673075a2e0e5f4a1dde27ce9dee1ea4558c7ffe648f576438a20ca1d2acc4b0" +checksum = "fac4744fb15ae8337dc853fee7fb3f4e48c0fbaa23d0afe49c447b4fab126118" dependencies = [ "iana-time-zone", "js-sys", @@ -420,9 +420,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.6.0" +version = "4.5.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b193af5b67834b676abd72466a96c1024e6a6ad978a1f484bd90b85c94041351" +checksum = "2797f34da339ce31042b27d23607e051786132987f595b02ba4f6a6dffb7030a" dependencies = [ "clap_builder", "clap_derive", @@ -440,9 +440,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.6.0" +version = "4.5.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "714a53001bf66416adb0e2ef5ac857140e7dc3a0c48fb28b2f10762fc4b5069f" +checksum = "24a241312cea5059b13574bb9b3861cabf758b879c15190b37b6d6fd63ab6876" dependencies = [ "anstream", "anstyle", @@ -452,21 +452,21 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.6.0" +version = "4.5.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1110bd8a634a1ab8cb04345d8d878267d57c3cf1b38d91b71af6686408bbca6a" +checksum = "a92793da1a46a5f2a02a6f4c46c6496b28c43638adea8306fcb0caa1634f24e5" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.114", ] [[package]] name = "clap_lex" -version = "1.1.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9" +checksum = "3a822ea5bc7590f9d40f1ba12c0dc3c2760f3482c6984db1573ad11031420831" [[package]] name = "clio" @@ -671,9 +671,9 @@ dependencies = [ [[package]] name = "darling" -version = "0.23.0" +version = "0.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25ae13da2f202d56bd7f91c25fba009e7717a1e4a1cc98a76d844b65ae912e9d" +checksum = "9cdf337090841a411e2a7f3deb9187445851f91b309c0c0a29e05f74a00a48c0" dependencies = [ "darling_core", "darling_macro", @@ -681,26 +681,27 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.23.0" +version = "0.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9865a50f7c335f53564bb694ef660825eb8610e0a53d3e11bf1b0d3df31e03b0" +checksum = "1247195ecd7e3c85f83c8d2a366e4210d588e802133e1e355180a9870b517ea4" dependencies = [ + "fnv", "ident_case", "proc-macro2", "quote", "strsim", - "syn 2.0.117", + "syn 2.0.114", ] [[package]] name = "darling_macro" -version = "0.23.0" +version = "0.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3984ec7bd6cfa798e62b4a642426a5be0e68f9401cfc2a01e3fa9ea2fcdb8d" +checksum = "d38308df82d1080de0afee5d069fa14b0326a88c14f15c5ccda35b4a6c414c81" dependencies = [ "darling_core", "quote", - "syn 2.0.117", + "syn 2.0.114", ] [[package]] @@ -736,14 +737,14 @@ checksum = "780eb241654bf097afb00fc5f054a09b687dad862e485fdcf8399bb056565370" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.114", ] [[package]] name = "deranged" -version = "0.5.8" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c" +checksum = "ececcb659e7ba858fb4f10388c250a7252eb0a27373f1a72b8748afdd248e587" dependencies = [ "powerfmt", "serde_core", @@ -757,18 +758,18 @@ checksum = "d65d7ce8132b7c0e54497a4d9a55a1c2a0912a0d786cf894472ba818fba45762" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.114", ] [[package]] name = "derive-where" -version = "1.6.1" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d08b3a0bcc0d079199cd476b2cae8435016ec11d1c0986c6901c5ac223041534" +checksum = "ef941ded77d15ca19b40374869ac6000af1c9f2a4c0f3d4c70926287e6364a8f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.114", ] [[package]] @@ -781,7 +782,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version", - "syn 2.0.117", + "syn 2.0.114", ] [[package]] @@ -803,7 +804,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version", - "syn 2.0.117", + "syn 2.0.114", "unicode-xid", ] @@ -862,7 +863,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.114", ] [[package]] @@ -873,9 +874,9 @@ checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[package]] name = "erased-serde" -version = "0.4.10" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2add8a07dd6a8d93ff627029c51de145e12686fbc36ecb298ac22e74cf02dec" +checksum = "89e8918065695684b2b0702da20382d5ae6065cf3327bc2d6436bd49a71ce9f3" dependencies = [ "serde", "serde_core", @@ -936,26 +937,26 @@ checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] name = "futures-core" -version = "0.3.32" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-macro" -version = "0.3.32" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e835b70203e41293343137df5c0664546da5745f82ec9b84d40be8336958447b" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.114", ] [[package]] name = "futures-task" -version = "0.3.32" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-timer" @@ -965,14 +966,15 @@ checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" [[package]] name = "futures-util" -version = "0.3.32" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-core", "futures-macro", "futures-task", "pin-project-lite", + "pin-utils", "slab", ] @@ -1003,21 +1005,8 @@ checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" dependencies = [ "cfg-if", "libc", - "r-efi 5.3.0", - "wasip2", -] - -[[package]] -name = "getrandom" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555" -dependencies = [ - "cfg-if", - "libc", - "r-efi 6.0.0", + "r-efi", "wasip2", - "wasip3", ] [[package]] @@ -1098,20 +1087,19 @@ dependencies = [ [[package]] name = "hugr" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60bd5eca20bf3e7045b68668c7b29e80e05e1c36072e9adf1b7565ecaec906e3" +version = "0.25.6" +source = "git+https://github.com/quantinuum/hugr?rev=0ab742f4502f12e9ef0b9dd8f3fe767c10150983#0ab742f4502f12e9ef0b9dd8f3fe767c10150983" dependencies = [ "hugr-core", "hugr-llvm", "hugr-model", + "hugr-passes", ] [[package]] name = "hugr-cli" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13c2e99f82b15e5a9f8a41c96f4fe8647ba93315b2c84a533a34f0e916b5b4eb" +version = "0.25.6" +source = "git+https://github.com/quantinuum/hugr?rev=0ab742f4502f12e9ef0b9dd8f3fe767c10150983#0ab742f4502f12e9ef0b9dd8f3fe767c10150983" dependencies = [ "anyhow", "clap", @@ -1130,9 +1118,8 @@ dependencies = [ [[package]] name = "hugr-core" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3aaf6aa2670a90068eafb9606418fd0d24c0b34064c70590e24e0db8c6d43cd9" +version = "0.25.6" +source = "git+https://github.com/quantinuum/hugr?rev=0ab742f4502f12e9ef0b9dd8f3fe767c10150983#0ab742f4502f12e9ef0b9dd8f3fe767c10150983" dependencies = [ "base64", "cgmath", @@ -1168,9 +1155,8 @@ dependencies = [ [[package]] name = "hugr-llvm" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efcbab7e40ab80cc1de863b998a17a01e9c58b1e2c1f339da33fe2fed9bbc124" +version = "0.25.6" +source = "git+https://github.com/quantinuum/hugr?rev=0ab742f4502f12e9ef0b9dd8f3fe767c10150983#0ab742f4502f12e9ef0b9dd8f3fe767c10150983" dependencies = [ "anyhow", "cc", @@ -1188,9 +1174,8 @@ dependencies = [ [[package]] name = "hugr-model" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a2403a481855ba1dd61c1354c3173c03a53546558a8373e4dee3beaa0001796" +version = "0.25.6" +source = "git+https://github.com/quantinuum/hugr?rev=0ab742f4502f12e9ef0b9dd8f3fe767c10150983#0ab742f4502f12e9ef0b9dd8f3fe767c10150983" dependencies = [ "base64", "bumpalo", @@ -1210,9 +1195,8 @@ dependencies = [ [[package]] name = "hugr-passes" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3022a594f5c428c2ee12e6cf7c8f690eff71972231d9b40f29a52e299f8e91f" +version = "0.25.6" +source = "git+https://github.com/quantinuum/hugr?rev=0ab742f4502f12e9ef0b9dd8f3fe767c10150983#0ab742f4502f12e9ef0b9dd8f3fe767c10150983" dependencies = [ "ascent", "derive_more 2.1.1", @@ -1251,12 +1235,6 @@ dependencies = [ "cc", ] -[[package]] -name = "id-arena" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954" - [[package]] name = "ident_case" version = "1.0.1" @@ -1292,6 +1270,15 @@ dependencies = [ "serde_core", ] +[[package]] +name = "indoc" +version = "2.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79cf5c93f93228cf8efb3ba362535fb11199ac548a09ce117c9b1adc3030d706" +dependencies = [ + "rustversion", +] + [[package]] name = "inkwell" version = "0.8.0" @@ -1313,7 +1300,7 @@ checksum = "63736175c9a30ea123f7018de9f26163e0b39cd6978990ae486b510c4f3bad69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.114", ] [[package]] @@ -1339,9 +1326,9 @@ dependencies = [ [[package]] name = "inventory" -version = "0.3.22" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "009ae045c87e7082cb72dab0ccd01ae075dd00141ddc108f43a0ea150a9e7227" +checksum = "bc61209c082fbeb19919bee74b176221b27223e27b65d781eb91af24eb1fb46e" dependencies = [ "rustversion", ] @@ -1402,15 +1389,15 @@ version = "0.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33" dependencies = [ - "getrandom 0.3.4", + "getrandom", "libc", ] [[package]] name = "js-sys" -version = "0.3.91" +version = "0.3.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b49715b7073f385ba4bc528e5747d02e66cb39c6146efb66b781f131f0fb399c" +checksum = "8c942ebf8e95485ca0d52d97da7c5a2c387d0e7f0ba4c35e93bfcaee045955b3" dependencies = [ "once_cell", "wasm-bindgen", @@ -1422,17 +1409,11 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" -[[package]] -name = "leb128fmt" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" - [[package]] name = "libc" -version = "0.2.183" +version = "0.2.181" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b646652bf6661599e1da8901b3b9522896f01e736bad5f723fe7a3a27f899d" +checksum = "459427e2af2b9c839b132acb702a1c654d95e10f8c326bfc2ad11310e458b1c5" [[package]] name = "libloading" @@ -1446,9 +1427,9 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.12.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" +checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" [[package]] name = "llvm-sys" @@ -1481,9 +1462,18 @@ checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" [[package]] name = "memchr" -version = "2.8.0" +version = "2.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" +checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" + +[[package]] +name = "memoffset" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" +dependencies = [ + "autocfg", +] [[package]] name = "minimal-lexical" @@ -1567,9 +1557,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.21.4" +version = "1.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" [[package]] name = "once_cell_polyfill" @@ -1676,7 +1666,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.114", ] [[package]] @@ -1713,9 +1703,15 @@ dependencies = [ [[package]] name = "pin-project-lite" -version = "0.2.17" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" + +[[package]] +name = "pin-utils" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" @@ -1828,7 +1824,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" dependencies = [ "proc-macro2", - "syn 2.0.117", + "syn 2.0.114", ] [[package]] @@ -1844,9 +1840,9 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "3.5.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f" +checksum = "219cb19e96be00ab2e37d6e299658a0cfa83e52429179969b0f0121b4ac46983" dependencies = [ "toml_edit", ] @@ -1870,7 +1866,7 @@ dependencies = [ "proc-macro-error-attr2", "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.114", ] [[package]] @@ -1884,68 +1880,80 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.28.2" +version = "0.27.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf85e27e86080aafd5a22eae58a162e133a589551542b3e5cee4beb27e54f8e1" +checksum = "ab53c047fcd1a1d2a8820fe84f05d6be69e9526be40cb03b73f86b6b03e6d87d" dependencies = [ "anyhow", + "indoc", "libc", + "memoffset", "once_cell", "portable-atomic", - "pyo3-build-config", + "pyo3-build-config 0.27.2", "pyo3-ffi", "pyo3-macros", + "unindent", ] [[package]] name = "pyo3-build-config" -version = "0.28.2" +version = "0.27.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bf94ee265674bf76c09fa430b0e99c26e319c945d96ca0d5a8215f31bf81cf7" +checksum = "b455933107de8642b4487ed26d912c2d899dec6114884214a0b3bb3be9261ea6" +dependencies = [ + "target-lexicon", +] + +[[package]] +name = "pyo3-build-config" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "972720a441c91fd9c49f212a1d2d74c6e3803b231ebc8d66c51efbd7ccab11c8" dependencies = [ "target-lexicon", ] [[package]] name = "pyo3-ffi" -version = "0.28.2" +version = "0.27.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "491aa5fc66d8059dd44a75f4580a2962c1862a1c2945359db36f6c2818b748dc" +checksum = "1c85c9cbfaddf651b1221594209aed57e9e5cff63c4d11d1feead529b872a089" dependencies = [ "libc", - "pyo3-build-config", + "pyo3-build-config 0.27.2", ] [[package]] name = "pyo3-macros" -version = "0.28.2" +version = "0.27.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5d671734e9d7a43449f8480f8b38115df67bef8d21f76837fa75ee7aaa5e52e" +checksum = "0a5b10c9bf9888125d917fb4d2ca2d25c8df94c7ab5a52e13313a07e050a3b02" dependencies = [ "proc-macro2", "pyo3-macros-backend", "quote", - "syn 2.0.117", + "syn 2.0.114", ] [[package]] name = "pyo3-macros-backend" -version = "0.28.2" +version = "0.27.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22faaa1ce6c430a1f71658760497291065e6450d7b5dc2bcf254d49f66ee700a" +checksum = "03b51720d314836e53327f5871d4c0cfb4fb37cc2c4a11cc71907a86342c40f9" dependencies = [ "heck", "proc-macro2", - "pyo3-build-config", + "pyo3-build-config 0.27.2", "quote", - "syn 2.0.117", + "syn 2.0.114", ] [[package]] name = "pythonize" -version = "0.28.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b79f670c9626c8b651c0581011b57b6ba6970bb69faf01a7c4c0cfc81c43f95" +checksum = "a3a8f29db331e28c332c63496cfcbb822aca3d7320bc08b655d7fd0c29c50ede" dependencies = [ "pyo3", "serde", @@ -1953,9 +1961,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.45" +version = "1.0.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" +checksum = "21b2ebcf727b7760c461f091f9f0f539b77b8e87f2fd88131e7f1b433b3cece4" dependencies = [ "proc-macro2", ] @@ -1966,12 +1974,6 @@ version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" -[[package]] -name = "r-efi" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" - [[package]] name = "radium" version = "0.7.0" @@ -2043,7 +2045,7 @@ checksum = "b7186006dcb21920990093f30e3dea63b7d6e977bf1256be20c3563a5db070da" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.114", ] [[package]] @@ -2060,9 +2062,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.14" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f" +checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c" dependencies = [ "aho-corasick", "memchr", @@ -2077,9 +2079,9 @@ checksum = "cab834c73d247e67f4fae452806d17d3c7501756d98c8808d7c9c7aa7d18f973" [[package]] name = "regex-syntax" -version = "0.8.10" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a" +checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58" [[package]] name = "relative-path" @@ -2147,7 +2149,7 @@ dependencies = [ "regex", "relative-path", "rustc_version", - "syn 2.0.117", + "syn 2.0.114", "unicode-ident", ] @@ -2174,9 +2176,9 @@ dependencies = [ [[package]] name = "rustix" -version = "1.1.4" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" +checksum = "146c9e247ccc180c1f61615433868c99f3de3ae256a30a43b49f67c2d9171f34" dependencies = [ "bitflags", "errno", @@ -2193,9 +2195,9 @@ checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" [[package]] name = "ryu" -version = "1.0.23" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" +checksum = "a50f4cf475b65d88e057964e0e9bb1f0aa9bbb2036dc65c64596b42932536984" [[package]] name = "same-file" @@ -2240,7 +2242,7 @@ dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 2.0.117", + "syn 2.0.114", ] [[package]] @@ -2258,7 +2260,7 @@ dependencies = [ "insta", "itertools 0.14.0", "pyo3", - "pyo3-build-config", + "pyo3-build-config 0.28.0", "rstest", "serde", "serde_json", @@ -2306,7 +2308,7 @@ checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.114", ] [[package]] @@ -2317,7 +2319,7 @@ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.114", ] [[package]] @@ -2344,9 +2346,9 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.18.0" +version = "3.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd5414fad8e6907dbdd5bc441a50ae8d6e26151a03b1de04d89a5576de61d01f" +checksum = "4fa237f2807440d238e0364a218270b98f767a00d3dada77b1c53ae88940e2e7" dependencies = [ "base64", "chrono", @@ -2363,14 +2365,14 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.18.0" +version = "3.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3db8978e608f1fe7357e211969fd9abdcae80bac1ba7a3369bb7eb6b404eb65" +checksum = "52a8e3ca0ca629121f70ab50f95249e5a6f925cc0f6ffe8256c45b728875706c" dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.114", ] [[package]] @@ -2432,9 +2434,9 @@ dependencies = [ [[package]] name = "smol_str" -version = "0.3.6" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4aaa7368fcf4852a4c2dd92df0cace6a71f2091ca0a23391ce7f3a31833f1523" +checksum = "0f7a918bd2a9951d18ee6e48f076843e8e73a9a5d22cf05bcd4b7a81bdd04e17" dependencies = [ "borsh", "serde_core", @@ -2454,23 +2456,23 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "strum" -version = "0.28.0" +version = "0.27.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9628de9b8791db39ceda2b119bbe13134770b56c138ec1d3af810d045c04f9bd" +checksum = "af23d6f6c1a224baef9d3f61e287d2761385a5b88fdab4eb4c6f11aeb54c4bcf" dependencies = [ "strum_macros", ] [[package]] name = "strum_macros" -version = "0.28.0" +version = "0.27.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab85eea0270ee17587ed4156089e10b9e6880ee688791d45a905f5b1ca36f664" +checksum = "7695ce3845ea4b33927c055a39dc438a45b059f7c1b3d91d38d10355fb8cbca7" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.114", ] [[package]] @@ -2486,9 +2488,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.117" +version = "2.0.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" +checksum = "d4d107df263a3013ef9b1879b0df87d706ff80f65a86ea879bd9c31f9b307c2a" dependencies = [ "proc-macro2", "quote", @@ -2516,7 +2518,7 @@ dependencies = [ "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.114", ] [[package]] @@ -2527,18 +2529,18 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "target-lexicon" -version = "0.13.5" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca" +checksum = "b1dd07eb858a2067e2f3c7155d54e929265c264e6f37efe3ee7a8d1b5a1dd0ba" [[package]] name = "tempfile" -version = "3.27.0" +version = "3.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" +checksum = "655da9c7eb6305c55742045d5a8d2037996d61d8de95806335c7c86ce0f82e9c" dependencies = [ "fastrand", - "getrandom 0.4.2", + "getrandom", "once_cell", "rustix", "windows-sys 0.61.2", @@ -2579,7 +2581,7 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.114", ] [[package]] @@ -2590,7 +2592,7 @@ checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.114", ] [[package]] @@ -2624,9 +2626,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.47" +version = "0.3.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "743bd48c283afc0388f9b8827b976905fb217ad9e647fae3a379a9283c4def2c" +checksum = "9da98b7d9b7dad93488a84b8248efc35352b0b2657397d4167e7ad67e5d535e5" dependencies = [ "deranged", "itoa", @@ -2645,9 +2647,9 @@ checksum = "7694e1cfe791f8d31026952abf09c69ca6f6fa4e1a1229e18988f06a04a12dca" [[package]] name = "time-macros" -version = "0.2.27" +version = "0.2.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e70e4c5a0e0a8a4823ad65dfe1a6930e4f4d756dcd9dd7939022b5e8c501215" +checksum = "78cc610bac2dcee56805c99642447d4c5dbde4d01f752ffea0199aee1f601dc4" dependencies = [ "num-conv", "time-core", @@ -2680,7 +2682,6 @@ dependencies = [ "fxhash", "hugr", "hugr-core", - "hugr-passes", "indexmap 2.13.0", "insta", "itertools 0.14.0", @@ -2708,9 +2709,9 @@ dependencies = [ [[package]] name = "tket-json-rs" -version = "0.8.2" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f94cdded1cb82aaf9e0c2508762753f72c60ce8c068853b8ecc6c1bcd21644b9" +checksum = "aea5374e5ef784cd4825cfcd7cfaf4c8a6a39a2da6129b12181aa0c9234f9678" dependencies = [ "derive_more 2.1.1", "pyo3", @@ -2725,7 +2726,6 @@ dependencies = [ name = "tket-py" version = "0.0.0" dependencies = [ - "anyhow", "cool_asserts", "derive_more 2.1.1", "hugr", @@ -2756,7 +2756,6 @@ dependencies = [ "hugr", "hugr-cli", "hugr-core", - "hugr-passes", "indexmap 2.13.0", "itertools 0.14.0", "lazy_static", @@ -2794,14 +2793,14 @@ dependencies = [ [[package]] name = "toml" -version = "0.9.12+spec-1.1.0" +version = "0.9.11+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf92845e79fc2e2def6a5d828f0801e29a2f8acc037becc5ab08595c7d5e9863" +checksum = "f3afc9a848309fe1aaffaed6e1546a7a14de1f935dc9d89d32afd9a44bab7c46" dependencies = [ "indexmap 2.13.0", "serde_core", "serde_spanned", - "toml_datetime 0.7.5+spec-1.1.0", + "toml_datetime", "toml_parser", "toml_writer", "winnow", @@ -2816,32 +2815,23 @@ dependencies = [ "serde_core", ] -[[package]] -name = "toml_datetime" -version = "1.0.0+spec-1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32c2555c699578a4f59f0cc68e5116c8d7cabbd45e1409b989d4be085b53f13e" -dependencies = [ - "serde_core", -] - [[package]] name = "toml_edit" -version = "0.25.4+spec-1.1.0" +version = "0.23.10+spec-1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7193cbd0ce53dc966037f54351dbbcf0d5a642c7f0038c382ef9e677ce8c13f2" +checksum = "84c8b9f757e028cee9fa244aea147aab2a9ec09d5325a9b01e0a49730c2b5269" dependencies = [ "indexmap 2.13.0", - "toml_datetime 1.0.0+spec-1.1.0", + "toml_datetime", "toml_parser", "winnow", ] [[package]] name = "toml_parser" -version = "1.0.9+spec-1.1.0" +version = "1.0.6+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "702d4415e08923e7e1ef96cd5727c0dfed80b4d2fa25db9647fe5eb6f7c5a4c4" +checksum = "a3198b4b0a8e11f09dd03e133c0280504d0801269e9afa46362ffde1cbeebf44" dependencies = [ "winnow", ] @@ -2883,7 +2873,7 @@ checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.114", ] [[package]] @@ -2909,9 +2899,9 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.23" +version = "0.3.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7f578e5945fb242538965c2d0b04418d38ec25c79d160cd279bf0731c8d319" +checksum = "2f30143827ddab0d256fd843b7a66d164e9f271cfa0dde49142c5ca0ca291f1e" dependencies = [ "nu-ansi-term", "sharded-slab", @@ -2960,7 +2950,7 @@ checksum = "27a7a9b72ba121f6f1f6c3632b85604cac41aedb5ddc70accbebb6cac83de846" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.114", ] [[package]] @@ -2971,9 +2961,9 @@ checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" [[package]] name = "unicode-ident" -version = "1.0.24" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" +checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" [[package]] name = "unicode-segmentation" @@ -2993,6 +2983,12 @@ version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" +[[package]] +name = "unindent" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7264e107f553ccae879d21fbea1d6724ac785e8c3bfc762137959b5802826ef3" + [[package]] name = "utf8-width" version = "0.1.8" @@ -3007,11 +3003,11 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.22.0" +version = "1.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a68d3c8f01c0cfa54a75291d83601161799e4a89a39e0929f4b0354d88757a37" +checksum = "ee48d38b119b0cd71fe4141b30f5ba9c7c5d9f4e7a3a8b4a674e4b6ef789976f" dependencies = [ - "getrandom 0.4.2", + "getrandom", "js-sys", "serde_core", "wasm-bindgen", @@ -3048,20 +3044,11 @@ dependencies = [ "wit-bindgen", ] -[[package]] -name = "wasip3" -version = "0.4.0+wasi-0.3.0-rc-2026-01-06" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5428f8bf88ea5ddc08faddef2ac4a67e390b88186c703ce6dbd955e1c145aca5" -dependencies = [ - "wit-bindgen", -] - [[package]] name = "wasm-bindgen" -version = "0.2.114" +version = "0.2.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6532f9a5c1ece3798cb1c2cfdba640b9b3ba884f5db45973a6f442510a87d38e" +checksum = "64024a30ec1e37399cf85a7ffefebdb72205ca1c972291c51512360d90bd8566" dependencies = [ "cfg-if", "once_cell", @@ -3072,9 +3059,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.114" +version = "0.2.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18a2d50fcf105fb33bb15f00e7a77b772945a2ee45dcf454961fd843e74c18e6" +checksum = "008b239d9c740232e71bd39e8ef6429d27097518b6b30bdf9086833bd5b6d608" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3082,65 +3069,31 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.114" +version = "0.2.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03ce4caeaac547cdf713d280eda22a730824dd11e6b8c3ca9e42247b25c631e3" +checksum = "5256bae2d58f54820e6490f9839c49780dff84c65aeab9e772f15d5f0e913a55" dependencies = [ "bumpalo", "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.114", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.114" +version = "0.2.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75a326b8c223ee17883a4251907455a2431acc2791c98c26279376490c378c16" +checksum = "1f01b580c9ac74c8d8f0c0e4afb04eeef2acf145458e52c03845ee9cd23e3d12" dependencies = [ "unicode-ident", ] -[[package]] -name = "wasm-encoder" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "990065f2fe63003fe337b932cfb5e3b80e0b4d0f5ff650e6985b1048f62c8319" -dependencies = [ - "leb128fmt", - "wasmparser", -] - -[[package]] -name = "wasm-metadata" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909" -dependencies = [ - "anyhow", - "indexmap 2.13.0", - "wasm-encoder", - "wasmparser", -] - -[[package]] -name = "wasmparser" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe" -dependencies = [ - "bitflags", - "hashbrown 0.15.5", - "indexmap 2.13.0", - "semver", -] - [[package]] name = "web-sys" -version = "0.3.91" +version = "0.3.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "854ba17bb104abfb26ba36da9729addc7ce7f06f5c0f90f3c391f8461cca21f9" +checksum = "312e32e551d92129218ea9a2452120f4aabc03529ef03e4d0d82fb2780608598" dependencies = [ "js-sys", "wasm-bindgen", @@ -3198,7 +3151,7 @@ checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.114", ] [[package]] @@ -3209,7 +3162,7 @@ checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.114", ] [[package]] @@ -3377,9 +3330,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.7.15" +version = "0.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df79d97927682d2fd8adb29682d1140b343be4ac0f08fd68b7765d9c059d3945" +checksum = "5a5364e9d77fcdeeaa6062ced926ee3381faa2ee02d3eb83a5c27a8825540829" dependencies = [ "memchr", ] @@ -3389,88 +3342,6 @@ name = "wit-bindgen" version = "0.51.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" -dependencies = [ - "wit-bindgen-rust-macro", -] - -[[package]] -name = "wit-bindgen-core" -version = "0.51.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea61de684c3ea68cb082b7a88508a8b27fcc8b797d738bfc99a82facf1d752dc" -dependencies = [ - "anyhow", - "heck", - "wit-parser", -] - -[[package]] -name = "wit-bindgen-rust" -version = "0.51.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7c566e0f4b284dd6561c786d9cb0142da491f46a9fbed79ea69cdad5db17f21" -dependencies = [ - "anyhow", - "heck", - "indexmap 2.13.0", - "prettyplease", - "syn 2.0.117", - "wasm-metadata", - "wit-bindgen-core", - "wit-component", -] - -[[package]] -name = "wit-bindgen-rust-macro" -version = "0.51.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c0f9bfd77e6a48eccf51359e3ae77140a7f50b1e2ebfe62422d8afdaffab17a" -dependencies = [ - "anyhow", - "prettyplease", - "proc-macro2", - "quote", - "syn 2.0.117", - "wit-bindgen-core", - "wit-bindgen-rust", -] - -[[package]] -name = "wit-component" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2" -dependencies = [ - "anyhow", - "bitflags", - "indexmap 2.13.0", - "log", - "serde", - "serde_derive", - "serde_json", - "wasm-encoder", - "wasm-metadata", - "wasmparser", - "wit-parser", -] - -[[package]] -name = "wit-parser" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecc8ac4bc1dc3381b7f59c34f00b67e18f910c2c0f50015669dde7def656a736" -dependencies = [ - "anyhow", - "id-arena", - "indexmap 2.13.0", - "log", - "semver", - "serde", - "serde_derive", - "serde_json", - "unicode-xid", - "wasmparser", -] [[package]] name = "wyz" @@ -3483,29 +3354,29 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.8.42" +version = "0.8.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2578b716f8a7a858b7f02d5bd870c14bf4ddbbcf3a4c05414ba6503640505e3" +checksum = "7456cf00f0685ad319c5b1693f291a650eaf345e941d082fc4e03df8a03996ac" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.42" +version = "0.8.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e6cc098ea4d3bd6246687de65af3f920c430e236bee1e3bf2e441463f08a02f" +checksum = "1328722bbf2115db7e19d69ebcc15e795719e2d66b60827c6a69a117365e37a0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.114", ] [[package]] name = "zmij" -version = "1.0.21" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa" +checksum = "3ff05f8caa9038894637571ae6b9e29466c1f4f829d26c9b28f869a29cbe3445" [[package]] name = "zstd" diff --git a/Cargo.toml b/Cargo.toml index 25de99923..e4fad87fd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -43,11 +43,11 @@ large_enum_variant = "allow" [patch.crates-io] # Uncomment to use unreleased versions of hugr -# hugr = { git = "https://github.com/quantinuum/hugr", "rev" = "5415abebf35be4af4e5bac5c7fe54381aea55a3e" } -# hugr-core = { git = "https://github.com/quantinuum/hugr", "rev" = "5415abebf35be4af4e5bac5c7fe54381aea55a3e" } -# hugr-cli = { git = "https://github.com/quantinuum/hugr", "rev" = "5415abebf35be4af4e5bac5c7fe54381aea55a3e" } -# hugr-passes = { git = "https://github.com/quantinuum/hugr", "rev" = "5415abebf35be4af4e5bac5c7fe54381aea55a3e" } -# hugr-llvm = { git = "https://github.com/quantinuum/hugr", "rev" = "5415abebf35be4af4e5bac5c7fe54381aea55a3e" } +hugr = { git = "https://github.com/quantinuum/hugr", "rev" = "0ab742f4502f12e9ef0b9dd8f3fe767c10150983" } +hugr-core = { git = "https://github.com/quantinuum/hugr", "rev" = "0ab742f4502f12e9ef0b9dd8f3fe767c10150983" } +hugr-cli = { git = "https://github.com/quantinuum/hugr", "rev" = "0ab742f4502f12e9ef0b9dd8f3fe767c10150983" } +hugr-passes = { git = "https://github.com/quantinuum/hugr", "rev" = "0ab742f4502f12e9ef0b9dd8f3fe767c10150983" } +hugr-llvm = { git = "https://github.com/quantinuum/hugr", "rev" = "0ab742f4502f12e9ef0b9dd8f3fe767c10150983" } # portgraph = { git = "https://github.com/quantinuum/portgraph", rev = "68b96ac737e0c285d8c543b2d74a7aa80a18202c" } [workspace.dependencies] diff --git a/tket-qsystem/src/llvm/array_utils.rs b/tket-qsystem/src/llvm/array_utils.rs index 3e572bf72..4726d107a 100644 --- a/tket-qsystem/src/llvm/array_utils.rs +++ b/tket-qsystem/src/llvm/array_utils.rs @@ -242,7 +242,6 @@ pub fn struct_1d_arr_alloc<'a>( let out_arr_type = struct_1d_arr_t(ctx); let out_arr_ptr = builder.build_alloca(out_arr_type, "out_arr_alloca")?; - let ptr_t = ctx.ptr_type(AddressSpace::default()); let x_field = builder.build_struct_gep(out_arr_type, out_arr_ptr, 0, "x_ptr")?; let y_field = builder.build_struct_gep(out_arr_type, out_arr_ptr, 1, "y_ptr")?; let arr_field = builder.build_struct_gep(out_arr_type, out_arr_ptr, 2, "arr_ptr")?; @@ -365,15 +364,8 @@ mod tests { make_bb(&context, &module, &builder); let array_ptr = build_array(&context, &builder).unwrap(); - // Test the function with different element types - let elem_types = [ElemType::Int, ElemType::Float, ElemType::Bool]; - - for elem_type in elem_types.iter() { - let (struct_ptr, _) = - struct_1d_arr_alloc(&context, &builder, 2, array_ptr).unwrap(); - - assert!(!struct_ptr.is_null(), "Struct pointer should not be null"); - } + let (struct_ptr, _) = struct_1d_arr_alloc(&context, &builder, 2, array_ptr).unwrap(); + assert!(!struct_ptr.is_null(), "Struct pointer should not be null"); builder .build_return(None) diff --git a/tket-qsystem/src/llvm/debug.rs b/tket-qsystem/src/llvm/debug.rs index 3b0955ba0..f2133b032 100644 --- a/tket-qsystem/src/llvm/debug.rs +++ b/tket-qsystem/src/llvm/debug.rs @@ -12,7 +12,7 @@ use hugr::ops::ExtensionOp; use hugr::{HugrView, Node}; use tket::extension::debug::{DEBUG_EXTENSION_ID, STATE_RESULT_OP_ID, StateResult}; -use super::array_utils::{ArrayLowering, ElemType, struct_1d_arr_alloc}; +use super::array_utils::{ArrayLowering, struct_1d_arr_alloc}; static TAG_PREFIX: &str = "USER:"; From 4f899465ccf5db570f8914e7214d04de2334820a Mon Sep 17 00:00:00 2001 From: George Hodgkins Date: Mon, 23 Feb 2026 15:50:07 -0700 Subject: [PATCH 04/24] Bump pinned hugr version --- Cargo.lock | 24 ++++++++++++------------ Cargo.toml | 17 ++++++++--------- 2 files changed, 20 insertions(+), 21 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bd76c6671..109e80149 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1087,8 +1087,8 @@ dependencies = [ [[package]] name = "hugr" -version = "0.25.6" -source = "git+https://github.com/quantinuum/hugr?rev=0ab742f4502f12e9ef0b9dd8f3fe767c10150983#0ab742f4502f12e9ef0b9dd8f3fe767c10150983" +version = "0.30.0" +source = "git+https://github.com/quantinuum/hugr?rev=3dacad485c1004a84b22e8a1de0f86fb7087e05b#3dacad485c1004a84b22e8a1de0f86fb7087e05b" dependencies = [ "hugr-core", "hugr-llvm", @@ -1098,8 +1098,8 @@ dependencies = [ [[package]] name = "hugr-cli" -version = "0.25.6" -source = "git+https://github.com/quantinuum/hugr?rev=0ab742f4502f12e9ef0b9dd8f3fe767c10150983#0ab742f4502f12e9ef0b9dd8f3fe767c10150983" +version = "0.30.0" +source = "git+https://github.com/quantinuum/hugr?rev=3dacad485c1004a84b22e8a1de0f86fb7087e05b#3dacad485c1004a84b22e8a1de0f86fb7087e05b" dependencies = [ "anyhow", "clap", @@ -1118,8 +1118,8 @@ dependencies = [ [[package]] name = "hugr-core" -version = "0.25.6" -source = "git+https://github.com/quantinuum/hugr?rev=0ab742f4502f12e9ef0b9dd8f3fe767c10150983#0ab742f4502f12e9ef0b9dd8f3fe767c10150983" +version = "0.30.0" +source = "git+https://github.com/quantinuum/hugr?rev=3dacad485c1004a84b22e8a1de0f86fb7087e05b#3dacad485c1004a84b22e8a1de0f86fb7087e05b" dependencies = [ "base64", "cgmath", @@ -1155,8 +1155,8 @@ dependencies = [ [[package]] name = "hugr-llvm" -version = "0.25.6" -source = "git+https://github.com/quantinuum/hugr?rev=0ab742f4502f12e9ef0b9dd8f3fe767c10150983#0ab742f4502f12e9ef0b9dd8f3fe767c10150983" +version = "0.30.0" +source = "git+https://github.com/quantinuum/hugr?rev=3dacad485c1004a84b22e8a1de0f86fb7087e05b#3dacad485c1004a84b22e8a1de0f86fb7087e05b" dependencies = [ "anyhow", "cc", @@ -1174,8 +1174,8 @@ dependencies = [ [[package]] name = "hugr-model" -version = "0.25.6" -source = "git+https://github.com/quantinuum/hugr?rev=0ab742f4502f12e9ef0b9dd8f3fe767c10150983#0ab742f4502f12e9ef0b9dd8f3fe767c10150983" +version = "0.30.0" +source = "git+https://github.com/quantinuum/hugr?rev=3dacad485c1004a84b22e8a1de0f86fb7087e05b#3dacad485c1004a84b22e8a1de0f86fb7087e05b" dependencies = [ "base64", "bumpalo", @@ -1195,8 +1195,8 @@ dependencies = [ [[package]] name = "hugr-passes" -version = "0.25.6" -source = "git+https://github.com/quantinuum/hugr?rev=0ab742f4502f12e9ef0b9dd8f3fe767c10150983#0ab742f4502f12e9ef0b9dd8f3fe767c10150983" +version = "0.30.0" +source = "git+https://github.com/quantinuum/hugr?rev=3dacad485c1004a84b22e8a1de0f86fb7087e05b#3dacad485c1004a84b22e8a1de0f86fb7087e05b" dependencies = [ "ascent", "derive_more 2.1.1", diff --git a/Cargo.toml b/Cargo.toml index e4fad87fd..dad3c6aab 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -43,20 +43,19 @@ large_enum_variant = "allow" [patch.crates-io] # Uncomment to use unreleased versions of hugr -hugr = { git = "https://github.com/quantinuum/hugr", "rev" = "0ab742f4502f12e9ef0b9dd8f3fe767c10150983" } -hugr-core = { git = "https://github.com/quantinuum/hugr", "rev" = "0ab742f4502f12e9ef0b9dd8f3fe767c10150983" } -hugr-cli = { git = "https://github.com/quantinuum/hugr", "rev" = "0ab742f4502f12e9ef0b9dd8f3fe767c10150983" } -hugr-passes = { git = "https://github.com/quantinuum/hugr", "rev" = "0ab742f4502f12e9ef0b9dd8f3fe767c10150983" } -hugr-llvm = { git = "https://github.com/quantinuum/hugr", "rev" = "0ab742f4502f12e9ef0b9dd8f3fe767c10150983" } +hugr = { git = "https://github.com/quantinuum/hugr", "rev" = "3dacad485c1004a84b22e8a1de0f86fb7087e05b" } +hugr-core = { git = "https://github.com/quantinuum/hugr", "rev" = "3dacad485c1004a84b22e8a1de0f86fb7087e05b" } +hugr-cli = { git = "https://github.com/quantinuum/hugr", "rev" = "3dacad485c1004a84b22e8a1de0f86fb7087e05b" } +hugr-passes = { git = "https://github.com/quantinuum/hugr", "rev" = "3dacad485c1004a84b22e8a1de0f86fb7087e05b" } +hugr-llvm = { git = "https://github.com/quantinuum/hugr", "rev" = "3dacad485c1004a84b22e8a1de0f86fb7087e05b" } # portgraph = { git = "https://github.com/quantinuum/portgraph", rev = "68b96ac737e0c285d8c543b2d74a7aa80a18202c" } [workspace.dependencies] # Make sure to run `just recompile-eccs` if the hugr serialisation format changes. -hugr = "0.26.0" -hugr-core = "0.26.0" -hugr-passes = "0.26.0" -hugr-cli = "0.26.0" +hugr = "0.30.0" +hugr-core = "0.30.0" +hugr-cli = "0.30.0" portgraph = "0.15.3" # There can only be one `pyo3` version in the whole workspace, so we use a # loose version constraint to prevent breaking changes in dependent crates where possible. From c02d9c63d9370fe717e3c65b98962fed64681ac1 Mon Sep 17 00:00:00 2001 From: George Hodgkins Date: Mon, 23 Feb 2026 16:28:02 -0700 Subject: [PATCH 05/24] Use direct deps instead of cargo override, pin branch --- Cargo.lock | 24 ++++++++++++------------ Cargo.toml | 21 +++++++++++++-------- 2 files changed, 25 insertions(+), 20 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 109e80149..44108958d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1087,8 +1087,8 @@ dependencies = [ [[package]] name = "hugr" -version = "0.30.0" -source = "git+https://github.com/quantinuum/hugr?rev=3dacad485c1004a84b22e8a1de0f86fb7087e05b#3dacad485c1004a84b22e8a1de0f86fb7087e05b" +version = "0.25.6" +source = "git+https://github.com/quantinuum/hugr?branch=george%2Fllvmup#7d8587c64086ea5a2a4486b23ef7b73ab2c44040" dependencies = [ "hugr-core", "hugr-llvm", @@ -1098,8 +1098,8 @@ dependencies = [ [[package]] name = "hugr-cli" -version = "0.30.0" -source = "git+https://github.com/quantinuum/hugr?rev=3dacad485c1004a84b22e8a1de0f86fb7087e05b#3dacad485c1004a84b22e8a1de0f86fb7087e05b" +version = "0.25.6" +source = "git+https://github.com/quantinuum/hugr?branch=george%2Fllvmup#7d8587c64086ea5a2a4486b23ef7b73ab2c44040" dependencies = [ "anyhow", "clap", @@ -1118,8 +1118,8 @@ dependencies = [ [[package]] name = "hugr-core" -version = "0.30.0" -source = "git+https://github.com/quantinuum/hugr?rev=3dacad485c1004a84b22e8a1de0f86fb7087e05b#3dacad485c1004a84b22e8a1de0f86fb7087e05b" +version = "0.25.6" +source = "git+https://github.com/quantinuum/hugr?branch=george%2Fllvmup#7d8587c64086ea5a2a4486b23ef7b73ab2c44040" dependencies = [ "base64", "cgmath", @@ -1155,8 +1155,8 @@ dependencies = [ [[package]] name = "hugr-llvm" -version = "0.30.0" -source = "git+https://github.com/quantinuum/hugr?rev=3dacad485c1004a84b22e8a1de0f86fb7087e05b#3dacad485c1004a84b22e8a1de0f86fb7087e05b" +version = "0.25.6" +source = "git+https://github.com/quantinuum/hugr?branch=george%2Fllvmup#7d8587c64086ea5a2a4486b23ef7b73ab2c44040" dependencies = [ "anyhow", "cc", @@ -1174,8 +1174,8 @@ dependencies = [ [[package]] name = "hugr-model" -version = "0.30.0" -source = "git+https://github.com/quantinuum/hugr?rev=3dacad485c1004a84b22e8a1de0f86fb7087e05b#3dacad485c1004a84b22e8a1de0f86fb7087e05b" +version = "0.25.6" +source = "git+https://github.com/quantinuum/hugr?branch=george%2Fllvmup#7d8587c64086ea5a2a4486b23ef7b73ab2c44040" dependencies = [ "base64", "bumpalo", @@ -1195,8 +1195,8 @@ dependencies = [ [[package]] name = "hugr-passes" -version = "0.30.0" -source = "git+https://github.com/quantinuum/hugr?rev=3dacad485c1004a84b22e8a1de0f86fb7087e05b#3dacad485c1004a84b22e8a1de0f86fb7087e05b" +version = "0.25.6" +source = "git+https://github.com/quantinuum/hugr?branch=george%2Fllvmup#7d8587c64086ea5a2a4486b23ef7b73ab2c44040" dependencies = [ "ascent", "derive_more 2.1.1", diff --git a/Cargo.toml b/Cargo.toml index dad3c6aab..6e5e8725c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -43,19 +43,24 @@ large_enum_variant = "allow" [patch.crates-io] # Uncomment to use unreleased versions of hugr -hugr = { git = "https://github.com/quantinuum/hugr", "rev" = "3dacad485c1004a84b22e8a1de0f86fb7087e05b" } -hugr-core = { git = "https://github.com/quantinuum/hugr", "rev" = "3dacad485c1004a84b22e8a1de0f86fb7087e05b" } -hugr-cli = { git = "https://github.com/quantinuum/hugr", "rev" = "3dacad485c1004a84b22e8a1de0f86fb7087e05b" } -hugr-passes = { git = "https://github.com/quantinuum/hugr", "rev" = "3dacad485c1004a84b22e8a1de0f86fb7087e05b" } -hugr-llvm = { git = "https://github.com/quantinuum/hugr", "rev" = "3dacad485c1004a84b22e8a1de0f86fb7087e05b" } +#hugr = { git = "https://github.com/quantinuum/hugr", "rev" = "3dacad485c1004a84b22e8a1de0f86fb7087e05b" } +#hugr-core = { git = "https://github.com/quantinuum/hugr", "rev" = "3dacad485c1004a84b22e8a1de0f86fb7087e05b" } +#hugr-cli = { git = "https://github.com/quantinuum/hugr", "rev" = "3dacad485c1004a84b22e8a1de0f86fb7087e05b" } +#hugr-passes = { git = "https://github.com/quantinuum/hugr", "rev" = "3dacad485c1004a84b22e8a1de0f86fb7087e05b" } +#hugr-llvm = { git = "https://github.com/quantinuum/hugr", "rev" = "3dacad485c1004a84b22e8a1de0f86fb7087e05b" } # portgraph = { git = "https://github.com/quantinuum/portgraph", rev = "68b96ac737e0c285d8c543b2d74a7aa80a18202c" } [workspace.dependencies] +hugr = { git = "https://github.com/quantinuum/hugr", "branch" = "george/llvmup" } +hugr-core = { git = "https://github.com/quantinuum/hugr", "branch" = "george/llvmup" } +hugr-cli = { git = "https://github.com/quantinuum/hugr", "branch" = "george/llvmup" } +hugr-passes = { git = "https://github.com/quantinuum/hugr", "branch" = "george/llvmup" } +hugr-llvm = { git = "https://github.com/quantinuum/hugr", "branch" = "george/llvmup" } # Make sure to run `just recompile-eccs` if the hugr serialisation format changes. -hugr = "0.30.0" -hugr-core = "0.30.0" -hugr-cli = "0.30.0" +#hugr = "0.25.6" +#hugr-core = "0.25.6" +#hugr-cli = "0.25.6" portgraph = "0.15.3" # There can only be one `pyo3` version in the whole workspace, so we use a # loose version constraint to prevent breaking changes in dependent crates where possible. From 24c14cc1642e382b79bea767326b941ddf15c8ea Mon Sep 17 00:00:00 2001 From: George Hodgkins Date: Wed, 25 Feb 2026 17:01:36 -0700 Subject: [PATCH 06/24] Update snaps --- .../gpu_aarch64-apple-darwin | 138 ++- .../gpu_x86_64-apple-darwin | 136 ++- .../gpu_x86_64-unknown-linux-gnu | 136 ++- .../gpu_x86_64-windows-msvc | 136 ++- .../discard_qb_array_aarch64-apple-darwin | 434 ++++++---- .../flip_some_aarch64-apple-darwin | 134 +-- .../measure_qb_array_aarch64-apple-darwin | 626 ++++++++------ .../no_results_aarch64-apple-darwin | 38 +- .../postselect_exit_aarch64-apple-darwin | 48 +- .../postselect_panic_aarch64-apple-darwin | 48 +- .../print_current_shot_aarch64-apple-darwin | 6 +- .../rng_aarch64-apple-darwin | 20 +- .../rus_aarch64-apple-darwin | 158 ++-- .../discard_qb_array_x86_64-apple-darwin | 432 ++++++---- .../flip_some_x86_64-apple-darwin | 134 +-- .../measure_qb_array_x86_64-apple-darwin | 803 ++++++++++++------ .../no_results_x86_64-apple-darwin | 38 +- .../postselect_exit_x86_64-apple-darwin | 48 +- .../postselect_panic_x86_64-apple-darwin | 48 +- .../print_current_shot_x86_64-apple-darwin | 6 +- .../rng_x86_64-apple-darwin | 20 +- .../rus_x86_64-apple-darwin | 158 ++-- .../discard_qb_array_x86_64-unknown-linux-gnu | 432 ++++++---- .../flip_some_x86_64-unknown-linux-gnu | 134 +-- .../measure_qb_array_x86_64-unknown-linux-gnu | 803 ++++++++++++------ .../no_results_x86_64-unknown-linux-gnu | 38 +- .../postselect_exit_x86_64-unknown-linux-gnu | 48 +- .../postselect_panic_x86_64-unknown-linux-gnu | 48 +- ...rint_current_shot_x86_64-unknown-linux-gnu | 6 +- .../rng_x86_64-unknown-linux-gnu | 20 +- .../rus_x86_64-unknown-linux-gnu | 158 ++-- .../discard_qb_array_x86_64-windows-msvc | 432 ++++++---- .../flip_some_x86_64-windows-msvc | 134 +-- .../measure_qb_array_x86_64-windows-msvc | 803 ++++++++++++------ .../no_results_x86_64-windows-msvc | 38 +- .../postselect_exit_x86_64-windows-msvc | 48 +- .../postselect_panic_x86_64-windows-msvc | 48 +- .../print_current_shot_x86_64-windows-msvc | 6 +- .../rng_x86_64-windows-msvc | 20 +- .../rus_x86_64-windows-msvc | 158 ++-- ...u__test__gpu_codegen@llvm14_call_args.snap | 80 -- ...test__gpu_codegen@llvm14_lookup_by_id.snap | 14 - ...u__test__gpu_codegen@llvm21_call_args.snap | 73 ++ ...t__gpu_codegen@llvm21_call_ret_float.snap} | 17 +- ...est__gpu_codegen@llvm21_call_ret_int.snap} | 17 +- ...__gpu_codegen@llvm21_dispose_context.snap} | 12 +- ...test__gpu_codegen@llvm21_get_context.snap} | 22 +- ...est__gpu_codegen@llvm21_lookup_by_id.snap} | 0 ...t__gpu_codegen@llvm21_lookup_by_name.snap} | 30 +- ...gpu_codegen@llvm21_read_result_float.snap} | 24 +- ...__gpu_codegen@llvm21_read_result_int.snap} | 25 +- ..._codegen@pre-mem2reg@llvm14_call_args.snap | 104 --- ...degen@pre-mem2reg@llvm14_lookup_by_id.snap | 23 - ..._codegen@pre-mem2reg@llvm21_call_args.snap | 97 +++ ...en@pre-mem2reg@llvm21_call_ret_float.snap} | 33 +- ...egen@pre-mem2reg@llvm21_call_ret_int.snap} | 33 +- ...n@pre-mem2reg@llvm21_dispose_context.snap} | 16 +- ...degen@pre-mem2reg@llvm21_get_context.snap} | 34 +- ...egen@pre-mem2reg@llvm21_lookup_by_id.snap} | 12 +- ...en@pre-mem2reg@llvm21_lookup_by_name.snap} | 42 +- ...pre-mem2reg@llvm21_read_result_float.snap} | 42 +- ...n@pre-mem2reg@llvm21_read_result_int.snap} | 45 +- ...ug__test__emit_debug_codegen@llvm14_1.snap | 37 - ...ug__test__emit_debug_codegen@llvm14_2.snap | 37 - ...ug__test__emit_debug_codegen@llvm21_1.snap | 35 + ...ug__test__emit_debug_codegen@llvm21_2.snap | 36 + ...it_debug_codegen@pre-mem2reg@llvm14_1.snap | 46 - ...it_debug_codegen@pre-mem2reg@llvm14_2.snap | 46 - ...it_debug_codegen@pre-mem2reg@llvm21_1.snap | 44 + ...it_debug_codegen@pre-mem2reg@llvm21_2.snap | 45 + ..._test__emit_futures_codegen@llvm21_1.snap} | 0 ..._test__emit_futures_codegen@llvm21_2.snap} | 2 +- ..._test__emit_futures_codegen@llvm21_3.snap} | 0 ..._test__emit_futures_codegen@llvm21_4.snap} | 0 ..._test__emit_futures_codegen@llvm21_5.snap} | 2 +- ..._test__emit_futures_codegen@llvm21_6.snap} | 0 ...futures_codegen@pre-mem2reg@llvm21_1.snap} | 12 +- ...futures_codegen@pre-mem2reg@llvm21_2.snap} | 22 +- ...futures_codegen@pre-mem2reg@llvm21_3.snap} | 4 +- ...futures_codegen@pre-mem2reg@llvm21_4.snap} | 12 +- ...futures_codegen@pre-mem2reg@llvm21_5.snap} | 22 +- ...futures_codegen@pre-mem2reg@llvm21_6.snap} | 4 +- ...m__prelude__test__exit_emit@llvm21_0.snap} | 10 +- ..._test__exit_emit@pre-mem2reg@llvm14_0.snap | 47 - ..._test__exit_emit@pre-mem2reg@llvm21_0.snap | 47 + ...__prelude__test__panic_emit@llvm21_0.snap} | 10 +- ...test__panic_emit@pre-mem2reg@llvm14_0.snap | 48 -- ...test__panic_emit@pre-mem2reg@llvm21_0.snap | 48 ++ ..._test__emit_qsystem_codegen@llvm21_1.snap} | 0 ...test__emit_qsystem_codegen@llvm21_10.snap} | 0 ..._test__emit_qsystem_codegen@llvm21_2.snap} | 2 +- ..._test__emit_qsystem_codegen@llvm21_3.snap} | 0 ..._test__emit_qsystem_codegen@llvm21_4.snap} | 0 ..._test__emit_qsystem_codegen@llvm21_5.snap} | 0 ..._test__emit_qsystem_codegen@llvm21_6.snap} | 0 ..._test__emit_qsystem_codegen@llvm21_7.snap} | 0 ..._test__emit_qsystem_codegen@llvm21_8.snap} | 0 ..._test__emit_qsystem_codegen@llvm21_9.snap} | 2 +- ...qsystem_codegen@pre-mem2reg@llvm21_1.snap} | 16 +- ...system_codegen@pre-mem2reg@llvm21_10.snap} | 12 +- ...qsystem_codegen@pre-mem2reg@llvm21_2.snap} | 30 +- ...qsystem_codegen@pre-mem2reg@llvm21_3.snap} | 20 +- ...qsystem_codegen@pre-mem2reg@llvm21_4.snap} | 24 +- ...qsystem_codegen@pre-mem2reg@llvm21_5.snap} | 12 +- ...qsystem_codegen@pre-mem2reg@llvm21_6.snap} | 8 +- ...qsystem_codegen@pre-mem2reg@llvm21_7.snap} | 4 +- ...qsystem_codegen@pre-mem2reg@llvm21_8.snap} | 12 +- ...qsystem_codegen@pre-mem2reg@llvm21_9.snap} | 38 +- ...om__test__emit_random_codegen@llvm21.snap} | 0 ...__test__emit_random_codegen@llvm21_1.snap} | 2 +- ...__test__emit_random_codegen@llvm21_2.snap} | 2 +- ...__test__emit_random_codegen@llvm21_3.snap} | 2 +- ...__test__emit_random_codegen@llvm21_4.snap} | 0 ...__test__emit_random_codegen@llvm21_5.snap} | 0 ...it_random_codegen@pre-mem2reg@llvm21.snap} | 16 +- ..._random_codegen@pre-mem2reg@llvm21_1.snap} | 22 +- ..._random_codegen@pre-mem2reg@llvm21_2.snap} | 22 +- ..._random_codegen@pre-mem2reg@llvm21_3.snap} | 26 +- ..._random_codegen@pre-mem2reg@llvm21_4.snap} | 12 +- ..._random_codegen@pre-mem2reg@llvm21_5.snap} | 4 +- ...__test__emit_result_codegen@llvm14_10.snap | 37 - ...__test__emit_result_codegen@llvm14_11.snap | 37 - ...t__test__emit_result_codegen@llvm14_5.snap | 37 - ...t__test__emit_result_codegen@llvm14_6.snap | 37 - ...t__test__emit_result_codegen@llvm14_7.snap | 37 - ...t__test__emit_result_codegen@llvm14_8.snap | 37 - ...t__test__emit_result_codegen@llvm14_9.snap | 37 - ...__test__emit_result_codegen@llvm21_1.snap} | 6 +- ...__test__emit_result_codegen@llvm21_10.snap | 35 + ...__test__emit_result_codegen@llvm21_11.snap | 36 + ..._test__emit_result_codegen@llvm21_12.snap} | 6 +- ..._test__emit_result_codegen@llvm21_13.snap} | 6 +- ..._test__emit_result_codegen@llvm21_15.snap} | 6 +- ..._test__emit_result_codegen@llvm21_16.snap} | 6 +- ...__test__emit_result_codegen@llvm21_2.snap} | 6 +- ...__test__emit_result_codegen@llvm21_3.snap} | 6 +- ...__test__emit_result_codegen@llvm21_4.snap} | 6 +- ...t__test__emit_result_codegen@llvm21_5.snap | 36 + ...t__test__emit_result_codegen@llvm21_6.snap | 35 + ...t__test__emit_result_codegen@llvm21_7.snap | 36 + ...t__test__emit_result_codegen@llvm21_8.snap | 35 + ...t__test__emit_result_codegen@llvm21_9.snap | 36 + ..._result_codegen@pre-mem2reg@llvm14_10.snap | 40 - ..._result_codegen@pre-mem2reg@llvm14_11.snap | 40 - ...t_result_codegen@pre-mem2reg@llvm14_5.snap | 40 - ...t_result_codegen@pre-mem2reg@llvm14_6.snap | 40 - ...t_result_codegen@pre-mem2reg@llvm14_7.snap | 40 - ...t_result_codegen@pre-mem2reg@llvm14_8.snap | 40 - ...t_result_codegen@pre-mem2reg@llvm14_9.snap | 40 - ..._result_codegen@pre-mem2reg@llvm21_1.snap} | 10 +- ..._result_codegen@pre-mem2reg@llvm21_10.snap | 38 + ..._result_codegen@pre-mem2reg@llvm21_11.snap | 39 + ...result_codegen@pre-mem2reg@llvm21_12.snap} | 10 +- ...result_codegen@pre-mem2reg@llvm21_13.snap} | 10 +- ...result_codegen@pre-mem2reg@llvm21_15.snap} | 10 +- ...result_codegen@pre-mem2reg@llvm21_16.snap} | 10 +- ..._result_codegen@pre-mem2reg@llvm21_2.snap} | 10 +- ..._result_codegen@pre-mem2reg@llvm21_3.snap} | 10 +- ..._result_codegen@pre-mem2reg@llvm21_4.snap} | 10 +- ...t_result_codegen@pre-mem2reg@llvm21_5.snap | 39 + ...t_result_codegen@pre-mem2reg@llvm21_6.snap | 38 + ...t_result_codegen@pre-mem2reg@llvm21_7.snap | 39 + ...t_result_codegen@pre-mem2reg@llvm21_8.snap | 38 + ...t_result_codegen@pre-mem2reg@llvm21_9.snap | 39 + ...s__test__emit_utils_codegen@llvm21_1.snap} | 0 ...t_utils_codegen@pre-mem2reg@llvm21_1.snap} | 8 +- ...m__bool__test__emit_all_ops@llvm21_1.snap} | 0 ...m__bool__test__emit_all_ops@llvm21_2.snap} | 0 ...m__bool__test__emit_all_ops@llvm21_3.snap} | 0 ...m__bool__test__emit_all_ops@llvm21_4.snap} | 0 ...m__bool__test__emit_all_ops@llvm21_5.snap} | 0 ...m__bool__test__emit_all_ops@llvm21_6.snap} | 0 ...m__bool__test__emit_all_ops@llvm21_7.snap} | 0 ...t__emit_all_ops@pre-mem2reg@llvm21_1.snap} | 12 +- ...t__emit_all_ops@pre-mem2reg@llvm21_2.snap} | 12 +- ...t__emit_all_ops@pre-mem2reg@llvm21_3.snap} | 12 +- ...t__emit_all_ops@pre-mem2reg@llvm21_4.snap} | 16 +- ...t__emit_all_ops@pre-mem2reg@llvm21_5.snap} | 16 +- ...t__emit_all_ops@pre-mem2reg@llvm21_6.snap} | 16 +- ...t__emit_all_ops@pre-mem2reg@llvm21_7.snap} | 16 +- ...otation__test__emit_all_ops@llvm21_0.snap} | 10 +- ...t__emit_all_ops@pre-mem2reg@llvm21_0.snap} | 58 +- 182 files changed, 5534 insertions(+), 4646 deletions(-) delete mode 100644 qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm14_call_args.snap delete mode 100644 qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm14_lookup_by_id.snap create mode 100644 qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_call_args.snap rename qis-compiler/rust/snapshots/{selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm14_call_ret_float.snap => selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_call_ret_float.snap} (62%) rename qis-compiler/rust/snapshots/{selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm14_call_ret_int.snap => selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_call_ret_int.snap} (62%) rename qis-compiler/rust/snapshots/{selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm14_dispose_context.snap => selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_dispose_context.snap} (73%) rename qis-compiler/rust/snapshots/{selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm14_get_context.snap => selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_get_context.snap} (73%) rename qis-compiler/rust/snapshots/{selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm14_lookup.snap => selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_lookup_by_id.snap} (100%) rename qis-compiler/rust/snapshots/{selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm14_lookup_by_name.snap => selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_lookup_by_name.snap} (70%) rename qis-compiler/rust/snapshots/{selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm14_read_result_float.snap => selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_read_result_float.snap} (57%) rename qis-compiler/rust/snapshots/{selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm14_read_result_int.snap => selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_read_result_int.snap} (58%) delete mode 100644 qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm14_call_args.snap delete mode 100644 qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm14_lookup_by_id.snap create mode 100644 qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_call_args.snap rename qis-compiler/rust/snapshots/{selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm14_call_ret_float.snap => selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_call_ret_float.snap} (54%) rename qis-compiler/rust/snapshots/{selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm14_call_ret_int.snap => selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_call_ret_int.snap} (54%) rename qis-compiler/rust/snapshots/{selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm14_dispose_context.snap => selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_dispose_context.snap} (70%) rename qis-compiler/rust/snapshots/{selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm14_get_context.snap => selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_get_context.snap} (66%) rename qis-compiler/rust/snapshots/{selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm14_lookup.snap => selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_lookup_by_id.snap} (62%) rename qis-compiler/rust/snapshots/{selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm14_lookup_by_name.snap => selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_lookup_by_name.snap} (66%) rename qis-compiler/rust/snapshots/{selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm14_read_result_float.snap => selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_read_result_float.snap} (52%) rename qis-compiler/rust/snapshots/{selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm14_read_result_int.snap => selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_read_result_int.snap} (50%) delete mode 100644 tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@llvm14_1.snap delete mode 100644 tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@llvm14_2.snap create mode 100644 tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@llvm21_1.snap create mode 100644 tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@llvm21_2.snap delete mode 100644 tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@pre-mem2reg@llvm14_1.snap delete mode 100644 tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@pre-mem2reg@llvm14_2.snap create mode 100644 tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@pre-mem2reg@llvm21_1.snap create mode 100644 tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@pre-mem2reg@llvm21_2.snap rename tket-qsystem/src/llvm/snapshots/{tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm14_1.snap => tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_1.snap} (100%) rename tket-qsystem/src/llvm/snapshots/{tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm14_5.snap => tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_2.snap} (89%) rename tket-qsystem/src/llvm/snapshots/{tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm14_3.snap => tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_3.snap} (100%) rename tket-qsystem/src/llvm/snapshots/{tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm14_4.snap => tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_4.snap} (100%) rename tket-qsystem/src/llvm/snapshots/{tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm14_2.snap => tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_5.snap} (89%) rename tket-qsystem/src/llvm/snapshots/{tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm14_6.snap => tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_6.snap} (100%) rename tket-qsystem/src/llvm/snapshots/{tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm14_1.snap => tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_1.snap} (72%) rename tket-qsystem/src/llvm/snapshots/{tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm14_2.snap => tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_2.snap} (57%) rename tket-qsystem/src/llvm/snapshots/{tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm14_3.snap => tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_3.snap} (84%) rename tket-qsystem/src/llvm/snapshots/{tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm14_4.snap => tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_4.snap} (70%) rename tket-qsystem/src/llvm/snapshots/{tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm14_5.snap => tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_5.snap} (57%) rename tket-qsystem/src/llvm/snapshots/{tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm14_6.snap => tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_6.snap} (84%) rename tket-qsystem/src/llvm/snapshots/{tket_qsystem__llvm__prelude__test__exit_emit@llvm14_0.snap => tket_qsystem__llvm__prelude__test__exit_emit@llvm21_0.snap} (56%) delete mode 100644 tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__exit_emit@pre-mem2reg@llvm14_0.snap create mode 100644 tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__exit_emit@pre-mem2reg@llvm21_0.snap rename tket-qsystem/src/llvm/snapshots/{tket_qsystem__llvm__prelude__test__panic_emit@llvm14_0.snap => tket_qsystem__llvm__prelude__test__panic_emit@llvm21_0.snap} (57%) delete mode 100644 tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__panic_emit@pre-mem2reg@llvm14_0.snap create mode 100644 tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__panic_emit@pre-mem2reg@llvm21_0.snap rename tket-qsystem/src/llvm/snapshots/{tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm14_1.snap => tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_1.snap} (100%) rename tket-qsystem/src/llvm/snapshots/{tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm14_10.snap => tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_10.snap} (100%) rename tket-qsystem/src/llvm/snapshots/{tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm14_2.snap => tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_2.snap} (90%) rename tket-qsystem/src/llvm/snapshots/{tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm14_3.snap => tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_3.snap} (100%) rename tket-qsystem/src/llvm/snapshots/{tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm14_4.snap => tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_4.snap} (100%) rename tket-qsystem/src/llvm/snapshots/{tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm14_5.snap => tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_5.snap} (100%) rename tket-qsystem/src/llvm/snapshots/{tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm14_6.snap => tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_6.snap} (100%) rename tket-qsystem/src/llvm/snapshots/{tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm14_7.snap => tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_7.snap} (100%) rename tket-qsystem/src/llvm/snapshots/{tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm14_8.snap => tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_8.snap} (100%) rename tket-qsystem/src/llvm/snapshots/{tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm14_9.snap => tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_9.snap} (91%) rename tket-qsystem/src/llvm/snapshots/{tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm14_1.snap => tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_1.snap} (60%) rename tket-qsystem/src/llvm/snapshots/{tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm14_10.snap => tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_10.snap} (68%) rename tket-qsystem/src/llvm/snapshots/{tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm14_2.snap => tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_2.snap} (52%) rename tket-qsystem/src/llvm/snapshots/{tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm14_3.snap => tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_3.snap} (58%) rename tket-qsystem/src/llvm/snapshots/{tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm14_4.snap => tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_4.snap} (55%) rename tket-qsystem/src/llvm/snapshots/{tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm14_5.snap => tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_5.snap} (68%) rename tket-qsystem/src/llvm/snapshots/{tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm14_6.snap => tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_6.snap} (80%) rename tket-qsystem/src/llvm/snapshots/{tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm14_7.snap => tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_7.snap} (83%) rename tket-qsystem/src/llvm/snapshots/{tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm14_8.snap => tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_8.snap} (65%) rename tket-qsystem/src/llvm/snapshots/{tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm14_9.snap => tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_9.snap} (50%) rename tket-qsystem/src/llvm/snapshots/{tket_qsystem__llvm__random__test__emit_random_codegen@llvm14.snap => tket_qsystem__llvm__random__test__emit_random_codegen@llvm21.snap} (100%) rename tket-qsystem/src/llvm/snapshots/{tket_qsystem__llvm__random__test__emit_random_codegen@llvm14_1.snap => tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_1.snap} (89%) rename tket-qsystem/src/llvm/snapshots/{tket_qsystem__llvm__random__test__emit_random_codegen@llvm14_2.snap => tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_2.snap} (88%) rename tket-qsystem/src/llvm/snapshots/{tket_qsystem__llvm__random__test__emit_random_codegen@llvm14_3.snap => tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_3.snap} (89%) rename tket-qsystem/src/llvm/snapshots/{tket_qsystem__llvm__random__test__emit_random_codegen@llvm14_4.snap => tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_4.snap} (100%) rename tket-qsystem/src/llvm/snapshots/{tket_qsystem__llvm__random__test__emit_random_codegen@llvm14_5.snap => tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_5.snap} (100%) rename tket-qsystem/src/llvm/snapshots/{tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm14.snap => tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21.snap} (61%) rename tket-qsystem/src/llvm/snapshots/{tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm14_1.snap => tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_1.snap} (55%) rename tket-qsystem/src/llvm/snapshots/{tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm14_2.snap => tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_2.snap} (55%) rename tket-qsystem/src/llvm/snapshots/{tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm14_3.snap => tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_3.snap} (54%) rename tket-qsystem/src/llvm/snapshots/{tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm14_4.snap => tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_4.snap} (66%) rename tket-qsystem/src/llvm/snapshots/{tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm14_5.snap => tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_5.snap} (81%) delete mode 100644 tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm14_10.snap delete mode 100644 tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm14_11.snap delete mode 100644 tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm14_5.snap delete mode 100644 tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm14_6.snap delete mode 100644 tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm14_7.snap delete mode 100644 tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm14_8.snap delete mode 100644 tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm14_9.snap rename tket-qsystem/src/llvm/snapshots/{tket_qsystem__llvm__result__test__emit_result_codegen@llvm14_1.snap => tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_1.snap} (58%) create mode 100644 tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_10.snap create mode 100644 tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_11.snap rename tket-qsystem/src/llvm/snapshots/{tket_qsystem__llvm__result__test__emit_result_codegen@llvm14_12.snap => tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_12.snap} (56%) rename tket-qsystem/src/llvm/snapshots/{tket_qsystem__llvm__result__test__emit_result_codegen@llvm14_13.snap => tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_13.snap} (58%) rename tket-qsystem/src/llvm/snapshots/{tket_qsystem__llvm__result__test__emit_result_codegen@llvm14_15.snap => tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_15.snap} (59%) rename tket-qsystem/src/llvm/snapshots/{tket_qsystem__llvm__result__test__emit_result_codegen@llvm14_16.snap => tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_16.snap} (55%) rename tket-qsystem/src/llvm/snapshots/{tket_qsystem__llvm__result__test__emit_result_codegen@llvm14_2.snap => tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_2.snap} (58%) rename tket-qsystem/src/llvm/snapshots/{tket_qsystem__llvm__result__test__emit_result_codegen@llvm14_3.snap => tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_3.snap} (58%) rename tket-qsystem/src/llvm/snapshots/{tket_qsystem__llvm__result__test__emit_result_codegen@llvm14_4.snap => tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_4.snap} (57%) create mode 100644 tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_5.snap create mode 100644 tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_6.snap create mode 100644 tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_7.snap create mode 100644 tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_8.snap create mode 100644 tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_9.snap delete mode 100644 tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm14_10.snap delete mode 100644 tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm14_11.snap delete mode 100644 tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm14_5.snap delete mode 100644 tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm14_6.snap delete mode 100644 tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm14_7.snap delete mode 100644 tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm14_8.snap delete mode 100644 tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm14_9.snap rename tket-qsystem/src/llvm/snapshots/{tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm14_1.snap => tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_1.snap} (54%) create mode 100644 tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_10.snap create mode 100644 tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_11.snap rename tket-qsystem/src/llvm/snapshots/{tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm14_12.snap => tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_12.snap} (53%) rename tket-qsystem/src/llvm/snapshots/{tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm14_13.snap => tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_13.snap} (53%) rename tket-qsystem/src/llvm/snapshots/{tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm14_15.snap => tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_15.snap} (55%) rename tket-qsystem/src/llvm/snapshots/{tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm14_16.snap => tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_16.snap} (52%) rename tket-qsystem/src/llvm/snapshots/{tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm14_2.snap => tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_2.snap} (53%) rename tket-qsystem/src/llvm/snapshots/{tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm14_3.snap => tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_3.snap} (53%) rename tket-qsystem/src/llvm/snapshots/{tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm14_4.snap => tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_4.snap} (52%) create mode 100644 tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_5.snap create mode 100644 tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_6.snap create mode 100644 tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_7.snap create mode 100644 tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_8.snap create mode 100644 tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_9.snap rename tket-qsystem/src/llvm/snapshots/{tket_qsystem__llvm__utils__test__emit_utils_codegen@llvm14_1.snap => tket_qsystem__llvm__utils__test__emit_utils_codegen@llvm21_1.snap} (100%) rename tket-qsystem/src/llvm/snapshots/{tket_qsystem__llvm__utils__test__emit_utils_codegen@pre-mem2reg@llvm14_1.snap => tket_qsystem__llvm__utils__test__emit_utils_codegen@pre-mem2reg@llvm21_1.snap} (72%) rename tket/src/llvm/snapshots/{tket__llvm__bool__test__emit_all_ops@llvm14_1.snap => tket__llvm__bool__test__emit_all_ops@llvm21_1.snap} (100%) rename tket/src/llvm/snapshots/{tket__llvm__bool__test__emit_all_ops@llvm14_2.snap => tket__llvm__bool__test__emit_all_ops@llvm21_2.snap} (100%) rename tket/src/llvm/snapshots/{tket__llvm__bool__test__emit_all_ops@llvm14_3.snap => tket__llvm__bool__test__emit_all_ops@llvm21_3.snap} (100%) rename tket/src/llvm/snapshots/{tket__llvm__bool__test__emit_all_ops@llvm14_4.snap => tket__llvm__bool__test__emit_all_ops@llvm21_4.snap} (100%) rename tket/src/llvm/snapshots/{tket__llvm__bool__test__emit_all_ops@llvm14_5.snap => tket__llvm__bool__test__emit_all_ops@llvm21_5.snap} (100%) rename tket/src/llvm/snapshots/{tket__llvm__bool__test__emit_all_ops@llvm14_6.snap => tket__llvm__bool__test__emit_all_ops@llvm21_6.snap} (100%) rename tket/src/llvm/snapshots/{tket__llvm__bool__test__emit_all_ops@llvm14_7.snap => tket__llvm__bool__test__emit_all_ops@llvm21_7.snap} (100%) rename tket/src/llvm/snapshots/{tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm14_1.snap => tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_1.snap} (64%) rename tket/src/llvm/snapshots/{tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm14_2.snap => tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_2.snap} (61%) rename tket/src/llvm/snapshots/{tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm14_3.snap => tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_3.snap} (64%) rename tket/src/llvm/snapshots/{tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm14_4.snap => tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_4.snap} (59%) rename tket/src/llvm/snapshots/{tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm14_5.snap => tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_5.snap} (59%) rename tket/src/llvm/snapshots/{tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm14_6.snap => tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_6.snap} (59%) rename tket/src/llvm/snapshots/{tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm14_7.snap => tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_7.snap} (59%) rename tket/src/llvm/snapshots/{tket__llvm__rotation__test__emit_all_ops@llvm14_0.snap => tket__llvm__rotation__test__emit_all_ops@llvm21_0.snap} (78%) rename tket/src/llvm/snapshots/{tket__llvm__rotation__test__emit_all_ops@pre-mem2reg@llvm14_0.snap => tket__llvm__rotation__test__emit_all_ops@pre-mem2reg@llvm21_0.snap} (59%) diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_gpu/aarch64-apple-darwin/gpu_aarch64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_gpu/aarch64-apple-darwin/gpu_aarch64-apple-darwin index 6e7c7bb22..54cc86f5a 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_gpu/aarch64-apple-darwin/gpu_aarch64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_gpu/aarch64-apple-darwin/gpu_aarch64-apple-darwin @@ -1,6 +1,6 @@ ; ModuleID = 'hugr' source_filename = "hugr" -target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128" +target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-n32:64-S128-Fn32" target triple = "aarch64-apple-darwin" @gpu_cache_is_set_function_id_fn_returning_float = thread_local local_unnamed_addr global i8 0 @@ -19,7 +19,7 @@ target triple = "aarch64-apple-darwin" ; Function Attrs: noinline define i64 @gpu_function_id_fn_returning_float() local_unnamed_addr #0 { entry: - %function_id = load i8, i8* @gpu_cache_is_set_function_id_fn_returning_float, align 1 + %function_id = load i8, ptr @gpu_cache_is_set_function_id_fn_returning_float, align 1 %needs_lookup = icmp eq i8 %function_id, 0 br i1 %needs_lookup, label %lookup, label %read_cache @@ -30,22 +30,22 @@ common.ret: ; preds = %read_cache, %lookup lookup: ; preds = %entry tail call void @run_gpu_validation() %function_id_ptr = alloca i64, align 8 - %function_id_call = call i8 @gpu_get_function_id(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @function_name, i64 0, i64 0), i64* nonnull %function_id_ptr) + %function_id_call = call i8 @gpu_get_function_id(ptr nonnull @function_name, ptr nonnull %function_id_ptr) call void @validate_gpu_response(i8 %function_id_call) - %function_id2 = load i64, i64* %function_id_ptr, align 8 - store i64 %function_id2, i64* @gpu_cache_function_id_fn_returning_float, align 8 - store i8 1, i8* @gpu_cache_is_set_function_id_fn_returning_float, align 1 + %function_id2 = load i64, ptr %function_id_ptr, align 8 + store i64 %function_id2, ptr @gpu_cache_function_id_fn_returning_float, align 8 + store i8 1, ptr @gpu_cache_is_set_function_id_fn_returning_float, align 1 br label %common.ret read_cache: ; preds = %entry - %function_id1 = load i64, i64* @gpu_cache_function_id_fn_returning_float, align 8 + %function_id1 = load i64, ptr @gpu_cache_function_id_fn_returning_float, align 8 br label %common.ret } ; Function Attrs: noinline define void @run_gpu_validation() local_unnamed_addr #0 { entry: - %validated = load i8, i8* @gpu_validated, align 1 + %validated = load i8, ptr @gpu_validated, align 1 %already_validated.not = icmp eq i8 %validated, 0 br i1 %already_validated.not, label %validate, label %common.ret @@ -55,7 +55,7 @@ common.ret: ; preds = %entry, %validate validate: ; preds = %entry %validate_call = tail call i8 @gpu_validate_api(i64 0, i64 1, i64 0) tail call void @validate_gpu_response(i8 %validate_call) - store i8 1, i8* @gpu_validated, align 1 + store i8 1, ptr @gpu_validated, align 1 br label %common.ret } @@ -78,24 +78,24 @@ err: ; preds = %entry ; Function Attrs: noinline noreturn define void @gpu_error_handler() local_unnamed_addr #1 { entry: - %error_message = tail call i8* @gpu_get_error() - %is_null = icmp eq i8* %error_message, null - %error_message_nonnull = select i1 %is_null, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @no_gpu_error, i64 0, i64 0), i8* %error_message - tail call void @panic_str(i32 70002, i8* %error_message_nonnull) + %error_message = tail call ptr @gpu_get_error() + %is_null = icmp eq ptr %error_message, null + %error_message_nonnull = select i1 %is_null, ptr @no_gpu_error, ptr %error_message + tail call void @panic_str(i32 70002, ptr nonnull %error_message_nonnull) unreachable } -declare i8* @gpu_get_error() local_unnamed_addr +declare ptr @gpu_get_error() local_unnamed_addr ; Function Attrs: noreturn -declare void @panic_str(i32, i8*) local_unnamed_addr #2 +declare void @panic_str(i32, ptr) local_unnamed_addr #2 -declare i8 @gpu_get_function_id(i8*, i64*) local_unnamed_addr +declare i8 @gpu_get_function_id(ptr, ptr) local_unnamed_addr ; Function Attrs: noinline define i64 @gpu_function_id_fn_returning_int() local_unnamed_addr #0 { entry: - %function_id = load i8, i8* @gpu_cache_is_set_function_id_fn_returning_int, align 1 + %function_id = load i8, ptr @gpu_cache_is_set_function_id_fn_returning_int, align 1 %needs_lookup = icmp eq i8 %function_id, 0 br i1 %needs_lookup, label %lookup, label %read_cache @@ -106,98 +106,90 @@ common.ret: ; preds = %read_cache, %lookup lookup: ; preds = %entry tail call void @run_gpu_validation() %function_id_ptr = alloca i64, align 8 - %function_id_call = call i8 @gpu_get_function_id(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @function_name.1, i64 0, i64 0), i64* nonnull %function_id_ptr) + %function_id_call = call i8 @gpu_get_function_id(ptr nonnull @function_name.1, ptr nonnull %function_id_ptr) call void @validate_gpu_response(i8 %function_id_call) - %function_id2 = load i64, i64* %function_id_ptr, align 8 - store i64 %function_id2, i64* @gpu_cache_function_id_fn_returning_int, align 8 - store i8 1, i8* @gpu_cache_is_set_function_id_fn_returning_int, align 1 + %function_id2 = load i64, ptr %function_id_ptr, align 8 + store i64 %function_id2, ptr @gpu_cache_function_id_fn_returning_int, align 8 + store i8 1, ptr @gpu_cache_is_set_function_id_fn_returning_int, align 1 br label %common.ret read_cache: ; preds = %entry - %function_id1 = load i64, i64* @gpu_cache_function_id_fn_returning_int, align 8 + %function_id1 = load i64, ptr @gpu_cache_function_id_fn_returning_int, align 8 br label %common.ret } -declare i8 @gpu_init(i64, i64*) local_unnamed_addr +declare i8 @gpu_init(i64, ptr) local_unnamed_addr -declare i8 @gpu_call(i64, i64, i64, i8*, i8*) local_unnamed_addr +declare i8 @gpu_call(i64, i64, i64, ptr, ptr) local_unnamed_addr -declare i8 @gpu_get_result(i64, i64, i8*) local_unnamed_addr +declare i8 @gpu_get_result(i64, i64, ptr) local_unnamed_addr -declare void @print_int(i8*, i64, i64) local_unnamed_addr +declare void @print_int(ptr, i64, i64) local_unnamed_addr declare i8 @gpu_discard(i64) local_unnamed_addr -declare void @print_float(i8*, i64, double) local_unnamed_addr +declare void @print_float(ptr, i64, double) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr { entry: %gpu_ref_ptr.i = alloca i64, align 8 %gpu_input_blob.i = alloca [16 x i8], align 8 %int_result.i = alloca i64, align 8 - %gpu_input_blob26.i = alloca i64, align 8 - %int_result32.i = alloca i64, align 8 + %gpu_input_blob24.i = alloca [8 x i8], align 8 + %int_result28.i = alloca i64, align 8 tail call void @setup(i64 %0) - %1 = bitcast i64* %gpu_ref_ptr.i to i8* - call void @llvm.lifetime.start.p0i8(i64 8, i8* nonnull %1) - %2 = getelementptr inbounds [16 x i8], [16 x i8]* %gpu_input_blob.i, i64 0, i64 0 - call void @llvm.lifetime.start.p0i8(i64 16, i8* nonnull %2) - %3 = bitcast i64* %int_result.i to i8* - call void @llvm.lifetime.start.p0i8(i64 8, i8* nonnull %3) - %4 = bitcast i64* %gpu_input_blob26.i to i8* - call void @llvm.lifetime.start.p0i8(i64 8, i8* nonnull %4) - %5 = bitcast i64* %int_result32.i to i8* - call void @llvm.lifetime.start.p0i8(i64 8, i8* nonnull %5) + call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %gpu_ref_ptr.i) + call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %gpu_input_blob.i) + call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %int_result.i) + call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %gpu_input_blob24.i) + call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %int_result28.i) %function_id_call.i = tail call i64 @gpu_function_id_fn_returning_float() %function_id_call3.i = tail call i64 @gpu_function_id_fn_returning_int() tail call void @run_gpu_validation() - %gpu_ref_call.i = call i8 @gpu_init(i64 0, i64* nonnull %gpu_ref_ptr.i) + %gpu_ref_call.i = call i8 @gpu_init(i64 0, ptr nonnull %gpu_ref_ptr.i) call void @validate_gpu_response(i8 %gpu_ref_call.i) - %gpu_ref.i = load i64, i64* %gpu_ref_ptr.i, align 8 - %6 = bitcast [16 x i8]* %gpu_input_blob.i to i64* - store i64 42, i64* %6, align 8 - %dest_ptr17.i = getelementptr inbounds [16 x i8], [16 x i8]* %gpu_input_blob.i, i64 0, i64 8 - %7 = bitcast i8* %dest_ptr17.i to i64* - store i64 4613303441197561744, i64* %7, align 8 - %8 = call i8 @gpu_call(i64 %gpu_ref.i, i64 %function_id_call3.i, i64 16, i8* nonnull %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @arg_types, i64 0, i64 0)) - call void @validate_gpu_response(i8 %8) - %read_status.i = call i8 @gpu_get_result(i64 %gpu_ref.i, i64 8, i8* nonnull %3) + %gpu_ref.i = load i64, ptr %gpu_ref_ptr.i, align 8 + store i64 42, ptr %gpu_input_blob.i, align 8 + %dest_ptr17.i = getelementptr inbounds nuw i8, ptr %gpu_input_blob.i, i64 8 + store i64 4613303441197561744, ptr %dest_ptr17.i, align 8 + %1 = call i8 @gpu_call(i64 %gpu_ref.i, i64 %function_id_call3.i, i64 16, ptr nonnull %gpu_input_blob.i, ptr nonnull @arg_types) + call void @validate_gpu_response(i8 %1) + %read_status.i = call i8 @gpu_get_result(i64 %gpu_ref.i, i64 8, ptr nonnull %int_result.i) call void @validate_gpu_response(i8 %read_status.i) - %int_result20.i = load i64, i64* %int_result.i, align 8 - call void @print_int(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @res_a.19FB4E83.0, i64 0, i64 0), i64 10, i64 %int_result20.i) - store i64 %int_result20.i, i64* %gpu_input_blob26.i, align 8 - %9 = call i8 @gpu_call(i64 %gpu_ref.i, i64 %function_id_call.i, i64 8, i8* nonnull %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @arg_types.2, i64 0, i64 0)) - call void @validate_gpu_response(i8 %9) - %read_status34.i = call i8 @gpu_get_result(i64 %gpu_ref.i, i64 8, i8* nonnull %5) - call void @validate_gpu_response(i8 %read_status34.i) - %float_result_ptr.i = bitcast i64* %int_result32.i to double* - %float_result.i = load double, double* %float_result_ptr.i, align 8 - %10 = call i8 @gpu_discard(i64 %gpu_ref.i) - call void @validate_gpu_response(i8 %10) - call void @print_float(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @res_b.0E048F9C.0, i64 0, i64 0), i64 12, double %float_result.i) - call void @llvm.lifetime.end.p0i8(i64 8, i8* nonnull %1) - call void @llvm.lifetime.end.p0i8(i64 16, i8* nonnull %2) - call void @llvm.lifetime.end.p0i8(i64 8, i8* nonnull %3) - call void @llvm.lifetime.end.p0i8(i64 8, i8* nonnull %4) - call void @llvm.lifetime.end.p0i8(i64 8, i8* nonnull %5) - %11 = call i64 @teardown() - ret i64 %11 + %result.i = load i64, ptr %int_result.i, align 8 + call void @print_int(ptr nonnull @res_a.19FB4E83.0, i64 10, i64 %result.i) + store i64 %result.i, ptr %gpu_input_blob24.i, align 8 + %2 = call i8 @gpu_call(i64 %gpu_ref.i, i64 %function_id_call.i, i64 8, ptr nonnull %gpu_input_blob24.i, ptr nonnull @arg_types.2) + call void @validate_gpu_response(i8 %2) + %read_status29.i = call i8 @gpu_get_result(i64 %gpu_ref.i, i64 8, ptr nonnull %int_result28.i) + call void @validate_gpu_response(i8 %read_status29.i) + %result30.i = load double, ptr %int_result28.i, align 8 + %3 = call i8 @gpu_discard(i64 %gpu_ref.i) + call void @validate_gpu_response(i8 %3) + call void @print_float(ptr nonnull @res_b.0E048F9C.0, i64 12, double %result30.i) + call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %gpu_ref_ptr.i) + call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %gpu_input_blob.i) + call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %int_result.i) + call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %gpu_input_blob24.i) + call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %int_result28.i) + %4 = call i64 @teardown() + ret i64 %4 } declare void @setup(i64) local_unnamed_addr declare i64 @teardown() local_unnamed_addr -; Function Attrs: argmemonly nofree nosync nounwind willreturn -declare void @llvm.lifetime.start.p0i8(i64 immarg, i8* nocapture) #3 +; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) +declare void @llvm.lifetime.start.p0(i64 immarg, ptr captures(none)) #3 -; Function Attrs: argmemonly nofree nosync nounwind willreturn -declare void @llvm.lifetime.end.p0i8(i64 immarg, i8* nocapture) #3 +; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) +declare void @llvm.lifetime.end.p0(i64 immarg, ptr captures(none)) #3 attributes #0 = { noinline } attributes #1 = { noinline noreturn } attributes #2 = { noreturn } -attributes #3 = { argmemonly nofree nosync nounwind willreturn } +attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } !name = !{!0} diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_gpu/x86_64-apple-darwin/gpu_x86_64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_gpu/x86_64-apple-darwin/gpu_x86_64-apple-darwin index 37a77a905..55dc015eb 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_gpu/x86_64-apple-darwin/gpu_x86_64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_gpu/x86_64-apple-darwin/gpu_x86_64-apple-darwin @@ -1,6 +1,6 @@ ; ModuleID = 'hugr' source_filename = "hugr" -target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" +target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128" target triple = "x86_64-apple-darwin" @gpu_cache_is_set_function_id_fn_returning_float = thread_local local_unnamed_addr global i8 0 @@ -19,7 +19,7 @@ target triple = "x86_64-apple-darwin" ; Function Attrs: noinline define i64 @gpu_function_id_fn_returning_float() local_unnamed_addr #0 { entry: - %function_id = load i8, i8* @gpu_cache_is_set_function_id_fn_returning_float, align 1 + %function_id = load i8, ptr @gpu_cache_is_set_function_id_fn_returning_float, align 1 %needs_lookup = icmp eq i8 %function_id, 0 br i1 %needs_lookup, label %lookup, label %read_cache @@ -30,22 +30,22 @@ common.ret: ; preds = %read_cache, %lookup lookup: ; preds = %entry tail call void @run_gpu_validation() %function_id_ptr = alloca i64, align 8 - %function_id_call = call i8 @gpu_get_function_id(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @function_name, i64 0, i64 0), i64* nonnull %function_id_ptr) + %function_id_call = call i8 @gpu_get_function_id(ptr nonnull @function_name, ptr nonnull %function_id_ptr) call void @validate_gpu_response(i8 %function_id_call) - %function_id2 = load i64, i64* %function_id_ptr, align 8 - store i64 %function_id2, i64* @gpu_cache_function_id_fn_returning_float, align 8 - store i8 1, i8* @gpu_cache_is_set_function_id_fn_returning_float, align 1 + %function_id2 = load i64, ptr %function_id_ptr, align 8 + store i64 %function_id2, ptr @gpu_cache_function_id_fn_returning_float, align 8 + store i8 1, ptr @gpu_cache_is_set_function_id_fn_returning_float, align 1 br label %common.ret read_cache: ; preds = %entry - %function_id1 = load i64, i64* @gpu_cache_function_id_fn_returning_float, align 8 + %function_id1 = load i64, ptr @gpu_cache_function_id_fn_returning_float, align 8 br label %common.ret } ; Function Attrs: noinline define void @run_gpu_validation() local_unnamed_addr #0 { entry: - %validated = load i8, i8* @gpu_validated, align 1 + %validated = load i8, ptr @gpu_validated, align 1 %already_validated.not = icmp eq i8 %validated, 0 br i1 %already_validated.not, label %validate, label %common.ret @@ -55,7 +55,7 @@ common.ret: ; preds = %entry, %validate validate: ; preds = %entry %validate_call = tail call i8 @gpu_validate_api(i64 0, i64 1, i64 0) tail call void @validate_gpu_response(i8 %validate_call) - store i8 1, i8* @gpu_validated, align 1 + store i8 1, ptr @gpu_validated, align 1 br label %common.ret } @@ -78,24 +78,24 @@ err: ; preds = %entry ; Function Attrs: noinline noreturn define void @gpu_error_handler() local_unnamed_addr #1 { entry: - %error_message = tail call i8* @gpu_get_error() - %is_null = icmp eq i8* %error_message, null - %error_message_nonnull = select i1 %is_null, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @no_gpu_error, i64 0, i64 0), i8* %error_message - tail call void @panic_str(i32 70002, i8* %error_message_nonnull) + %error_message = tail call ptr @gpu_get_error() + %is_null = icmp eq ptr %error_message, null + %error_message_nonnull = select i1 %is_null, ptr @no_gpu_error, ptr %error_message + tail call void @panic_str(i32 70002, ptr nonnull %error_message_nonnull) unreachable } -declare i8* @gpu_get_error() local_unnamed_addr +declare ptr @gpu_get_error() local_unnamed_addr ; Function Attrs: noreturn -declare void @panic_str(i32, i8*) local_unnamed_addr #2 +declare void @panic_str(i32, ptr) local_unnamed_addr #2 -declare i8 @gpu_get_function_id(i8*, i64*) local_unnamed_addr +declare i8 @gpu_get_function_id(ptr, ptr) local_unnamed_addr ; Function Attrs: noinline define i64 @gpu_function_id_fn_returning_int() local_unnamed_addr #0 { entry: - %function_id = load i8, i8* @gpu_cache_is_set_function_id_fn_returning_int, align 1 + %function_id = load i8, ptr @gpu_cache_is_set_function_id_fn_returning_int, align 1 %needs_lookup = icmp eq i8 %function_id, 0 br i1 %needs_lookup, label %lookup, label %read_cache @@ -106,94 +106,90 @@ common.ret: ; preds = %read_cache, %lookup lookup: ; preds = %entry tail call void @run_gpu_validation() %function_id_ptr = alloca i64, align 8 - %function_id_call = call i8 @gpu_get_function_id(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @function_name.1, i64 0, i64 0), i64* nonnull %function_id_ptr) + %function_id_call = call i8 @gpu_get_function_id(ptr nonnull @function_name.1, ptr nonnull %function_id_ptr) call void @validate_gpu_response(i8 %function_id_call) - %function_id2 = load i64, i64* %function_id_ptr, align 8 - store i64 %function_id2, i64* @gpu_cache_function_id_fn_returning_int, align 8 - store i8 1, i8* @gpu_cache_is_set_function_id_fn_returning_int, align 1 + %function_id2 = load i64, ptr %function_id_ptr, align 8 + store i64 %function_id2, ptr @gpu_cache_function_id_fn_returning_int, align 8 + store i8 1, ptr @gpu_cache_is_set_function_id_fn_returning_int, align 1 br label %common.ret read_cache: ; preds = %entry - %function_id1 = load i64, i64* @gpu_cache_function_id_fn_returning_int, align 8 + %function_id1 = load i64, ptr @gpu_cache_function_id_fn_returning_int, align 8 br label %common.ret } -declare i8 @gpu_init(i64, i64*) local_unnamed_addr +declare i8 @gpu_init(i64, ptr) local_unnamed_addr -declare i8 @gpu_call(i64, i64, i64, i8*, i8*) local_unnamed_addr +declare i8 @gpu_call(i64, i64, i64, ptr, ptr) local_unnamed_addr -declare i8 @gpu_get_result(i64, i64, i8*) local_unnamed_addr +declare i8 @gpu_get_result(i64, i64, ptr) local_unnamed_addr -declare void @print_int(i8*, i64, i64) local_unnamed_addr +declare void @print_int(ptr, i64, i64) local_unnamed_addr declare i8 @gpu_discard(i64) local_unnamed_addr -declare void @print_float(i8*, i64, double) local_unnamed_addr +declare void @print_float(ptr, i64, double) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr { entry: %gpu_ref_ptr.i = alloca i64, align 8 - %gpu_input_blob.i = alloca <2 x i64>, align 16 + %gpu_input_blob.i = alloca [16 x i8], align 8 %int_result.i = alloca i64, align 8 - %gpu_input_blob26.i = alloca i64, align 8 - %int_result32.i = alloca i64, align 8 + %gpu_input_blob24.i = alloca [8 x i8], align 8 + %int_result28.i = alloca i64, align 8 tail call void @setup(i64 %0) - %1 = bitcast i64* %gpu_ref_ptr.i to i8* - call void @llvm.lifetime.start.p0i8(i64 8, i8* nonnull %1) - %2 = bitcast <2 x i64>* %gpu_input_blob.i to i8* - call void @llvm.lifetime.start.p0i8(i64 16, i8* nonnull %2) - %3 = bitcast i64* %int_result.i to i8* - call void @llvm.lifetime.start.p0i8(i64 8, i8* nonnull %3) - %4 = bitcast i64* %gpu_input_blob26.i to i8* - call void @llvm.lifetime.start.p0i8(i64 8, i8* nonnull %4) - %5 = bitcast i64* %int_result32.i to i8* - call void @llvm.lifetime.start.p0i8(i64 8, i8* nonnull %5) + call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %gpu_ref_ptr.i) + call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %gpu_input_blob.i) + call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %int_result.i) + call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %gpu_input_blob24.i) + call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %int_result28.i) %function_id_call.i = tail call i64 @gpu_function_id_fn_returning_float() %function_id_call3.i = tail call i64 @gpu_function_id_fn_returning_int() tail call void @run_gpu_validation() - %gpu_ref_call.i = call i8 @gpu_init(i64 0, i64* nonnull %gpu_ref_ptr.i) + %gpu_ref_call.i = call i8 @gpu_init(i64 0, ptr nonnull %gpu_ref_ptr.i) call void @validate_gpu_response(i8 %gpu_ref_call.i) - %gpu_ref.i = load i64, i64* %gpu_ref_ptr.i, align 8 - store <2 x i64> , <2 x i64>* %gpu_input_blob.i, align 16 - %6 = call i8 @gpu_call(i64 %gpu_ref.i, i64 %function_id_call3.i, i64 16, i8* nonnull %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @arg_types, i64 0, i64 0)) - call void @validate_gpu_response(i8 %6) - %read_status.i = call i8 @gpu_get_result(i64 %gpu_ref.i, i64 8, i8* nonnull %3) + %gpu_ref.i = load i64, ptr %gpu_ref_ptr.i, align 8 + store i64 42, ptr %gpu_input_blob.i, align 8 + %dest_ptr17.i = getelementptr inbounds nuw i8, ptr %gpu_input_blob.i, i64 8 + store i64 4613303441197561744, ptr %dest_ptr17.i, align 8 + %1 = call i8 @gpu_call(i64 %gpu_ref.i, i64 %function_id_call3.i, i64 16, ptr nonnull %gpu_input_blob.i, ptr nonnull @arg_types) + call void @validate_gpu_response(i8 %1) + %read_status.i = call i8 @gpu_get_result(i64 %gpu_ref.i, i64 8, ptr nonnull %int_result.i) call void @validate_gpu_response(i8 %read_status.i) - %int_result20.i = load i64, i64* %int_result.i, align 8 - call void @print_int(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @res_a.19FB4E83.0, i64 0, i64 0), i64 10, i64 %int_result20.i) - store i64 %int_result20.i, i64* %gpu_input_blob26.i, align 8 - %7 = call i8 @gpu_call(i64 %gpu_ref.i, i64 %function_id_call.i, i64 8, i8* nonnull %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @arg_types.2, i64 0, i64 0)) - call void @validate_gpu_response(i8 %7) - %read_status34.i = call i8 @gpu_get_result(i64 %gpu_ref.i, i64 8, i8* nonnull %5) - call void @validate_gpu_response(i8 %read_status34.i) - %float_result_ptr.i = bitcast i64* %int_result32.i to double* - %float_result.i = load double, double* %float_result_ptr.i, align 8 - %8 = call i8 @gpu_discard(i64 %gpu_ref.i) - call void @validate_gpu_response(i8 %8) - call void @print_float(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @res_b.0E048F9C.0, i64 0, i64 0), i64 12, double %float_result.i) - call void @llvm.lifetime.end.p0i8(i64 8, i8* nonnull %1) - call void @llvm.lifetime.end.p0i8(i64 16, i8* nonnull %2) - call void @llvm.lifetime.end.p0i8(i64 8, i8* nonnull %3) - call void @llvm.lifetime.end.p0i8(i64 8, i8* nonnull %4) - call void @llvm.lifetime.end.p0i8(i64 8, i8* nonnull %5) - %9 = call i64 @teardown() - ret i64 %9 + %result.i = load i64, ptr %int_result.i, align 8 + call void @print_int(ptr nonnull @res_a.19FB4E83.0, i64 10, i64 %result.i) + store i64 %result.i, ptr %gpu_input_blob24.i, align 8 + %2 = call i8 @gpu_call(i64 %gpu_ref.i, i64 %function_id_call.i, i64 8, ptr nonnull %gpu_input_blob24.i, ptr nonnull @arg_types.2) + call void @validate_gpu_response(i8 %2) + %read_status29.i = call i8 @gpu_get_result(i64 %gpu_ref.i, i64 8, ptr nonnull %int_result28.i) + call void @validate_gpu_response(i8 %read_status29.i) + %result30.i = load double, ptr %int_result28.i, align 8 + %3 = call i8 @gpu_discard(i64 %gpu_ref.i) + call void @validate_gpu_response(i8 %3) + call void @print_float(ptr nonnull @res_b.0E048F9C.0, i64 12, double %result30.i) + call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %gpu_ref_ptr.i) + call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %gpu_input_blob.i) + call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %int_result.i) + call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %gpu_input_blob24.i) + call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %int_result28.i) + %4 = call i64 @teardown() + ret i64 %4 } declare void @setup(i64) local_unnamed_addr declare i64 @teardown() local_unnamed_addr -; Function Attrs: argmemonly nofree nosync nounwind willreturn -declare void @llvm.lifetime.start.p0i8(i64 immarg, i8* nocapture) #3 +; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) +declare void @llvm.lifetime.start.p0(i64 immarg, ptr captures(none)) #3 -; Function Attrs: argmemonly nofree nosync nounwind willreturn -declare void @llvm.lifetime.end.p0i8(i64 immarg, i8* nocapture) #3 +; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) +declare void @llvm.lifetime.end.p0(i64 immarg, ptr captures(none)) #3 attributes #0 = { noinline } attributes #1 = { noinline noreturn } attributes #2 = { noreturn } -attributes #3 = { argmemonly nofree nosync nounwind willreturn } +attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } !name = !{!0} diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_gpu/x86_64-unknown-linux-gnu/gpu_x86_64-unknown-linux-gnu b/qis-compiler/python/tests/snapshots/test_basic_generation/test_gpu/x86_64-unknown-linux-gnu/gpu_x86_64-unknown-linux-gnu index bbb9f1bd3..49dbc01c1 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_gpu/x86_64-unknown-linux-gnu/gpu_x86_64-unknown-linux-gnu +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_gpu/x86_64-unknown-linux-gnu/gpu_x86_64-unknown-linux-gnu @@ -1,6 +1,6 @@ ; ModuleID = 'hugr' source_filename = "hugr" -target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" +target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" @gpu_cache_is_set_function_id_fn_returning_float = thread_local local_unnamed_addr global i8 0 @@ -19,7 +19,7 @@ target triple = "x86_64-unknown-linux-gnu" ; Function Attrs: noinline define i64 @gpu_function_id_fn_returning_float() local_unnamed_addr #0 { entry: - %function_id = load i8, i8* @gpu_cache_is_set_function_id_fn_returning_float, align 1 + %function_id = load i8, ptr @gpu_cache_is_set_function_id_fn_returning_float, align 1 %needs_lookup = icmp eq i8 %function_id, 0 br i1 %needs_lookup, label %lookup, label %read_cache @@ -30,22 +30,22 @@ common.ret: ; preds = %read_cache, %lookup lookup: ; preds = %entry tail call void @run_gpu_validation() %function_id_ptr = alloca i64, align 8 - %function_id_call = call i8 @gpu_get_function_id(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @function_name, i64 0, i64 0), i64* nonnull %function_id_ptr) + %function_id_call = call i8 @gpu_get_function_id(ptr nonnull @function_name, ptr nonnull %function_id_ptr) call void @validate_gpu_response(i8 %function_id_call) - %function_id2 = load i64, i64* %function_id_ptr, align 8 - store i64 %function_id2, i64* @gpu_cache_function_id_fn_returning_float, align 8 - store i8 1, i8* @gpu_cache_is_set_function_id_fn_returning_float, align 1 + %function_id2 = load i64, ptr %function_id_ptr, align 8 + store i64 %function_id2, ptr @gpu_cache_function_id_fn_returning_float, align 8 + store i8 1, ptr @gpu_cache_is_set_function_id_fn_returning_float, align 1 br label %common.ret read_cache: ; preds = %entry - %function_id1 = load i64, i64* @gpu_cache_function_id_fn_returning_float, align 8 + %function_id1 = load i64, ptr @gpu_cache_function_id_fn_returning_float, align 8 br label %common.ret } ; Function Attrs: noinline define void @run_gpu_validation() local_unnamed_addr #0 { entry: - %validated = load i8, i8* @gpu_validated, align 1 + %validated = load i8, ptr @gpu_validated, align 1 %already_validated.not = icmp eq i8 %validated, 0 br i1 %already_validated.not, label %validate, label %common.ret @@ -55,7 +55,7 @@ common.ret: ; preds = %entry, %validate validate: ; preds = %entry %validate_call = tail call i8 @gpu_validate_api(i64 0, i64 1, i64 0) tail call void @validate_gpu_response(i8 %validate_call) - store i8 1, i8* @gpu_validated, align 1 + store i8 1, ptr @gpu_validated, align 1 br label %common.ret } @@ -78,24 +78,24 @@ err: ; preds = %entry ; Function Attrs: noinline noreturn define void @gpu_error_handler() local_unnamed_addr #1 { entry: - %error_message = tail call i8* @gpu_get_error() - %is_null = icmp eq i8* %error_message, null - %error_message_nonnull = select i1 %is_null, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @no_gpu_error, i64 0, i64 0), i8* %error_message - tail call void @panic_str(i32 70002, i8* %error_message_nonnull) + %error_message = tail call ptr @gpu_get_error() + %is_null = icmp eq ptr %error_message, null + %error_message_nonnull = select i1 %is_null, ptr @no_gpu_error, ptr %error_message + tail call void @panic_str(i32 70002, ptr nonnull %error_message_nonnull) unreachable } -declare i8* @gpu_get_error() local_unnamed_addr +declare ptr @gpu_get_error() local_unnamed_addr ; Function Attrs: noreturn -declare void @panic_str(i32, i8*) local_unnamed_addr #2 +declare void @panic_str(i32, ptr) local_unnamed_addr #2 -declare i8 @gpu_get_function_id(i8*, i64*) local_unnamed_addr +declare i8 @gpu_get_function_id(ptr, ptr) local_unnamed_addr ; Function Attrs: noinline define i64 @gpu_function_id_fn_returning_int() local_unnamed_addr #0 { entry: - %function_id = load i8, i8* @gpu_cache_is_set_function_id_fn_returning_int, align 1 + %function_id = load i8, ptr @gpu_cache_is_set_function_id_fn_returning_int, align 1 %needs_lookup = icmp eq i8 %function_id, 0 br i1 %needs_lookup, label %lookup, label %read_cache @@ -106,94 +106,90 @@ common.ret: ; preds = %read_cache, %lookup lookup: ; preds = %entry tail call void @run_gpu_validation() %function_id_ptr = alloca i64, align 8 - %function_id_call = call i8 @gpu_get_function_id(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @function_name.1, i64 0, i64 0), i64* nonnull %function_id_ptr) + %function_id_call = call i8 @gpu_get_function_id(ptr nonnull @function_name.1, ptr nonnull %function_id_ptr) call void @validate_gpu_response(i8 %function_id_call) - %function_id2 = load i64, i64* %function_id_ptr, align 8 - store i64 %function_id2, i64* @gpu_cache_function_id_fn_returning_int, align 8 - store i8 1, i8* @gpu_cache_is_set_function_id_fn_returning_int, align 1 + %function_id2 = load i64, ptr %function_id_ptr, align 8 + store i64 %function_id2, ptr @gpu_cache_function_id_fn_returning_int, align 8 + store i8 1, ptr @gpu_cache_is_set_function_id_fn_returning_int, align 1 br label %common.ret read_cache: ; preds = %entry - %function_id1 = load i64, i64* @gpu_cache_function_id_fn_returning_int, align 8 + %function_id1 = load i64, ptr @gpu_cache_function_id_fn_returning_int, align 8 br label %common.ret } -declare i8 @gpu_init(i64, i64*) local_unnamed_addr +declare i8 @gpu_init(i64, ptr) local_unnamed_addr -declare i8 @gpu_call(i64, i64, i64, i8*, i8*) local_unnamed_addr +declare i8 @gpu_call(i64, i64, i64, ptr, ptr) local_unnamed_addr -declare i8 @gpu_get_result(i64, i64, i8*) local_unnamed_addr +declare i8 @gpu_get_result(i64, i64, ptr) local_unnamed_addr -declare void @print_int(i8*, i64, i64) local_unnamed_addr +declare void @print_int(ptr, i64, i64) local_unnamed_addr declare i8 @gpu_discard(i64) local_unnamed_addr -declare void @print_float(i8*, i64, double) local_unnamed_addr +declare void @print_float(ptr, i64, double) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr { entry: %gpu_ref_ptr.i = alloca i64, align 8 - %gpu_input_blob.i = alloca <2 x i64>, align 16 + %gpu_input_blob.i = alloca [16 x i8], align 8 %int_result.i = alloca i64, align 8 - %gpu_input_blob26.i = alloca i64, align 8 - %int_result32.i = alloca i64, align 8 + %gpu_input_blob24.i = alloca [8 x i8], align 8 + %int_result28.i = alloca i64, align 8 tail call void @setup(i64 %0) - %1 = bitcast i64* %gpu_ref_ptr.i to i8* - call void @llvm.lifetime.start.p0i8(i64 8, i8* nonnull %1) - %2 = bitcast <2 x i64>* %gpu_input_blob.i to i8* - call void @llvm.lifetime.start.p0i8(i64 16, i8* nonnull %2) - %3 = bitcast i64* %int_result.i to i8* - call void @llvm.lifetime.start.p0i8(i64 8, i8* nonnull %3) - %4 = bitcast i64* %gpu_input_blob26.i to i8* - call void @llvm.lifetime.start.p0i8(i64 8, i8* nonnull %4) - %5 = bitcast i64* %int_result32.i to i8* - call void @llvm.lifetime.start.p0i8(i64 8, i8* nonnull %5) + call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %gpu_ref_ptr.i) + call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %gpu_input_blob.i) + call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %int_result.i) + call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %gpu_input_blob24.i) + call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %int_result28.i) %function_id_call.i = tail call i64 @gpu_function_id_fn_returning_float() %function_id_call3.i = tail call i64 @gpu_function_id_fn_returning_int() tail call void @run_gpu_validation() - %gpu_ref_call.i = call i8 @gpu_init(i64 0, i64* nonnull %gpu_ref_ptr.i) + %gpu_ref_call.i = call i8 @gpu_init(i64 0, ptr nonnull %gpu_ref_ptr.i) call void @validate_gpu_response(i8 %gpu_ref_call.i) - %gpu_ref.i = load i64, i64* %gpu_ref_ptr.i, align 8 - store <2 x i64> , <2 x i64>* %gpu_input_blob.i, align 16 - %6 = call i8 @gpu_call(i64 %gpu_ref.i, i64 %function_id_call3.i, i64 16, i8* nonnull %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @arg_types, i64 0, i64 0)) - call void @validate_gpu_response(i8 %6) - %read_status.i = call i8 @gpu_get_result(i64 %gpu_ref.i, i64 8, i8* nonnull %3) + %gpu_ref.i = load i64, ptr %gpu_ref_ptr.i, align 8 + store i64 42, ptr %gpu_input_blob.i, align 8 + %dest_ptr17.i = getelementptr inbounds nuw i8, ptr %gpu_input_blob.i, i64 8 + store i64 4613303441197561744, ptr %dest_ptr17.i, align 8 + %1 = call i8 @gpu_call(i64 %gpu_ref.i, i64 %function_id_call3.i, i64 16, ptr nonnull %gpu_input_blob.i, ptr nonnull @arg_types) + call void @validate_gpu_response(i8 %1) + %read_status.i = call i8 @gpu_get_result(i64 %gpu_ref.i, i64 8, ptr nonnull %int_result.i) call void @validate_gpu_response(i8 %read_status.i) - %int_result20.i = load i64, i64* %int_result.i, align 8 - call void @print_int(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @res_a.19FB4E83.0, i64 0, i64 0), i64 10, i64 %int_result20.i) - store i64 %int_result20.i, i64* %gpu_input_blob26.i, align 8 - %7 = call i8 @gpu_call(i64 %gpu_ref.i, i64 %function_id_call.i, i64 8, i8* nonnull %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @arg_types.2, i64 0, i64 0)) - call void @validate_gpu_response(i8 %7) - %read_status34.i = call i8 @gpu_get_result(i64 %gpu_ref.i, i64 8, i8* nonnull %5) - call void @validate_gpu_response(i8 %read_status34.i) - %float_result_ptr.i = bitcast i64* %int_result32.i to double* - %float_result.i = load double, double* %float_result_ptr.i, align 8 - %8 = call i8 @gpu_discard(i64 %gpu_ref.i) - call void @validate_gpu_response(i8 %8) - call void @print_float(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @res_b.0E048F9C.0, i64 0, i64 0), i64 12, double %float_result.i) - call void @llvm.lifetime.end.p0i8(i64 8, i8* nonnull %1) - call void @llvm.lifetime.end.p0i8(i64 16, i8* nonnull %2) - call void @llvm.lifetime.end.p0i8(i64 8, i8* nonnull %3) - call void @llvm.lifetime.end.p0i8(i64 8, i8* nonnull %4) - call void @llvm.lifetime.end.p0i8(i64 8, i8* nonnull %5) - %9 = call i64 @teardown() - ret i64 %9 + %result.i = load i64, ptr %int_result.i, align 8 + call void @print_int(ptr nonnull @res_a.19FB4E83.0, i64 10, i64 %result.i) + store i64 %result.i, ptr %gpu_input_blob24.i, align 8 + %2 = call i8 @gpu_call(i64 %gpu_ref.i, i64 %function_id_call.i, i64 8, ptr nonnull %gpu_input_blob24.i, ptr nonnull @arg_types.2) + call void @validate_gpu_response(i8 %2) + %read_status29.i = call i8 @gpu_get_result(i64 %gpu_ref.i, i64 8, ptr nonnull %int_result28.i) + call void @validate_gpu_response(i8 %read_status29.i) + %result30.i = load double, ptr %int_result28.i, align 8 + %3 = call i8 @gpu_discard(i64 %gpu_ref.i) + call void @validate_gpu_response(i8 %3) + call void @print_float(ptr nonnull @res_b.0E048F9C.0, i64 12, double %result30.i) + call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %gpu_ref_ptr.i) + call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %gpu_input_blob.i) + call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %int_result.i) + call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %gpu_input_blob24.i) + call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %int_result28.i) + %4 = call i64 @teardown() + ret i64 %4 } declare void @setup(i64) local_unnamed_addr declare i64 @teardown() local_unnamed_addr -; Function Attrs: argmemonly nofree nosync nounwind willreturn -declare void @llvm.lifetime.start.p0i8(i64 immarg, i8* nocapture) #3 +; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) +declare void @llvm.lifetime.start.p0(i64 immarg, ptr captures(none)) #3 -; Function Attrs: argmemonly nofree nosync nounwind willreturn -declare void @llvm.lifetime.end.p0i8(i64 immarg, i8* nocapture) #3 +; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) +declare void @llvm.lifetime.end.p0(i64 immarg, ptr captures(none)) #3 attributes #0 = { noinline } attributes #1 = { noinline noreturn } attributes #2 = { noreturn } -attributes #3 = { argmemonly nofree nosync nounwind willreturn } +attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } !name = !{!0} diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_gpu/x86_64-windows-msvc/gpu_x86_64-windows-msvc b/qis-compiler/python/tests/snapshots/test_basic_generation/test_gpu/x86_64-windows-msvc/gpu_x86_64-windows-msvc index 8ce8f41e3..37f4ec9f3 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_gpu/x86_64-windows-msvc/gpu_x86_64-windows-msvc +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_gpu/x86_64-windows-msvc/gpu_x86_64-windows-msvc @@ -1,6 +1,6 @@ ; ModuleID = 'hugr' source_filename = "hugr" -target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" +target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128" target triple = "x86_64-windows-msvc" @gpu_cache_is_set_function_id_fn_returning_float = thread_local local_unnamed_addr global i8 0 @@ -19,7 +19,7 @@ target triple = "x86_64-windows-msvc" ; Function Attrs: noinline define i64 @gpu_function_id_fn_returning_float() local_unnamed_addr #0 { entry: - %function_id = load i8, i8* @gpu_cache_is_set_function_id_fn_returning_float, align 1 + %function_id = load i8, ptr @gpu_cache_is_set_function_id_fn_returning_float, align 1 %needs_lookup = icmp eq i8 %function_id, 0 br i1 %needs_lookup, label %lookup, label %read_cache @@ -30,22 +30,22 @@ common.ret: ; preds = %read_cache, %lookup lookup: ; preds = %entry tail call void @run_gpu_validation() %function_id_ptr = alloca i64, align 8 - %function_id_call = call i8 @gpu_get_function_id(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @function_name, i64 0, i64 0), i64* nonnull %function_id_ptr) + %function_id_call = call i8 @gpu_get_function_id(ptr nonnull @function_name, ptr nonnull %function_id_ptr) call void @validate_gpu_response(i8 %function_id_call) - %function_id2 = load i64, i64* %function_id_ptr, align 8 - store i64 %function_id2, i64* @gpu_cache_function_id_fn_returning_float, align 8 - store i8 1, i8* @gpu_cache_is_set_function_id_fn_returning_float, align 1 + %function_id2 = load i64, ptr %function_id_ptr, align 8 + store i64 %function_id2, ptr @gpu_cache_function_id_fn_returning_float, align 8 + store i8 1, ptr @gpu_cache_is_set_function_id_fn_returning_float, align 1 br label %common.ret read_cache: ; preds = %entry - %function_id1 = load i64, i64* @gpu_cache_function_id_fn_returning_float, align 8 + %function_id1 = load i64, ptr @gpu_cache_function_id_fn_returning_float, align 8 br label %common.ret } ; Function Attrs: noinline define void @run_gpu_validation() local_unnamed_addr #0 { entry: - %validated = load i8, i8* @gpu_validated, align 1 + %validated = load i8, ptr @gpu_validated, align 1 %already_validated.not = icmp eq i8 %validated, 0 br i1 %already_validated.not, label %validate, label %common.ret @@ -55,7 +55,7 @@ common.ret: ; preds = %entry, %validate validate: ; preds = %entry %validate_call = tail call i8 @gpu_validate_api(i64 0, i64 1, i64 0) tail call void @validate_gpu_response(i8 %validate_call) - store i8 1, i8* @gpu_validated, align 1 + store i8 1, ptr @gpu_validated, align 1 br label %common.ret } @@ -78,24 +78,24 @@ err: ; preds = %entry ; Function Attrs: noinline noreturn define void @gpu_error_handler() local_unnamed_addr #1 { entry: - %error_message = tail call i8* @gpu_get_error() - %is_null = icmp eq i8* %error_message, null - %error_message_nonnull = select i1 %is_null, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @no_gpu_error, i64 0, i64 0), i8* %error_message - tail call void @panic_str(i32 70002, i8* %error_message_nonnull) + %error_message = tail call ptr @gpu_get_error() + %is_null = icmp eq ptr %error_message, null + %error_message_nonnull = select i1 %is_null, ptr @no_gpu_error, ptr %error_message + tail call void @panic_str(i32 70002, ptr nonnull %error_message_nonnull) unreachable } -declare i8* @gpu_get_error() local_unnamed_addr +declare ptr @gpu_get_error() local_unnamed_addr ; Function Attrs: noreturn -declare void @panic_str(i32, i8*) local_unnamed_addr #2 +declare void @panic_str(i32, ptr) local_unnamed_addr #2 -declare i8 @gpu_get_function_id(i8*, i64*) local_unnamed_addr +declare i8 @gpu_get_function_id(ptr, ptr) local_unnamed_addr ; Function Attrs: noinline define i64 @gpu_function_id_fn_returning_int() local_unnamed_addr #0 { entry: - %function_id = load i8, i8* @gpu_cache_is_set_function_id_fn_returning_int, align 1 + %function_id = load i8, ptr @gpu_cache_is_set_function_id_fn_returning_int, align 1 %needs_lookup = icmp eq i8 %function_id, 0 br i1 %needs_lookup, label %lookup, label %read_cache @@ -106,94 +106,90 @@ common.ret: ; preds = %read_cache, %lookup lookup: ; preds = %entry tail call void @run_gpu_validation() %function_id_ptr = alloca i64, align 8 - %function_id_call = call i8 @gpu_get_function_id(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @function_name.1, i64 0, i64 0), i64* nonnull %function_id_ptr) + %function_id_call = call i8 @gpu_get_function_id(ptr nonnull @function_name.1, ptr nonnull %function_id_ptr) call void @validate_gpu_response(i8 %function_id_call) - %function_id2 = load i64, i64* %function_id_ptr, align 8 - store i64 %function_id2, i64* @gpu_cache_function_id_fn_returning_int, align 8 - store i8 1, i8* @gpu_cache_is_set_function_id_fn_returning_int, align 1 + %function_id2 = load i64, ptr %function_id_ptr, align 8 + store i64 %function_id2, ptr @gpu_cache_function_id_fn_returning_int, align 8 + store i8 1, ptr @gpu_cache_is_set_function_id_fn_returning_int, align 1 br label %common.ret read_cache: ; preds = %entry - %function_id1 = load i64, i64* @gpu_cache_function_id_fn_returning_int, align 8 + %function_id1 = load i64, ptr @gpu_cache_function_id_fn_returning_int, align 8 br label %common.ret } -declare i8 @gpu_init(i64, i64*) local_unnamed_addr +declare i8 @gpu_init(i64, ptr) local_unnamed_addr -declare i8 @gpu_call(i64, i64, i64, i8*, i8*) local_unnamed_addr +declare i8 @gpu_call(i64, i64, i64, ptr, ptr) local_unnamed_addr -declare i8 @gpu_get_result(i64, i64, i8*) local_unnamed_addr +declare i8 @gpu_get_result(i64, i64, ptr) local_unnamed_addr -declare void @print_int(i8*, i64, i64) local_unnamed_addr +declare void @print_int(ptr, i64, i64) local_unnamed_addr declare i8 @gpu_discard(i64) local_unnamed_addr -declare void @print_float(i8*, i64, double) local_unnamed_addr +declare void @print_float(ptr, i64, double) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr { entry: %gpu_ref_ptr.i = alloca i64, align 8 - %gpu_input_blob.i = alloca <2 x i64>, align 16 + %gpu_input_blob.i = alloca [16 x i8], align 8 %int_result.i = alloca i64, align 8 - %gpu_input_blob26.i = alloca i64, align 8 - %int_result32.i = alloca i64, align 8 + %gpu_input_blob24.i = alloca [8 x i8], align 8 + %int_result28.i = alloca i64, align 8 tail call void @setup(i64 %0) - %1 = bitcast i64* %gpu_ref_ptr.i to i8* - call void @llvm.lifetime.start.p0i8(i64 8, i8* nonnull %1) - %2 = bitcast <2 x i64>* %gpu_input_blob.i to i8* - call void @llvm.lifetime.start.p0i8(i64 16, i8* nonnull %2) - %3 = bitcast i64* %int_result.i to i8* - call void @llvm.lifetime.start.p0i8(i64 8, i8* nonnull %3) - %4 = bitcast i64* %gpu_input_blob26.i to i8* - call void @llvm.lifetime.start.p0i8(i64 8, i8* nonnull %4) - %5 = bitcast i64* %int_result32.i to i8* - call void @llvm.lifetime.start.p0i8(i64 8, i8* nonnull %5) + call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %gpu_ref_ptr.i) + call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %gpu_input_blob.i) + call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %int_result.i) + call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %gpu_input_blob24.i) + call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %int_result28.i) %function_id_call.i = tail call i64 @gpu_function_id_fn_returning_float() %function_id_call3.i = tail call i64 @gpu_function_id_fn_returning_int() tail call void @run_gpu_validation() - %gpu_ref_call.i = call i8 @gpu_init(i64 0, i64* nonnull %gpu_ref_ptr.i) + %gpu_ref_call.i = call i8 @gpu_init(i64 0, ptr nonnull %gpu_ref_ptr.i) call void @validate_gpu_response(i8 %gpu_ref_call.i) - %gpu_ref.i = load i64, i64* %gpu_ref_ptr.i, align 8 - store <2 x i64> , <2 x i64>* %gpu_input_blob.i, align 16 - %6 = call i8 @gpu_call(i64 %gpu_ref.i, i64 %function_id_call3.i, i64 16, i8* nonnull %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @arg_types, i64 0, i64 0)) - call void @validate_gpu_response(i8 %6) - %read_status.i = call i8 @gpu_get_result(i64 %gpu_ref.i, i64 8, i8* nonnull %3) + %gpu_ref.i = load i64, ptr %gpu_ref_ptr.i, align 8 + store i64 42, ptr %gpu_input_blob.i, align 8 + %dest_ptr17.i = getelementptr inbounds nuw i8, ptr %gpu_input_blob.i, i64 8 + store i64 4613303441197561744, ptr %dest_ptr17.i, align 8 + %1 = call i8 @gpu_call(i64 %gpu_ref.i, i64 %function_id_call3.i, i64 16, ptr nonnull %gpu_input_blob.i, ptr nonnull @arg_types) + call void @validate_gpu_response(i8 %1) + %read_status.i = call i8 @gpu_get_result(i64 %gpu_ref.i, i64 8, ptr nonnull %int_result.i) call void @validate_gpu_response(i8 %read_status.i) - %int_result20.i = load i64, i64* %int_result.i, align 8 - call void @print_int(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @res_a.19FB4E83.0, i64 0, i64 0), i64 10, i64 %int_result20.i) - store i64 %int_result20.i, i64* %gpu_input_blob26.i, align 8 - %7 = call i8 @gpu_call(i64 %gpu_ref.i, i64 %function_id_call.i, i64 8, i8* nonnull %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @arg_types.2, i64 0, i64 0)) - call void @validate_gpu_response(i8 %7) - %read_status34.i = call i8 @gpu_get_result(i64 %gpu_ref.i, i64 8, i8* nonnull %5) - call void @validate_gpu_response(i8 %read_status34.i) - %float_result_ptr.i = bitcast i64* %int_result32.i to double* - %float_result.i = load double, double* %float_result_ptr.i, align 8 - %8 = call i8 @gpu_discard(i64 %gpu_ref.i) - call void @validate_gpu_response(i8 %8) - call void @print_float(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @res_b.0E048F9C.0, i64 0, i64 0), i64 12, double %float_result.i) - call void @llvm.lifetime.end.p0i8(i64 8, i8* nonnull %1) - call void @llvm.lifetime.end.p0i8(i64 16, i8* nonnull %2) - call void @llvm.lifetime.end.p0i8(i64 8, i8* nonnull %3) - call void @llvm.lifetime.end.p0i8(i64 8, i8* nonnull %4) - call void @llvm.lifetime.end.p0i8(i64 8, i8* nonnull %5) - %9 = call i64 @teardown() - ret i64 %9 + %result.i = load i64, ptr %int_result.i, align 8 + call void @print_int(ptr nonnull @res_a.19FB4E83.0, i64 10, i64 %result.i) + store i64 %result.i, ptr %gpu_input_blob24.i, align 8 + %2 = call i8 @gpu_call(i64 %gpu_ref.i, i64 %function_id_call.i, i64 8, ptr nonnull %gpu_input_blob24.i, ptr nonnull @arg_types.2) + call void @validate_gpu_response(i8 %2) + %read_status29.i = call i8 @gpu_get_result(i64 %gpu_ref.i, i64 8, ptr nonnull %int_result28.i) + call void @validate_gpu_response(i8 %read_status29.i) + %result30.i = load double, ptr %int_result28.i, align 8 + %3 = call i8 @gpu_discard(i64 %gpu_ref.i) + call void @validate_gpu_response(i8 %3) + call void @print_float(ptr nonnull @res_b.0E048F9C.0, i64 12, double %result30.i) + call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %gpu_ref_ptr.i) + call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %gpu_input_blob.i) + call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %int_result.i) + call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %gpu_input_blob24.i) + call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %int_result28.i) + %4 = call i64 @teardown() + ret i64 %4 } declare void @setup(i64) local_unnamed_addr declare i64 @teardown() local_unnamed_addr -; Function Attrs: argmemonly nofree nosync nounwind willreturn -declare void @llvm.lifetime.start.p0i8(i64 immarg, i8* nocapture) #3 +; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) +declare void @llvm.lifetime.start.p0(i64 immarg, ptr captures(none)) #3 -; Function Attrs: argmemonly nofree nosync nounwind willreturn -declare void @llvm.lifetime.end.p0i8(i64 immarg, i8* nocapture) #3 +; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) +declare void @llvm.lifetime.end.p0(i64 immarg, ptr captures(none)) #3 attributes #0 = { noinline } attributes #1 = { noinline noreturn } attributes #2 = { noreturn } -attributes #3 = { argmemonly nofree nosync nounwind willreturn } +attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } !name = !{!0} diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-discard_qb_array/discard_qb_array_aarch64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-discard_qb_array/discard_qb_array_aarch64-apple-darwin index 53dd081c0..65da73d47 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-discard_qb_array/discard_qb_array_aarch64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-discard_qb_array/discard_qb_array_aarch64-apple-darwin @@ -1,6 +1,6 @@ ; ModuleID = 'hugr' source_filename = "hugr" -target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128" +target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-n32:64-S128-Fn32" target triple = "aarch64-apple-darwin" @"e_Array alre.5A300C2A.0" = private constant [57 x i8] c"8EXIT:INT:Array already contains an element at this index" @@ -8,14 +8,14 @@ target triple = "aarch64-apple-darwin" @"e_Array cont.EFA5AC45.0" = private constant [70 x i8] c"EEXIT:INT:Array contains non-borrowed elements and cannot be discarded" @"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." -declare i8* @heap_alloc(i64) local_unnamed_addr +declare ptr @heap_alloc(i64) local_unnamed_addr ; Function Attrs: noreturn -declare void @panic(i32, i8*) local_unnamed_addr #0 +declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @___qfree(i64) local_unnamed_addr -declare void @heap_free(i8*) local_unnamed_addr +declare void @heap_free(ptr) local_unnamed_addr declare i64 @___qalloc() local_unnamed_addr @@ -24,194 +24,264 @@ declare void @___reset(i64) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr { entry: tail call void @setup(i64 %0) - %1 = tail call i8* @heap_alloc(i64 80) - %2 = bitcast i8* %1 to i64* - %3 = tail call i8* @heap_alloc(i64 8) - %4 = bitcast i8* %3 to i64* - store i64 -1, i64* %4, align 1 - br label %cond_20_case_1.i - -cond_20_case_1.i: ; preds = %cond_exit_20.i, %entry - %"15_0.sroa.0.0114.i" = phi i64 [ 0, %entry ], [ %5, %cond_exit_20.i ] - %5 = add nuw nsw i64 %"15_0.sroa.0.0114.i", 1 + %1 = tail call ptr @heap_alloc(i64 80) + %2 = tail call ptr @heap_alloc(i64 8) + store i64 -1, ptr %2, align 1 %qalloc.i.i = tail call i64 @___qalloc() - %not_max.not.i.i = icmp eq i64 %qalloc.i.i, -1 - br i1 %not_max.not.i.i, label %id_bb.i.i, label %reset_bb.i.i + %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 + br i1 %not_max.not.not.i.i, label %cond_211_case_0.i.i, label %__hugr__.__tk2_qalloc.216.exit.i -reset_bb.i.i: ; preds = %cond_20_case_1.i - tail call void @___reset(i64 %qalloc.i.i) - br label %id_bb.i.i - -id_bb.i.i: ; preds = %reset_bb.i.i, %cond_20_case_1.i - %6 = insertvalue { i1, i64 } { i1 true, i64 poison }, i64 %qalloc.i.i, 1 - %7 = select i1 %not_max.not.i.i, { i1, i64 } { i1 false, i64 poison }, { i1, i64 } %6 - %.fca.0.extract.i.i = extractvalue { i1, i64 } %7, 0 - br i1 %.fca.0.extract.i.i, label %__barray_check_bounds.exit.i, label %cond_211_case_0.i.i - -cond_211_case_0.i.i: ; preds = %id_bb.i.i - tail call void @panic(i32 1001, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @"e_No more qu.3B2EEBF0.0", i64 0, i64 0)) +cond_211_case_0.i.i: ; preds = %cond_exit_20.8.i, %cond_exit_20.7.i, %cond_exit_20.6.i, %cond_exit_20.5.i, %cond_exit_20.4.i, %cond_exit_20.3.i, %cond_exit_20.2.i, %cond_exit_20.1.i, %cond_exit_20.i, %entry + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__barray_check_bounds.exit.i: ; preds = %id_bb.i.i - %8 = lshr i64 %"15_0.sroa.0.0114.i", 6 - %9 = getelementptr inbounds i64, i64* %4, i64 %8 - %10 = load i64, i64* %9, align 4 - %11 = shl nuw nsw i64 1, %"15_0.sroa.0.0114.i" - %12 = and i64 %10, %11 - %.not.i.i = icmp eq i64 %12, 0 - br i1 %.not.i.i, label %panic.i.i, label %cond_exit_20.i - -panic.i.i: ; preds = %__barray_check_bounds.exit.i - tail call void @panic(i32 1002, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @"e_Array alre.5A300C2A.0", i64 0, i64 0)) +__hugr__.__tk2_qalloc.216.exit.i: ; preds = %entry + tail call void @___reset(i64 %qalloc.i.i) + %3 = load i64, ptr %2, align 4 + %4 = trunc i64 %3 to i1 + br i1 %4, label %cond_exit_20.i, label %panic.i.i + +panic.i.i: ; preds = %__barray_check_bounds.exit.9.i, %__hugr__.__tk2_qalloc.216.exit.8.i, %__hugr__.__tk2_qalloc.216.exit.7.i, %__hugr__.__tk2_qalloc.216.exit.6.i, %__hugr__.__tk2_qalloc.216.exit.5.i, %__hugr__.__tk2_qalloc.216.exit.4.i, %__hugr__.__tk2_qalloc.216.exit.3.i, %__hugr__.__tk2_qalloc.216.exit.2.i, %__hugr__.__tk2_qalloc.216.exit.1.i, %__hugr__.__tk2_qalloc.216.exit.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -cond_exit_20.i: ; preds = %__barray_check_bounds.exit.i - %.fca.1.extract.i.i = extractvalue { i1, i64 } %7, 1 - %13 = xor i64 %10, %11 - store i64 %13, i64* %9, align 4 - %14 = getelementptr inbounds i64, i64* %2, i64 %"15_0.sroa.0.0114.i" - store i64 %.fca.1.extract.i.i, i64* %14, align 4 - %exitcond.not.i = icmp eq i64 %5, 10 - br i1 %exitcond.not.i, label %loop_out.preheader.preheader.i, label %cond_20_case_1.i - -loop_out.preheader.preheader.i: ; preds = %cond_exit_20.i - %15 = load i64, i64* %4, align 4 - %16 = and i64 %15, 1 - %.not.i99.i.i.i = icmp eq i64 %16, 0 - br i1 %.not.i99.i.i.i, label %cond_380_case_1.i.i, label %panic.i.i.i.i - -mask_block_err.i.i.i.i: ; preds = %cond_380_case_1.i.9.i - tail call void @panic(i32 1002, i8* getelementptr inbounds ([70 x i8], [70 x i8]* @"e_Array cont.EFA5AC45.0", i64 0, i64 0)) +cond_exit_20.i: ; preds = %__hugr__.__tk2_qalloc.216.exit.i + %5 = and i64 %3, -2 + store i64 %5, ptr %2, align 4 + store i64 %qalloc.i.i, ptr %1, align 4 + %qalloc.i.1.i = tail call i64 @___qalloc() + %not_max.not.not.i.1.i = icmp eq i64 %qalloc.i.1.i, -1 + br i1 %not_max.not.not.i.1.i, label %cond_211_case_0.i.i, label %__hugr__.__tk2_qalloc.216.exit.1.i + +__hugr__.__tk2_qalloc.216.exit.1.i: ; preds = %cond_exit_20.i + tail call void @___reset(i64 %qalloc.i.1.i) + %6 = load i64, ptr %2, align 4 + %7 = and i64 %6, 2 + %.not.i = icmp eq i64 %7, 0 + br i1 %.not.i, label %panic.i.i, label %cond_exit_20.1.i + +cond_exit_20.1.i: ; preds = %__hugr__.__tk2_qalloc.216.exit.1.i + %8 = and i64 %6, -3 + store i64 %8, ptr %2, align 4 + %9 = getelementptr inbounds nuw i8, ptr %1, i64 8 + store i64 %qalloc.i.1.i, ptr %9, align 4 + %qalloc.i.2.i = tail call i64 @___qalloc() + %not_max.not.not.i.2.i = icmp eq i64 %qalloc.i.2.i, -1 + br i1 %not_max.not.not.i.2.i, label %cond_211_case_0.i.i, label %__hugr__.__tk2_qalloc.216.exit.2.i + +__hugr__.__tk2_qalloc.216.exit.2.i: ; preds = %cond_exit_20.1.i + tail call void @___reset(i64 %qalloc.i.2.i) + %10 = load i64, ptr %2, align 4 + %11 = and i64 %10, 4 + %.not115.i = icmp eq i64 %11, 0 + br i1 %.not115.i, label %panic.i.i, label %cond_exit_20.2.i + +cond_exit_20.2.i: ; preds = %__hugr__.__tk2_qalloc.216.exit.2.i + %12 = and i64 %10, -5 + store i64 %12, ptr %2, align 4 + %13 = getelementptr inbounds nuw i8, ptr %1, i64 16 + store i64 %qalloc.i.2.i, ptr %13, align 4 + %qalloc.i.3.i = tail call i64 @___qalloc() + %not_max.not.not.i.3.i = icmp eq i64 %qalloc.i.3.i, -1 + br i1 %not_max.not.not.i.3.i, label %cond_211_case_0.i.i, label %__hugr__.__tk2_qalloc.216.exit.3.i + +__hugr__.__tk2_qalloc.216.exit.3.i: ; preds = %cond_exit_20.2.i + tail call void @___reset(i64 %qalloc.i.3.i) + %14 = load i64, ptr %2, align 4 + %15 = and i64 %14, 8 + %.not116.i = icmp eq i64 %15, 0 + br i1 %.not116.i, label %panic.i.i, label %cond_exit_20.3.i + +cond_exit_20.3.i: ; preds = %__hugr__.__tk2_qalloc.216.exit.3.i + %16 = and i64 %14, -9 + store i64 %16, ptr %2, align 4 + %17 = getelementptr inbounds nuw i8, ptr %1, i64 24 + store i64 %qalloc.i.3.i, ptr %17, align 4 + %qalloc.i.4.i = tail call i64 @___qalloc() + %not_max.not.not.i.4.i = icmp eq i64 %qalloc.i.4.i, -1 + br i1 %not_max.not.not.i.4.i, label %cond_211_case_0.i.i, label %__hugr__.__tk2_qalloc.216.exit.4.i + +__hugr__.__tk2_qalloc.216.exit.4.i: ; preds = %cond_exit_20.3.i + tail call void @___reset(i64 %qalloc.i.4.i) + %18 = load i64, ptr %2, align 4 + %19 = and i64 %18, 16 + %.not117.i = icmp eq i64 %19, 0 + br i1 %.not117.i, label %panic.i.i, label %cond_exit_20.4.i + +cond_exit_20.4.i: ; preds = %__hugr__.__tk2_qalloc.216.exit.4.i + %20 = and i64 %18, -17 + store i64 %20, ptr %2, align 4 + %21 = getelementptr inbounds nuw i8, ptr %1, i64 32 + store i64 %qalloc.i.4.i, ptr %21, align 4 + %qalloc.i.5.i = tail call i64 @___qalloc() + %not_max.not.not.i.5.i = icmp eq i64 %qalloc.i.5.i, -1 + br i1 %not_max.not.not.i.5.i, label %cond_211_case_0.i.i, label %__hugr__.__tk2_qalloc.216.exit.5.i + +__hugr__.__tk2_qalloc.216.exit.5.i: ; preds = %cond_exit_20.4.i + tail call void @___reset(i64 %qalloc.i.5.i) + %22 = load i64, ptr %2, align 4 + %23 = and i64 %22, 32 + %.not118.i = icmp eq i64 %23, 0 + br i1 %.not118.i, label %panic.i.i, label %cond_exit_20.5.i + +cond_exit_20.5.i: ; preds = %__hugr__.__tk2_qalloc.216.exit.5.i + %24 = and i64 %22, -33 + store i64 %24, ptr %2, align 4 + %25 = getelementptr inbounds nuw i8, ptr %1, i64 40 + store i64 %qalloc.i.5.i, ptr %25, align 4 + %qalloc.i.6.i = tail call i64 @___qalloc() + %not_max.not.not.i.6.i = icmp eq i64 %qalloc.i.6.i, -1 + br i1 %not_max.not.not.i.6.i, label %cond_211_case_0.i.i, label %__hugr__.__tk2_qalloc.216.exit.6.i + +__hugr__.__tk2_qalloc.216.exit.6.i: ; preds = %cond_exit_20.5.i + tail call void @___reset(i64 %qalloc.i.6.i) + %26 = load i64, ptr %2, align 4 + %27 = and i64 %26, 64 + %.not119.i = icmp eq i64 %27, 0 + br i1 %.not119.i, label %panic.i.i, label %cond_exit_20.6.i + +cond_exit_20.6.i: ; preds = %__hugr__.__tk2_qalloc.216.exit.6.i + %28 = and i64 %26, -65 + store i64 %28, ptr %2, align 4 + %29 = getelementptr inbounds nuw i8, ptr %1, i64 48 + store i64 %qalloc.i.6.i, ptr %29, align 4 + %qalloc.i.7.i = tail call i64 @___qalloc() + %not_max.not.not.i.7.i = icmp eq i64 %qalloc.i.7.i, -1 + br i1 %not_max.not.not.i.7.i, label %cond_211_case_0.i.i, label %__hugr__.__tk2_qalloc.216.exit.7.i + +__hugr__.__tk2_qalloc.216.exit.7.i: ; preds = %cond_exit_20.6.i + tail call void @___reset(i64 %qalloc.i.7.i) + %30 = load i64, ptr %2, align 4 + %31 = and i64 %30, 128 + %.not120.i = icmp eq i64 %31, 0 + br i1 %.not120.i, label %panic.i.i, label %cond_exit_20.7.i + +cond_exit_20.7.i: ; preds = %__hugr__.__tk2_qalloc.216.exit.7.i + %32 = and i64 %30, -129 + store i64 %32, ptr %2, align 4 + %33 = getelementptr inbounds nuw i8, ptr %1, i64 56 + store i64 %qalloc.i.7.i, ptr %33, align 4 + %qalloc.i.8.i = tail call i64 @___qalloc() + %not_max.not.not.i.8.i = icmp eq i64 %qalloc.i.8.i, -1 + br i1 %not_max.not.not.i.8.i, label %cond_211_case_0.i.i, label %__hugr__.__tk2_qalloc.216.exit.8.i + +__hugr__.__tk2_qalloc.216.exit.8.i: ; preds = %cond_exit_20.7.i + tail call void @___reset(i64 %qalloc.i.8.i) + %34 = load i64, ptr %2, align 4 + %35 = and i64 %34, 256 + %.not121.i = icmp eq i64 %35, 0 + br i1 %.not121.i, label %panic.i.i, label %cond_exit_20.8.i + +cond_exit_20.8.i: ; preds = %__hugr__.__tk2_qalloc.216.exit.8.i + %36 = and i64 %34, -257 + store i64 %36, ptr %2, align 4 + %37 = getelementptr inbounds nuw i8, ptr %1, i64 64 + store i64 %qalloc.i.8.i, ptr %37, align 4 + %qalloc.i.9.i = tail call i64 @___qalloc() + %not_max.not.not.i.9.i = icmp eq i64 %qalloc.i.9.i, -1 + br i1 %not_max.not.not.i.9.i, label %cond_211_case_0.i.i, label %__barray_check_bounds.exit.9.i + +__barray_check_bounds.exit.9.i: ; preds = %cond_exit_20.8.i + tail call void @___reset(i64 %qalloc.i.9.i) + %38 = load i64, ptr %2, align 4 + %39 = and i64 %38, 512 + %.not122.i = icmp eq i64 %39, 0 + br i1 %.not122.i, label %panic.i.i, label %cond_exit_20.9.i + +cond_exit_20.9.i: ; preds = %__barray_check_bounds.exit.9.i + %40 = and i64 %38, -513 + store i64 %40, ptr %2, align 4 + %41 = getelementptr inbounds nuw i8, ptr %1, i64 72 + store i64 %qalloc.i.9.i, ptr %41, align 4 + %"120.fca.0.insert.i" = insertvalue { ptr, ptr, i64 } poison, ptr %1, 0 + %"120.fca.1.insert.i" = insertvalue { ptr, ptr, i64 } %"120.fca.0.insert.i", ptr %2, 1 + %"120.fca.2.insert.i" = insertvalue { ptr, ptr, i64 } %"120.fca.1.insert.i", i64 0, 2 + %42 = insertvalue { { ptr, ptr, i64 }, i64 } poison, { ptr, ptr, i64 } %"120.fca.2.insert.i", 0 + br label %__barray_check_bounds.exit.i.i.i + +43: ; preds = %"__hugr__.$__next__$$t(qubit)$n(10).299.exit.thread.i.i" + %44 = lshr i64 %.fca.1.0.0.2.extract.i.i.i, 6 + %45 = getelementptr i64, ptr %.fca.1.0.0.1.extract.i.i.i, i64 %44 + %46 = load i64, ptr %45, align 4 + %47 = and i64 %.fca.1.0.0.2.extract.i.i.i, 63 + %48 = sub nuw nsw i64 64, %47 + %49 = lshr i64 -1, %48 + %50 = icmp eq i64 %47, 0 + %51 = select i1 %50, i64 0, i64 %49 + %52 = or i64 %46, %51 + store i64 %52, ptr %45, align 4 + %last_valid.i.i.i.i = add i64 %.fca.1.0.0.2.extract.i.i.i, 9 + %53 = lshr i64 %last_valid.i.i.i.i, 6 + %54 = getelementptr inbounds nuw i64, ptr %.fca.1.0.0.1.extract.i.i.i, i64 %53 + %55 = load i64, ptr %54, align 4 + %56 = and i64 %last_valid.i.i.i.i, 63 + %57 = shl nsw i64 -2, %56 + %58 = icmp eq i64 %56, 63 + %59 = select i1 %58, i64 0, i64 %57 + %60 = or i64 %55, %59 + store i64 %60, ptr %54, align 4 + %reass.sub.i.i.i.i = sub nsw i64 %53, %44 + %.not.i.i.i.i = icmp eq i64 %reass.sub.i.i.i.i, -1 + br i1 %.not.i.i.i.i, label %__hugr__.main.1.exit, label %mask_block_ok.i.i.i.i + +61: ; preds = %mask_block_ok.i.i.i.i + %62 = add nuw i64 %.02.i.i.i.i, 1 + %exitcond.not.i.i.i.i = icmp eq i64 %.02.i.i.i.i, %reass.sub.i.i.i.i + br i1 %exitcond.not.i.i.i.i, label %__hugr__.main.1.exit, label %mask_block_ok.i.i.i.i + +mask_block_ok.i.i.i.i: ; preds = %43, %61 + %.02.i.i.i.i = phi i64 [ %62, %61 ], [ 0, %43 ] + %gep.i.i.i.i = getelementptr i64, ptr %45, i64 %.02.i.i.i.i + %63 = load i64, ptr %gep.i.i.i.i, align 4 + %64 = icmp eq i64 %63, -1 + br i1 %64, label %61, label %mask_block_err.i.i.i.i + +mask_block_err.i.i.i.i: ; preds = %mask_block_ok.i.i.i.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -panic.i.i.i.i: ; preds = %cond_380_case_1.i.8.i, %cond_380_case_1.i.7.i, %cond_380_case_1.i.6.i, %cond_380_case_1.i.5.i, %cond_380_case_1.i.4.i, %cond_380_case_1.i.3.i, %cond_380_case_1.i.2.i, %cond_380_case_1.i.1.i, %cond_380_case_1.i.i, %loop_out.preheader.preheader.i - tail call void @panic(i32 1002, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @"e_Array elem.E746B1A3.0", i64 0, i64 0)) +__barray_check_bounds.exit.i.i.i: ; preds = %"__hugr__.$__next__$$t(qubit)$n(10).299.exit.thread.i.i", %cond_exit_20.9.i + %.fca.2.extract83.i185.i.i = phi i64 [ 0, %cond_exit_20.9.i ], [ %.fca.1.0.0.2.extract.i.i.i, %"__hugr__.$__next__$$t(qubit)$n(10).299.exit.thread.i.i" ] + %.fca.1.extract82.i184.i.i = phi ptr [ %2, %cond_exit_20.9.i ], [ %.fca.1.0.0.1.extract.i.i.i, %"__hugr__.$__next__$$t(qubit)$n(10).299.exit.thread.i.i" ] + %.fca.0.extract81.i183.i.i = phi ptr [ %1, %cond_exit_20.9.i ], [ %.fca.1.0.0.0.extract.i.i.i, %"__hugr__.$__next__$$t(qubit)$n(10).299.exit.thread.i.i" ] + %"291_0.0182.i.i" = phi i64 [ 0, %cond_exit_20.9.i ], [ %72, %"__hugr__.$__next__$$t(qubit)$n(10).299.exit.thread.i.i" ] + %.pn181.i.i = phi { { ptr, ptr, i64 }, i64 } [ %42, %cond_exit_20.9.i ], [ %80, %"__hugr__.$__next__$$t(qubit)$n(10).299.exit.thread.i.i" ] + %65 = add i64 %"291_0.0182.i.i", %.fca.2.extract83.i185.i.i + %66 = lshr i64 %65, 6 + %67 = getelementptr inbounds nuw i64, ptr %.fca.1.extract82.i184.i.i, i64 %66 + %68 = load i64, ptr %67, align 4 + %69 = and i64 %65, 63 + %70 = lshr i64 %68, %69 + %71 = trunc i64 %70 to i1 + br i1 %71, label %panic.i.i.i.i, label %"__hugr__.$__next__$$t(qubit)$n(10).299.exit.thread.i.i" + +panic.i.i.i.i: ; preds = %__barray_check_bounds.exit.i.i.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -cond_380_case_1.i.i: ; preds = %loop_out.preheader.preheader.i - %17 = xor i64 %15, 1 - store i64 %17, i64* %4, align 4 - %18 = load i64, i64* %2, align 4 - tail call void @___qfree(i64 %18) - %19 = load i64, i64* %4, align 4 - %20 = and i64 %19, 2 - %.not.i99.i.i.1.i = icmp eq i64 %20, 0 - br i1 %.not.i99.i.i.1.i, label %cond_380_case_1.i.1.i, label %panic.i.i.i.i - -cond_380_case_1.i.1.i: ; preds = %cond_380_case_1.i.i - %21 = xor i64 %19, 2 - store i64 %21, i64* %4, align 4 - %22 = getelementptr inbounds i8, i8* %1, i64 8 - %23 = bitcast i8* %22 to i64* - %24 = load i64, i64* %23, align 4 - tail call void @___qfree(i64 %24) - %25 = load i64, i64* %4, align 4 - %26 = and i64 %25, 4 - %.not.i99.i.i.2.i = icmp eq i64 %26, 0 - br i1 %.not.i99.i.i.2.i, label %cond_380_case_1.i.2.i, label %panic.i.i.i.i - -cond_380_case_1.i.2.i: ; preds = %cond_380_case_1.i.1.i - %27 = xor i64 %25, 4 - store i64 %27, i64* %4, align 4 - %28 = getelementptr inbounds i8, i8* %1, i64 16 - %29 = bitcast i8* %28 to i64* - %30 = load i64, i64* %29, align 4 - tail call void @___qfree(i64 %30) - %31 = load i64, i64* %4, align 4 - %32 = and i64 %31, 8 - %.not.i99.i.i.3.i = icmp eq i64 %32, 0 - br i1 %.not.i99.i.i.3.i, label %cond_380_case_1.i.3.i, label %panic.i.i.i.i - -cond_380_case_1.i.3.i: ; preds = %cond_380_case_1.i.2.i - %33 = xor i64 %31, 8 - store i64 %33, i64* %4, align 4 - %34 = getelementptr inbounds i8, i8* %1, i64 24 - %35 = bitcast i8* %34 to i64* - %36 = load i64, i64* %35, align 4 - tail call void @___qfree(i64 %36) - %37 = load i64, i64* %4, align 4 - %38 = and i64 %37, 16 - %.not.i99.i.i.4.i = icmp eq i64 %38, 0 - br i1 %.not.i99.i.i.4.i, label %cond_380_case_1.i.4.i, label %panic.i.i.i.i - -cond_380_case_1.i.4.i: ; preds = %cond_380_case_1.i.3.i - %39 = xor i64 %37, 16 - store i64 %39, i64* %4, align 4 - %40 = getelementptr inbounds i8, i8* %1, i64 32 - %41 = bitcast i8* %40 to i64* - %42 = load i64, i64* %41, align 4 - tail call void @___qfree(i64 %42) - %43 = load i64, i64* %4, align 4 - %44 = and i64 %43, 32 - %.not.i99.i.i.5.i = icmp eq i64 %44, 0 - br i1 %.not.i99.i.i.5.i, label %cond_380_case_1.i.5.i, label %panic.i.i.i.i - -cond_380_case_1.i.5.i: ; preds = %cond_380_case_1.i.4.i - %45 = xor i64 %43, 32 - store i64 %45, i64* %4, align 4 - %46 = getelementptr inbounds i8, i8* %1, i64 40 - %47 = bitcast i8* %46 to i64* - %48 = load i64, i64* %47, align 4 - tail call void @___qfree(i64 %48) - %49 = load i64, i64* %4, align 4 - %50 = and i64 %49, 64 - %.not.i99.i.i.6.i = icmp eq i64 %50, 0 - br i1 %.not.i99.i.i.6.i, label %cond_380_case_1.i.6.i, label %panic.i.i.i.i - -cond_380_case_1.i.6.i: ; preds = %cond_380_case_1.i.5.i - %51 = xor i64 %49, 64 - store i64 %51, i64* %4, align 4 - %52 = getelementptr inbounds i8, i8* %1, i64 48 - %53 = bitcast i8* %52 to i64* - %54 = load i64, i64* %53, align 4 - tail call void @___qfree(i64 %54) - %55 = load i64, i64* %4, align 4 - %56 = and i64 %55, 128 - %.not.i99.i.i.7.i = icmp eq i64 %56, 0 - br i1 %.not.i99.i.i.7.i, label %cond_380_case_1.i.7.i, label %panic.i.i.i.i - -cond_380_case_1.i.7.i: ; preds = %cond_380_case_1.i.6.i - %57 = xor i64 %55, 128 - store i64 %57, i64* %4, align 4 - %58 = getelementptr inbounds i8, i8* %1, i64 56 - %59 = bitcast i8* %58 to i64* - %60 = load i64, i64* %59, align 4 - tail call void @___qfree(i64 %60) - %61 = load i64, i64* %4, align 4 - %62 = and i64 %61, 256 - %.not.i99.i.i.8.i = icmp eq i64 %62, 0 - br i1 %.not.i99.i.i.8.i, label %cond_380_case_1.i.8.i, label %panic.i.i.i.i - -cond_380_case_1.i.8.i: ; preds = %cond_380_case_1.i.7.i - %63 = xor i64 %61, 256 - store i64 %63, i64* %4, align 4 - %64 = getelementptr inbounds i8, i8* %1, i64 64 - %65 = bitcast i8* %64 to i64* - %66 = load i64, i64* %65, align 4 - tail call void @___qfree(i64 %66) - %67 = load i64, i64* %4, align 4 - %68 = and i64 %67, 512 - %.not.i99.i.i.9.i = icmp eq i64 %68, 0 - br i1 %.not.i99.i.i.9.i, label %cond_380_case_1.i.9.i, label %panic.i.i.i.i - -cond_380_case_1.i.9.i: ; preds = %cond_380_case_1.i.8.i - %69 = xor i64 %67, 512 - store i64 %69, i64* %4, align 4 - %70 = getelementptr inbounds i8, i8* %1, i64 72 - %71 = bitcast i8* %70 to i64* - %72 = load i64, i64* %71, align 4 - tail call void @___qfree(i64 %72) - %73 = load i64, i64* %4, align 4 - %74 = or i64 %73, -1024 - store i64 %74, i64* %4, align 4 - %75 = icmp eq i64 %74, -1 - br i1 %75, label %__hugr__.main.1.exit, label %mask_block_err.i.i.i.i - -__hugr__.main.1.exit: ; preds = %cond_380_case_1.i.9.i - tail call void @heap_free(i8* nonnull %1) - tail call void @heap_free(i8* nonnull %3) - %76 = tail call i64 @teardown() - ret i64 %76 +"__hugr__.$__next__$$t(qubit)$n(10).299.exit.thread.i.i": ; preds = %__barray_check_bounds.exit.i.i.i + %72 = add nuw nsw i64 %"291_0.0182.i.i", 1 + %73 = shl nuw i64 1, %69 + %74 = xor i64 %73, %68 + store i64 %74, ptr %67, align 4 + %75 = getelementptr inbounds i64, ptr %.fca.0.extract81.i183.i.i, i64 %65 + %76 = load i64, ptr %75, align 4 + %.fca.1.0.0.0.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn181.i.i, 0, 0 + %.fca.1.0.0.1.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn181.i.i, 0, 1 + %.fca.1.0.0.2.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn181.i.i, 0, 2 + %77 = insertvalue { { ptr, ptr, i64 }, i64 } %.pn181.i.i, i64 %72, 1 + %78 = insertvalue { { ptr, ptr, i64 }, i64 } %77, ptr %.fca.1.0.0.0.extract.i.i.i, 0, 0 + %79 = insertvalue { { ptr, ptr, i64 }, i64 } %78, ptr %.fca.1.0.0.1.extract.i.i.i, 0, 1 + %80 = insertvalue { { ptr, ptr, i64 }, i64 } %79, i64 %.fca.1.0.0.2.extract.i.i.i, 0, 2 + tail call void @___qfree(i64 %76) + %.not.i.i = icmp eq i64 %"291_0.0182.i.i", 9 + br i1 %.not.i.i, label %43, label %__barray_check_bounds.exit.i.i.i + +__hugr__.main.1.exit: ; preds = %61, %43 + tail call void @heap_free(ptr %.fca.1.0.0.0.extract.i.i.i) + tail call void @heap_free(ptr nonnull %.fca.1.0.0.1.extract.i.i.i) + %81 = tail call i64 @teardown() + ret i64 %81 } declare void @setup(i64) local_unnamed_addr diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-flip_some/flip_some_aarch64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-flip_some/flip_some_aarch64-apple-darwin index 2563f234e..938ef7cb9 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-flip_some/flip_some_aarch64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-flip_some/flip_some_aarch64-apple-darwin @@ -1,6 +1,6 @@ ; ModuleID = 'hugr' source_filename = "hugr" -target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128" +target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-n32:64-S128-Fn32" target triple = "aarch64-apple-darwin" @res_c0.7C14CD6E.0 = private constant [13 x i8] c"\0CUSER:BOOL:c0" @@ -17,14 +17,14 @@ declare i1 @___read_future_bool(i64) local_unnamed_addr declare void @___dec_future_refcount(i64) local_unnamed_addr -declare void @print_bool(i8*, i64, i1) local_unnamed_addr +declare void @print_bool(ptr, i64, i1) local_unnamed_addr declare i64 @___qalloc() local_unnamed_addr declare void @___reset(i64) local_unnamed_addr ; Function Attrs: noreturn -declare void @panic(i32, i8*) local_unnamed_addr #0 +declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @___rxy(i64, double, double) local_unnamed_addr @@ -32,110 +32,70 @@ define i64 @qmain(i64 %0) local_unnamed_addr { entry: tail call void @setup(i64 %0) %qalloc.i.i = tail call i64 @___qalloc() - %not_max.not.i.i = icmp eq i64 %qalloc.i.i, -1 - br i1 %not_max.not.i.i, label %id_bb.i.i, label %reset_bb.i.i + %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 + br i1 %not_max.not.not.i.i, label %cond_40_case_0.i.i, label %__hugr__.__tk2_qalloc.36.exit.i -reset_bb.i.i: ; preds = %entry - tail call void @___reset(i64 %qalloc.i.i) - br label %id_bb.i.i - -id_bb.i.i: ; preds = %reset_bb.i.i, %entry - %1 = insertvalue { i1, i64 } { i1 true, i64 poison }, i64 %qalloc.i.i, 1 - %2 = select i1 %not_max.not.i.i, { i1, i64 } { i1 false, i64 poison }, { i1, i64 } %1 - %.fca.0.extract.i.i = extractvalue { i1, i64 } %2, 0 - br i1 %.fca.0.extract.i.i, label %__hugr__.__tk2_qalloc.36.exit.i, label %cond_40_case_0.i.i - -cond_40_case_0.i.i: ; preds = %id_bb.i.i - tail call void @panic(i32 1001, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @"e_No more qu.3B2EEBF0.0", i64 0, i64 0)) +cond_40_case_0.i.i: ; preds = %entry + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_qalloc.36.exit.i: ; preds = %id_bb.i.i - %.fca.1.extract.i.i = extractvalue { i1, i64 } %2, 1 - tail call void @___rxy(i64 %.fca.1.extract.i.i, double 0x400921FB54442D18, double 0.000000e+00) +__hugr__.__tk2_qalloc.36.exit.i: ; preds = %entry + tail call void @___reset(i64 %qalloc.i.i) + tail call void @___rxy(i64 %qalloc.i.i, double 0x400921FB54442D18, double 0.000000e+00) %qalloc.i101.i = tail call i64 @___qalloc() - %not_max.not.i102.i = icmp eq i64 %qalloc.i101.i, -1 - br i1 %not_max.not.i102.i, label %id_bb.i105.i, label %reset_bb.i103.i - -reset_bb.i103.i: ; preds = %__hugr__.__tk2_qalloc.36.exit.i - tail call void @___reset(i64 %qalloc.i101.i) - br label %id_bb.i105.i + %not_max.not.not.i102.i = icmp eq i64 %qalloc.i101.i, -1 + br i1 %not_max.not.not.i102.i, label %cond_54_case_0.i.i, label %__hugr__.__tk2_qalloc.50.exit.i -id_bb.i105.i: ; preds = %reset_bb.i103.i, %__hugr__.__tk2_qalloc.36.exit.i - %3 = insertvalue { i1, i64 } { i1 true, i64 poison }, i64 %qalloc.i101.i, 1 - %4 = select i1 %not_max.not.i102.i, { i1, i64 } { i1 false, i64 poison }, { i1, i64 } %3 - %.fca.0.extract.i104.i = extractvalue { i1, i64 } %4, 0 - br i1 %.fca.0.extract.i104.i, label %__hugr__.__tk2_qalloc.50.exit.i, label %cond_54_case_0.i.i - -cond_54_case_0.i.i: ; preds = %id_bb.i105.i - tail call void @panic(i32 1001, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @"e_No more qu.3B2EEBF0.0", i64 0, i64 0)) +cond_54_case_0.i.i: ; preds = %__hugr__.__tk2_qalloc.36.exit.i + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_qalloc.50.exit.i: ; preds = %id_bb.i105.i - %.fca.1.extract.i106.i = extractvalue { i1, i64 } %4, 1 - %qalloc.i107.i = tail call i64 @___qalloc() - %not_max.not.i108.i = icmp eq i64 %qalloc.i107.i, -1 - br i1 %not_max.not.i108.i, label %id_bb.i111.i, label %reset_bb.i109.i - -reset_bb.i109.i: ; preds = %__hugr__.__tk2_qalloc.50.exit.i - tail call void @___reset(i64 %qalloc.i107.i) - br label %id_bb.i111.i - -id_bb.i111.i: ; preds = %reset_bb.i109.i, %__hugr__.__tk2_qalloc.50.exit.i - %5 = insertvalue { i1, i64 } { i1 true, i64 poison }, i64 %qalloc.i107.i, 1 - %6 = select i1 %not_max.not.i108.i, { i1, i64 } { i1 false, i64 poison }, { i1, i64 } %5 - %.fca.0.extract.i110.i = extractvalue { i1, i64 } %6, 0 - br i1 %.fca.0.extract.i110.i, label %__hugr__.__tk2_qalloc.64.exit.i, label %cond_68_case_0.i.i +__hugr__.__tk2_qalloc.50.exit.i: ; preds = %__hugr__.__tk2_qalloc.36.exit.i + tail call void @___reset(i64 %qalloc.i101.i) + %qalloc.i103.i = tail call i64 @___qalloc() + %not_max.not.not.i104.i = icmp eq i64 %qalloc.i103.i, -1 + br i1 %not_max.not.not.i104.i, label %cond_68_case_0.i.i, label %__hugr__.__tk2_qalloc.64.exit.i -cond_68_case_0.i.i: ; preds = %id_bb.i111.i - tail call void @panic(i32 1001, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @"e_No more qu.3B2EEBF0.0", i64 0, i64 0)) +cond_68_case_0.i.i: ; preds = %__hugr__.__tk2_qalloc.50.exit.i + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_qalloc.64.exit.i: ; preds = %id_bb.i111.i - %.fca.1.extract.i112.i = extractvalue { i1, i64 } %6, 1 - tail call void @___rxy(i64 %.fca.1.extract.i112.i, double 0x400921FB54442D18, double 0.000000e+00) - %qalloc.i113.i = tail call i64 @___qalloc() - %not_max.not.i114.i = icmp eq i64 %qalloc.i113.i, -1 - br i1 %not_max.not.i114.i, label %id_bb.i117.i, label %reset_bb.i115.i - -reset_bb.i115.i: ; preds = %__hugr__.__tk2_qalloc.64.exit.i - tail call void @___reset(i64 %qalloc.i113.i) - br label %id_bb.i117.i - -id_bb.i117.i: ; preds = %reset_bb.i115.i, %__hugr__.__tk2_qalloc.64.exit.i - %7 = insertvalue { i1, i64 } { i1 true, i64 poison }, i64 %qalloc.i113.i, 1 - %8 = select i1 %not_max.not.i114.i, { i1, i64 } { i1 false, i64 poison }, { i1, i64 } %7 - %.fca.0.extract.i116.i = extractvalue { i1, i64 } %8, 0 - br i1 %.fca.0.extract.i116.i, label %__hugr__.main.1.exit, label %cond_82_case_0.i.i - -cond_82_case_0.i.i: ; preds = %id_bb.i117.i - tail call void @panic(i32 1001, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @"e_No more qu.3B2EEBF0.0", i64 0, i64 0)) +__hugr__.__tk2_qalloc.64.exit.i: ; preds = %__hugr__.__tk2_qalloc.50.exit.i + tail call void @___reset(i64 %qalloc.i103.i) + tail call void @___rxy(i64 %qalloc.i103.i, double 0x400921FB54442D18, double 0.000000e+00) + %qalloc.i105.i = tail call i64 @___qalloc() + %not_max.not.not.i106.i = icmp eq i64 %qalloc.i105.i, -1 + br i1 %not_max.not.not.i106.i, label %cond_82_case_0.i.i, label %__hugr__.main.1.exit + +cond_82_case_0.i.i: ; preds = %__hugr__.__tk2_qalloc.64.exit.i + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.main.1.exit: ; preds = %id_bb.i117.i - %.fca.1.extract.i118.i = extractvalue { i1, i64 } %8, 1 - %lazy_measure.i = tail call i64 @___lazy_measure(i64 %.fca.1.extract.i.i) - tail call void @___qfree(i64 %.fca.1.extract.i.i) +__hugr__.main.1.exit: ; preds = %__hugr__.__tk2_qalloc.64.exit.i + tail call void @___reset(i64 %qalloc.i105.i) + %lazy_measure.i = tail call i64 @___lazy_measure(i64 %qalloc.i.i) + tail call void @___qfree(i64 %qalloc.i.i) %read_bool.i = tail call i1 @___read_future_bool(i64 %lazy_measure.i) tail call void @___dec_future_refcount(i64 %lazy_measure.i) - tail call void @print_bool(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @res_c0.7C14CD6E.0, i64 0, i64 0), i64 12, i1 %read_bool.i) - %lazy_measure22.i = tail call i64 @___lazy_measure(i64 %.fca.1.extract.i106.i) - tail call void @___qfree(i64 %.fca.1.extract.i106.i) + tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool.i) + %lazy_measure22.i = tail call i64 @___lazy_measure(i64 %qalloc.i101.i) + tail call void @___qfree(i64 %qalloc.i101.i) %read_bool35.i = tail call i1 @___read_future_bool(i64 %lazy_measure22.i) tail call void @___dec_future_refcount(i64 %lazy_measure22.i) - tail call void @print_bool(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @res_c1.1F7A6571.0, i64 0, i64 0), i64 12, i1 %read_bool35.i) - %lazy_measure44.i = tail call i64 @___lazy_measure(i64 %.fca.1.extract.i112.i) - tail call void @___qfree(i64 %.fca.1.extract.i112.i) + tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool35.i) + %lazy_measure44.i = tail call i64 @___lazy_measure(i64 %qalloc.i103.i) + tail call void @___qfree(i64 %qalloc.i103.i) %read_bool57.i = tail call i1 @___read_future_bool(i64 %lazy_measure44.i) tail call void @___dec_future_refcount(i64 %lazy_measure44.i) - tail call void @print_bool(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @res_c2.60825383.0, i64 0, i64 0), i64 12, i1 %read_bool57.i) - tail call void @___rxy(i64 %.fca.1.extract.i118.i, double 0x400921FB54442D18, double 0.000000e+00) - %lazy_measure67.i = tail call i64 @___lazy_measure(i64 %.fca.1.extract.i118.i) - tail call void @___qfree(i64 %.fca.1.extract.i118.i) + tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool57.i) + tail call void @___rxy(i64 %qalloc.i105.i, double 0x400921FB54442D18, double 0.000000e+00) + %lazy_measure67.i = tail call i64 @___lazy_measure(i64 %qalloc.i105.i) + tail call void @___qfree(i64 %qalloc.i105.i) %read_bool80.i = tail call i1 @___read_future_bool(i64 %lazy_measure67.i) tail call void @___dec_future_refcount(i64 %lazy_measure67.i) - tail call void @print_bool(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @res_c3.B223E16D.0, i64 0, i64 0), i64 12, i1 %read_bool80.i) - %9 = tail call i64 @teardown() - ret i64 %9 + tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool80.i) + %1 = tail call i64 @teardown() + ret i64 %1 } declare void @setup(i64) local_unnamed_addr diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-measure_qb_array/measure_qb_array_aarch64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-measure_qb_array/measure_qb_array_aarch64-apple-darwin index eae70fc2d..7339917b6 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-measure_qb_array/measure_qb_array_aarch64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-measure_qb_array/measure_qb_array_aarch64-apple-darwin @@ -1,6 +1,6 @@ ; ModuleID = 'hugr' source_filename = "hugr" -target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128" +target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-n32:64-S128-Fn32" target triple = "aarch64-apple-darwin" @"e_Array alre.5A300C2A.0" = private constant [57 x i8] c"8EXIT:INT:Array already contains an element at this index" @@ -8,12 +8,12 @@ target triple = "aarch64-apple-darwin" @"e_Array cont.EFA5AC45.0" = private constant [70 x i8] c"EEXIT:INT:Array contains non-borrowed elements and cannot be discarded" @"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." -declare i8* @heap_alloc(i64) local_unnamed_addr +declare ptr @heap_alloc(i64) local_unnamed_addr ; Function Attrs: noreturn -declare void @panic(i32, i8*) local_unnamed_addr #0 +declare void @panic(i32, ptr) local_unnamed_addr #0 -declare void @heap_free(i8*) local_unnamed_addr +declare void @heap_free(ptr) local_unnamed_addr declare void @___dec_future_refcount(i64) local_unnamed_addr @@ -30,279 +30,431 @@ declare void @___reset(i64) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr { entry: tail call void @setup(i64 %0) - %1 = tail call i8* @heap_alloc(i64 80) - %2 = bitcast i8* %1 to i64* - %3 = tail call i8* @heap_alloc(i64 8) - %4 = bitcast i8* %3 to i64* - store i64 -1, i64* %4, align 1 - br label %cond_20_case_1.i - -cond_20_case_1.i: ; preds = %cond_exit_20.i, %entry - %"15_0.sroa.0.0294.i" = phi i64 [ 0, %entry ], [ %5, %cond_exit_20.i ] - %5 = add nuw nsw i64 %"15_0.sroa.0.0294.i", 1 + %1 = tail call ptr @heap_alloc(i64 80) + %2 = tail call ptr @heap_alloc(i64 8) + store i64 -1, ptr %2, align 1 %qalloc.i.i = tail call i64 @___qalloc() - %not_max.not.i.i = icmp eq i64 %qalloc.i.i, -1 - br i1 %not_max.not.i.i, label %id_bb.i.i, label %reset_bb.i.i + %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 + br i1 %not_max.not.not.i.i, label %cond_236_case_0.i.i, label %__hugr__.__tk2_qalloc.208.exit.i -reset_bb.i.i: ; preds = %cond_20_case_1.i - tail call void @___reset(i64 %qalloc.i.i) - br label %id_bb.i.i +cond_236_case_0.i.i: ; preds = %cond_exit_20.8.i, %cond_exit_20.7.i, %cond_exit_20.6.i, %cond_exit_20.5.i, %cond_exit_20.4.i, %cond_exit_20.3.i, %cond_exit_20.2.i, %cond_exit_20.1.i, %cond_exit_20.i, %entry + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") + unreachable -id_bb.i.i: ; preds = %reset_bb.i.i, %cond_20_case_1.i - %6 = insertvalue { i1, i64 } { i1 true, i64 poison }, i64 %qalloc.i.i, 1 - %7 = select i1 %not_max.not.i.i, { i1, i64 } { i1 false, i64 poison }, { i1, i64 } %6 - %.fca.0.extract.i.i = extractvalue { i1, i64 } %7, 0 - br i1 %.fca.0.extract.i.i, label %__barray_check_bounds.exit.i, label %cond_236_case_0.i.i +__hugr__.__tk2_qalloc.208.exit.i: ; preds = %entry + tail call void @___reset(i64 %qalloc.i.i) + %3 = load i64, ptr %2, align 4 + %4 = trunc i64 %3 to i1 + br i1 %4, label %cond_exit_20.i, label %panic.i.i -cond_236_case_0.i.i: ; preds = %id_bb.i.i - tail call void @panic(i32 1001, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @"e_No more qu.3B2EEBF0.0", i64 0, i64 0)) +panic.i.i: ; preds = %__barray_check_bounds.exit.9.i, %__hugr__.__tk2_qalloc.208.exit.8.i, %__hugr__.__tk2_qalloc.208.exit.7.i, %__hugr__.__tk2_qalloc.208.exit.6.i, %__hugr__.__tk2_qalloc.208.exit.5.i, %__hugr__.__tk2_qalloc.208.exit.4.i, %__hugr__.__tk2_qalloc.208.exit.3.i, %__hugr__.__tk2_qalloc.208.exit.2.i, %__hugr__.__tk2_qalloc.208.exit.1.i, %__hugr__.__tk2_qalloc.208.exit.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_check_bounds.exit.i: ; preds = %id_bb.i.i - %8 = lshr i64 %"15_0.sroa.0.0294.i", 6 - %9 = getelementptr inbounds i64, i64* %4, i64 %8 - %10 = load i64, i64* %9, align 4 - %11 = shl nuw nsw i64 1, %"15_0.sroa.0.0294.i" - %12 = and i64 %10, %11 - %.not.i.i = icmp eq i64 %12, 0 - br i1 %.not.i.i, label %panic.i.i, label %cond_exit_20.i - -panic.i.i: ; preds = %__barray_check_bounds.exit.i - tail call void @panic(i32 1002, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @"e_Array alre.5A300C2A.0", i64 0, i64 0)) +cond_exit_20.i: ; preds = %__hugr__.__tk2_qalloc.208.exit.i + %5 = and i64 %3, -2 + store i64 %5, ptr %2, align 4 + store i64 %qalloc.i.i, ptr %1, align 4 + %qalloc.i.1.i = tail call i64 @___qalloc() + %not_max.not.not.i.1.i = icmp eq i64 %qalloc.i.1.i, -1 + br i1 %not_max.not.not.i.1.i, label %cond_236_case_0.i.i, label %__hugr__.__tk2_qalloc.208.exit.1.i + +__hugr__.__tk2_qalloc.208.exit.1.i: ; preds = %cond_exit_20.i + tail call void @___reset(i64 %qalloc.i.1.i) + %6 = load i64, ptr %2, align 4 + %7 = and i64 %6, 2 + %.not301.i = icmp eq i64 %7, 0 + br i1 %.not301.i, label %panic.i.i, label %cond_exit_20.1.i + +cond_exit_20.1.i: ; preds = %__hugr__.__tk2_qalloc.208.exit.1.i + %8 = and i64 %6, -3 + store i64 %8, ptr %2, align 4 + %9 = getelementptr inbounds nuw i8, ptr %1, i64 8 + store i64 %qalloc.i.1.i, ptr %9, align 4 + %qalloc.i.2.i = tail call i64 @___qalloc() + %not_max.not.not.i.2.i = icmp eq i64 %qalloc.i.2.i, -1 + br i1 %not_max.not.not.i.2.i, label %cond_236_case_0.i.i, label %__hugr__.__tk2_qalloc.208.exit.2.i + +__hugr__.__tk2_qalloc.208.exit.2.i: ; preds = %cond_exit_20.1.i + tail call void @___reset(i64 %qalloc.i.2.i) + %10 = load i64, ptr %2, align 4 + %11 = and i64 %10, 4 + %.not302.i = icmp eq i64 %11, 0 + br i1 %.not302.i, label %panic.i.i, label %cond_exit_20.2.i + +cond_exit_20.2.i: ; preds = %__hugr__.__tk2_qalloc.208.exit.2.i + %12 = and i64 %10, -5 + store i64 %12, ptr %2, align 4 + %13 = getelementptr inbounds nuw i8, ptr %1, i64 16 + store i64 %qalloc.i.2.i, ptr %13, align 4 + %qalloc.i.3.i = tail call i64 @___qalloc() + %not_max.not.not.i.3.i = icmp eq i64 %qalloc.i.3.i, -1 + br i1 %not_max.not.not.i.3.i, label %cond_236_case_0.i.i, label %__hugr__.__tk2_qalloc.208.exit.3.i + +__hugr__.__tk2_qalloc.208.exit.3.i: ; preds = %cond_exit_20.2.i + tail call void @___reset(i64 %qalloc.i.3.i) + %14 = load i64, ptr %2, align 4 + %15 = and i64 %14, 8 + %.not303.i = icmp eq i64 %15, 0 + br i1 %.not303.i, label %panic.i.i, label %cond_exit_20.3.i + +cond_exit_20.3.i: ; preds = %__hugr__.__tk2_qalloc.208.exit.3.i + %16 = and i64 %14, -9 + store i64 %16, ptr %2, align 4 + %17 = getelementptr inbounds nuw i8, ptr %1, i64 24 + store i64 %qalloc.i.3.i, ptr %17, align 4 + %qalloc.i.4.i = tail call i64 @___qalloc() + %not_max.not.not.i.4.i = icmp eq i64 %qalloc.i.4.i, -1 + br i1 %not_max.not.not.i.4.i, label %cond_236_case_0.i.i, label %__hugr__.__tk2_qalloc.208.exit.4.i + +__hugr__.__tk2_qalloc.208.exit.4.i: ; preds = %cond_exit_20.3.i + tail call void @___reset(i64 %qalloc.i.4.i) + %18 = load i64, ptr %2, align 4 + %19 = and i64 %18, 16 + %.not304.i = icmp eq i64 %19, 0 + br i1 %.not304.i, label %panic.i.i, label %cond_exit_20.4.i + +cond_exit_20.4.i: ; preds = %__hugr__.__tk2_qalloc.208.exit.4.i + %20 = and i64 %18, -17 + store i64 %20, ptr %2, align 4 + %21 = getelementptr inbounds nuw i8, ptr %1, i64 32 + store i64 %qalloc.i.4.i, ptr %21, align 4 + %qalloc.i.5.i = tail call i64 @___qalloc() + %not_max.not.not.i.5.i = icmp eq i64 %qalloc.i.5.i, -1 + br i1 %not_max.not.not.i.5.i, label %cond_236_case_0.i.i, label %__hugr__.__tk2_qalloc.208.exit.5.i + +__hugr__.__tk2_qalloc.208.exit.5.i: ; preds = %cond_exit_20.4.i + tail call void @___reset(i64 %qalloc.i.5.i) + %22 = load i64, ptr %2, align 4 + %23 = and i64 %22, 32 + %.not305.i = icmp eq i64 %23, 0 + br i1 %.not305.i, label %panic.i.i, label %cond_exit_20.5.i + +cond_exit_20.5.i: ; preds = %__hugr__.__tk2_qalloc.208.exit.5.i + %24 = and i64 %22, -33 + store i64 %24, ptr %2, align 4 + %25 = getelementptr inbounds nuw i8, ptr %1, i64 40 + store i64 %qalloc.i.5.i, ptr %25, align 4 + %qalloc.i.6.i = tail call i64 @___qalloc() + %not_max.not.not.i.6.i = icmp eq i64 %qalloc.i.6.i, -1 + br i1 %not_max.not.not.i.6.i, label %cond_236_case_0.i.i, label %__hugr__.__tk2_qalloc.208.exit.6.i + +__hugr__.__tk2_qalloc.208.exit.6.i: ; preds = %cond_exit_20.5.i + tail call void @___reset(i64 %qalloc.i.6.i) + %26 = load i64, ptr %2, align 4 + %27 = and i64 %26, 64 + %.not306.i = icmp eq i64 %27, 0 + br i1 %.not306.i, label %panic.i.i, label %cond_exit_20.6.i + +cond_exit_20.6.i: ; preds = %__hugr__.__tk2_qalloc.208.exit.6.i + %28 = and i64 %26, -65 + store i64 %28, ptr %2, align 4 + %29 = getelementptr inbounds nuw i8, ptr %1, i64 48 + store i64 %qalloc.i.6.i, ptr %29, align 4 + %qalloc.i.7.i = tail call i64 @___qalloc() + %not_max.not.not.i.7.i = icmp eq i64 %qalloc.i.7.i, -1 + br i1 %not_max.not.not.i.7.i, label %cond_236_case_0.i.i, label %__hugr__.__tk2_qalloc.208.exit.7.i + +__hugr__.__tk2_qalloc.208.exit.7.i: ; preds = %cond_exit_20.6.i + tail call void @___reset(i64 %qalloc.i.7.i) + %30 = load i64, ptr %2, align 4 + %31 = and i64 %30, 128 + %.not307.i = icmp eq i64 %31, 0 + br i1 %.not307.i, label %panic.i.i, label %cond_exit_20.7.i + +cond_exit_20.7.i: ; preds = %__hugr__.__tk2_qalloc.208.exit.7.i + %32 = and i64 %30, -129 + store i64 %32, ptr %2, align 4 + %33 = getelementptr inbounds nuw i8, ptr %1, i64 56 + store i64 %qalloc.i.7.i, ptr %33, align 4 + %qalloc.i.8.i = tail call i64 @___qalloc() + %not_max.not.not.i.8.i = icmp eq i64 %qalloc.i.8.i, -1 + br i1 %not_max.not.not.i.8.i, label %cond_236_case_0.i.i, label %__hugr__.__tk2_qalloc.208.exit.8.i + +__hugr__.__tk2_qalloc.208.exit.8.i: ; preds = %cond_exit_20.7.i + tail call void @___reset(i64 %qalloc.i.8.i) + %34 = load i64, ptr %2, align 4 + %35 = and i64 %34, 256 + %.not308.i = icmp eq i64 %35, 0 + br i1 %.not308.i, label %panic.i.i, label %cond_exit_20.8.i + +cond_exit_20.8.i: ; preds = %__hugr__.__tk2_qalloc.208.exit.8.i + %36 = and i64 %34, -257 + store i64 %36, ptr %2, align 4 + %37 = getelementptr inbounds nuw i8, ptr %1, i64 64 + store i64 %qalloc.i.8.i, ptr %37, align 4 + %qalloc.i.9.i = tail call i64 @___qalloc() + %not_max.not.not.i.9.i = icmp eq i64 %qalloc.i.9.i, -1 + br i1 %not_max.not.not.i.9.i, label %cond_236_case_0.i.i, label %__barray_check_bounds.exit.9.i + +__barray_check_bounds.exit.9.i: ; preds = %cond_exit_20.8.i + tail call void @___reset(i64 %qalloc.i.9.i) + %38 = load i64, ptr %2, align 4 + %39 = and i64 %38, 512 + %.not309.i = icmp eq i64 %39, 0 + br i1 %.not309.i, label %panic.i.i, label %cond_exit_20.9.i + +cond_exit_20.9.i: ; preds = %__barray_check_bounds.exit.9.i + %40 = and i64 %38, -513 + store i64 %40, ptr %2, align 4 + %41 = getelementptr inbounds nuw i8, ptr %1, i64 72 + store i64 %qalloc.i.9.i, ptr %41, align 4 + %"128.fca.0.insert.i" = insertvalue { ptr, ptr, i64 } poison, ptr %1, 0 + %"128.fca.1.insert.i" = insertvalue { ptr, ptr, i64 } %"128.fca.0.insert.i", ptr %2, 1 + %"128.fca.2.insert.i" = insertvalue { ptr, ptr, i64 } %"128.fca.1.insert.i", i64 0, 2 + %42 = load i64, ptr %2, align 4 + %43 = trunc i64 %42 to i1 + br i1 %43, label %panic.i257.i, label %__barray_mask_borrow.exit.i + +panic.i257.i: ; preds = %cond_exit_20.9.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -cond_exit_20.i: ; preds = %__barray_check_bounds.exit.i - %.fca.1.extract.i.i = extractvalue { i1, i64 } %7, 1 - %13 = xor i64 %10, %11 - store i64 %13, i64* %9, align 4 - %14 = getelementptr inbounds i64, i64* %2, i64 %"15_0.sroa.0.0294.i" - store i64 %.fca.1.extract.i.i, i64* %14, align 4 - %exitcond.not.i = icmp eq i64 %5, 10 - br i1 %exitcond.not.i, label %loop_out.i, label %cond_20_case_1.i - -loop_out.i: ; preds = %cond_exit_20.i - %15 = load i64, i64* %4, align 4 - %16 = and i64 %15, 1 - %.not.i258.i = icmp eq i64 %16, 0 - br i1 %.not.i258.i, label %__barray_mask_borrow.exit.i, label %panic.i259.i - -panic.i259.i: ; preds = %loop_out.i - tail call void @panic(i32 1002, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @"e_Array elem.E746B1A3.0", i64 0, i64 0)) - unreachable +__barray_mask_borrow.exit.i: ; preds = %cond_exit_20.9.i + %44 = or disjoint i64 %42, 1 + store i64 %44, ptr %2, align 4 + %45 = load i64, ptr %1, align 4 + tail call void @___rxy(i64 %45, double 0x400921FB54442D18, double 0.000000e+00) + %46 = load i64, ptr %2, align 4 + %47 = trunc i64 %46 to i1 + br i1 %47, label %__barray_mask_return.exit259.i, label %panic.i258.i -__barray_mask_borrow.exit.i: ; preds = %loop_out.i - %17 = xor i64 %15, 1 - store i64 %17, i64* %4, align 4 - %18 = load i64, i64* %2, align 4 - tail call void @___rxy(i64 %18, double 0x400921FB54442D18, double 0.000000e+00) - %19 = load i64, i64* %4, align 4 - %20 = and i64 %19, 1 - %.not.i260.i = icmp eq i64 %20, 0 - br i1 %.not.i260.i, label %panic.i261.i, label %__barray_mask_return.exit262.i - -panic.i261.i: ; preds = %__barray_mask_borrow.exit.i - tail call void @panic(i32 1002, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @"e_Array alre.5A300C2A.0", i64 0, i64 0)) +panic.i258.i: ; preds = %__barray_mask_borrow.exit.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_mask_return.exit262.i: ; preds = %__barray_mask_borrow.exit.i - %21 = xor i64 %19, 1 - store i64 %21, i64* %4, align 4 - store i64 %18, i64* %2, align 4 - %22 = load i64, i64* %4, align 4 - %23 = and i64 %22, 4 - %.not.i263.i = icmp eq i64 %23, 0 - br i1 %.not.i263.i, label %__barray_mask_borrow.exit265.i, label %panic.i264.i - -panic.i264.i: ; preds = %__barray_mask_return.exit262.i - tail call void @panic(i32 1002, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @"e_Array elem.E746B1A3.0", i64 0, i64 0)) +__barray_mask_return.exit259.i: ; preds = %__barray_mask_borrow.exit.i + %48 = and i64 %46, -2 + store i64 %48, ptr %2, align 4 + store i64 %45, ptr %1, align 4 + %49 = load i64, ptr %2, align 4 + %50 = and i64 %49, 4 + %.not.i = icmp eq i64 %50, 0 + br i1 %.not.i, label %__barray_mask_borrow.exit261.i, label %panic.i260.i + +panic.i260.i: ; preds = %__barray_mask_return.exit259.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_mask_borrow.exit265.i: ; preds = %__barray_mask_return.exit262.i - %24 = xor i64 %22, 4 - store i64 %24, i64* %4, align 4 - %25 = getelementptr inbounds i8, i8* %1, i64 16 - %26 = bitcast i8* %25 to i64* - %27 = load i64, i64* %26, align 4 - tail call void @___rxy(i64 %27, double 0x400921FB54442D18, double 0.000000e+00) - %28 = load i64, i64* %4, align 4 - %29 = and i64 %28, 4 - %.not.i266.i = icmp eq i64 %29, 0 - br i1 %.not.i266.i, label %panic.i267.i, label %__barray_mask_return.exit268.i - -panic.i267.i: ; preds = %__barray_mask_borrow.exit265.i - tail call void @panic(i32 1002, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @"e_Array alre.5A300C2A.0", i64 0, i64 0)) +__barray_mask_borrow.exit261.i: ; preds = %__barray_mask_return.exit259.i + %51 = or disjoint i64 %49, 4 + store i64 %51, ptr %2, align 4 + %52 = load i64, ptr %13, align 4 + tail call void @___rxy(i64 %52, double 0x400921FB54442D18, double 0.000000e+00) + %53 = load i64, ptr %2, align 4 + %54 = and i64 %53, 4 + %.not289.i = icmp eq i64 %54, 0 + br i1 %.not289.i, label %panic.i262.i, label %__barray_mask_return.exit263.i + +panic.i262.i: ; preds = %__barray_mask_borrow.exit261.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_mask_return.exit268.i: ; preds = %__barray_mask_borrow.exit265.i - %30 = xor i64 %28, 4 - store i64 %30, i64* %4, align 4 - store i64 %27, i64* %26, align 4 - %31 = load i64, i64* %4, align 4 - %32 = and i64 %31, 8 - %.not.i269.i = icmp eq i64 %32, 0 - br i1 %.not.i269.i, label %__barray_mask_borrow.exit271.i, label %panic.i270.i - -panic.i270.i: ; preds = %__barray_mask_return.exit268.i - tail call void @panic(i32 1002, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @"e_Array elem.E746B1A3.0", i64 0, i64 0)) +__barray_mask_return.exit263.i: ; preds = %__barray_mask_borrow.exit261.i + %55 = and i64 %53, -5 + store i64 %55, ptr %2, align 4 + store i64 %52, ptr %13, align 4 + %56 = load i64, ptr %2, align 4 + %57 = and i64 %56, 8 + %.not290.i = icmp eq i64 %57, 0 + br i1 %.not290.i, label %__barray_mask_borrow.exit265.i, label %panic.i264.i + +panic.i264.i: ; preds = %__barray_mask_return.exit263.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_mask_borrow.exit271.i: ; preds = %__barray_mask_return.exit268.i - %33 = xor i64 %31, 8 - store i64 %33, i64* %4, align 4 - %34 = getelementptr inbounds i8, i8* %1, i64 24 - %35 = bitcast i8* %34 to i64* - %36 = load i64, i64* %35, align 4 - tail call void @___rxy(i64 %36, double 0x400921FB54442D18, double 0.000000e+00) - %37 = load i64, i64* %4, align 4 - %38 = and i64 %37, 8 - %.not.i272.i = icmp eq i64 %38, 0 - br i1 %.not.i272.i, label %panic.i273.i, label %__barray_mask_return.exit274.i - -panic.i273.i: ; preds = %__barray_mask_borrow.exit271.i - tail call void @panic(i32 1002, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @"e_Array alre.5A300C2A.0", i64 0, i64 0)) +__barray_mask_borrow.exit265.i: ; preds = %__barray_mask_return.exit263.i + %58 = or disjoint i64 %56, 8 + store i64 %58, ptr %2, align 4 + %59 = load i64, ptr %17, align 4 + tail call void @___rxy(i64 %59, double 0x400921FB54442D18, double 0.000000e+00) + %60 = load i64, ptr %2, align 4 + %61 = and i64 %60, 8 + %.not291.i = icmp eq i64 %61, 0 + br i1 %.not291.i, label %panic.i266.i, label %__barray_mask_return.exit267.i + +panic.i266.i: ; preds = %__barray_mask_borrow.exit265.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_mask_return.exit274.i: ; preds = %__barray_mask_borrow.exit271.i - %39 = xor i64 %37, 8 - store i64 %39, i64* %4, align 4 - store i64 %36, i64* %35, align 4 - %40 = load i64, i64* %4, align 4 - %41 = and i64 %40, 512 - %.not.i275.i = icmp eq i64 %41, 0 - br i1 %.not.i275.i, label %__barray_mask_borrow.exit277.i, label %panic.i276.i - -panic.i276.i: ; preds = %__barray_mask_return.exit274.i - tail call void @panic(i32 1002, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @"e_Array elem.E746B1A3.0", i64 0, i64 0)) +__barray_mask_return.exit267.i: ; preds = %__barray_mask_borrow.exit265.i + %62 = and i64 %60, -9 + store i64 %62, ptr %2, align 4 + store i64 %59, ptr %17, align 4 + %63 = load i64, ptr %2, align 4 + %64 = and i64 %63, 512 + %.not292.i = icmp eq i64 %64, 0 + br i1 %.not292.i, label %__barray_mask_borrow.exit269.i, label %panic.i268.i + +panic.i268.i: ; preds = %__barray_mask_return.exit267.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_mask_borrow.exit277.i: ; preds = %__barray_mask_return.exit274.i - %42 = xor i64 %40, 512 - store i64 %42, i64* %4, align 4 - %43 = getelementptr inbounds i8, i8* %1, i64 72 - %44 = bitcast i8* %43 to i64* - %45 = load i64, i64* %44, align 4 - tail call void @___rxy(i64 %45, double 0x400921FB54442D18, double 0.000000e+00) - %46 = load i64, i64* %4, align 4 - %47 = and i64 %46, 512 - %.not.i278.i = icmp eq i64 %47, 0 - br i1 %.not.i278.i, label %panic.i279.i, label %__barray_mask_return.exit280.i - -panic.i279.i: ; preds = %__barray_mask_borrow.exit277.i - tail call void @panic(i32 1002, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @"e_Array alre.5A300C2A.0", i64 0, i64 0)) +__barray_mask_borrow.exit269.i: ; preds = %__barray_mask_return.exit267.i + %65 = or disjoint i64 %63, 512 + store i64 %65, ptr %2, align 4 + %66 = load i64, ptr %41, align 4 + tail call void @___rxy(i64 %66, double 0x400921FB54442D18, double 0.000000e+00) + %67 = load i64, ptr %2, align 4 + %68 = and i64 %67, 512 + %.not293.i = icmp eq i64 %68, 0 + br i1 %.not293.i, label %panic.i270.i, label %__barray_mask_return.exit271.i + +panic.i270.i: ; preds = %__barray_mask_borrow.exit269.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_mask_return.exit280.i: ; preds = %__barray_mask_borrow.exit277.i - %48 = xor i64 %46, 512 - store i64 %48, i64* %4, align 4 - store i64 %45, i64* %44, align 4 - %49 = tail call i8* @heap_alloc(i64 240) - %50 = bitcast i8* %49 to { i1, i64, i1 }* - %51 = tail call i8* @heap_alloc(i64 8) - %52 = bitcast i8* %51 to i64* - store i64 -1, i64* %52, align 1 - br label %56 - -mask_block_ok.i.i.i.i: ; preds = %cond_exit_353.i.i - %53 = load i64, i64* %4, align 4 - %54 = or i64 %53, -1024 - store i64 %54, i64* %4, align 4 - %55 = icmp eq i64 %54, -1 - br i1 %55, label %"__hugr__.$measure_array$$n(10).277.exit.i", label %mask_block_err.i.i.i.i - -"__hugr__.$measure_array$$n(10).277.exit.i": ; preds = %mask_block_ok.i.i.i.i - tail call void @heap_free(i8* nonnull %1) - tail call void @heap_free(i8* nonnull %3) - br label %__barray_check_bounds.exit283.i +__barray_mask_return.exit271.i: ; preds = %__barray_mask_borrow.exit269.i + %69 = and i64 %67, -513 + store i64 %69, ptr %2, align 4 + store i64 %66, ptr %41, align 4 + %70 = insertvalue { { ptr, ptr, i64 }, i64 } poison, { ptr, ptr, i64 } %"128.fca.2.insert.i", 0 + %71 = tail call ptr @heap_alloc(i64 240) + %72 = tail call ptr @heap_alloc(i64 8) + store i64 -1, ptr %72, align 1 + br label %__barray_check_bounds.exit.i.i.i + +73: ; preds = %loop_body.i.i + %74 = lshr i64 %.fca.2.extract83.i.i.i, 6 + %75 = getelementptr i64, ptr %.fca.1.extract82.i.i.i, i64 %74 + %76 = load i64, ptr %75, align 4 + %77 = and i64 %.fca.2.extract83.i.i.i, 63 + %78 = sub nuw nsw i64 64, %77 + %79 = lshr i64 -1, %78 + %80 = icmp eq i64 %77, 0 + %81 = select i1 %80, i64 0, i64 %79 + %82 = or i64 %76, %81 + store i64 %82, ptr %75, align 4 + %last_valid.i.i.i.i = add i64 %.fca.2.extract83.i.i.i, 9 + %83 = lshr i64 %last_valid.i.i.i.i, 6 + %84 = getelementptr inbounds nuw i64, ptr %.fca.1.extract82.i.i.i, i64 %83 + %85 = load i64, ptr %84, align 4 + %86 = and i64 %last_valid.i.i.i.i, 63 + %87 = shl nsw i64 -2, %86 + %88 = icmp eq i64 %86, 63 + %89 = select i1 %88, i64 0, i64 %87 + %90 = or i64 %85, %89 + store i64 %90, ptr %84, align 4 + %reass.sub.i.i.i.i = sub nsw i64 %83, %74 + %.not.i.i.i.i = icmp eq i64 %reass.sub.i.i.i.i, -1 + br i1 %.not.i.i.i.i, label %"__hugr__.$measure_array$$n(10).277.exit.i", label %mask_block_ok.i.i.i.i + +91: ; preds = %mask_block_ok.i.i.i.i + %92 = add nuw i64 %.02.i.i.i.i, 1 + %exitcond.not.i.i.i.i = icmp eq i64 %.02.i.i.i.i, %reass.sub.i.i.i.i + br i1 %exitcond.not.i.i.i.i, label %"__hugr__.$measure_array$$n(10).277.exit.i", label %mask_block_ok.i.i.i.i + +mask_block_ok.i.i.i.i: ; preds = %73, %91 + %.02.i.i.i.i = phi i64 [ %92, %91 ], [ 0, %73 ] + %gep.i.i.i.i = getelementptr i64, ptr %75, i64 %.02.i.i.i.i + %93 = load i64, ptr %gep.i.i.i.i, align 4 + %94 = icmp eq i64 %93, -1 + br i1 %94, label %91, label %mask_block_err.i.i.i.i mask_block_err.i.i.i.i: ; preds = %mask_block_ok.i.i.i.i - tail call void @panic(i32 1002, i8* getelementptr inbounds ([70 x i8], [70 x i8]* @"e_Array cont.EFA5AC45.0", i64 0, i64 0)) + tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -56: ; preds = %cond_exit_353.i.i, %__barray_mask_return.exit280.i - %"303_0.sroa.15.0.i296.i" = phi i64 [ 0, %__barray_mask_return.exit280.i ], [ %57, %cond_exit_353.i.i ] - %57 = add nuw nsw i64 %"303_0.sroa.15.0.i296.i", 1 - %58 = lshr i64 %"303_0.sroa.15.0.i296.i", 6 - %59 = getelementptr inbounds i64, i64* %4, i64 %58 - %60 = load i64, i64* %59, align 4 - %61 = shl nuw nsw i64 1, %"303_0.sroa.15.0.i296.i" - %62 = and i64 %60, %61 - %.not.i99.i.i.i = icmp eq i64 %62, 0 - br i1 %.not.i99.i.i.i, label %__barray_check_bounds.exit.i.i, label %panic.i.i.i.i - -panic.i.i.i.i: ; preds = %56 - tail call void @panic(i32 1002, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @"e_Array elem.E746B1A3.0", i64 0, i64 0)) +__barray_check_bounds.exit.i.i.i: ; preds = %loop_body.i.i, %__barray_mask_return.exit271.i + %.fca.2.extract83.i187.i.i = phi i64 [ 0, %__barray_mask_return.exit271.i ], [ %.fca.2.extract83.i.i.i, %loop_body.i.i ] + %.fca.1.extract82.i186.i.i = phi ptr [ %2, %__barray_mask_return.exit271.i ], [ %.fca.1.extract82.i.i.i, %loop_body.i.i ] + %.fca.0.extract81.i185.i.i = phi ptr [ %1, %__barray_mask_return.exit271.i ], [ %.fca.0.extract81.i.i.i, %loop_body.i.i ] + %"303_0.sroa.15.0184.i.i" = phi i64 [ 0, %__barray_mask_return.exit271.i ], [ %95, %loop_body.i.i ] + %.pn165183.i.i = phi { { ptr, ptr, i64 }, i64 } [ %70, %__barray_mask_return.exit271.i ], [ %110, %loop_body.i.i ] + %95 = add nuw nsw i64 %"303_0.sroa.15.0184.i.i", 1 + %96 = add i64 %"303_0.sroa.15.0184.i.i", %.fca.2.extract83.i187.i.i + %97 = lshr i64 %96, 6 + %98 = getelementptr inbounds nuw i64, ptr %.fca.1.extract82.i186.i.i, i64 %97 + %99 = load i64, ptr %98, align 4 + %100 = and i64 %96, 63 + %101 = lshr i64 %99, %100 + %102 = trunc i64 %101 to i1 + br i1 %102, label %panic.i.i.i.i, label %__barray_check_bounds.exit.i.i + +panic.i.i.i.i: ; preds = %__barray_check_bounds.exit.i.i.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_check_bounds.exit.i.i: ; preds = %56 - %63 = xor i64 %60, %61 - store i64 %63, i64* %59, align 4 - %64 = getelementptr inbounds i64, i64* %2, i64 %"303_0.sroa.15.0.i296.i" - %65 = load i64, i64* %64, align 4 - %lazy_measure.i.i = tail call i64 @___lazy_measure(i64 %65) - tail call void @___qfree(i64 %65) - %66 = getelementptr inbounds i64, i64* %52, i64 %58 - %67 = load i64, i64* %66, align 4 - %68 = and i64 %67, %61 - %.not.i.i.i = icmp eq i64 %68, 0 - br i1 %.not.i.i.i, label %panic.i.i.i, label %cond_exit_353.i.i +__barray_check_bounds.exit.i.i: ; preds = %__barray_check_bounds.exit.i.i.i + %103 = shl nuw i64 1, %100 + %104 = xor i64 %103, %99 + store i64 %104, ptr %98, align 4 + %105 = getelementptr inbounds i64, ptr %.fca.0.extract81.i185.i.i, i64 %96 + %106 = load i64, ptr %105, align 4 + %lazy_measure.i.i = tail call i64 @___lazy_measure(i64 %106) + tail call void @___qfree(i64 %106) + %107 = load i64, ptr %72, align 4 + %108 = lshr i64 %107, %"303_0.sroa.15.0184.i.i" + %109 = trunc i64 %108 to i1 + br i1 %109, label %loop_body.i.i, label %panic.i.i.i panic.i.i.i: ; preds = %__barray_check_bounds.exit.i.i - tail call void @panic(i32 1002, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @"e_Array alre.5A300C2A.0", i64 0, i64 0)) + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -cond_exit_353.i.i: ; preds = %__barray_check_bounds.exit.i.i - %"367_054.fca.1.insert.i.i" = insertvalue { i1, i64, i1 } { i1 true, i64 poison, i1 poison }, i64 %lazy_measure.i.i, 1 - %69 = xor i64 %67, %61 - store i64 %69, i64* %66, align 4 - %70 = getelementptr inbounds { i1, i64, i1 }, { i1, i64, i1 }* %50, i64 %"303_0.sroa.15.0.i296.i" - store { i1, i64, i1 } %"367_054.fca.1.insert.i.i", { i1, i64, i1 }* %70, align 4 - %exitcond297.not.i = icmp eq i64 %57, 10 - br i1 %exitcond297.not.i, label %mask_block_ok.i.i.i.i, label %56 - -cond_87_case_0.i: ; preds = %cond_exit_87.i - %71 = load i64, i64* %52, align 4 - %72 = or i64 %71, -1024 - store i64 %72, i64* %52, align 4 - %73 = icmp eq i64 %72, -1 - br i1 %73, label %__hugr__.main.1.exit, label %mask_block_err.i.i +loop_body.i.i: ; preds = %__barray_check_bounds.exit.i.i + %"367_054.fca.1.insert.i.i" = insertvalue { i1, i64, i1 } { i1 true, i64 poison, i1 undef }, i64 %lazy_measure.i.i, 1 + %"367_054.fca.2.insert.i.i" = insertvalue { i1, i64, i1 } %"367_054.fca.1.insert.i.i", i1 undef, 2 + %110 = insertvalue { { ptr, ptr, i64 }, i64 } %.pn165183.i.i, i64 %95, 1 + %111 = shl nuw nsw i64 1, %"303_0.sroa.15.0184.i.i" + %112 = xor i64 %107, %111 + store i64 %112, ptr %72, align 4 + %113 = getelementptr inbounds nuw { i1, i64, i1 }, ptr %71, i64 %"303_0.sroa.15.0184.i.i" + store { i1, i64, i1 } %"367_054.fca.2.insert.i.i", ptr %113, align 4 + %114 = extractvalue { { ptr, ptr, i64 }, i64 } %.pn165183.i.i, 0 + %.fca.0.extract81.i.i.i = extractvalue { ptr, ptr, i64 } %114, 0 + %.fca.1.extract82.i.i.i = extractvalue { ptr, ptr, i64 } %114, 1 + %.fca.2.extract83.i.i.i = extractvalue { ptr, ptr, i64 } %114, 2 + %exitcond.not.i.i = icmp eq i64 %95, 10 + br i1 %exitcond.not.i.i, label %73, label %__barray_check_bounds.exit.i.i.i + +"__hugr__.$measure_array$$n(10).277.exit.i": ; preds = %91, %73 + tail call void @heap_free(ptr %.fca.0.extract81.i.i.i) + tail call void @heap_free(ptr nonnull %.fca.1.extract82.i.i.i) + br label %__barray_check_bounds.exit274.i + +cond_87_case_0.i: ; preds = %cond_exit_87.thread.i + %115 = load i64, ptr %72, align 4 + %116 = or i64 %115, -1024 + store i64 %116, ptr %72, align 4 + %117 = icmp eq i64 %116, -1 + br i1 %117, label %__hugr__.main.1.exit, label %mask_block_err.i.i mask_block_err.i.i: ; preds = %cond_87_case_0.i - tail call void @panic(i32 1002, i8* getelementptr inbounds ([70 x i8], [70 x i8]* @"e_Array cont.EFA5AC45.0", i64 0, i64 0)) + tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_check_bounds.exit283.i: ; preds = %"__hugr__.$measure_array$$n(10).277.exit.i", %cond_exit_87.i - %"90_0.0.i1" = phi i64 [ 0, %"__hugr__.$measure_array$$n(10).277.exit.i" ], [ %74, %cond_exit_87.i ] - %74 = add nuw nsw i64 %"90_0.0.i1", 1 - %75 = lshr i64 %"90_0.0.i1", 6 - %76 = getelementptr inbounds i64, i64* %52, i64 %75 - %77 = load i64, i64* %76, align 4 - %78 = shl nuw nsw i64 1, %"90_0.0.i1" - %79 = and i64 %77, %78 - %.not.i = icmp eq i64 %79, 0 - br i1 %.not.i, label %__barray_mask_borrow.exit288.i, label %cond_exit_87.i - -__barray_mask_borrow.exit288.i: ; preds = %__barray_check_bounds.exit283.i - %80 = xor i64 %77, %78 - store i64 %80, i64* %76, align 4 - %81 = getelementptr inbounds { i1, i64, i1 }, { i1, i64, i1 }* %50, i64 %"90_0.0.i1" - %82 = load { i1, i64, i1 }, { i1, i64, i1 }* %81, align 4 - %.fca.0.extract179.i = extractvalue { i1, i64, i1 } %82, 0 - br i1 %.fca.0.extract179.i, label %cond_390_case_1.i, label %cond_exit_87.i - -cond_exit_87.i: ; preds = %cond_390_case_1.i, %__barray_mask_borrow.exit288.i, %__barray_check_bounds.exit283.i - %exitcond.not = icmp eq i64 %74, 10 - br i1 %exitcond.not, label %cond_87_case_0.i, label %__barray_check_bounds.exit283.i - -cond_390_case_1.i: ; preds = %__barray_mask_borrow.exit288.i - %.fca.1.extract.i = extractvalue { i1, i64, i1 } %82, 1 +__barray_check_bounds.exit274.i: ; preds = %cond_exit_87.thread.i, %"__hugr__.$measure_array$$n(10).277.exit.i" + %"90_0.0300.i" = phi i64 [ 0, %"__hugr__.$measure_array$$n(10).277.exit.i" ], [ %118, %cond_exit_87.thread.i ] + %118 = add nuw nsw i64 %"90_0.0300.i", 1 + %119 = load i64, ptr %72, align 4 + %120 = lshr i64 %119, %"90_0.0300.i" + %121 = trunc i64 %120 to i1 + br i1 %121, label %cond_exit_87.thread.i, label %__barray_mask_borrow.exit278.i + +__barray_mask_borrow.exit278.i: ; preds = %__barray_check_bounds.exit274.i + %122 = shl nuw nsw i64 1, %"90_0.0300.i" + %123 = xor i64 %119, %122 + store i64 %123, ptr %72, align 4 + %124 = getelementptr inbounds nuw { i1, i64, i1 }, ptr %71, i64 %"90_0.0300.i" + %125 = load { i1, i64, i1 }, ptr %124, align 4 + %.fca.0.extract179.i = extractvalue { i1, i64, i1 } %125, 0 + br i1 %.fca.0.extract179.i, label %cond_390_case_1.i, label %cond_exit_87.thread.i + +cond_exit_87.thread.i: ; preds = %cond_390_case_1.i, %__barray_mask_borrow.exit278.i, %__barray_check_bounds.exit274.i + %exitcond.i = icmp eq i64 %118, 10 + br i1 %exitcond.i, label %cond_87_case_0.i, label %__barray_check_bounds.exit274.i + +cond_390_case_1.i: ; preds = %__barray_mask_borrow.exit278.i + %.fca.1.extract.i = extractvalue { i1, i64, i1 } %125, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.i) - br label %cond_exit_87.i + br label %cond_exit_87.thread.i __hugr__.main.1.exit: ; preds = %cond_87_case_0.i - tail call void @heap_free(i8* %49) - tail call void @heap_free(i8* nonnull %51) - %83 = tail call i64 @teardown() - ret i64 %83 + tail call void @heap_free(ptr %71) + tail call void @heap_free(ptr nonnull %72) + %126 = tail call i64 @teardown() + ret i64 %126 } declare void @setup(i64) local_unnamed_addr diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-no_results/no_results_aarch64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-no_results/no_results_aarch64-apple-darwin index a7d8d58c5..50ddd8eca 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-no_results/no_results_aarch64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-no_results/no_results_aarch64-apple-darwin @@ -1,6 +1,6 @@ ; ModuleID = 'hugr' source_filename = "hugr" -target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128" +target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-n32:64-S128-Fn32" target triple = "aarch64-apple-darwin" @"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." @@ -16,7 +16,7 @@ declare i64 @___qalloc() local_unnamed_addr declare void @___reset(i64) local_unnamed_addr ; Function Attrs: noreturn -declare void @panic(i32, i8*) local_unnamed_addr #0 +declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @___rxy(i64, double, double) local_unnamed_addr @@ -26,32 +26,22 @@ define i64 @qmain(i64 %0) local_unnamed_addr { entry: tail call void @setup(i64 %0) %qalloc.i.i = tail call i64 @___qalloc() - %not_max.not.i.i = icmp eq i64 %qalloc.i.i, -1 - br i1 %not_max.not.i.i, label %id_bb.i.i, label %reset_bb.i.i + %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 + br i1 %not_max.not.not.i.i, label %cond_18_case_0.i.i, label %__hugr__.bar.1.exit -reset_bb.i.i: ; preds = %entry - tail call void @___reset(i64 %qalloc.i.i) - br label %id_bb.i.i - -id_bb.i.i: ; preds = %reset_bb.i.i, %entry - %1 = insertvalue { i1, i64 } { i1 true, i64 poison }, i64 %qalloc.i.i, 1 - %2 = select i1 %not_max.not.i.i, { i1, i64 } { i1 false, i64 poison }, { i1, i64 } %1 - %.fca.0.extract.i.i = extractvalue { i1, i64 } %2, 0 - br i1 %.fca.0.extract.i.i, label %__hugr__.bar.1.exit, label %cond_18_case_0.i.i - -cond_18_case_0.i.i: ; preds = %id_bb.i.i - tail call void @panic(i32 1001, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @"e_No more qu.3B2EEBF0.0", i64 0, i64 0)) +cond_18_case_0.i.i: ; preds = %entry + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.bar.1.exit: ; preds = %id_bb.i.i - %.fca.1.extract.i.i = extractvalue { i1, i64 } %2, 1 - tail call void @___rxy(i64 %.fca.1.extract.i.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %.fca.1.extract.i.i, double 0x400921FB54442D18) - %lazy_measure.i = tail call i64 @___lazy_measure(i64 %.fca.1.extract.i.i) - tail call void @___qfree(i64 %.fca.1.extract.i.i) +__hugr__.bar.1.exit: ; preds = %entry + tail call void @___reset(i64 %qalloc.i.i) + tail call void @___rxy(i64 %qalloc.i.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) + tail call void @___rz(i64 %qalloc.i.i, double 0x400921FB54442D18) + %lazy_measure.i = tail call i64 @___lazy_measure(i64 %qalloc.i.i) + tail call void @___qfree(i64 %qalloc.i.i) tail call void @___dec_future_refcount(i64 %lazy_measure.i) - %3 = tail call i64 @teardown() - ret i64 %3 + %1 = tail call i64 @teardown() + ret i64 %1 } declare void @setup(i64) local_unnamed_addr diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-postselect_exit/postselect_exit_aarch64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-postselect_exit/postselect_exit_aarch64-apple-darwin index 095ab2b1b..bc31f619e 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-postselect_exit/postselect_exit_aarch64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-postselect_exit/postselect_exit_aarch64-apple-darwin @@ -1,6 +1,6 @@ ; ModuleID = 'hugr' source_filename = "hugr" -target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128" +target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-n32:64-S128-Fn32" target triple = "aarch64-apple-darwin" @e_Postselect.558881BF.0 = private constant [30 x i8] c"\1DEXIT:INT:Postselection failed" @@ -18,9 +18,9 @@ declare i1 @___read_future_bool(i64) local_unnamed_addr declare void @___dec_future_refcount(i64) local_unnamed_addr ; Function Attrs: noreturn -declare void @panic(i32, i8*) local_unnamed_addr #0 +declare void @panic(i32, ptr) local_unnamed_addr #0 -declare void @print_bool(i8*, i64, i1) local_unnamed_addr +declare void @print_bool(ptr, i64, i1) local_unnamed_addr declare i64 @___qalloc() local_unnamed_addr @@ -34,44 +34,34 @@ define i64 @qmain(i64 %0) local_unnamed_addr { entry: tail call void @setup(i64 %0) %qalloc.i.i = tail call i64 @___qalloc() - %not_max.not.i.i = icmp eq i64 %qalloc.i.i, -1 - br i1 %not_max.not.i.i, label %id_bb.i.i, label %reset_bb.i.i + %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 + br i1 %not_max.not.not.i.i, label %cond_39_case_0.i.i, label %__hugr__.__tk2_qalloc.35.exit.i -reset_bb.i.i: ; preds = %entry - tail call void @___reset(i64 %qalloc.i.i) - br label %id_bb.i.i - -id_bb.i.i: ; preds = %reset_bb.i.i, %entry - %1 = insertvalue { i1, i64 } { i1 true, i64 poison }, i64 %qalloc.i.i, 1 - %2 = select i1 %not_max.not.i.i, { i1, i64 } { i1 false, i64 poison }, { i1, i64 } %1 - %.fca.0.extract.i.i = extractvalue { i1, i64 } %2, 0 - br i1 %.fca.0.extract.i.i, label %__hugr__.__tk2_qalloc.35.exit.i, label %cond_39_case_0.i.i - -cond_39_case_0.i.i: ; preds = %id_bb.i.i - tail call void @panic(i32 1001, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @"e_No more qu.3B2EEBF0.0", i64 0, i64 0)) +cond_39_case_0.i.i: ; preds = %entry + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_qalloc.35.exit.i: ; preds = %id_bb.i.i - %.fca.1.extract.i.i = extractvalue { i1, i64 } %2, 1 - tail call void @___rxy(i64 %.fca.1.extract.i.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %.fca.1.extract.i.i, double 0x400921FB54442D18) - %lazy_measure.i = tail call i64 @___lazy_measure(i64 %.fca.1.extract.i.i) - tail call void @___qfree(i64 %.fca.1.extract.i.i) +__hugr__.__tk2_qalloc.35.exit.i: ; preds = %entry + tail call void @___reset(i64 %qalloc.i.i) + tail call void @___rxy(i64 %qalloc.i.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) + tail call void @___rz(i64 %qalloc.i.i, double 0x400921FB54442D18) + %lazy_measure.i = tail call i64 @___lazy_measure(i64 %qalloc.i.i) + tail call void @___qfree(i64 %qalloc.i.i) tail call void @___inc_future_refcount(i64 %lazy_measure.i) %read_bool.i = tail call i1 @___read_future_bool(i64 %lazy_measure.i) tail call void @___dec_future_refcount(i64 %lazy_measure.i) - br i1 %read_bool.i, label %3, label %__hugr__.main.1.exit + br i1 %read_bool.i, label %1, label %__hugr__.main.1.exit -3: ; preds = %__hugr__.__tk2_qalloc.35.exit.i - tail call void @panic(i32 42, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @e_Postselect.558881BF.0, i64 0, i64 0)) +1: ; preds = %__hugr__.__tk2_qalloc.35.exit.i + tail call void @panic(i32 42, ptr nonnull @e_Postselect.558881BF.0) unreachable __hugr__.main.1.exit: ; preds = %__hugr__.__tk2_qalloc.35.exit.i %read_bool63.i = tail call i1 @___read_future_bool(i64 %lazy_measure.i) tail call void @___dec_future_refcount(i64 %lazy_measure.i) - tail call void @print_bool(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @res_c.1C9EF4D1.0, i64 0, i64 0), i64 11, i1 %read_bool63.i) - %4 = tail call i64 @teardown() - ret i64 %4 + tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool63.i) + %2 = tail call i64 @teardown() + ret i64 %2 } declare void @setup(i64) local_unnamed_addr diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-postselect_panic/postselect_panic_aarch64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-postselect_panic/postselect_panic_aarch64-apple-darwin index d0e81f408..06d7895ae 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-postselect_panic/postselect_panic_aarch64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-postselect_panic/postselect_panic_aarch64-apple-darwin @@ -1,6 +1,6 @@ ; ModuleID = 'hugr' source_filename = "hugr" -target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128" +target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-n32:64-S128-Fn32" target triple = "aarch64-apple-darwin" @e_Postselect.558881BF.0 = private constant [30 x i8] c"\1DEXIT:INT:Postselection failed" @@ -18,9 +18,9 @@ declare i1 @___read_future_bool(i64) local_unnamed_addr declare void @___dec_future_refcount(i64) local_unnamed_addr ; Function Attrs: noreturn -declare void @panic(i32, i8*) local_unnamed_addr #0 +declare void @panic(i32, ptr) local_unnamed_addr #0 -declare void @print_bool(i8*, i64, i1) local_unnamed_addr +declare void @print_bool(ptr, i64, i1) local_unnamed_addr declare i64 @___qalloc() local_unnamed_addr @@ -34,44 +34,34 @@ define i64 @qmain(i64 %0) local_unnamed_addr { entry: tail call void @setup(i64 %0) %qalloc.i.i = tail call i64 @___qalloc() - %not_max.not.i.i = icmp eq i64 %qalloc.i.i, -1 - br i1 %not_max.not.i.i, label %id_bb.i.i, label %reset_bb.i.i + %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 + br i1 %not_max.not.not.i.i, label %cond_39_case_0.i.i, label %__hugr__.__tk2_qalloc.35.exit.i -reset_bb.i.i: ; preds = %entry - tail call void @___reset(i64 %qalloc.i.i) - br label %id_bb.i.i - -id_bb.i.i: ; preds = %reset_bb.i.i, %entry - %1 = insertvalue { i1, i64 } { i1 true, i64 poison }, i64 %qalloc.i.i, 1 - %2 = select i1 %not_max.not.i.i, { i1, i64 } { i1 false, i64 poison }, { i1, i64 } %1 - %.fca.0.extract.i.i = extractvalue { i1, i64 } %2, 0 - br i1 %.fca.0.extract.i.i, label %__hugr__.__tk2_qalloc.35.exit.i, label %cond_39_case_0.i.i - -cond_39_case_0.i.i: ; preds = %id_bb.i.i - tail call void @panic(i32 1001, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @"e_No more qu.3B2EEBF0.0", i64 0, i64 0)) +cond_39_case_0.i.i: ; preds = %entry + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_qalloc.35.exit.i: ; preds = %id_bb.i.i - %.fca.1.extract.i.i = extractvalue { i1, i64 } %2, 1 - tail call void @___rxy(i64 %.fca.1.extract.i.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %.fca.1.extract.i.i, double 0x400921FB54442D18) - %lazy_measure.i = tail call i64 @___lazy_measure(i64 %.fca.1.extract.i.i) - tail call void @___qfree(i64 %.fca.1.extract.i.i) +__hugr__.__tk2_qalloc.35.exit.i: ; preds = %entry + tail call void @___reset(i64 %qalloc.i.i) + tail call void @___rxy(i64 %qalloc.i.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) + tail call void @___rz(i64 %qalloc.i.i, double 0x400921FB54442D18) + %lazy_measure.i = tail call i64 @___lazy_measure(i64 %qalloc.i.i) + tail call void @___qfree(i64 %qalloc.i.i) tail call void @___inc_future_refcount(i64 %lazy_measure.i) %read_bool.i = tail call i1 @___read_future_bool(i64 %lazy_measure.i) tail call void @___dec_future_refcount(i64 %lazy_measure.i) - br i1 %read_bool.i, label %3, label %__hugr__.main.1.exit + br i1 %read_bool.i, label %1, label %__hugr__.main.1.exit -3: ; preds = %__hugr__.__tk2_qalloc.35.exit.i - tail call void @panic(i32 1001, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @e_Postselect.558881BF.0, i64 0, i64 0)) +1: ; preds = %__hugr__.__tk2_qalloc.35.exit.i + tail call void @panic(i32 1001, ptr nonnull @e_Postselect.558881BF.0) unreachable __hugr__.main.1.exit: ; preds = %__hugr__.__tk2_qalloc.35.exit.i %read_bool63.i = tail call i1 @___read_future_bool(i64 %lazy_measure.i) tail call void @___dec_future_refcount(i64 %lazy_measure.i) - tail call void @print_bool(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @res_c.1C9EF4D1.0, i64 0, i64 0), i64 11, i1 %read_bool63.i) - %4 = tail call i64 @teardown() - ret i64 %4 + tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool63.i) + %2 = tail call i64 @teardown() + ret i64 %2 } declare void @setup(i64) local_unnamed_addr diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-print_current_shot/print_current_shot_aarch64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-print_current_shot/print_current_shot_aarch64-apple-darwin index dc18fbd80..47a2a4968 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-print_current_shot/print_current_shot_aarch64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-print_current_shot/print_current_shot_aarch64-apple-darwin @@ -1,19 +1,19 @@ ; ModuleID = 'hugr' source_filename = "hugr" -target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128" +target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-n32:64-S128-Fn32" target triple = "aarch64-apple-darwin" @res_shot.6D86EAF7.0 = private constant [14 x i8] c"\0DUSER:INT:shot" declare i64 @get_current_shot() local_unnamed_addr -declare void @print_int(i8*, i64, i64) local_unnamed_addr +declare void @print_int(ptr, i64, i64) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr { entry: tail call void @setup(i64 %0) %shot.i = tail call i64 @get_current_shot() - tail call void @print_int(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @res_shot.6D86EAF7.0, i64 0, i64 0), i64 13, i64 %shot.i) + tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot.i) %1 = tail call i64 @teardown() ret i64 %1 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-rng/rng_aarch64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-rng/rng_aarch64-apple-darwin index 7e9799778..466a4f849 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-rng/rng_aarch64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-rng/rng_aarch64-apple-darwin @@ -1,6 +1,6 @@ ; ModuleID = 'hugr' source_filename = "hugr" -target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128" +target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-n32:64-S128-Fn32" target triple = "aarch64-apple-darwin" @res_rint.B928E41E.0 = private constant [14 x i8] c"\0DUSER:INT:rint" @@ -17,9 +17,9 @@ declare double @random_float() local_unnamed_addr declare i32 @random_rng(i32) local_unnamed_addr -declare void @print_int(i8*, i64, i64) local_unnamed_addr +declare void @print_int(ptr, i64, i64) local_unnamed_addr -declare void @print_float(i8*, i64, double) local_unnamed_addr +declare void @print_float(ptr, i64, double) local_unnamed_addr declare void @random_seed(i64) local_unnamed_addr @@ -34,19 +34,19 @@ entry: %1 = sext i32 %rintb.i to i64 %2 = sext i32 %rint20.i to i64 %3 = sext i32 %rint.i to i64 - tail call void @print_int(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @res_rint.B928E41E.0, i64 0, i64 0), i64 13, i64 %3) - tail call void @print_int(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @res_rint1.0884EC03.0, i64 0, i64 0), i64 14, i64 %2) - tail call void @print_float(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @res_rfloat.F0E4DD2C.0, i64 0, i64 0), i64 17, double %rfloat.i) - tail call void @print_int(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @res_rint_bnd.CB1E6B0D.0, i64 0, i64 0), i64 17, i64 %1) + tail call void @print_int(ptr nonnull @res_rint.B928E41E.0, i64 13, i64 %3) + tail call void @print_int(ptr nonnull @res_rint1.0884EC03.0, i64 14, i64 %2) + tail call void @print_float(ptr nonnull @res_rfloat.F0E4DD2C.0, i64 17, double %rfloat.i) + tail call void @print_int(ptr nonnull @res_rint_bnd.CB1E6B0D.0, i64 17, i64 %1) tail call void @random_seed(i64 84) %rint53.i = tail call i32 @random_int() %rfloat55.i = tail call double @random_float() %rintb58.i = tail call i32 @random_rng(i32 200) %4 = sext i32 %rintb58.i to i64 %5 = sext i32 %rint53.i to i64 - tail call void @print_int(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @res_rint2.F0335598.0, i64 0, i64 0), i64 14, i64 %5) - tail call void @print_float(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @res_rfloat2.4DAB941F.0, i64 0, i64 0), i64 18, double %rfloat55.i) - tail call void @print_int(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @res_rint_bnd2.169DE399.0, i64 0, i64 0), i64 18, i64 %4) + tail call void @print_int(ptr nonnull @res_rint2.F0335598.0, i64 14, i64 %5) + tail call void @print_float(ptr nonnull @res_rfloat2.4DAB941F.0, i64 18, double %rfloat55.i) + tail call void @print_int(ptr nonnull @res_rint_bnd2.169DE399.0, i64 18, i64 %4) %6 = tail call i64 @teardown() ret i64 %6 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-rus/rus_aarch64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-rus/rus_aarch64-apple-darwin index c0bea5117..95ddd2420 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-rus/rus_aarch64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-rus/rus_aarch64-apple-darwin @@ -1,6 +1,6 @@ ; ModuleID = 'hugr' source_filename = "hugr" -target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128" +target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-n32:64-S128-Fn32" target triple = "aarch64-apple-darwin" @res_result.457DE32D.0 = private constant [17 x i8] c"\10USER:BOOL:result" @@ -14,14 +14,14 @@ declare i1 @___read_future_bool(i64) local_unnamed_addr declare void @___dec_future_refcount(i64) local_unnamed_addr -declare void @print_bool(i8*, i64, i1) local_unnamed_addr +declare void @print_bool(ptr, i64, i1) local_unnamed_addr declare i64 @___qalloc() local_unnamed_addr declare void @___reset(i64) local_unnamed_addr ; Function Attrs: noreturn -declare void @panic(i32, i8*) local_unnamed_addr #0 +declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @___rxy(i64, double, double) local_unnamed_addr @@ -33,119 +33,89 @@ define i64 @qmain(i64 %0) local_unnamed_addr { entry: tail call void @setup(i64 %0) %qalloc.i.i = tail call i64 @___qalloc() - %not_max.not.i.i = icmp eq i64 %qalloc.i.i, -1 - br i1 %not_max.not.i.i, label %id_bb.i.i, label %reset_bb.i.i + %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 + br i1 %not_max.not.not.i.i, label %cond_87_case_0.i.i, label %__hugr__.__tk2_qalloc.83.exit.i -reset_bb.i.i: ; preds = %entry - tail call void @___reset(i64 %qalloc.i.i) - br label %id_bb.i.i - -id_bb.i.i: ; preds = %reset_bb.i.i, %entry - %1 = insertvalue { i1, i64 } { i1 true, i64 poison }, i64 %qalloc.i.i, 1 - %2 = select i1 %not_max.not.i.i, { i1, i64 } { i1 false, i64 poison }, { i1, i64 } %1 - %.fca.0.extract.i.i = extractvalue { i1, i64 } %2, 0 - br i1 %.fca.0.extract.i.i, label %__hugr__.__tk2_qalloc.83.exit.i, label %cond_87_case_0.i.i - -cond_87_case_0.i.i: ; preds = %id_bb.i.i - tail call void @panic(i32 1001, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @"e_No more qu.3B2EEBF0.0", i64 0, i64 0)) +cond_87_case_0.i.i: ; preds = %entry + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_qalloc.83.exit.i: ; preds = %id_bb.i.i - %.fca.1.extract.i.i = extractvalue { i1, i64 } %2, 1 - br label %cond_242_case_1.i.i - -cond_242_case_1.i.i: ; preds = %cond_242_case_1.i.i.backedge, %__hugr__.__tk2_qalloc.83.exit.i - %qalloc.i.i.i = tail call i64 @___qalloc() - %not_max.not.i.i.i = icmp eq i64 %qalloc.i.i.i, -1 - br i1 %not_max.not.i.i.i, label %id_bb.i.i.i, label %reset_bb.i.i.i - -reset_bb.i.i.i: ; preds = %cond_242_case_1.i.i - tail call void @___reset(i64 %qalloc.i.i.i) - br label %id_bb.i.i.i - -id_bb.i.i.i: ; preds = %reset_bb.i.i.i, %cond_242_case_1.i.i - %3 = insertvalue { i1, i64 } { i1 true, i64 poison }, i64 %qalloc.i.i.i, 1 - %4 = select i1 %not_max.not.i.i.i, { i1, i64 } { i1 false, i64 poison }, { i1, i64 } %3 - %.fca.0.extract.i.i.i = extractvalue { i1, i64 } %4, 0 - br i1 %.fca.0.extract.i.i.i, label %__hugr__.__tk2_qalloc.97.exit.i.i, label %cond_101_case_0.i.i.i +__hugr__.__tk2_qalloc.83.exit.i: ; preds = %entry + tail call void @___reset(i64 %qalloc.i.i) + %qalloc.i132.i.i = tail call i64 @___qalloc() + %not_max.not.not.i133.i.i = icmp eq i64 %qalloc.i132.i.i, -1 + br i1 %not_max.not.not.i133.i.i, label %cond_101_case_0.i.i.i, label %__hugr__.__tk2_qalloc.97.exit.i.i -cond_101_case_0.i.i.i: ; preds = %id_bb.i.i.i - tail call void @panic(i32 1001, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @"e_No more qu.3B2EEBF0.0", i64 0, i64 0)) +cond_101_case_0.i.i.i: ; preds = %cond_242_case_1.backedge.i.i, %__hugr__.__tk2_qalloc.83.exit.i + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_qalloc.97.exit.i.i: ; preds = %id_bb.i.i.i - %.fca.1.extract.i.i.i = extractvalue { i1, i64 } %4, 1 +__hugr__.__tk2_qalloc.97.exit.i.i: ; preds = %__hugr__.__tk2_qalloc.83.exit.i, %cond_242_case_1.backedge.i.i + %qalloc.i134.i.i = phi i64 [ %qalloc.i.i.i, %cond_242_case_1.backedge.i.i ], [ %qalloc.i132.i.i, %__hugr__.__tk2_qalloc.83.exit.i ] + tail call void @___reset(i64 %qalloc.i134.i.i) %qalloc.i128.i.i = tail call i64 @___qalloc() - %not_max.not.i129.i.i = icmp eq i64 %qalloc.i128.i.i, -1 - br i1 %not_max.not.i129.i.i, label %id_bb.i132.i.i, label %reset_bb.i130.i.i + %not_max.not.not.i129.i.i = icmp eq i64 %qalloc.i128.i.i, -1 + br i1 %not_max.not.not.i129.i.i, label %cond_115_case_0.i.i.i, label %__hugr__.__tk2_qalloc.111.exit.i.i -reset_bb.i130.i.i: ; preds = %__hugr__.__tk2_qalloc.97.exit.i.i - tail call void @___reset(i64 %qalloc.i128.i.i) - br label %id_bb.i132.i.i - -id_bb.i132.i.i: ; preds = %reset_bb.i130.i.i, %__hugr__.__tk2_qalloc.97.exit.i.i - %5 = insertvalue { i1, i64 } { i1 true, i64 poison }, i64 %qalloc.i128.i.i, 1 - %6 = select i1 %not_max.not.i129.i.i, { i1, i64 } { i1 false, i64 poison }, { i1, i64 } %5 - %.fca.0.extract.i131.i.i = extractvalue { i1, i64 } %6, 0 - br i1 %.fca.0.extract.i131.i.i, label %__hugr__.__tk2_qalloc.111.exit.i.i, label %cond_115_case_0.i.i.i - -cond_115_case_0.i.i.i: ; preds = %id_bb.i132.i.i - tail call void @panic(i32 1001, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @"e_No more qu.3B2EEBF0.0", i64 0, i64 0)) +cond_115_case_0.i.i.i: ; preds = %__hugr__.__tk2_qalloc.97.exit.i.i + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_qalloc.111.exit.i.i: ; preds = %id_bb.i132.i.i - %.fca.1.extract.i133.i.i = extractvalue { i1, i64 } %6, 1 - tail call void @___rxy(i64 %.fca.1.extract.i133.i.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %.fca.1.extract.i133.i.i, double 0x400921FB54442D18) - tail call void @___rxy(i64 %.fca.1.extract.i.i.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %.fca.1.extract.i.i.i, double 0x400921FB54442D18) - tail call void @___rz(i64 %.fca.1.extract.i.i.i, double 0xBFE921FB54442D18) - tail call void @___rxy(i64 %.fca.1.extract.i.i.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rzz(i64 %.fca.1.extract.i133.i.i, i64 %.fca.1.extract.i.i.i, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %.fca.1.extract.i133.i.i, double 0xBFF921FB54442D18) - tail call void @___rxy(i64 %.fca.1.extract.i.i.i, double 0x3FF921FB54442D18, double 0x400921FB54442D18) - tail call void @___rz(i64 %.fca.1.extract.i.i.i, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %.fca.1.extract.i.i.i, double 0x3FE921FB54442D18) - %lazy_measure.i.i = tail call i64 @___lazy_measure(i64 %.fca.1.extract.i.i.i) - tail call void @___qfree(i64 %.fca.1.extract.i.i.i) +__hugr__.__tk2_qalloc.111.exit.i.i: ; preds = %__hugr__.__tk2_qalloc.97.exit.i.i + tail call void @___reset(i64 %qalloc.i128.i.i) + tail call void @___rxy(i64 %qalloc.i128.i.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) + tail call void @___rz(i64 %qalloc.i128.i.i, double 0x400921FB54442D18) + tail call void @___rxy(i64 %qalloc.i134.i.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) + tail call void @___rz(i64 %qalloc.i134.i.i, double 0x400921FB54442D18) + tail call void @___rz(i64 %qalloc.i134.i.i, double 0xBFE921FB54442D18) + tail call void @___rxy(i64 %qalloc.i134.i.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) + tail call void @___rzz(i64 %qalloc.i128.i.i, i64 %qalloc.i134.i.i, double 0x3FF921FB54442D18) + tail call void @___rz(i64 %qalloc.i128.i.i, double 0xBFF921FB54442D18) + tail call void @___rxy(i64 %qalloc.i134.i.i, double 0x3FF921FB54442D18, double 0x400921FB54442D18) + tail call void @___rz(i64 %qalloc.i134.i.i, double 0xBFF921FB54442D18) + tail call void @___rz(i64 %qalloc.i134.i.i, double 0x3FE921FB54442D18) + %lazy_measure.i.i = tail call i64 @___lazy_measure(i64 %qalloc.i134.i.i) + tail call void @___qfree(i64 %qalloc.i134.i.i) %read_bool.i.i = tail call i1 @___read_future_bool(i64 %lazy_measure.i.i) tail call void @___dec_future_refcount(i64 %lazy_measure.i.i) - br i1 %read_bool.i.i, label %cond_256_case_1.i.i, label %7 + br i1 %read_bool.i.i, label %cond_256_case_1.i.i, label %1 -7: ; preds = %__hugr__.__tk2_qalloc.111.exit.i.i - tail call void @___qfree(i64 %.fca.1.extract.i133.i.i) - br label %cond_242_case_1.i.i.backedge +1: ; preds = %__hugr__.__tk2_qalloc.111.exit.i.i + tail call void @___qfree(i64 %qalloc.i128.i.i) + br label %cond_242_case_1.backedge.i.i + +cond_242_case_1.backedge.i.i: ; preds = %2, %1 + %qalloc.i.i.i = tail call i64 @___qalloc() + %not_max.not.not.i.i.i = icmp eq i64 %qalloc.i.i.i, -1 + br i1 %not_max.not.not.i.i.i, label %cond_101_case_0.i.i.i, label %__hugr__.__tk2_qalloc.97.exit.i.i cond_256_case_1.i.i: ; preds = %__hugr__.__tk2_qalloc.111.exit.i.i - tail call void @___rz(i64 %.fca.1.extract.i.i, double 0x3FE921FB54442D18) - tail call void @___rz(i64 %.fca.1.extract.i.i, double 0x400921FB54442D18) - tail call void @___rxy(i64 %.fca.1.extract.i133.i.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rzz(i64 %.fca.1.extract.i.i, i64 %.fca.1.extract.i133.i.i, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %.fca.1.extract.i.i, double 0xBFF921FB54442D18) - tail call void @___rxy(i64 %.fca.1.extract.i133.i.i, double 0x3FF921FB54442D18, double 0x400921FB54442D18) - tail call void @___rz(i64 %.fca.1.extract.i133.i.i, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %.fca.1.extract.i133.i.i, double 0x3FE921FB54442D18) - %lazy_measure67.i.i = tail call i64 @___lazy_measure(i64 %.fca.1.extract.i133.i.i) - tail call void @___qfree(i64 %.fca.1.extract.i133.i.i) + tail call void @___rz(i64 %qalloc.i.i, double 0x3FE921FB54442D18) + tail call void @___rz(i64 %qalloc.i.i, double 0x400921FB54442D18) + tail call void @___rxy(i64 %qalloc.i128.i.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) + tail call void @___rzz(i64 %qalloc.i.i, i64 %qalloc.i128.i.i, double 0x3FF921FB54442D18) + tail call void @___rz(i64 %qalloc.i.i, double 0xBFF921FB54442D18) + tail call void @___rxy(i64 %qalloc.i128.i.i, double 0x3FF921FB54442D18, double 0x400921FB54442D18) + tail call void @___rz(i64 %qalloc.i128.i.i, double 0xBFF921FB54442D18) + tail call void @___rz(i64 %qalloc.i128.i.i, double 0x3FE921FB54442D18) + %lazy_measure67.i.i = tail call i64 @___lazy_measure(i64 %qalloc.i128.i.i) + tail call void @___qfree(i64 %qalloc.i128.i.i) %read_bool80.i.i = tail call i1 @___read_future_bool(i64 %lazy_measure67.i.i) tail call void @___dec_future_refcount(i64 %lazy_measure67.i.i) - br i1 %read_bool80.i.i, label %__hugr__.main.1.exit, label %8 - -8: ; preds = %cond_256_case_1.i.i - tail call void @___rxy(i64 %.fca.1.extract.i.i, double 0x400921FB54442D18, double 0.000000e+00) - br label %cond_242_case_1.i.i.backedge + br i1 %read_bool80.i.i, label %__hugr__.main.1.exit, label %2 -cond_242_case_1.i.i.backedge: ; preds = %8, %7 - br label %cond_242_case_1.i.i +2: ; preds = %cond_256_case_1.i.i + tail call void @___rxy(i64 %qalloc.i.i, double 0x400921FB54442D18, double 0.000000e+00) + br label %cond_242_case_1.backedge.i.i __hugr__.main.1.exit: ; preds = %cond_256_case_1.i.i - %lazy_measure.i = tail call i64 @___lazy_measure(i64 %.fca.1.extract.i.i) - tail call void @___qfree(i64 %.fca.1.extract.i.i) + %lazy_measure.i = tail call i64 @___lazy_measure(i64 %qalloc.i.i) + tail call void @___qfree(i64 %qalloc.i.i) %read_bool.i = tail call i1 @___read_future_bool(i64 %lazy_measure.i) tail call void @___dec_future_refcount(i64 %lazy_measure.i) - tail call void @print_bool(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @res_result.457DE32D.0, i64 0, i64 0), i64 16, i1 %read_bool.i) - %9 = tail call i64 @teardown() - ret i64 %9 + tail call void @print_bool(ptr nonnull @res_result.457DE32D.0, i64 16, i1 %read_bool.i) + %3 = tail call i64 @teardown() + ret i64 %3 } declare void @setup(i64) local_unnamed_addr diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-discard_qb_array/discard_qb_array_x86_64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-discard_qb_array/discard_qb_array_x86_64-apple-darwin index f08dd5207..5bc61b599 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-discard_qb_array/discard_qb_array_x86_64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-discard_qb_array/discard_qb_array_x86_64-apple-darwin @@ -1,6 +1,6 @@ ; ModuleID = 'hugr' source_filename = "hugr" -target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" +target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128" target triple = "x86_64-apple-darwin" @"e_Array alre.5A300C2A.0" = private constant [57 x i8] c"8EXIT:INT:Array already contains an element at this index" @@ -8,14 +8,14 @@ target triple = "x86_64-apple-darwin" @"e_Array cont.EFA5AC45.0" = private constant [70 x i8] c"EEXIT:INT:Array contains non-borrowed elements and cannot be discarded" @"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." -declare i8* @heap_alloc(i64) local_unnamed_addr +declare ptr @heap_alloc(i64) local_unnamed_addr ; Function Attrs: noreturn -declare void @panic(i32, i8*) local_unnamed_addr #0 +declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @___qfree(i64) local_unnamed_addr -declare void @heap_free(i8*) local_unnamed_addr +declare void @heap_free(ptr) local_unnamed_addr declare i64 @___qalloc() local_unnamed_addr @@ -24,194 +24,264 @@ declare void @___reset(i64) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr { entry: tail call void @setup(i64 %0) - %1 = tail call i8* @heap_alloc(i64 80) - %2 = bitcast i8* %1 to i64* - %3 = tail call i8* @heap_alloc(i64 8) - %4 = bitcast i8* %3 to i64* - store i64 -1, i64* %4, align 1 - br label %cond_20_case_1.i - -cond_20_case_1.i: ; preds = %cond_exit_20.i, %entry - %"15_0.sroa.0.0114.i" = phi i64 [ 0, %entry ], [ %5, %cond_exit_20.i ] - %5 = add nuw nsw i64 %"15_0.sroa.0.0114.i", 1 + %1 = tail call ptr @heap_alloc(i64 80) + %2 = tail call ptr @heap_alloc(i64 8) + store i64 -1, ptr %2, align 1 %qalloc.i.i = tail call i64 @___qalloc() - %not_max.not.i.i = icmp eq i64 %qalloc.i.i, -1 - br i1 %not_max.not.i.i, label %id_bb.i.i, label %reset_bb.i.i + %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 + br i1 %not_max.not.not.i.i, label %cond_211_case_0.i.i, label %__barray_check_bounds.exit.i -reset_bb.i.i: ; preds = %cond_20_case_1.i - tail call void @___reset(i64 %qalloc.i.i) - br label %id_bb.i.i - -id_bb.i.i: ; preds = %reset_bb.i.i, %cond_20_case_1.i - %6 = insertvalue { i1, i64 } { i1 true, i64 poison }, i64 %qalloc.i.i, 1 - %7 = select i1 %not_max.not.i.i, { i1, i64 } { i1 false, i64 poison }, { i1, i64 } %6 - %.fca.0.extract.i.i = extractvalue { i1, i64 } %7, 0 - br i1 %.fca.0.extract.i.i, label %__barray_check_bounds.exit.i, label %cond_211_case_0.i.i - -cond_211_case_0.i.i: ; preds = %id_bb.i.i - tail call void @panic(i32 1001, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @"e_No more qu.3B2EEBF0.0", i64 0, i64 0)) +cond_211_case_0.i.i: ; preds = %cond_exit_20.i.8, %cond_exit_20.i.7, %cond_exit_20.i.6, %cond_exit_20.i.5, %cond_exit_20.i.4, %cond_exit_20.i.3, %cond_exit_20.i.2, %cond_exit_20.i.1, %cond_exit_20.i, %entry + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__barray_check_bounds.exit.i: ; preds = %id_bb.i.i - %8 = lshr i64 %"15_0.sroa.0.0114.i", 6 - %9 = getelementptr inbounds i64, i64* %4, i64 %8 - %10 = load i64, i64* %9, align 4 - %11 = shl nuw nsw i64 1, %"15_0.sroa.0.0114.i" - %12 = and i64 %10, %11 - %.not.i.i = icmp eq i64 %12, 0 - br i1 %.not.i.i, label %panic.i.i, label %cond_exit_20.i - -panic.i.i: ; preds = %__barray_check_bounds.exit.i - tail call void @panic(i32 1002, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @"e_Array alre.5A300C2A.0", i64 0, i64 0)) +__barray_check_bounds.exit.i: ; preds = %entry + tail call void @___reset(i64 %qalloc.i.i) + %3 = load i64, ptr %2, align 4 + %4 = trunc i64 %3 to i1 + br i1 %4, label %cond_exit_20.i, label %panic.i.i + +panic.i.i: ; preds = %__barray_check_bounds.exit.i.9, %__barray_check_bounds.exit.i.8, %__barray_check_bounds.exit.i.7, %__barray_check_bounds.exit.i.6, %__barray_check_bounds.exit.i.5, %__barray_check_bounds.exit.i.4, %__barray_check_bounds.exit.i.3, %__barray_check_bounds.exit.i.2, %__barray_check_bounds.exit.i.1, %__barray_check_bounds.exit.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable cond_exit_20.i: ; preds = %__barray_check_bounds.exit.i - %.fca.1.extract.i.i = extractvalue { i1, i64 } %7, 1 - %13 = xor i64 %10, %11 - store i64 %13, i64* %9, align 4 - %14 = getelementptr inbounds i64, i64* %2, i64 %"15_0.sroa.0.0114.i" - store i64 %.fca.1.extract.i.i, i64* %14, align 4 - %exitcond.not.i = icmp eq i64 %5, 10 - br i1 %exitcond.not.i, label %loop_out.preheader.preheader.i, label %cond_20_case_1.i - -loop_out.preheader.preheader.i: ; preds = %cond_exit_20.i - %15 = load i64, i64* %4, align 4 - %16 = and i64 %15, 1 - %.not.i99.i.i.i = icmp eq i64 %16, 0 - br i1 %.not.i99.i.i.i, label %cond_380_case_1.i.i, label %panic.i.i.i.i - -mask_block_err.i.i.i.i: ; preds = %cond_380_case_1.i.9.i - tail call void @panic(i32 1002, i8* getelementptr inbounds ([70 x i8], [70 x i8]* @"e_Array cont.EFA5AC45.0", i64 0, i64 0)) + %5 = and i64 %3, -2 + store i64 %5, ptr %2, align 4 + store i64 %qalloc.i.i, ptr %1, align 4 + %qalloc.i.i.1 = tail call i64 @___qalloc() + %not_max.not.not.i.i.1 = icmp eq i64 %qalloc.i.i.1, -1 + br i1 %not_max.not.not.i.i.1, label %cond_211_case_0.i.i, label %__barray_check_bounds.exit.i.1 + +__barray_check_bounds.exit.i.1: ; preds = %cond_exit_20.i + tail call void @___reset(i64 %qalloc.i.i.1) + %6 = load i64, ptr %2, align 4 + %7 = and i64 %6, 2 + %.not = icmp eq i64 %7, 0 + br i1 %.not, label %panic.i.i, label %cond_exit_20.i.1 + +cond_exit_20.i.1: ; preds = %__barray_check_bounds.exit.i.1 + %8 = and i64 %6, -3 + store i64 %8, ptr %2, align 4 + %9 = getelementptr inbounds nuw i8, ptr %1, i64 8 + store i64 %qalloc.i.i.1, ptr %9, align 4 + %qalloc.i.i.2 = tail call i64 @___qalloc() + %not_max.not.not.i.i.2 = icmp eq i64 %qalloc.i.i.2, -1 + br i1 %not_max.not.not.i.i.2, label %cond_211_case_0.i.i, label %__barray_check_bounds.exit.i.2 + +__barray_check_bounds.exit.i.2: ; preds = %cond_exit_20.i.1 + tail call void @___reset(i64 %qalloc.i.i.2) + %10 = load i64, ptr %2, align 4 + %11 = and i64 %10, 4 + %.not1 = icmp eq i64 %11, 0 + br i1 %.not1, label %panic.i.i, label %cond_exit_20.i.2 + +cond_exit_20.i.2: ; preds = %__barray_check_bounds.exit.i.2 + %12 = and i64 %10, -5 + store i64 %12, ptr %2, align 4 + %13 = getelementptr inbounds nuw i8, ptr %1, i64 16 + store i64 %qalloc.i.i.2, ptr %13, align 4 + %qalloc.i.i.3 = tail call i64 @___qalloc() + %not_max.not.not.i.i.3 = icmp eq i64 %qalloc.i.i.3, -1 + br i1 %not_max.not.not.i.i.3, label %cond_211_case_0.i.i, label %__barray_check_bounds.exit.i.3 + +__barray_check_bounds.exit.i.3: ; preds = %cond_exit_20.i.2 + tail call void @___reset(i64 %qalloc.i.i.3) + %14 = load i64, ptr %2, align 4 + %15 = and i64 %14, 8 + %.not2 = icmp eq i64 %15, 0 + br i1 %.not2, label %panic.i.i, label %cond_exit_20.i.3 + +cond_exit_20.i.3: ; preds = %__barray_check_bounds.exit.i.3 + %16 = and i64 %14, -9 + store i64 %16, ptr %2, align 4 + %17 = getelementptr inbounds nuw i8, ptr %1, i64 24 + store i64 %qalloc.i.i.3, ptr %17, align 4 + %qalloc.i.i.4 = tail call i64 @___qalloc() + %not_max.not.not.i.i.4 = icmp eq i64 %qalloc.i.i.4, -1 + br i1 %not_max.not.not.i.i.4, label %cond_211_case_0.i.i, label %__barray_check_bounds.exit.i.4 + +__barray_check_bounds.exit.i.4: ; preds = %cond_exit_20.i.3 + tail call void @___reset(i64 %qalloc.i.i.4) + %18 = load i64, ptr %2, align 4 + %19 = and i64 %18, 16 + %.not3 = icmp eq i64 %19, 0 + br i1 %.not3, label %panic.i.i, label %cond_exit_20.i.4 + +cond_exit_20.i.4: ; preds = %__barray_check_bounds.exit.i.4 + %20 = and i64 %18, -17 + store i64 %20, ptr %2, align 4 + %21 = getelementptr inbounds nuw i8, ptr %1, i64 32 + store i64 %qalloc.i.i.4, ptr %21, align 4 + %qalloc.i.i.5 = tail call i64 @___qalloc() + %not_max.not.not.i.i.5 = icmp eq i64 %qalloc.i.i.5, -1 + br i1 %not_max.not.not.i.i.5, label %cond_211_case_0.i.i, label %__barray_check_bounds.exit.i.5 + +__barray_check_bounds.exit.i.5: ; preds = %cond_exit_20.i.4 + tail call void @___reset(i64 %qalloc.i.i.5) + %22 = load i64, ptr %2, align 4 + %23 = and i64 %22, 32 + %.not4 = icmp eq i64 %23, 0 + br i1 %.not4, label %panic.i.i, label %cond_exit_20.i.5 + +cond_exit_20.i.5: ; preds = %__barray_check_bounds.exit.i.5 + %24 = and i64 %22, -33 + store i64 %24, ptr %2, align 4 + %25 = getelementptr inbounds nuw i8, ptr %1, i64 40 + store i64 %qalloc.i.i.5, ptr %25, align 4 + %qalloc.i.i.6 = tail call i64 @___qalloc() + %not_max.not.not.i.i.6 = icmp eq i64 %qalloc.i.i.6, -1 + br i1 %not_max.not.not.i.i.6, label %cond_211_case_0.i.i, label %__barray_check_bounds.exit.i.6 + +__barray_check_bounds.exit.i.6: ; preds = %cond_exit_20.i.5 + tail call void @___reset(i64 %qalloc.i.i.6) + %26 = load i64, ptr %2, align 4 + %27 = and i64 %26, 64 + %.not5 = icmp eq i64 %27, 0 + br i1 %.not5, label %panic.i.i, label %cond_exit_20.i.6 + +cond_exit_20.i.6: ; preds = %__barray_check_bounds.exit.i.6 + %28 = and i64 %26, -65 + store i64 %28, ptr %2, align 4 + %29 = getelementptr inbounds nuw i8, ptr %1, i64 48 + store i64 %qalloc.i.i.6, ptr %29, align 4 + %qalloc.i.i.7 = tail call i64 @___qalloc() + %not_max.not.not.i.i.7 = icmp eq i64 %qalloc.i.i.7, -1 + br i1 %not_max.not.not.i.i.7, label %cond_211_case_0.i.i, label %__barray_check_bounds.exit.i.7 + +__barray_check_bounds.exit.i.7: ; preds = %cond_exit_20.i.6 + tail call void @___reset(i64 %qalloc.i.i.7) + %30 = load i64, ptr %2, align 4 + %31 = and i64 %30, 128 + %.not6 = icmp eq i64 %31, 0 + br i1 %.not6, label %panic.i.i, label %cond_exit_20.i.7 + +cond_exit_20.i.7: ; preds = %__barray_check_bounds.exit.i.7 + %32 = and i64 %30, -129 + store i64 %32, ptr %2, align 4 + %33 = getelementptr inbounds nuw i8, ptr %1, i64 56 + store i64 %qalloc.i.i.7, ptr %33, align 4 + %qalloc.i.i.8 = tail call i64 @___qalloc() + %not_max.not.not.i.i.8 = icmp eq i64 %qalloc.i.i.8, -1 + br i1 %not_max.not.not.i.i.8, label %cond_211_case_0.i.i, label %__barray_check_bounds.exit.i.8 + +__barray_check_bounds.exit.i.8: ; preds = %cond_exit_20.i.7 + tail call void @___reset(i64 %qalloc.i.i.8) + %34 = load i64, ptr %2, align 4 + %35 = and i64 %34, 256 + %.not7 = icmp eq i64 %35, 0 + br i1 %.not7, label %panic.i.i, label %cond_exit_20.i.8 + +cond_exit_20.i.8: ; preds = %__barray_check_bounds.exit.i.8 + %36 = and i64 %34, -257 + store i64 %36, ptr %2, align 4 + %37 = getelementptr inbounds nuw i8, ptr %1, i64 64 + store i64 %qalloc.i.i.8, ptr %37, align 4 + %qalloc.i.i.9 = tail call i64 @___qalloc() + %not_max.not.not.i.i.9 = icmp eq i64 %qalloc.i.i.9, -1 + br i1 %not_max.not.not.i.i.9, label %cond_211_case_0.i.i, label %__barray_check_bounds.exit.i.9 + +__barray_check_bounds.exit.i.9: ; preds = %cond_exit_20.i.8 + tail call void @___reset(i64 %qalloc.i.i.9) + %38 = load i64, ptr %2, align 4 + %39 = and i64 %38, 512 + %.not8 = icmp eq i64 %39, 0 + br i1 %.not8, label %panic.i.i, label %cond_exit_20.i.9 + +cond_exit_20.i.9: ; preds = %__barray_check_bounds.exit.i.9 + %40 = and i64 %38, -513 + store i64 %40, ptr %2, align 4 + %41 = getelementptr inbounds nuw i8, ptr %1, i64 72 + store i64 %qalloc.i.i.9, ptr %41, align 4 + %"120.fca.0.insert.i" = insertvalue { ptr, ptr, i64 } poison, ptr %1, 0 + %"120.fca.1.insert.i" = insertvalue { ptr, ptr, i64 } %"120.fca.0.insert.i", ptr %2, 1 + %"120.fca.2.insert.i" = insertvalue { ptr, ptr, i64 } %"120.fca.1.insert.i", i64 0, 2 + %42 = insertvalue { { ptr, ptr, i64 }, i64 } poison, { ptr, ptr, i64 } %"120.fca.2.insert.i", 0 + br label %__barray_check_bounds.exit.i.i.i + +43: ; preds = %"__hugr__.$__next__$$t(qubit)$n(10).299.exit.thread.i.i" + %44 = lshr i64 %.fca.1.0.0.2.extract.i.i.i, 6 + %45 = getelementptr i64, ptr %.fca.1.0.0.1.extract.i.i.i, i64 %44 + %46 = load i64, ptr %45, align 4 + %47 = and i64 %.fca.1.0.0.2.extract.i.i.i, 63 + %48 = sub nuw nsw i64 64, %47 + %49 = lshr i64 -1, %48 + %50 = icmp eq i64 %47, 0 + %51 = select i1 %50, i64 0, i64 %49 + %52 = or i64 %46, %51 + store i64 %52, ptr %45, align 4 + %last_valid.i.i.i.i = add i64 %.fca.1.0.0.2.extract.i.i.i, 9 + %53 = lshr i64 %last_valid.i.i.i.i, 6 + %54 = getelementptr inbounds nuw i64, ptr %.fca.1.0.0.1.extract.i.i.i, i64 %53 + %55 = load i64, ptr %54, align 4 + %56 = and i64 %last_valid.i.i.i.i, 63 + %57 = shl nsw i64 -2, %56 + %58 = icmp eq i64 %56, 63 + %59 = select i1 %58, i64 0, i64 %57 + %60 = or i64 %55, %59 + store i64 %60, ptr %54, align 4 + %reass.sub.i.i.i.i = sub nsw i64 %53, %44 + %.not.i.i.i.i = icmp eq i64 %reass.sub.i.i.i.i, -1 + br i1 %.not.i.i.i.i, label %__hugr__.main.1.exit, label %mask_block_ok.i.i.i.i + +61: ; preds = %mask_block_ok.i.i.i.i + %62 = add nuw i64 %.02.i.i.i.i, 1 + %exitcond.not.i.i.i.i = icmp eq i64 %.02.i.i.i.i, %reass.sub.i.i.i.i + br i1 %exitcond.not.i.i.i.i, label %__hugr__.main.1.exit, label %mask_block_ok.i.i.i.i + +mask_block_ok.i.i.i.i: ; preds = %43, %61 + %.02.i.i.i.i = phi i64 [ %62, %61 ], [ 0, %43 ] + %gep.i.i.i.i = getelementptr i64, ptr %45, i64 %.02.i.i.i.i + %63 = load i64, ptr %gep.i.i.i.i, align 4 + %64 = icmp eq i64 %63, -1 + br i1 %64, label %61, label %mask_block_err.i.i.i.i + +mask_block_err.i.i.i.i: ; preds = %mask_block_ok.i.i.i.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -panic.i.i.i.i: ; preds = %cond_380_case_1.i.8.i, %cond_380_case_1.i.7.i, %cond_380_case_1.i.6.i, %cond_380_case_1.i.5.i, %cond_380_case_1.i.4.i, %cond_380_case_1.i.3.i, %cond_380_case_1.i.2.i, %cond_380_case_1.i.1.i, %cond_380_case_1.i.i, %loop_out.preheader.preheader.i - tail call void @panic(i32 1002, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @"e_Array elem.E746B1A3.0", i64 0, i64 0)) +__barray_check_bounds.exit.i.i.i: ; preds = %"__hugr__.$__next__$$t(qubit)$n(10).299.exit.thread.i.i", %cond_exit_20.i.9 + %.fca.2.extract83.i185.i.i = phi i64 [ 0, %cond_exit_20.i.9 ], [ %.fca.1.0.0.2.extract.i.i.i, %"__hugr__.$__next__$$t(qubit)$n(10).299.exit.thread.i.i" ] + %.fca.1.extract82.i184.i.i = phi ptr [ %2, %cond_exit_20.i.9 ], [ %.fca.1.0.0.1.extract.i.i.i, %"__hugr__.$__next__$$t(qubit)$n(10).299.exit.thread.i.i" ] + %.fca.0.extract81.i183.i.i = phi ptr [ %1, %cond_exit_20.i.9 ], [ %.fca.1.0.0.0.extract.i.i.i, %"__hugr__.$__next__$$t(qubit)$n(10).299.exit.thread.i.i" ] + %"291_0.0182.i.i" = phi i64 [ 0, %cond_exit_20.i.9 ], [ %72, %"__hugr__.$__next__$$t(qubit)$n(10).299.exit.thread.i.i" ] + %.pn181.i.i = phi { { ptr, ptr, i64 }, i64 } [ %42, %cond_exit_20.i.9 ], [ %80, %"__hugr__.$__next__$$t(qubit)$n(10).299.exit.thread.i.i" ] + %65 = add i64 %"291_0.0182.i.i", %.fca.2.extract83.i185.i.i + %66 = lshr i64 %65, 6 + %67 = getelementptr inbounds nuw i64, ptr %.fca.1.extract82.i184.i.i, i64 %66 + %68 = load i64, ptr %67, align 4 + %69 = and i64 %65, 63 + %70 = lshr i64 %68, %69 + %71 = trunc i64 %70 to i1 + br i1 %71, label %panic.i.i.i.i, label %"__hugr__.$__next__$$t(qubit)$n(10).299.exit.thread.i.i" + +panic.i.i.i.i: ; preds = %__barray_check_bounds.exit.i.i.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -cond_380_case_1.i.i: ; preds = %loop_out.preheader.preheader.i - %17 = xor i64 %15, 1 - store i64 %17, i64* %4, align 4 - %18 = load i64, i64* %2, align 4 - tail call void @___qfree(i64 %18) - %19 = load i64, i64* %4, align 4 - %20 = and i64 %19, 2 - %.not.i99.i.i.1.i = icmp eq i64 %20, 0 - br i1 %.not.i99.i.i.1.i, label %cond_380_case_1.i.1.i, label %panic.i.i.i.i - -cond_380_case_1.i.1.i: ; preds = %cond_380_case_1.i.i - %21 = xor i64 %19, 2 - store i64 %21, i64* %4, align 4 - %22 = getelementptr inbounds i8, i8* %1, i64 8 - %23 = bitcast i8* %22 to i64* - %24 = load i64, i64* %23, align 4 - tail call void @___qfree(i64 %24) - %25 = load i64, i64* %4, align 4 - %26 = and i64 %25, 4 - %.not.i99.i.i.2.i = icmp eq i64 %26, 0 - br i1 %.not.i99.i.i.2.i, label %cond_380_case_1.i.2.i, label %panic.i.i.i.i - -cond_380_case_1.i.2.i: ; preds = %cond_380_case_1.i.1.i - %27 = xor i64 %25, 4 - store i64 %27, i64* %4, align 4 - %28 = getelementptr inbounds i8, i8* %1, i64 16 - %29 = bitcast i8* %28 to i64* - %30 = load i64, i64* %29, align 4 - tail call void @___qfree(i64 %30) - %31 = load i64, i64* %4, align 4 - %32 = and i64 %31, 8 - %.not.i99.i.i.3.i = icmp eq i64 %32, 0 - br i1 %.not.i99.i.i.3.i, label %cond_380_case_1.i.3.i, label %panic.i.i.i.i - -cond_380_case_1.i.3.i: ; preds = %cond_380_case_1.i.2.i - %33 = xor i64 %31, 8 - store i64 %33, i64* %4, align 4 - %34 = getelementptr inbounds i8, i8* %1, i64 24 - %35 = bitcast i8* %34 to i64* - %36 = load i64, i64* %35, align 4 - tail call void @___qfree(i64 %36) - %37 = load i64, i64* %4, align 4 - %38 = and i64 %37, 16 - %.not.i99.i.i.4.i = icmp eq i64 %38, 0 - br i1 %.not.i99.i.i.4.i, label %cond_380_case_1.i.4.i, label %panic.i.i.i.i - -cond_380_case_1.i.4.i: ; preds = %cond_380_case_1.i.3.i - %39 = xor i64 %37, 16 - store i64 %39, i64* %4, align 4 - %40 = getelementptr inbounds i8, i8* %1, i64 32 - %41 = bitcast i8* %40 to i64* - %42 = load i64, i64* %41, align 4 - tail call void @___qfree(i64 %42) - %43 = load i64, i64* %4, align 4 - %44 = and i64 %43, 32 - %.not.i99.i.i.5.i = icmp eq i64 %44, 0 - br i1 %.not.i99.i.i.5.i, label %cond_380_case_1.i.5.i, label %panic.i.i.i.i - -cond_380_case_1.i.5.i: ; preds = %cond_380_case_1.i.4.i - %45 = xor i64 %43, 32 - store i64 %45, i64* %4, align 4 - %46 = getelementptr inbounds i8, i8* %1, i64 40 - %47 = bitcast i8* %46 to i64* - %48 = load i64, i64* %47, align 4 - tail call void @___qfree(i64 %48) - %49 = load i64, i64* %4, align 4 - %50 = and i64 %49, 64 - %.not.i99.i.i.6.i = icmp eq i64 %50, 0 - br i1 %.not.i99.i.i.6.i, label %cond_380_case_1.i.6.i, label %panic.i.i.i.i - -cond_380_case_1.i.6.i: ; preds = %cond_380_case_1.i.5.i - %51 = xor i64 %49, 64 - store i64 %51, i64* %4, align 4 - %52 = getelementptr inbounds i8, i8* %1, i64 48 - %53 = bitcast i8* %52 to i64* - %54 = load i64, i64* %53, align 4 - tail call void @___qfree(i64 %54) - %55 = load i64, i64* %4, align 4 - %56 = and i64 %55, 128 - %.not.i99.i.i.7.i = icmp eq i64 %56, 0 - br i1 %.not.i99.i.i.7.i, label %cond_380_case_1.i.7.i, label %panic.i.i.i.i - -cond_380_case_1.i.7.i: ; preds = %cond_380_case_1.i.6.i - %57 = xor i64 %55, 128 - store i64 %57, i64* %4, align 4 - %58 = getelementptr inbounds i8, i8* %1, i64 56 - %59 = bitcast i8* %58 to i64* - %60 = load i64, i64* %59, align 4 - tail call void @___qfree(i64 %60) - %61 = load i64, i64* %4, align 4 - %62 = and i64 %61, 256 - %.not.i99.i.i.8.i = icmp eq i64 %62, 0 - br i1 %.not.i99.i.i.8.i, label %cond_380_case_1.i.8.i, label %panic.i.i.i.i - -cond_380_case_1.i.8.i: ; preds = %cond_380_case_1.i.7.i - %63 = xor i64 %61, 256 - store i64 %63, i64* %4, align 4 - %64 = getelementptr inbounds i8, i8* %1, i64 64 - %65 = bitcast i8* %64 to i64* - %66 = load i64, i64* %65, align 4 - tail call void @___qfree(i64 %66) - %67 = load i64, i64* %4, align 4 - %68 = and i64 %67, 512 - %.not.i99.i.i.9.i = icmp eq i64 %68, 0 - br i1 %.not.i99.i.i.9.i, label %cond_380_case_1.i.9.i, label %panic.i.i.i.i - -cond_380_case_1.i.9.i: ; preds = %cond_380_case_1.i.8.i - %69 = xor i64 %67, 512 - store i64 %69, i64* %4, align 4 - %70 = getelementptr inbounds i8, i8* %1, i64 72 - %71 = bitcast i8* %70 to i64* - %72 = load i64, i64* %71, align 4 - tail call void @___qfree(i64 %72) - %73 = load i64, i64* %4, align 4 - %74 = or i64 %73, -1024 - store i64 %74, i64* %4, align 4 - %75 = icmp eq i64 %74, -1 - br i1 %75, label %__hugr__.main.1.exit, label %mask_block_err.i.i.i.i - -__hugr__.main.1.exit: ; preds = %cond_380_case_1.i.9.i - tail call void @heap_free(i8* nonnull %1) - tail call void @heap_free(i8* nonnull %3) - %76 = tail call i64 @teardown() - ret i64 %76 +"__hugr__.$__next__$$t(qubit)$n(10).299.exit.thread.i.i": ; preds = %__barray_check_bounds.exit.i.i.i + %72 = add nuw nsw i64 %"291_0.0182.i.i", 1 + %73 = shl nuw i64 1, %69 + %74 = xor i64 %73, %68 + store i64 %74, ptr %67, align 4 + %75 = getelementptr inbounds i64, ptr %.fca.0.extract81.i183.i.i, i64 %65 + %76 = load i64, ptr %75, align 4 + %.fca.1.0.0.0.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn181.i.i, 0, 0 + %.fca.1.0.0.1.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn181.i.i, 0, 1 + %.fca.1.0.0.2.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn181.i.i, 0, 2 + %77 = insertvalue { { ptr, ptr, i64 }, i64 } %.pn181.i.i, i64 %72, 1 + %78 = insertvalue { { ptr, ptr, i64 }, i64 } %77, ptr %.fca.1.0.0.0.extract.i.i.i, 0, 0 + %79 = insertvalue { { ptr, ptr, i64 }, i64 } %78, ptr %.fca.1.0.0.1.extract.i.i.i, 0, 1 + %80 = insertvalue { { ptr, ptr, i64 }, i64 } %79, i64 %.fca.1.0.0.2.extract.i.i.i, 0, 2 + tail call void @___qfree(i64 %76) + %.not.i.i = icmp eq i64 %"291_0.0182.i.i", 9 + br i1 %.not.i.i, label %43, label %__barray_check_bounds.exit.i.i.i + +__hugr__.main.1.exit: ; preds = %61, %43 + tail call void @heap_free(ptr %.fca.1.0.0.0.extract.i.i.i) + tail call void @heap_free(ptr nonnull %.fca.1.0.0.1.extract.i.i.i) + %81 = tail call i64 @teardown() + ret i64 %81 } declare void @setup(i64) local_unnamed_addr diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-flip_some/flip_some_x86_64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-flip_some/flip_some_x86_64-apple-darwin index 66137e702..692aab40e 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-flip_some/flip_some_x86_64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-flip_some/flip_some_x86_64-apple-darwin @@ -1,6 +1,6 @@ ; ModuleID = 'hugr' source_filename = "hugr" -target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" +target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128" target triple = "x86_64-apple-darwin" @res_c0.7C14CD6E.0 = private constant [13 x i8] c"\0CUSER:BOOL:c0" @@ -17,14 +17,14 @@ declare i1 @___read_future_bool(i64) local_unnamed_addr declare void @___dec_future_refcount(i64) local_unnamed_addr -declare void @print_bool(i8*, i64, i1) local_unnamed_addr +declare void @print_bool(ptr, i64, i1) local_unnamed_addr declare i64 @___qalloc() local_unnamed_addr declare void @___reset(i64) local_unnamed_addr ; Function Attrs: noreturn -declare void @panic(i32, i8*) local_unnamed_addr #0 +declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @___rxy(i64, double, double) local_unnamed_addr @@ -32,110 +32,70 @@ define i64 @qmain(i64 %0) local_unnamed_addr { entry: tail call void @setup(i64 %0) %qalloc.i.i = tail call i64 @___qalloc() - %not_max.not.i.i = icmp eq i64 %qalloc.i.i, -1 - br i1 %not_max.not.i.i, label %id_bb.i.i, label %reset_bb.i.i + %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 + br i1 %not_max.not.not.i.i, label %cond_40_case_0.i.i, label %__hugr__.__tk2_qalloc.36.exit.i -reset_bb.i.i: ; preds = %entry - tail call void @___reset(i64 %qalloc.i.i) - br label %id_bb.i.i - -id_bb.i.i: ; preds = %reset_bb.i.i, %entry - %1 = insertvalue { i1, i64 } { i1 true, i64 poison }, i64 %qalloc.i.i, 1 - %2 = select i1 %not_max.not.i.i, { i1, i64 } { i1 false, i64 poison }, { i1, i64 } %1 - %.fca.0.extract.i.i = extractvalue { i1, i64 } %2, 0 - br i1 %.fca.0.extract.i.i, label %__hugr__.__tk2_qalloc.36.exit.i, label %cond_40_case_0.i.i - -cond_40_case_0.i.i: ; preds = %id_bb.i.i - tail call void @panic(i32 1001, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @"e_No more qu.3B2EEBF0.0", i64 0, i64 0)) +cond_40_case_0.i.i: ; preds = %entry + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_qalloc.36.exit.i: ; preds = %id_bb.i.i - %.fca.1.extract.i.i = extractvalue { i1, i64 } %2, 1 - tail call void @___rxy(i64 %.fca.1.extract.i.i, double 0x400921FB54442D18, double 0.000000e+00) +__hugr__.__tk2_qalloc.36.exit.i: ; preds = %entry + tail call void @___reset(i64 %qalloc.i.i) + tail call void @___rxy(i64 %qalloc.i.i, double 0x400921FB54442D18, double 0.000000e+00) %qalloc.i101.i = tail call i64 @___qalloc() - %not_max.not.i102.i = icmp eq i64 %qalloc.i101.i, -1 - br i1 %not_max.not.i102.i, label %id_bb.i105.i, label %reset_bb.i103.i - -reset_bb.i103.i: ; preds = %__hugr__.__tk2_qalloc.36.exit.i - tail call void @___reset(i64 %qalloc.i101.i) - br label %id_bb.i105.i + %not_max.not.not.i102.i = icmp eq i64 %qalloc.i101.i, -1 + br i1 %not_max.not.not.i102.i, label %cond_54_case_0.i.i, label %__hugr__.__tk2_qalloc.50.exit.i -id_bb.i105.i: ; preds = %reset_bb.i103.i, %__hugr__.__tk2_qalloc.36.exit.i - %3 = insertvalue { i1, i64 } { i1 true, i64 poison }, i64 %qalloc.i101.i, 1 - %4 = select i1 %not_max.not.i102.i, { i1, i64 } { i1 false, i64 poison }, { i1, i64 } %3 - %.fca.0.extract.i104.i = extractvalue { i1, i64 } %4, 0 - br i1 %.fca.0.extract.i104.i, label %__hugr__.__tk2_qalloc.50.exit.i, label %cond_54_case_0.i.i - -cond_54_case_0.i.i: ; preds = %id_bb.i105.i - tail call void @panic(i32 1001, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @"e_No more qu.3B2EEBF0.0", i64 0, i64 0)) +cond_54_case_0.i.i: ; preds = %__hugr__.__tk2_qalloc.36.exit.i + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_qalloc.50.exit.i: ; preds = %id_bb.i105.i - %.fca.1.extract.i106.i = extractvalue { i1, i64 } %4, 1 - %qalloc.i107.i = tail call i64 @___qalloc() - %not_max.not.i108.i = icmp eq i64 %qalloc.i107.i, -1 - br i1 %not_max.not.i108.i, label %id_bb.i111.i, label %reset_bb.i109.i - -reset_bb.i109.i: ; preds = %__hugr__.__tk2_qalloc.50.exit.i - tail call void @___reset(i64 %qalloc.i107.i) - br label %id_bb.i111.i - -id_bb.i111.i: ; preds = %reset_bb.i109.i, %__hugr__.__tk2_qalloc.50.exit.i - %5 = insertvalue { i1, i64 } { i1 true, i64 poison }, i64 %qalloc.i107.i, 1 - %6 = select i1 %not_max.not.i108.i, { i1, i64 } { i1 false, i64 poison }, { i1, i64 } %5 - %.fca.0.extract.i110.i = extractvalue { i1, i64 } %6, 0 - br i1 %.fca.0.extract.i110.i, label %__hugr__.__tk2_qalloc.64.exit.i, label %cond_68_case_0.i.i +__hugr__.__tk2_qalloc.50.exit.i: ; preds = %__hugr__.__tk2_qalloc.36.exit.i + tail call void @___reset(i64 %qalloc.i101.i) + %qalloc.i103.i = tail call i64 @___qalloc() + %not_max.not.not.i104.i = icmp eq i64 %qalloc.i103.i, -1 + br i1 %not_max.not.not.i104.i, label %cond_68_case_0.i.i, label %__hugr__.__tk2_qalloc.64.exit.i -cond_68_case_0.i.i: ; preds = %id_bb.i111.i - tail call void @panic(i32 1001, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @"e_No more qu.3B2EEBF0.0", i64 0, i64 0)) +cond_68_case_0.i.i: ; preds = %__hugr__.__tk2_qalloc.50.exit.i + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_qalloc.64.exit.i: ; preds = %id_bb.i111.i - %.fca.1.extract.i112.i = extractvalue { i1, i64 } %6, 1 - tail call void @___rxy(i64 %.fca.1.extract.i112.i, double 0x400921FB54442D18, double 0.000000e+00) - %qalloc.i113.i = tail call i64 @___qalloc() - %not_max.not.i114.i = icmp eq i64 %qalloc.i113.i, -1 - br i1 %not_max.not.i114.i, label %id_bb.i117.i, label %reset_bb.i115.i - -reset_bb.i115.i: ; preds = %__hugr__.__tk2_qalloc.64.exit.i - tail call void @___reset(i64 %qalloc.i113.i) - br label %id_bb.i117.i - -id_bb.i117.i: ; preds = %reset_bb.i115.i, %__hugr__.__tk2_qalloc.64.exit.i - %7 = insertvalue { i1, i64 } { i1 true, i64 poison }, i64 %qalloc.i113.i, 1 - %8 = select i1 %not_max.not.i114.i, { i1, i64 } { i1 false, i64 poison }, { i1, i64 } %7 - %.fca.0.extract.i116.i = extractvalue { i1, i64 } %8, 0 - br i1 %.fca.0.extract.i116.i, label %__hugr__.main.1.exit, label %cond_82_case_0.i.i - -cond_82_case_0.i.i: ; preds = %id_bb.i117.i - tail call void @panic(i32 1001, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @"e_No more qu.3B2EEBF0.0", i64 0, i64 0)) +__hugr__.__tk2_qalloc.64.exit.i: ; preds = %__hugr__.__tk2_qalloc.50.exit.i + tail call void @___reset(i64 %qalloc.i103.i) + tail call void @___rxy(i64 %qalloc.i103.i, double 0x400921FB54442D18, double 0.000000e+00) + %qalloc.i105.i = tail call i64 @___qalloc() + %not_max.not.not.i106.i = icmp eq i64 %qalloc.i105.i, -1 + br i1 %not_max.not.not.i106.i, label %cond_82_case_0.i.i, label %__hugr__.main.1.exit + +cond_82_case_0.i.i: ; preds = %__hugr__.__tk2_qalloc.64.exit.i + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.main.1.exit: ; preds = %id_bb.i117.i - %.fca.1.extract.i118.i = extractvalue { i1, i64 } %8, 1 - %lazy_measure.i = tail call i64 @___lazy_measure(i64 %.fca.1.extract.i.i) - tail call void @___qfree(i64 %.fca.1.extract.i.i) +__hugr__.main.1.exit: ; preds = %__hugr__.__tk2_qalloc.64.exit.i + tail call void @___reset(i64 %qalloc.i105.i) + %lazy_measure.i = tail call i64 @___lazy_measure(i64 %qalloc.i.i) + tail call void @___qfree(i64 %qalloc.i.i) %read_bool.i = tail call i1 @___read_future_bool(i64 %lazy_measure.i) tail call void @___dec_future_refcount(i64 %lazy_measure.i) - tail call void @print_bool(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @res_c0.7C14CD6E.0, i64 0, i64 0), i64 12, i1 %read_bool.i) - %lazy_measure22.i = tail call i64 @___lazy_measure(i64 %.fca.1.extract.i106.i) - tail call void @___qfree(i64 %.fca.1.extract.i106.i) + tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool.i) + %lazy_measure22.i = tail call i64 @___lazy_measure(i64 %qalloc.i101.i) + tail call void @___qfree(i64 %qalloc.i101.i) %read_bool35.i = tail call i1 @___read_future_bool(i64 %lazy_measure22.i) tail call void @___dec_future_refcount(i64 %lazy_measure22.i) - tail call void @print_bool(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @res_c1.1F7A6571.0, i64 0, i64 0), i64 12, i1 %read_bool35.i) - %lazy_measure44.i = tail call i64 @___lazy_measure(i64 %.fca.1.extract.i112.i) - tail call void @___qfree(i64 %.fca.1.extract.i112.i) + tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool35.i) + %lazy_measure44.i = tail call i64 @___lazy_measure(i64 %qalloc.i103.i) + tail call void @___qfree(i64 %qalloc.i103.i) %read_bool57.i = tail call i1 @___read_future_bool(i64 %lazy_measure44.i) tail call void @___dec_future_refcount(i64 %lazy_measure44.i) - tail call void @print_bool(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @res_c2.60825383.0, i64 0, i64 0), i64 12, i1 %read_bool57.i) - tail call void @___rxy(i64 %.fca.1.extract.i118.i, double 0x400921FB54442D18, double 0.000000e+00) - %lazy_measure67.i = tail call i64 @___lazy_measure(i64 %.fca.1.extract.i118.i) - tail call void @___qfree(i64 %.fca.1.extract.i118.i) + tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool57.i) + tail call void @___rxy(i64 %qalloc.i105.i, double 0x400921FB54442D18, double 0.000000e+00) + %lazy_measure67.i = tail call i64 @___lazy_measure(i64 %qalloc.i105.i) + tail call void @___qfree(i64 %qalloc.i105.i) %read_bool80.i = tail call i1 @___read_future_bool(i64 %lazy_measure67.i) tail call void @___dec_future_refcount(i64 %lazy_measure67.i) - tail call void @print_bool(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @res_c3.B223E16D.0, i64 0, i64 0), i64 12, i1 %read_bool80.i) - %9 = tail call i64 @teardown() - ret i64 %9 + tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool80.i) + %1 = tail call i64 @teardown() + ret i64 %1 } declare void @setup(i64) local_unnamed_addr diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-measure_qb_array/measure_qb_array_x86_64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-measure_qb_array/measure_qb_array_x86_64-apple-darwin index e27edecd6..8399ca245 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-measure_qb_array/measure_qb_array_x86_64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-measure_qb_array/measure_qb_array_x86_64-apple-darwin @@ -1,6 +1,6 @@ ; ModuleID = 'hugr' source_filename = "hugr" -target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" +target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128" target triple = "x86_64-apple-darwin" @"e_Array alre.5A300C2A.0" = private constant [57 x i8] c"8EXIT:INT:Array already contains an element at this index" @@ -8,12 +8,12 @@ target triple = "x86_64-apple-darwin" @"e_Array cont.EFA5AC45.0" = private constant [70 x i8] c"EEXIT:INT:Array contains non-borrowed elements and cannot be discarded" @"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." -declare i8* @heap_alloc(i64) local_unnamed_addr +declare ptr @heap_alloc(i64) local_unnamed_addr ; Function Attrs: noreturn -declare void @panic(i32, i8*) local_unnamed_addr #0 +declare void @panic(i32, ptr) local_unnamed_addr #0 -declare void @heap_free(i8*) local_unnamed_addr +declare void @heap_free(ptr) local_unnamed_addr declare void @___dec_future_refcount(i64) local_unnamed_addr @@ -30,279 +30,600 @@ declare void @___reset(i64) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr { entry: tail call void @setup(i64 %0) - %1 = tail call i8* @heap_alloc(i64 80) - %2 = bitcast i8* %1 to i64* - %3 = tail call i8* @heap_alloc(i64 8) - %4 = bitcast i8* %3 to i64* - store i64 -1, i64* %4, align 1 - br label %cond_20_case_1.i - -cond_20_case_1.i: ; preds = %cond_exit_20.i, %entry - %"15_0.sroa.0.0294.i" = phi i64 [ 0, %entry ], [ %5, %cond_exit_20.i ] - %5 = add nuw nsw i64 %"15_0.sroa.0.0294.i", 1 + %1 = tail call ptr @heap_alloc(i64 80) + %2 = tail call ptr @heap_alloc(i64 8) + store i64 -1, ptr %2, align 1 %qalloc.i.i = tail call i64 @___qalloc() - %not_max.not.i.i = icmp eq i64 %qalloc.i.i, -1 - br i1 %not_max.not.i.i, label %id_bb.i.i, label %reset_bb.i.i + %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 + br i1 %not_max.not.not.i.i, label %cond_236_case_0.i.i, label %__barray_check_bounds.exit.i -reset_bb.i.i: ; preds = %cond_20_case_1.i - tail call void @___reset(i64 %qalloc.i.i) - br label %id_bb.i.i - -id_bb.i.i: ; preds = %reset_bb.i.i, %cond_20_case_1.i - %6 = insertvalue { i1, i64 } { i1 true, i64 poison }, i64 %qalloc.i.i, 1 - %7 = select i1 %not_max.not.i.i, { i1, i64 } { i1 false, i64 poison }, { i1, i64 } %6 - %.fca.0.extract.i.i = extractvalue { i1, i64 } %7, 0 - br i1 %.fca.0.extract.i.i, label %__barray_check_bounds.exit.i, label %cond_236_case_0.i.i - -cond_236_case_0.i.i: ; preds = %id_bb.i.i - tail call void @panic(i32 1001, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @"e_No more qu.3B2EEBF0.0", i64 0, i64 0)) +cond_236_case_0.i.i: ; preds = %cond_exit_20.i.8, %cond_exit_20.i.7, %cond_exit_20.i.6, %cond_exit_20.i.5, %cond_exit_20.i.4, %cond_exit_20.i.3, %cond_exit_20.i.2, %cond_exit_20.i.1, %cond_exit_20.i, %entry + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__barray_check_bounds.exit.i: ; preds = %id_bb.i.i - %8 = lshr i64 %"15_0.sroa.0.0294.i", 6 - %9 = getelementptr inbounds i64, i64* %4, i64 %8 - %10 = load i64, i64* %9, align 4 - %11 = shl nuw nsw i64 1, %"15_0.sroa.0.0294.i" - %12 = and i64 %10, %11 - %.not.i.i = icmp eq i64 %12, 0 - br i1 %.not.i.i, label %panic.i.i, label %cond_exit_20.i - -panic.i.i: ; preds = %__barray_check_bounds.exit.i - tail call void @panic(i32 1002, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @"e_Array alre.5A300C2A.0", i64 0, i64 0)) +__barray_check_bounds.exit.i: ; preds = %entry + tail call void @___reset(i64 %qalloc.i.i) + %3 = load i64, ptr %2, align 4 + %4 = trunc i64 %3 to i1 + br i1 %4, label %cond_exit_20.i, label %panic.i.i + +panic.i.i: ; preds = %__barray_check_bounds.exit.i.9, %__barray_check_bounds.exit.i.8, %__barray_check_bounds.exit.i.7, %__barray_check_bounds.exit.i.6, %__barray_check_bounds.exit.i.5, %__barray_check_bounds.exit.i.4, %__barray_check_bounds.exit.i.3, %__barray_check_bounds.exit.i.2, %__barray_check_bounds.exit.i.1, %__barray_check_bounds.exit.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable cond_exit_20.i: ; preds = %__barray_check_bounds.exit.i - %.fca.1.extract.i.i = extractvalue { i1, i64 } %7, 1 - %13 = xor i64 %10, %11 - store i64 %13, i64* %9, align 4 - %14 = getelementptr inbounds i64, i64* %2, i64 %"15_0.sroa.0.0294.i" - store i64 %.fca.1.extract.i.i, i64* %14, align 4 - %exitcond.not.i = icmp eq i64 %5, 10 - br i1 %exitcond.not.i, label %loop_out.i, label %cond_20_case_1.i - -loop_out.i: ; preds = %cond_exit_20.i - %15 = load i64, i64* %4, align 4 - %16 = and i64 %15, 1 - %.not.i258.i = icmp eq i64 %16, 0 - br i1 %.not.i258.i, label %__barray_mask_borrow.exit.i, label %panic.i259.i - -panic.i259.i: ; preds = %loop_out.i - tail call void @panic(i32 1002, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @"e_Array elem.E746B1A3.0", i64 0, i64 0)) + %5 = and i64 %3, -2 + store i64 %5, ptr %2, align 4 + store i64 %qalloc.i.i, ptr %1, align 4 + %qalloc.i.i.1 = tail call i64 @___qalloc() + %not_max.not.not.i.i.1 = icmp eq i64 %qalloc.i.i.1, -1 + br i1 %not_max.not.not.i.i.1, label %cond_236_case_0.i.i, label %__barray_check_bounds.exit.i.1 + +__barray_check_bounds.exit.i.1: ; preds = %cond_exit_20.i + tail call void @___reset(i64 %qalloc.i.i.1) + %6 = load i64, ptr %2, align 4 + %7 = and i64 %6, 2 + %.not = icmp eq i64 %7, 0 + br i1 %.not, label %panic.i.i, label %cond_exit_20.i.1 + +cond_exit_20.i.1: ; preds = %__barray_check_bounds.exit.i.1 + %8 = and i64 %6, -3 + store i64 %8, ptr %2, align 4 + %9 = getelementptr inbounds nuw i8, ptr %1, i64 8 + store i64 %qalloc.i.i.1, ptr %9, align 4 + %qalloc.i.i.2 = tail call i64 @___qalloc() + %not_max.not.not.i.i.2 = icmp eq i64 %qalloc.i.i.2, -1 + br i1 %not_max.not.not.i.i.2, label %cond_236_case_0.i.i, label %__barray_check_bounds.exit.i.2 + +__barray_check_bounds.exit.i.2: ; preds = %cond_exit_20.i.1 + tail call void @___reset(i64 %qalloc.i.i.2) + %10 = load i64, ptr %2, align 4 + %11 = and i64 %10, 4 + %.not1 = icmp eq i64 %11, 0 + br i1 %.not1, label %panic.i.i, label %cond_exit_20.i.2 + +cond_exit_20.i.2: ; preds = %__barray_check_bounds.exit.i.2 + %12 = and i64 %10, -5 + store i64 %12, ptr %2, align 4 + %13 = getelementptr inbounds nuw i8, ptr %1, i64 16 + store i64 %qalloc.i.i.2, ptr %13, align 4 + %qalloc.i.i.3 = tail call i64 @___qalloc() + %not_max.not.not.i.i.3 = icmp eq i64 %qalloc.i.i.3, -1 + br i1 %not_max.not.not.i.i.3, label %cond_236_case_0.i.i, label %__barray_check_bounds.exit.i.3 + +__barray_check_bounds.exit.i.3: ; preds = %cond_exit_20.i.2 + tail call void @___reset(i64 %qalloc.i.i.3) + %14 = load i64, ptr %2, align 4 + %15 = and i64 %14, 8 + %.not2 = icmp eq i64 %15, 0 + br i1 %.not2, label %panic.i.i, label %cond_exit_20.i.3 + +cond_exit_20.i.3: ; preds = %__barray_check_bounds.exit.i.3 + %16 = and i64 %14, -9 + store i64 %16, ptr %2, align 4 + %17 = getelementptr inbounds nuw i8, ptr %1, i64 24 + store i64 %qalloc.i.i.3, ptr %17, align 4 + %qalloc.i.i.4 = tail call i64 @___qalloc() + %not_max.not.not.i.i.4 = icmp eq i64 %qalloc.i.i.4, -1 + br i1 %not_max.not.not.i.i.4, label %cond_236_case_0.i.i, label %__barray_check_bounds.exit.i.4 + +__barray_check_bounds.exit.i.4: ; preds = %cond_exit_20.i.3 + tail call void @___reset(i64 %qalloc.i.i.4) + %18 = load i64, ptr %2, align 4 + %19 = and i64 %18, 16 + %.not3 = icmp eq i64 %19, 0 + br i1 %.not3, label %panic.i.i, label %cond_exit_20.i.4 + +cond_exit_20.i.4: ; preds = %__barray_check_bounds.exit.i.4 + %20 = and i64 %18, -17 + store i64 %20, ptr %2, align 4 + %21 = getelementptr inbounds nuw i8, ptr %1, i64 32 + store i64 %qalloc.i.i.4, ptr %21, align 4 + %qalloc.i.i.5 = tail call i64 @___qalloc() + %not_max.not.not.i.i.5 = icmp eq i64 %qalloc.i.i.5, -1 + br i1 %not_max.not.not.i.i.5, label %cond_236_case_0.i.i, label %__barray_check_bounds.exit.i.5 + +__barray_check_bounds.exit.i.5: ; preds = %cond_exit_20.i.4 + tail call void @___reset(i64 %qalloc.i.i.5) + %22 = load i64, ptr %2, align 4 + %23 = and i64 %22, 32 + %.not4 = icmp eq i64 %23, 0 + br i1 %.not4, label %panic.i.i, label %cond_exit_20.i.5 + +cond_exit_20.i.5: ; preds = %__barray_check_bounds.exit.i.5 + %24 = and i64 %22, -33 + store i64 %24, ptr %2, align 4 + %25 = getelementptr inbounds nuw i8, ptr %1, i64 40 + store i64 %qalloc.i.i.5, ptr %25, align 4 + %qalloc.i.i.6 = tail call i64 @___qalloc() + %not_max.not.not.i.i.6 = icmp eq i64 %qalloc.i.i.6, -1 + br i1 %not_max.not.not.i.i.6, label %cond_236_case_0.i.i, label %__barray_check_bounds.exit.i.6 + +__barray_check_bounds.exit.i.6: ; preds = %cond_exit_20.i.5 + tail call void @___reset(i64 %qalloc.i.i.6) + %26 = load i64, ptr %2, align 4 + %27 = and i64 %26, 64 + %.not5 = icmp eq i64 %27, 0 + br i1 %.not5, label %panic.i.i, label %cond_exit_20.i.6 + +cond_exit_20.i.6: ; preds = %__barray_check_bounds.exit.i.6 + %28 = and i64 %26, -65 + store i64 %28, ptr %2, align 4 + %29 = getelementptr inbounds nuw i8, ptr %1, i64 48 + store i64 %qalloc.i.i.6, ptr %29, align 4 + %qalloc.i.i.7 = tail call i64 @___qalloc() + %not_max.not.not.i.i.7 = icmp eq i64 %qalloc.i.i.7, -1 + br i1 %not_max.not.not.i.i.7, label %cond_236_case_0.i.i, label %__barray_check_bounds.exit.i.7 + +__barray_check_bounds.exit.i.7: ; preds = %cond_exit_20.i.6 + tail call void @___reset(i64 %qalloc.i.i.7) + %30 = load i64, ptr %2, align 4 + %31 = and i64 %30, 128 + %.not6 = icmp eq i64 %31, 0 + br i1 %.not6, label %panic.i.i, label %cond_exit_20.i.7 + +cond_exit_20.i.7: ; preds = %__barray_check_bounds.exit.i.7 + %32 = and i64 %30, -129 + store i64 %32, ptr %2, align 4 + %33 = getelementptr inbounds nuw i8, ptr %1, i64 56 + store i64 %qalloc.i.i.7, ptr %33, align 4 + %qalloc.i.i.8 = tail call i64 @___qalloc() + %not_max.not.not.i.i.8 = icmp eq i64 %qalloc.i.i.8, -1 + br i1 %not_max.not.not.i.i.8, label %cond_236_case_0.i.i, label %__barray_check_bounds.exit.i.8 + +__barray_check_bounds.exit.i.8: ; preds = %cond_exit_20.i.7 + tail call void @___reset(i64 %qalloc.i.i.8) + %34 = load i64, ptr %2, align 4 + %35 = and i64 %34, 256 + %.not7 = icmp eq i64 %35, 0 + br i1 %.not7, label %panic.i.i, label %cond_exit_20.i.8 + +cond_exit_20.i.8: ; preds = %__barray_check_bounds.exit.i.8 + %36 = and i64 %34, -257 + store i64 %36, ptr %2, align 4 + %37 = getelementptr inbounds nuw i8, ptr %1, i64 64 + store i64 %qalloc.i.i.8, ptr %37, align 4 + %qalloc.i.i.9 = tail call i64 @___qalloc() + %not_max.not.not.i.i.9 = icmp eq i64 %qalloc.i.i.9, -1 + br i1 %not_max.not.not.i.i.9, label %cond_236_case_0.i.i, label %__barray_check_bounds.exit.i.9 + +__barray_check_bounds.exit.i.9: ; preds = %cond_exit_20.i.8 + tail call void @___reset(i64 %qalloc.i.i.9) + %38 = load i64, ptr %2, align 4 + %39 = and i64 %38, 512 + %.not8 = icmp eq i64 %39, 0 + br i1 %.not8, label %panic.i.i, label %cond_exit_20.i.9 + +cond_exit_20.i.9: ; preds = %__barray_check_bounds.exit.i.9 + %40 = and i64 %38, -513 + store i64 %40, ptr %2, align 4 + %41 = getelementptr inbounds nuw i8, ptr %1, i64 72 + store i64 %qalloc.i.i.9, ptr %41, align 4 + %"128.fca.0.insert.i" = insertvalue { ptr, ptr, i64 } poison, ptr %1, 0 + %"128.fca.1.insert.i" = insertvalue { ptr, ptr, i64 } %"128.fca.0.insert.i", ptr %2, 1 + %"128.fca.2.insert.i" = insertvalue { ptr, ptr, i64 } %"128.fca.1.insert.i", i64 0, 2 + %42 = load i64, ptr %2, align 4 + %43 = trunc i64 %42 to i1 + br i1 %43, label %panic.i257.i, label %__barray_mask_borrow.exit.i + +panic.i257.i: ; preds = %cond_exit_20.i.9 + tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_mask_borrow.exit.i: ; preds = %loop_out.i - %17 = xor i64 %15, 1 - store i64 %17, i64* %4, align 4 - %18 = load i64, i64* %2, align 4 - tail call void @___rxy(i64 %18, double 0x400921FB54442D18, double 0.000000e+00) - %19 = load i64, i64* %4, align 4 - %20 = and i64 %19, 1 - %.not.i260.i = icmp eq i64 %20, 0 - br i1 %.not.i260.i, label %panic.i261.i, label %__barray_mask_return.exit262.i - -panic.i261.i: ; preds = %__barray_mask_borrow.exit.i - tail call void @panic(i32 1002, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @"e_Array alre.5A300C2A.0", i64 0, i64 0)) - unreachable +__barray_mask_borrow.exit.i: ; preds = %cond_exit_20.i.9 + %44 = or disjoint i64 %42, 1 + store i64 %44, ptr %2, align 4 + %45 = load i64, ptr %1, align 4 + tail call void @___rxy(i64 %45, double 0x400921FB54442D18, double 0.000000e+00) + %46 = load i64, ptr %2, align 4 + %47 = trunc i64 %46 to i1 + br i1 %47, label %__barray_mask_return.exit259.i, label %panic.i258.i -__barray_mask_return.exit262.i: ; preds = %__barray_mask_borrow.exit.i - %21 = xor i64 %19, 1 - store i64 %21, i64* %4, align 4 - store i64 %18, i64* %2, align 4 - %22 = load i64, i64* %4, align 4 - %23 = and i64 %22, 4 - %.not.i263.i = icmp eq i64 %23, 0 - br i1 %.not.i263.i, label %__barray_mask_borrow.exit265.i, label %panic.i264.i - -panic.i264.i: ; preds = %__barray_mask_return.exit262.i - tail call void @panic(i32 1002, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @"e_Array elem.E746B1A3.0", i64 0, i64 0)) +panic.i258.i: ; preds = %__barray_mask_borrow.exit.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_mask_borrow.exit265.i: ; preds = %__barray_mask_return.exit262.i - %24 = xor i64 %22, 4 - store i64 %24, i64* %4, align 4 - %25 = getelementptr inbounds i8, i8* %1, i64 16 - %26 = bitcast i8* %25 to i64* - %27 = load i64, i64* %26, align 4 - tail call void @___rxy(i64 %27, double 0x400921FB54442D18, double 0.000000e+00) - %28 = load i64, i64* %4, align 4 - %29 = and i64 %28, 4 - %.not.i266.i = icmp eq i64 %29, 0 - br i1 %.not.i266.i, label %panic.i267.i, label %__barray_mask_return.exit268.i - -panic.i267.i: ; preds = %__barray_mask_borrow.exit265.i - tail call void @panic(i32 1002, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @"e_Array alre.5A300C2A.0", i64 0, i64 0)) +__barray_mask_return.exit259.i: ; preds = %__barray_mask_borrow.exit.i + %48 = and i64 %46, -2 + store i64 %48, ptr %2, align 4 + store i64 %45, ptr %1, align 4 + %49 = load i64, ptr %2, align 4 + %50 = and i64 %49, 4 + %.not.i = icmp eq i64 %50, 0 + br i1 %.not.i, label %__barray_mask_borrow.exit261.i, label %panic.i260.i + +panic.i260.i: ; preds = %__barray_mask_return.exit259.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_mask_return.exit268.i: ; preds = %__barray_mask_borrow.exit265.i - %30 = xor i64 %28, 4 - store i64 %30, i64* %4, align 4 - store i64 %27, i64* %26, align 4 - %31 = load i64, i64* %4, align 4 - %32 = and i64 %31, 8 - %.not.i269.i = icmp eq i64 %32, 0 - br i1 %.not.i269.i, label %__barray_mask_borrow.exit271.i, label %panic.i270.i - -panic.i270.i: ; preds = %__barray_mask_return.exit268.i - tail call void @panic(i32 1002, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @"e_Array elem.E746B1A3.0", i64 0, i64 0)) +__barray_mask_borrow.exit261.i: ; preds = %__barray_mask_return.exit259.i + %51 = or disjoint i64 %49, 4 + store i64 %51, ptr %2, align 4 + %52 = load i64, ptr %13, align 4 + tail call void @___rxy(i64 %52, double 0x400921FB54442D18, double 0.000000e+00) + %53 = load i64, ptr %2, align 4 + %54 = and i64 %53, 4 + %.not289.i = icmp eq i64 %54, 0 + br i1 %.not289.i, label %panic.i262.i, label %__barray_mask_return.exit263.i + +panic.i262.i: ; preds = %__barray_mask_borrow.exit261.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_mask_borrow.exit271.i: ; preds = %__barray_mask_return.exit268.i - %33 = xor i64 %31, 8 - store i64 %33, i64* %4, align 4 - %34 = getelementptr inbounds i8, i8* %1, i64 24 - %35 = bitcast i8* %34 to i64* - %36 = load i64, i64* %35, align 4 - tail call void @___rxy(i64 %36, double 0x400921FB54442D18, double 0.000000e+00) - %37 = load i64, i64* %4, align 4 - %38 = and i64 %37, 8 - %.not.i272.i = icmp eq i64 %38, 0 - br i1 %.not.i272.i, label %panic.i273.i, label %__barray_mask_return.exit274.i - -panic.i273.i: ; preds = %__barray_mask_borrow.exit271.i - tail call void @panic(i32 1002, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @"e_Array alre.5A300C2A.0", i64 0, i64 0)) +__barray_mask_return.exit263.i: ; preds = %__barray_mask_borrow.exit261.i + %55 = and i64 %53, -5 + store i64 %55, ptr %2, align 4 + store i64 %52, ptr %13, align 4 + %56 = load i64, ptr %2, align 4 + %57 = and i64 %56, 8 + %.not290.i = icmp eq i64 %57, 0 + br i1 %.not290.i, label %__barray_mask_borrow.exit265.i, label %panic.i264.i + +panic.i264.i: ; preds = %__barray_mask_return.exit263.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_mask_return.exit274.i: ; preds = %__barray_mask_borrow.exit271.i - %39 = xor i64 %37, 8 - store i64 %39, i64* %4, align 4 - store i64 %36, i64* %35, align 4 - %40 = load i64, i64* %4, align 4 - %41 = and i64 %40, 512 - %.not.i275.i = icmp eq i64 %41, 0 - br i1 %.not.i275.i, label %__barray_mask_borrow.exit277.i, label %panic.i276.i - -panic.i276.i: ; preds = %__barray_mask_return.exit274.i - tail call void @panic(i32 1002, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @"e_Array elem.E746B1A3.0", i64 0, i64 0)) +__barray_mask_borrow.exit265.i: ; preds = %__barray_mask_return.exit263.i + %58 = or disjoint i64 %56, 8 + store i64 %58, ptr %2, align 4 + %59 = load i64, ptr %17, align 4 + tail call void @___rxy(i64 %59, double 0x400921FB54442D18, double 0.000000e+00) + %60 = load i64, ptr %2, align 4 + %61 = and i64 %60, 8 + %.not291.i = icmp eq i64 %61, 0 + br i1 %.not291.i, label %panic.i266.i, label %__barray_mask_return.exit267.i + +panic.i266.i: ; preds = %__barray_mask_borrow.exit265.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_mask_borrow.exit277.i: ; preds = %__barray_mask_return.exit274.i - %42 = xor i64 %40, 512 - store i64 %42, i64* %4, align 4 - %43 = getelementptr inbounds i8, i8* %1, i64 72 - %44 = bitcast i8* %43 to i64* - %45 = load i64, i64* %44, align 4 - tail call void @___rxy(i64 %45, double 0x400921FB54442D18, double 0.000000e+00) - %46 = load i64, i64* %4, align 4 - %47 = and i64 %46, 512 - %.not.i278.i = icmp eq i64 %47, 0 - br i1 %.not.i278.i, label %panic.i279.i, label %__barray_mask_return.exit280.i +__barray_mask_return.exit267.i: ; preds = %__barray_mask_borrow.exit265.i + %62 = and i64 %60, -9 + store i64 %62, ptr %2, align 4 + store i64 %59, ptr %17, align 4 + %63 = load i64, ptr %2, align 4 + %64 = and i64 %63, 512 + %.not292.i = icmp eq i64 %64, 0 + br i1 %.not292.i, label %__barray_mask_borrow.exit269.i, label %panic.i268.i + +panic.i268.i: ; preds = %__barray_mask_return.exit267.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") + unreachable -panic.i279.i: ; preds = %__barray_mask_borrow.exit277.i - tail call void @panic(i32 1002, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @"e_Array alre.5A300C2A.0", i64 0, i64 0)) +__barray_mask_borrow.exit269.i: ; preds = %__barray_mask_return.exit267.i + %65 = or disjoint i64 %63, 512 + store i64 %65, ptr %2, align 4 + %66 = load i64, ptr %41, align 4 + tail call void @___rxy(i64 %66, double 0x400921FB54442D18, double 0.000000e+00) + %67 = load i64, ptr %2, align 4 + %68 = and i64 %67, 512 + %.not293.i = icmp eq i64 %68, 0 + br i1 %.not293.i, label %panic.i270.i, label %__barray_mask_return.exit271.i + +panic.i270.i: ; preds = %__barray_mask_borrow.exit269.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_mask_return.exit280.i: ; preds = %__barray_mask_borrow.exit277.i - %48 = xor i64 %46, 512 - store i64 %48, i64* %4, align 4 - store i64 %45, i64* %44, align 4 - %49 = tail call i8* @heap_alloc(i64 240) - %50 = bitcast i8* %49 to { i1, i64, i1 }* - %51 = tail call i8* @heap_alloc(i64 8) - %52 = bitcast i8* %51 to i64* - store i64 -1, i64* %52, align 1 - br label %56 - -mask_block_ok.i.i.i.i: ; preds = %cond_exit_353.i.i - %53 = load i64, i64* %4, align 4 - %54 = or i64 %53, -1024 - store i64 %54, i64* %4, align 4 - %55 = icmp eq i64 %54, -1 - br i1 %55, label %"__hugr__.$measure_array$$n(10).277.exit.i", label %mask_block_err.i.i.i.i - -"__hugr__.$measure_array$$n(10).277.exit.i": ; preds = %mask_block_ok.i.i.i.i - tail call void @heap_free(i8* nonnull %1) - tail call void @heap_free(i8* nonnull %3) - br label %__barray_check_bounds.exit283.i +__barray_mask_return.exit271.i: ; preds = %__barray_mask_borrow.exit269.i + %69 = and i64 %67, -513 + store i64 %69, ptr %2, align 4 + store i64 %66, ptr %41, align 4 + %70 = insertvalue { { ptr, ptr, i64 }, i64 } poison, { ptr, ptr, i64 } %"128.fca.2.insert.i", 0 + %71 = tail call ptr @heap_alloc(i64 240) + %72 = tail call ptr @heap_alloc(i64 8) + store i64 -1, ptr %72, align 1 + br label %__barray_check_bounds.exit.i.i.i + +73: ; preds = %loop_body.i.i + %74 = lshr i64 %.fca.2.extract83.i.i.i, 6 + %75 = getelementptr i64, ptr %.fca.1.extract82.i.i.i, i64 %74 + %76 = load i64, ptr %75, align 4 + %77 = and i64 %.fca.2.extract83.i.i.i, 63 + %78 = sub nuw nsw i64 64, %77 + %79 = lshr i64 -1, %78 + %80 = icmp eq i64 %77, 0 + %81 = select i1 %80, i64 0, i64 %79 + %82 = or i64 %76, %81 + store i64 %82, ptr %75, align 4 + %last_valid.i.i.i.i = add i64 %.fca.2.extract83.i.i.i, 9 + %83 = lshr i64 %last_valid.i.i.i.i, 6 + %84 = getelementptr inbounds nuw i64, ptr %.fca.1.extract82.i.i.i, i64 %83 + %85 = load i64, ptr %84, align 4 + %86 = and i64 %last_valid.i.i.i.i, 63 + %87 = shl nsw i64 -2, %86 + %88 = icmp eq i64 %86, 63 + %89 = select i1 %88, i64 0, i64 %87 + %90 = or i64 %85, %89 + store i64 %90, ptr %84, align 4 + %reass.sub.i.i.i.i = sub nsw i64 %83, %74 + %.not.i.i.i.i = icmp eq i64 %reass.sub.i.i.i.i, -1 + br i1 %.not.i.i.i.i, label %"__hugr__.$measure_array$$n(10).277.exit.i", label %mask_block_ok.i.i.i.i + +91: ; preds = %mask_block_ok.i.i.i.i + %92 = add nuw i64 %.02.i.i.i.i, 1 + %exitcond.not.i.i.i.i = icmp eq i64 %.02.i.i.i.i, %reass.sub.i.i.i.i + br i1 %exitcond.not.i.i.i.i, label %"__hugr__.$measure_array$$n(10).277.exit.i", label %mask_block_ok.i.i.i.i + +mask_block_ok.i.i.i.i: ; preds = %73, %91 + %.02.i.i.i.i = phi i64 [ %92, %91 ], [ 0, %73 ] + %gep.i.i.i.i = getelementptr i64, ptr %75, i64 %.02.i.i.i.i + %93 = load i64, ptr %gep.i.i.i.i, align 4 + %94 = icmp eq i64 %93, -1 + br i1 %94, label %91, label %mask_block_err.i.i.i.i mask_block_err.i.i.i.i: ; preds = %mask_block_ok.i.i.i.i - tail call void @panic(i32 1002, i8* getelementptr inbounds ([70 x i8], [70 x i8]* @"e_Array cont.EFA5AC45.0", i64 0, i64 0)) + tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -56: ; preds = %cond_exit_353.i.i, %__barray_mask_return.exit280.i - %"303_0.sroa.15.0.i296.i" = phi i64 [ 0, %__barray_mask_return.exit280.i ], [ %57, %cond_exit_353.i.i ] - %57 = add nuw nsw i64 %"303_0.sroa.15.0.i296.i", 1 - %58 = lshr i64 %"303_0.sroa.15.0.i296.i", 6 - %59 = getelementptr inbounds i64, i64* %4, i64 %58 - %60 = load i64, i64* %59, align 4 - %61 = shl nuw nsw i64 1, %"303_0.sroa.15.0.i296.i" - %62 = and i64 %60, %61 - %.not.i99.i.i.i = icmp eq i64 %62, 0 - br i1 %.not.i99.i.i.i, label %__barray_check_bounds.exit.i.i, label %panic.i.i.i.i - -panic.i.i.i.i: ; preds = %56 - tail call void @panic(i32 1002, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @"e_Array elem.E746B1A3.0", i64 0, i64 0)) +__barray_check_bounds.exit.i.i.i: ; preds = %loop_body.i.i, %__barray_mask_return.exit271.i + %.fca.2.extract83.i187.i.i = phi i64 [ 0, %__barray_mask_return.exit271.i ], [ %.fca.2.extract83.i.i.i, %loop_body.i.i ] + %.fca.1.extract82.i186.i.i = phi ptr [ %2, %__barray_mask_return.exit271.i ], [ %.fca.1.extract82.i.i.i, %loop_body.i.i ] + %.fca.0.extract81.i185.i.i = phi ptr [ %1, %__barray_mask_return.exit271.i ], [ %.fca.0.extract81.i.i.i, %loop_body.i.i ] + %"303_0.sroa.15.0184.i.i" = phi i64 [ 0, %__barray_mask_return.exit271.i ], [ %95, %loop_body.i.i ] + %.pn165183.i.i = phi { { ptr, ptr, i64 }, i64 } [ %70, %__barray_mask_return.exit271.i ], [ %110, %loop_body.i.i ] + %95 = add nuw nsw i64 %"303_0.sroa.15.0184.i.i", 1 + %96 = add i64 %"303_0.sroa.15.0184.i.i", %.fca.2.extract83.i187.i.i + %97 = lshr i64 %96, 6 + %98 = getelementptr inbounds nuw i64, ptr %.fca.1.extract82.i186.i.i, i64 %97 + %99 = load i64, ptr %98, align 4 + %100 = and i64 %96, 63 + %101 = lshr i64 %99, %100 + %102 = trunc i64 %101 to i1 + br i1 %102, label %panic.i.i.i.i, label %__barray_check_bounds.exit.i.i + +panic.i.i.i.i: ; preds = %__barray_check_bounds.exit.i.i.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_check_bounds.exit.i.i: ; preds = %56 - %63 = xor i64 %60, %61 - store i64 %63, i64* %59, align 4 - %64 = getelementptr inbounds i64, i64* %2, i64 %"303_0.sroa.15.0.i296.i" - %65 = load i64, i64* %64, align 4 - %lazy_measure.i.i = tail call i64 @___lazy_measure(i64 %65) - tail call void @___qfree(i64 %65) - %66 = getelementptr inbounds i64, i64* %52, i64 %58 - %67 = load i64, i64* %66, align 4 - %68 = and i64 %67, %61 - %.not.i.i.i = icmp eq i64 %68, 0 - br i1 %.not.i.i.i, label %panic.i.i.i, label %cond_exit_353.i.i +__barray_check_bounds.exit.i.i: ; preds = %__barray_check_bounds.exit.i.i.i + %103 = shl nuw i64 1, %100 + %104 = xor i64 %103, %99 + store i64 %104, ptr %98, align 4 + %105 = getelementptr inbounds i64, ptr %.fca.0.extract81.i185.i.i, i64 %96 + %106 = load i64, ptr %105, align 4 + %lazy_measure.i.i = tail call i64 @___lazy_measure(i64 %106) + tail call void @___qfree(i64 %106) + %107 = load i64, ptr %72, align 4 + %108 = lshr i64 %107, %"303_0.sroa.15.0184.i.i" + %109 = trunc i64 %108 to i1 + br i1 %109, label %loop_body.i.i, label %panic.i.i.i panic.i.i.i: ; preds = %__barray_check_bounds.exit.i.i - tail call void @panic(i32 1002, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @"e_Array alre.5A300C2A.0", i64 0, i64 0)) + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -cond_exit_353.i.i: ; preds = %__barray_check_bounds.exit.i.i - %"367_054.fca.1.insert.i.i" = insertvalue { i1, i64, i1 } { i1 true, i64 poison, i1 poison }, i64 %lazy_measure.i.i, 1 - %69 = xor i64 %67, %61 - store i64 %69, i64* %66, align 4 - %70 = getelementptr inbounds { i1, i64, i1 }, { i1, i64, i1 }* %50, i64 %"303_0.sroa.15.0.i296.i" - store { i1, i64, i1 } %"367_054.fca.1.insert.i.i", { i1, i64, i1 }* %70, align 4 - %exitcond297.not.i = icmp eq i64 %57, 10 - br i1 %exitcond297.not.i, label %mask_block_ok.i.i.i.i, label %56 - -cond_87_case_0.i: ; preds = %cond_exit_87.i - %71 = load i64, i64* %52, align 4 - %72 = or i64 %71, -1024 - store i64 %72, i64* %52, align 4 - %73 = icmp eq i64 %72, -1 - br i1 %73, label %__hugr__.main.1.exit, label %mask_block_err.i.i - -mask_block_err.i.i: ; preds = %cond_87_case_0.i - tail call void @panic(i32 1002, i8* getelementptr inbounds ([70 x i8], [70 x i8]* @"e_Array cont.EFA5AC45.0", i64 0, i64 0)) +loop_body.i.i: ; preds = %__barray_check_bounds.exit.i.i + %"367_054.fca.1.insert.i.i" = insertvalue { i1, i64, i1 } { i1 true, i64 poison, i1 undef }, i64 %lazy_measure.i.i, 1 + %"367_054.fca.2.insert.i.i" = insertvalue { i1, i64, i1 } %"367_054.fca.1.insert.i.i", i1 undef, 2 + %110 = insertvalue { { ptr, ptr, i64 }, i64 } %.pn165183.i.i, i64 %95, 1 + %111 = shl nuw nsw i64 1, %"303_0.sroa.15.0184.i.i" + %112 = xor i64 %107, %111 + store i64 %112, ptr %72, align 4 + %113 = getelementptr inbounds nuw { i1, i64, i1 }, ptr %71, i64 %"303_0.sroa.15.0184.i.i" + store { i1, i64, i1 } %"367_054.fca.2.insert.i.i", ptr %113, align 4 + %114 = extractvalue { { ptr, ptr, i64 }, i64 } %.pn165183.i.i, 0 + %.fca.0.extract81.i.i.i = extractvalue { ptr, ptr, i64 } %114, 0 + %.fca.1.extract82.i.i.i = extractvalue { ptr, ptr, i64 } %114, 1 + %.fca.2.extract83.i.i.i = extractvalue { ptr, ptr, i64 } %114, 2 + %exitcond.not.i.i = icmp eq i64 %95, 10 + br i1 %exitcond.not.i.i, label %73, label %__barray_check_bounds.exit.i.i.i + +"__hugr__.$measure_array$$n(10).277.exit.i": ; preds = %91, %73 + tail call void @heap_free(ptr %.fca.0.extract81.i.i.i) + tail call void @heap_free(ptr nonnull %.fca.1.extract82.i.i.i) + %115 = load i64, ptr %72, align 4 + %116 = trunc i64 %115 to i1 + br i1 %116, label %cond_exit_87.thread.i, label %__barray_mask_borrow.exit278.i + +mask_block_err.i.i: ; preds = %cond_exit_87.thread.9.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_check_bounds.exit283.i: ; preds = %"__hugr__.$measure_array$$n(10).277.exit.i", %cond_exit_87.i - %"90_0.0.i1" = phi i64 [ 0, %"__hugr__.$measure_array$$n(10).277.exit.i" ], [ %74, %cond_exit_87.i ] - %74 = add nuw nsw i64 %"90_0.0.i1", 1 - %75 = lshr i64 %"90_0.0.i1", 6 - %76 = getelementptr inbounds i64, i64* %52, i64 %75 - %77 = load i64, i64* %76, align 4 - %78 = shl nuw nsw i64 1, %"90_0.0.i1" - %79 = and i64 %77, %78 - %.not.i = icmp eq i64 %79, 0 - br i1 %.not.i, label %__barray_mask_borrow.exit288.i, label %cond_exit_87.i - -__barray_mask_borrow.exit288.i: ; preds = %__barray_check_bounds.exit283.i - %80 = xor i64 %77, %78 - store i64 %80, i64* %76, align 4 - %81 = getelementptr inbounds { i1, i64, i1 }, { i1, i64, i1 }* %50, i64 %"90_0.0.i1" - %82 = load { i1, i64, i1 }, { i1, i64, i1 }* %81, align 4 - %.fca.0.extract179.i = extractvalue { i1, i64, i1 } %82, 0 - br i1 %.fca.0.extract179.i, label %cond_390_case_1.i, label %cond_exit_87.i - -cond_exit_87.i: ; preds = %cond_390_case_1.i, %__barray_mask_borrow.exit288.i, %__barray_check_bounds.exit283.i - %exitcond.not = icmp eq i64 %74, 10 - br i1 %exitcond.not, label %cond_87_case_0.i, label %__barray_check_bounds.exit283.i - -cond_390_case_1.i: ; preds = %__barray_mask_borrow.exit288.i - %.fca.1.extract.i = extractvalue { i1, i64, i1 } %82, 1 +__barray_mask_borrow.exit278.i: ; preds = %"__hugr__.$measure_array$$n(10).277.exit.i" + %117 = or disjoint i64 %115, 1 + store i64 %117, ptr %72, align 4 + %118 = load { i1, i64, i1 }, ptr %71, align 4 + %.fca.0.extract179.i = extractvalue { i1, i64, i1 } %118, 0 + br i1 %.fca.0.extract179.i, label %cond_390_case_1.i, label %cond_exit_87.thread.i + +cond_exit_87.thread.i: ; preds = %cond_390_case_1.i, %__barray_mask_borrow.exit278.i, %"__hugr__.$measure_array$$n(10).277.exit.i" + %119 = phi i64 [ %.pre.i, %cond_390_case_1.i ], [ %117, %__barray_mask_borrow.exit278.i ], [ %115, %"__hugr__.$measure_array$$n(10).277.exit.i" ] + %120 = and i64 %119, 2 + %.not311.i = icmp eq i64 %120, 0 + br i1 %.not311.i, label %__barray_mask_borrow.exit278.1.i, label %cond_exit_87.thread.1.i + +__barray_mask_borrow.exit278.1.i: ; preds = %cond_exit_87.thread.i + %121 = or disjoint i64 %119, 2 + store i64 %121, ptr %72, align 4 + %122 = getelementptr inbounds nuw i8, ptr %71, i64 24 + %123 = load { i1, i64, i1 }, ptr %122, align 4 + %.fca.0.extract179.1.i = extractvalue { i1, i64, i1 } %123, 0 + br i1 %.fca.0.extract179.1.i, label %cond_390_case_1.1.i, label %cond_exit_87.thread.1.i + +cond_390_case_1.1.i: ; preds = %__barray_mask_borrow.exit278.1.i + %.fca.1.extract.1.i = extractvalue { i1, i64, i1 } %123, 1 + tail call void @___dec_future_refcount(i64 %.fca.1.extract.1.i) + %.pre302.i = load i64, ptr %72, align 4 + br label %cond_exit_87.thread.1.i + +cond_exit_87.thread.1.i: ; preds = %cond_390_case_1.1.i, %__barray_mask_borrow.exit278.1.i, %cond_exit_87.thread.i + %124 = phi i64 [ %.pre302.i, %cond_390_case_1.1.i ], [ %121, %__barray_mask_borrow.exit278.1.i ], [ %119, %cond_exit_87.thread.i ] + %125 = and i64 %124, 4 + %.not312.i = icmp eq i64 %125, 0 + br i1 %.not312.i, label %__barray_mask_borrow.exit278.2.i, label %cond_exit_87.thread.2.i + +__barray_mask_borrow.exit278.2.i: ; preds = %cond_exit_87.thread.1.i + %126 = or disjoint i64 %124, 4 + store i64 %126, ptr %72, align 4 + %127 = getelementptr inbounds nuw i8, ptr %71, i64 48 + %128 = load { i1, i64, i1 }, ptr %127, align 4 + %.fca.0.extract179.2.i = extractvalue { i1, i64, i1 } %128, 0 + br i1 %.fca.0.extract179.2.i, label %cond_390_case_1.2.i, label %cond_exit_87.thread.2.i + +cond_390_case_1.2.i: ; preds = %__barray_mask_borrow.exit278.2.i + %.fca.1.extract.2.i = extractvalue { i1, i64, i1 } %128, 1 + tail call void @___dec_future_refcount(i64 %.fca.1.extract.2.i) + %.pre303.i = load i64, ptr %72, align 4 + br label %cond_exit_87.thread.2.i + +cond_exit_87.thread.2.i: ; preds = %cond_390_case_1.2.i, %__barray_mask_borrow.exit278.2.i, %cond_exit_87.thread.1.i + %129 = phi i64 [ %.pre303.i, %cond_390_case_1.2.i ], [ %126, %__barray_mask_borrow.exit278.2.i ], [ %124, %cond_exit_87.thread.1.i ] + %130 = and i64 %129, 8 + %.not313.i = icmp eq i64 %130, 0 + br i1 %.not313.i, label %__barray_mask_borrow.exit278.3.i, label %cond_exit_87.thread.3.i + +__barray_mask_borrow.exit278.3.i: ; preds = %cond_exit_87.thread.2.i + %131 = or disjoint i64 %129, 8 + store i64 %131, ptr %72, align 4 + %132 = getelementptr inbounds nuw i8, ptr %71, i64 72 + %133 = load { i1, i64, i1 }, ptr %132, align 4 + %.fca.0.extract179.3.i = extractvalue { i1, i64, i1 } %133, 0 + br i1 %.fca.0.extract179.3.i, label %cond_390_case_1.3.i, label %cond_exit_87.thread.3.i + +cond_390_case_1.3.i: ; preds = %__barray_mask_borrow.exit278.3.i + %.fca.1.extract.3.i = extractvalue { i1, i64, i1 } %133, 1 + tail call void @___dec_future_refcount(i64 %.fca.1.extract.3.i) + %.pre304.i = load i64, ptr %72, align 4 + br label %cond_exit_87.thread.3.i + +cond_exit_87.thread.3.i: ; preds = %cond_390_case_1.3.i, %__barray_mask_borrow.exit278.3.i, %cond_exit_87.thread.2.i + %134 = phi i64 [ %.pre304.i, %cond_390_case_1.3.i ], [ %131, %__barray_mask_borrow.exit278.3.i ], [ %129, %cond_exit_87.thread.2.i ] + %135 = and i64 %134, 16 + %.not314.i = icmp eq i64 %135, 0 + br i1 %.not314.i, label %__barray_mask_borrow.exit278.4.i, label %cond_exit_87.thread.4.i + +__barray_mask_borrow.exit278.4.i: ; preds = %cond_exit_87.thread.3.i + %136 = or disjoint i64 %134, 16 + store i64 %136, ptr %72, align 4 + %137 = getelementptr inbounds nuw i8, ptr %71, i64 96 + %138 = load { i1, i64, i1 }, ptr %137, align 4 + %.fca.0.extract179.4.i = extractvalue { i1, i64, i1 } %138, 0 + br i1 %.fca.0.extract179.4.i, label %cond_390_case_1.4.i, label %cond_exit_87.thread.4.i + +cond_390_case_1.4.i: ; preds = %__barray_mask_borrow.exit278.4.i + %.fca.1.extract.4.i = extractvalue { i1, i64, i1 } %138, 1 + tail call void @___dec_future_refcount(i64 %.fca.1.extract.4.i) + %.pre305.i = load i64, ptr %72, align 4 + br label %cond_exit_87.thread.4.i + +cond_exit_87.thread.4.i: ; preds = %cond_390_case_1.4.i, %__barray_mask_borrow.exit278.4.i, %cond_exit_87.thread.3.i + %139 = phi i64 [ %.pre305.i, %cond_390_case_1.4.i ], [ %136, %__barray_mask_borrow.exit278.4.i ], [ %134, %cond_exit_87.thread.3.i ] + %140 = and i64 %139, 32 + %.not315.i = icmp eq i64 %140, 0 + br i1 %.not315.i, label %__barray_mask_borrow.exit278.5.i, label %cond_exit_87.thread.5.i + +__barray_mask_borrow.exit278.5.i: ; preds = %cond_exit_87.thread.4.i + %141 = or disjoint i64 %139, 32 + store i64 %141, ptr %72, align 4 + %142 = getelementptr inbounds nuw i8, ptr %71, i64 120 + %143 = load { i1, i64, i1 }, ptr %142, align 4 + %.fca.0.extract179.5.i = extractvalue { i1, i64, i1 } %143, 0 + br i1 %.fca.0.extract179.5.i, label %cond_390_case_1.5.i, label %cond_exit_87.thread.5.i + +cond_390_case_1.5.i: ; preds = %__barray_mask_borrow.exit278.5.i + %.fca.1.extract.5.i = extractvalue { i1, i64, i1 } %143, 1 + tail call void @___dec_future_refcount(i64 %.fca.1.extract.5.i) + %.pre306.i = load i64, ptr %72, align 4 + br label %cond_exit_87.thread.5.i + +cond_exit_87.thread.5.i: ; preds = %cond_390_case_1.5.i, %__barray_mask_borrow.exit278.5.i, %cond_exit_87.thread.4.i + %144 = phi i64 [ %.pre306.i, %cond_390_case_1.5.i ], [ %141, %__barray_mask_borrow.exit278.5.i ], [ %139, %cond_exit_87.thread.4.i ] + %145 = and i64 %144, 64 + %.not316.i = icmp eq i64 %145, 0 + br i1 %.not316.i, label %__barray_mask_borrow.exit278.6.i, label %cond_exit_87.thread.6.i + +__barray_mask_borrow.exit278.6.i: ; preds = %cond_exit_87.thread.5.i + %146 = or disjoint i64 %144, 64 + store i64 %146, ptr %72, align 4 + %147 = getelementptr inbounds nuw i8, ptr %71, i64 144 + %148 = load { i1, i64, i1 }, ptr %147, align 4 + %.fca.0.extract179.6.i = extractvalue { i1, i64, i1 } %148, 0 + br i1 %.fca.0.extract179.6.i, label %cond_390_case_1.6.i, label %cond_exit_87.thread.6.i + +cond_390_case_1.6.i: ; preds = %__barray_mask_borrow.exit278.6.i + %.fca.1.extract.6.i = extractvalue { i1, i64, i1 } %148, 1 + tail call void @___dec_future_refcount(i64 %.fca.1.extract.6.i) + %.pre307.i = load i64, ptr %72, align 4 + br label %cond_exit_87.thread.6.i + +cond_exit_87.thread.6.i: ; preds = %cond_390_case_1.6.i, %__barray_mask_borrow.exit278.6.i, %cond_exit_87.thread.5.i + %149 = phi i64 [ %.pre307.i, %cond_390_case_1.6.i ], [ %146, %__barray_mask_borrow.exit278.6.i ], [ %144, %cond_exit_87.thread.5.i ] + %150 = and i64 %149, 128 + %.not317.i = icmp eq i64 %150, 0 + br i1 %.not317.i, label %__barray_mask_borrow.exit278.7.i, label %cond_exit_87.thread.7.i + +__barray_mask_borrow.exit278.7.i: ; preds = %cond_exit_87.thread.6.i + %151 = or disjoint i64 %149, 128 + store i64 %151, ptr %72, align 4 + %152 = getelementptr inbounds nuw i8, ptr %71, i64 168 + %153 = load { i1, i64, i1 }, ptr %152, align 4 + %.fca.0.extract179.7.i = extractvalue { i1, i64, i1 } %153, 0 + br i1 %.fca.0.extract179.7.i, label %cond_390_case_1.7.i, label %cond_exit_87.thread.7.i + +cond_390_case_1.7.i: ; preds = %__barray_mask_borrow.exit278.7.i + %.fca.1.extract.7.i = extractvalue { i1, i64, i1 } %153, 1 + tail call void @___dec_future_refcount(i64 %.fca.1.extract.7.i) + %.pre308.i = load i64, ptr %72, align 4 + br label %cond_exit_87.thread.7.i + +cond_exit_87.thread.7.i: ; preds = %cond_390_case_1.7.i, %__barray_mask_borrow.exit278.7.i, %cond_exit_87.thread.6.i + %154 = phi i64 [ %.pre308.i, %cond_390_case_1.7.i ], [ %151, %__barray_mask_borrow.exit278.7.i ], [ %149, %cond_exit_87.thread.6.i ] + %155 = and i64 %154, 256 + %.not318.i = icmp eq i64 %155, 0 + br i1 %.not318.i, label %__barray_mask_borrow.exit278.8.i, label %cond_exit_87.thread.8.i + +__barray_mask_borrow.exit278.8.i: ; preds = %cond_exit_87.thread.7.i + %156 = or disjoint i64 %154, 256 + store i64 %156, ptr %72, align 4 + %157 = getelementptr inbounds nuw i8, ptr %71, i64 192 + %158 = load { i1, i64, i1 }, ptr %157, align 4 + %.fca.0.extract179.8.i = extractvalue { i1, i64, i1 } %158, 0 + br i1 %.fca.0.extract179.8.i, label %cond_390_case_1.8.i, label %cond_exit_87.thread.8.i + +cond_390_case_1.8.i: ; preds = %__barray_mask_borrow.exit278.8.i + %.fca.1.extract.8.i = extractvalue { i1, i64, i1 } %158, 1 + tail call void @___dec_future_refcount(i64 %.fca.1.extract.8.i) + %.pre309.i = load i64, ptr %72, align 4 + br label %cond_exit_87.thread.8.i + +cond_exit_87.thread.8.i: ; preds = %cond_390_case_1.8.i, %__barray_mask_borrow.exit278.8.i, %cond_exit_87.thread.7.i + %159 = phi i64 [ %.pre309.i, %cond_390_case_1.8.i ], [ %156, %__barray_mask_borrow.exit278.8.i ], [ %154, %cond_exit_87.thread.7.i ] + %160 = and i64 %159, 512 + %.not319.i = icmp eq i64 %160, 0 + br i1 %.not319.i, label %__barray_mask_borrow.exit278.9.i, label %cond_exit_87.thread.9.i + +__barray_mask_borrow.exit278.9.i: ; preds = %cond_exit_87.thread.8.i + %161 = or disjoint i64 %159, 512 + store i64 %161, ptr %72, align 4 + %162 = getelementptr inbounds nuw i8, ptr %71, i64 216 + %163 = load { i1, i64, i1 }, ptr %162, align 4 + %.fca.0.extract179.9.i = extractvalue { i1, i64, i1 } %163, 0 + br i1 %.fca.0.extract179.9.i, label %cond_390_case_1.9.i, label %cond_exit_87.thread.9.i + +cond_390_case_1.9.i: ; preds = %__barray_mask_borrow.exit278.9.i + %.fca.1.extract.9.i = extractvalue { i1, i64, i1 } %163, 1 + tail call void @___dec_future_refcount(i64 %.fca.1.extract.9.i) + %.pre310.i = load i64, ptr %72, align 4 + br label %cond_exit_87.thread.9.i + +cond_exit_87.thread.9.i: ; preds = %cond_390_case_1.9.i, %__barray_mask_borrow.exit278.9.i, %cond_exit_87.thread.8.i + %164 = phi i64 [ %.pre310.i, %cond_390_case_1.9.i ], [ %161, %__barray_mask_borrow.exit278.9.i ], [ %159, %cond_exit_87.thread.8.i ] + %165 = or i64 %164, -1024 + store i64 %165, ptr %72, align 4 + %166 = icmp eq i64 %165, -1 + br i1 %166, label %__hugr__.main.1.exit, label %mask_block_err.i.i + +cond_390_case_1.i: ; preds = %__barray_mask_borrow.exit278.i + %.fca.1.extract.i = extractvalue { i1, i64, i1 } %118, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.i) - br label %cond_exit_87.i - -__hugr__.main.1.exit: ; preds = %cond_87_case_0.i - tail call void @heap_free(i8* %49) - tail call void @heap_free(i8* nonnull %51) - %83 = tail call i64 @teardown() - ret i64 %83 + %.pre.i = load i64, ptr %72, align 4 + br label %cond_exit_87.thread.i + +__hugr__.main.1.exit: ; preds = %cond_exit_87.thread.9.i + tail call void @heap_free(ptr %71) + tail call void @heap_free(ptr nonnull %72) + %167 = tail call i64 @teardown() + ret i64 %167 } declare void @setup(i64) local_unnamed_addr diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-no_results/no_results_x86_64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-no_results/no_results_x86_64-apple-darwin index 30648c824..ee3bf9879 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-no_results/no_results_x86_64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-no_results/no_results_x86_64-apple-darwin @@ -1,6 +1,6 @@ ; ModuleID = 'hugr' source_filename = "hugr" -target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" +target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128" target triple = "x86_64-apple-darwin" @"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." @@ -16,7 +16,7 @@ declare i64 @___qalloc() local_unnamed_addr declare void @___reset(i64) local_unnamed_addr ; Function Attrs: noreturn -declare void @panic(i32, i8*) local_unnamed_addr #0 +declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @___rxy(i64, double, double) local_unnamed_addr @@ -26,32 +26,22 @@ define i64 @qmain(i64 %0) local_unnamed_addr { entry: tail call void @setup(i64 %0) %qalloc.i.i = tail call i64 @___qalloc() - %not_max.not.i.i = icmp eq i64 %qalloc.i.i, -1 - br i1 %not_max.not.i.i, label %id_bb.i.i, label %reset_bb.i.i + %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 + br i1 %not_max.not.not.i.i, label %cond_18_case_0.i.i, label %__hugr__.bar.1.exit -reset_bb.i.i: ; preds = %entry - tail call void @___reset(i64 %qalloc.i.i) - br label %id_bb.i.i - -id_bb.i.i: ; preds = %reset_bb.i.i, %entry - %1 = insertvalue { i1, i64 } { i1 true, i64 poison }, i64 %qalloc.i.i, 1 - %2 = select i1 %not_max.not.i.i, { i1, i64 } { i1 false, i64 poison }, { i1, i64 } %1 - %.fca.0.extract.i.i = extractvalue { i1, i64 } %2, 0 - br i1 %.fca.0.extract.i.i, label %__hugr__.bar.1.exit, label %cond_18_case_0.i.i - -cond_18_case_0.i.i: ; preds = %id_bb.i.i - tail call void @panic(i32 1001, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @"e_No more qu.3B2EEBF0.0", i64 0, i64 0)) +cond_18_case_0.i.i: ; preds = %entry + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.bar.1.exit: ; preds = %id_bb.i.i - %.fca.1.extract.i.i = extractvalue { i1, i64 } %2, 1 - tail call void @___rxy(i64 %.fca.1.extract.i.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %.fca.1.extract.i.i, double 0x400921FB54442D18) - %lazy_measure.i = tail call i64 @___lazy_measure(i64 %.fca.1.extract.i.i) - tail call void @___qfree(i64 %.fca.1.extract.i.i) +__hugr__.bar.1.exit: ; preds = %entry + tail call void @___reset(i64 %qalloc.i.i) + tail call void @___rxy(i64 %qalloc.i.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) + tail call void @___rz(i64 %qalloc.i.i, double 0x400921FB54442D18) + %lazy_measure.i = tail call i64 @___lazy_measure(i64 %qalloc.i.i) + tail call void @___qfree(i64 %qalloc.i.i) tail call void @___dec_future_refcount(i64 %lazy_measure.i) - %3 = tail call i64 @teardown() - ret i64 %3 + %1 = tail call i64 @teardown() + ret i64 %1 } declare void @setup(i64) local_unnamed_addr diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-postselect_exit/postselect_exit_x86_64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-postselect_exit/postselect_exit_x86_64-apple-darwin index a5980160b..6a17bf13e 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-postselect_exit/postselect_exit_x86_64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-postselect_exit/postselect_exit_x86_64-apple-darwin @@ -1,6 +1,6 @@ ; ModuleID = 'hugr' source_filename = "hugr" -target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" +target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128" target triple = "x86_64-apple-darwin" @e_Postselect.558881BF.0 = private constant [30 x i8] c"\1DEXIT:INT:Postselection failed" @@ -18,9 +18,9 @@ declare i1 @___read_future_bool(i64) local_unnamed_addr declare void @___dec_future_refcount(i64) local_unnamed_addr ; Function Attrs: noreturn -declare void @panic(i32, i8*) local_unnamed_addr #0 +declare void @panic(i32, ptr) local_unnamed_addr #0 -declare void @print_bool(i8*, i64, i1) local_unnamed_addr +declare void @print_bool(ptr, i64, i1) local_unnamed_addr declare i64 @___qalloc() local_unnamed_addr @@ -34,44 +34,34 @@ define i64 @qmain(i64 %0) local_unnamed_addr { entry: tail call void @setup(i64 %0) %qalloc.i.i = tail call i64 @___qalloc() - %not_max.not.i.i = icmp eq i64 %qalloc.i.i, -1 - br i1 %not_max.not.i.i, label %id_bb.i.i, label %reset_bb.i.i + %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 + br i1 %not_max.not.not.i.i, label %cond_39_case_0.i.i, label %__hugr__.__tk2_qalloc.35.exit.i -reset_bb.i.i: ; preds = %entry - tail call void @___reset(i64 %qalloc.i.i) - br label %id_bb.i.i - -id_bb.i.i: ; preds = %reset_bb.i.i, %entry - %1 = insertvalue { i1, i64 } { i1 true, i64 poison }, i64 %qalloc.i.i, 1 - %2 = select i1 %not_max.not.i.i, { i1, i64 } { i1 false, i64 poison }, { i1, i64 } %1 - %.fca.0.extract.i.i = extractvalue { i1, i64 } %2, 0 - br i1 %.fca.0.extract.i.i, label %__hugr__.__tk2_qalloc.35.exit.i, label %cond_39_case_0.i.i - -cond_39_case_0.i.i: ; preds = %id_bb.i.i - tail call void @panic(i32 1001, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @"e_No more qu.3B2EEBF0.0", i64 0, i64 0)) +cond_39_case_0.i.i: ; preds = %entry + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_qalloc.35.exit.i: ; preds = %id_bb.i.i - %.fca.1.extract.i.i = extractvalue { i1, i64 } %2, 1 - tail call void @___rxy(i64 %.fca.1.extract.i.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %.fca.1.extract.i.i, double 0x400921FB54442D18) - %lazy_measure.i = tail call i64 @___lazy_measure(i64 %.fca.1.extract.i.i) - tail call void @___qfree(i64 %.fca.1.extract.i.i) +__hugr__.__tk2_qalloc.35.exit.i: ; preds = %entry + tail call void @___reset(i64 %qalloc.i.i) + tail call void @___rxy(i64 %qalloc.i.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) + tail call void @___rz(i64 %qalloc.i.i, double 0x400921FB54442D18) + %lazy_measure.i = tail call i64 @___lazy_measure(i64 %qalloc.i.i) + tail call void @___qfree(i64 %qalloc.i.i) tail call void @___inc_future_refcount(i64 %lazy_measure.i) %read_bool.i = tail call i1 @___read_future_bool(i64 %lazy_measure.i) tail call void @___dec_future_refcount(i64 %lazy_measure.i) - br i1 %read_bool.i, label %3, label %__hugr__.main.1.exit + br i1 %read_bool.i, label %1, label %__hugr__.main.1.exit -3: ; preds = %__hugr__.__tk2_qalloc.35.exit.i - tail call void @panic(i32 42, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @e_Postselect.558881BF.0, i64 0, i64 0)) +1: ; preds = %__hugr__.__tk2_qalloc.35.exit.i + tail call void @panic(i32 42, ptr nonnull @e_Postselect.558881BF.0) unreachable __hugr__.main.1.exit: ; preds = %__hugr__.__tk2_qalloc.35.exit.i %read_bool63.i = tail call i1 @___read_future_bool(i64 %lazy_measure.i) tail call void @___dec_future_refcount(i64 %lazy_measure.i) - tail call void @print_bool(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @res_c.1C9EF4D1.0, i64 0, i64 0), i64 11, i1 %read_bool63.i) - %4 = tail call i64 @teardown() - ret i64 %4 + tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool63.i) + %2 = tail call i64 @teardown() + ret i64 %2 } declare void @setup(i64) local_unnamed_addr diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-postselect_panic/postselect_panic_x86_64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-postselect_panic/postselect_panic_x86_64-apple-darwin index 5e1be3450..1b52f5089 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-postselect_panic/postselect_panic_x86_64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-postselect_panic/postselect_panic_x86_64-apple-darwin @@ -1,6 +1,6 @@ ; ModuleID = 'hugr' source_filename = "hugr" -target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" +target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128" target triple = "x86_64-apple-darwin" @e_Postselect.558881BF.0 = private constant [30 x i8] c"\1DEXIT:INT:Postselection failed" @@ -18,9 +18,9 @@ declare i1 @___read_future_bool(i64) local_unnamed_addr declare void @___dec_future_refcount(i64) local_unnamed_addr ; Function Attrs: noreturn -declare void @panic(i32, i8*) local_unnamed_addr #0 +declare void @panic(i32, ptr) local_unnamed_addr #0 -declare void @print_bool(i8*, i64, i1) local_unnamed_addr +declare void @print_bool(ptr, i64, i1) local_unnamed_addr declare i64 @___qalloc() local_unnamed_addr @@ -34,44 +34,34 @@ define i64 @qmain(i64 %0) local_unnamed_addr { entry: tail call void @setup(i64 %0) %qalloc.i.i = tail call i64 @___qalloc() - %not_max.not.i.i = icmp eq i64 %qalloc.i.i, -1 - br i1 %not_max.not.i.i, label %id_bb.i.i, label %reset_bb.i.i + %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 + br i1 %not_max.not.not.i.i, label %cond_39_case_0.i.i, label %__hugr__.__tk2_qalloc.35.exit.i -reset_bb.i.i: ; preds = %entry - tail call void @___reset(i64 %qalloc.i.i) - br label %id_bb.i.i - -id_bb.i.i: ; preds = %reset_bb.i.i, %entry - %1 = insertvalue { i1, i64 } { i1 true, i64 poison }, i64 %qalloc.i.i, 1 - %2 = select i1 %not_max.not.i.i, { i1, i64 } { i1 false, i64 poison }, { i1, i64 } %1 - %.fca.0.extract.i.i = extractvalue { i1, i64 } %2, 0 - br i1 %.fca.0.extract.i.i, label %__hugr__.__tk2_qalloc.35.exit.i, label %cond_39_case_0.i.i - -cond_39_case_0.i.i: ; preds = %id_bb.i.i - tail call void @panic(i32 1001, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @"e_No more qu.3B2EEBF0.0", i64 0, i64 0)) +cond_39_case_0.i.i: ; preds = %entry + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_qalloc.35.exit.i: ; preds = %id_bb.i.i - %.fca.1.extract.i.i = extractvalue { i1, i64 } %2, 1 - tail call void @___rxy(i64 %.fca.1.extract.i.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %.fca.1.extract.i.i, double 0x400921FB54442D18) - %lazy_measure.i = tail call i64 @___lazy_measure(i64 %.fca.1.extract.i.i) - tail call void @___qfree(i64 %.fca.1.extract.i.i) +__hugr__.__tk2_qalloc.35.exit.i: ; preds = %entry + tail call void @___reset(i64 %qalloc.i.i) + tail call void @___rxy(i64 %qalloc.i.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) + tail call void @___rz(i64 %qalloc.i.i, double 0x400921FB54442D18) + %lazy_measure.i = tail call i64 @___lazy_measure(i64 %qalloc.i.i) + tail call void @___qfree(i64 %qalloc.i.i) tail call void @___inc_future_refcount(i64 %lazy_measure.i) %read_bool.i = tail call i1 @___read_future_bool(i64 %lazy_measure.i) tail call void @___dec_future_refcount(i64 %lazy_measure.i) - br i1 %read_bool.i, label %3, label %__hugr__.main.1.exit + br i1 %read_bool.i, label %1, label %__hugr__.main.1.exit -3: ; preds = %__hugr__.__tk2_qalloc.35.exit.i - tail call void @panic(i32 1001, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @e_Postselect.558881BF.0, i64 0, i64 0)) +1: ; preds = %__hugr__.__tk2_qalloc.35.exit.i + tail call void @panic(i32 1001, ptr nonnull @e_Postselect.558881BF.0) unreachable __hugr__.main.1.exit: ; preds = %__hugr__.__tk2_qalloc.35.exit.i %read_bool63.i = tail call i1 @___read_future_bool(i64 %lazy_measure.i) tail call void @___dec_future_refcount(i64 %lazy_measure.i) - tail call void @print_bool(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @res_c.1C9EF4D1.0, i64 0, i64 0), i64 11, i1 %read_bool63.i) - %4 = tail call i64 @teardown() - ret i64 %4 + tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool63.i) + %2 = tail call i64 @teardown() + ret i64 %2 } declare void @setup(i64) local_unnamed_addr diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-print_current_shot/print_current_shot_x86_64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-print_current_shot/print_current_shot_x86_64-apple-darwin index c5a9ef92b..2f2765e7d 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-print_current_shot/print_current_shot_x86_64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-print_current_shot/print_current_shot_x86_64-apple-darwin @@ -1,19 +1,19 @@ ; ModuleID = 'hugr' source_filename = "hugr" -target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" +target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128" target triple = "x86_64-apple-darwin" @res_shot.6D86EAF7.0 = private constant [14 x i8] c"\0DUSER:INT:shot" declare i64 @get_current_shot() local_unnamed_addr -declare void @print_int(i8*, i64, i64) local_unnamed_addr +declare void @print_int(ptr, i64, i64) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr { entry: tail call void @setup(i64 %0) %shot.i = tail call i64 @get_current_shot() - tail call void @print_int(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @res_shot.6D86EAF7.0, i64 0, i64 0), i64 13, i64 %shot.i) + tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot.i) %1 = tail call i64 @teardown() ret i64 %1 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-rng/rng_x86_64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-rng/rng_x86_64-apple-darwin index 841227703..0f176c0be 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-rng/rng_x86_64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-rng/rng_x86_64-apple-darwin @@ -1,6 +1,6 @@ ; ModuleID = 'hugr' source_filename = "hugr" -target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" +target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128" target triple = "x86_64-apple-darwin" @res_rint.B928E41E.0 = private constant [14 x i8] c"\0DUSER:INT:rint" @@ -17,9 +17,9 @@ declare double @random_float() local_unnamed_addr declare i32 @random_rng(i32) local_unnamed_addr -declare void @print_int(i8*, i64, i64) local_unnamed_addr +declare void @print_int(ptr, i64, i64) local_unnamed_addr -declare void @print_float(i8*, i64, double) local_unnamed_addr +declare void @print_float(ptr, i64, double) local_unnamed_addr declare void @random_seed(i64) local_unnamed_addr @@ -34,19 +34,19 @@ entry: %1 = sext i32 %rintb.i to i64 %2 = sext i32 %rint20.i to i64 %3 = sext i32 %rint.i to i64 - tail call void @print_int(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @res_rint.B928E41E.0, i64 0, i64 0), i64 13, i64 %3) - tail call void @print_int(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @res_rint1.0884EC03.0, i64 0, i64 0), i64 14, i64 %2) - tail call void @print_float(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @res_rfloat.F0E4DD2C.0, i64 0, i64 0), i64 17, double %rfloat.i) - tail call void @print_int(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @res_rint_bnd.CB1E6B0D.0, i64 0, i64 0), i64 17, i64 %1) + tail call void @print_int(ptr nonnull @res_rint.B928E41E.0, i64 13, i64 %3) + tail call void @print_int(ptr nonnull @res_rint1.0884EC03.0, i64 14, i64 %2) + tail call void @print_float(ptr nonnull @res_rfloat.F0E4DD2C.0, i64 17, double %rfloat.i) + tail call void @print_int(ptr nonnull @res_rint_bnd.CB1E6B0D.0, i64 17, i64 %1) tail call void @random_seed(i64 84) %rint53.i = tail call i32 @random_int() %rfloat55.i = tail call double @random_float() %rintb58.i = tail call i32 @random_rng(i32 200) %4 = sext i32 %rintb58.i to i64 %5 = sext i32 %rint53.i to i64 - tail call void @print_int(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @res_rint2.F0335598.0, i64 0, i64 0), i64 14, i64 %5) - tail call void @print_float(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @res_rfloat2.4DAB941F.0, i64 0, i64 0), i64 18, double %rfloat55.i) - tail call void @print_int(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @res_rint_bnd2.169DE399.0, i64 0, i64 0), i64 18, i64 %4) + tail call void @print_int(ptr nonnull @res_rint2.F0335598.0, i64 14, i64 %5) + tail call void @print_float(ptr nonnull @res_rfloat2.4DAB941F.0, i64 18, double %rfloat55.i) + tail call void @print_int(ptr nonnull @res_rint_bnd2.169DE399.0, i64 18, i64 %4) %6 = tail call i64 @teardown() ret i64 %6 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-rus/rus_x86_64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-rus/rus_x86_64-apple-darwin index d981614b2..77f401c44 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-rus/rus_x86_64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-rus/rus_x86_64-apple-darwin @@ -1,6 +1,6 @@ ; ModuleID = 'hugr' source_filename = "hugr" -target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" +target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128" target triple = "x86_64-apple-darwin" @res_result.457DE32D.0 = private constant [17 x i8] c"\10USER:BOOL:result" @@ -14,14 +14,14 @@ declare i1 @___read_future_bool(i64) local_unnamed_addr declare void @___dec_future_refcount(i64) local_unnamed_addr -declare void @print_bool(i8*, i64, i1) local_unnamed_addr +declare void @print_bool(ptr, i64, i1) local_unnamed_addr declare i64 @___qalloc() local_unnamed_addr declare void @___reset(i64) local_unnamed_addr ; Function Attrs: noreturn -declare void @panic(i32, i8*) local_unnamed_addr #0 +declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @___rxy(i64, double, double) local_unnamed_addr @@ -33,119 +33,89 @@ define i64 @qmain(i64 %0) local_unnamed_addr { entry: tail call void @setup(i64 %0) %qalloc.i.i = tail call i64 @___qalloc() - %not_max.not.i.i = icmp eq i64 %qalloc.i.i, -1 - br i1 %not_max.not.i.i, label %id_bb.i.i, label %reset_bb.i.i + %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 + br i1 %not_max.not.not.i.i, label %cond_87_case_0.i.i, label %__hugr__.__tk2_qalloc.83.exit.i -reset_bb.i.i: ; preds = %entry - tail call void @___reset(i64 %qalloc.i.i) - br label %id_bb.i.i - -id_bb.i.i: ; preds = %reset_bb.i.i, %entry - %1 = insertvalue { i1, i64 } { i1 true, i64 poison }, i64 %qalloc.i.i, 1 - %2 = select i1 %not_max.not.i.i, { i1, i64 } { i1 false, i64 poison }, { i1, i64 } %1 - %.fca.0.extract.i.i = extractvalue { i1, i64 } %2, 0 - br i1 %.fca.0.extract.i.i, label %__hugr__.__tk2_qalloc.83.exit.i, label %cond_87_case_0.i.i - -cond_87_case_0.i.i: ; preds = %id_bb.i.i - tail call void @panic(i32 1001, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @"e_No more qu.3B2EEBF0.0", i64 0, i64 0)) +cond_87_case_0.i.i: ; preds = %entry + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_qalloc.83.exit.i: ; preds = %id_bb.i.i - %.fca.1.extract.i.i = extractvalue { i1, i64 } %2, 1 - br label %cond_242_case_1.i.i - -cond_242_case_1.i.i: ; preds = %cond_242_case_1.i.i.backedge, %__hugr__.__tk2_qalloc.83.exit.i - %qalloc.i.i.i = tail call i64 @___qalloc() - %not_max.not.i.i.i = icmp eq i64 %qalloc.i.i.i, -1 - br i1 %not_max.not.i.i.i, label %id_bb.i.i.i, label %reset_bb.i.i.i - -reset_bb.i.i.i: ; preds = %cond_242_case_1.i.i - tail call void @___reset(i64 %qalloc.i.i.i) - br label %id_bb.i.i.i - -id_bb.i.i.i: ; preds = %reset_bb.i.i.i, %cond_242_case_1.i.i - %3 = insertvalue { i1, i64 } { i1 true, i64 poison }, i64 %qalloc.i.i.i, 1 - %4 = select i1 %not_max.not.i.i.i, { i1, i64 } { i1 false, i64 poison }, { i1, i64 } %3 - %.fca.0.extract.i.i.i = extractvalue { i1, i64 } %4, 0 - br i1 %.fca.0.extract.i.i.i, label %__hugr__.__tk2_qalloc.97.exit.i.i, label %cond_101_case_0.i.i.i +__hugr__.__tk2_qalloc.83.exit.i: ; preds = %entry + tail call void @___reset(i64 %qalloc.i.i) + %qalloc.i132.i.i = tail call i64 @___qalloc() + %not_max.not.not.i133.i.i = icmp eq i64 %qalloc.i132.i.i, -1 + br i1 %not_max.not.not.i133.i.i, label %cond_101_case_0.i.i.i, label %__hugr__.__tk2_qalloc.97.exit.i.i -cond_101_case_0.i.i.i: ; preds = %id_bb.i.i.i - tail call void @panic(i32 1001, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @"e_No more qu.3B2EEBF0.0", i64 0, i64 0)) +cond_101_case_0.i.i.i: ; preds = %cond_242_case_1.backedge.i.i, %__hugr__.__tk2_qalloc.83.exit.i + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_qalloc.97.exit.i.i: ; preds = %id_bb.i.i.i - %.fca.1.extract.i.i.i = extractvalue { i1, i64 } %4, 1 +__hugr__.__tk2_qalloc.97.exit.i.i: ; preds = %__hugr__.__tk2_qalloc.83.exit.i, %cond_242_case_1.backedge.i.i + %qalloc.i134.i.i = phi i64 [ %qalloc.i.i.i, %cond_242_case_1.backedge.i.i ], [ %qalloc.i132.i.i, %__hugr__.__tk2_qalloc.83.exit.i ] + tail call void @___reset(i64 %qalloc.i134.i.i) %qalloc.i128.i.i = tail call i64 @___qalloc() - %not_max.not.i129.i.i = icmp eq i64 %qalloc.i128.i.i, -1 - br i1 %not_max.not.i129.i.i, label %id_bb.i132.i.i, label %reset_bb.i130.i.i + %not_max.not.not.i129.i.i = icmp eq i64 %qalloc.i128.i.i, -1 + br i1 %not_max.not.not.i129.i.i, label %cond_115_case_0.i.i.i, label %__hugr__.__tk2_qalloc.111.exit.i.i -reset_bb.i130.i.i: ; preds = %__hugr__.__tk2_qalloc.97.exit.i.i - tail call void @___reset(i64 %qalloc.i128.i.i) - br label %id_bb.i132.i.i - -id_bb.i132.i.i: ; preds = %reset_bb.i130.i.i, %__hugr__.__tk2_qalloc.97.exit.i.i - %5 = insertvalue { i1, i64 } { i1 true, i64 poison }, i64 %qalloc.i128.i.i, 1 - %6 = select i1 %not_max.not.i129.i.i, { i1, i64 } { i1 false, i64 poison }, { i1, i64 } %5 - %.fca.0.extract.i131.i.i = extractvalue { i1, i64 } %6, 0 - br i1 %.fca.0.extract.i131.i.i, label %__hugr__.__tk2_qalloc.111.exit.i.i, label %cond_115_case_0.i.i.i - -cond_115_case_0.i.i.i: ; preds = %id_bb.i132.i.i - tail call void @panic(i32 1001, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @"e_No more qu.3B2EEBF0.0", i64 0, i64 0)) +cond_115_case_0.i.i.i: ; preds = %__hugr__.__tk2_qalloc.97.exit.i.i + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_qalloc.111.exit.i.i: ; preds = %id_bb.i132.i.i - %.fca.1.extract.i133.i.i = extractvalue { i1, i64 } %6, 1 - tail call void @___rxy(i64 %.fca.1.extract.i133.i.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %.fca.1.extract.i133.i.i, double 0x400921FB54442D18) - tail call void @___rxy(i64 %.fca.1.extract.i.i.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %.fca.1.extract.i.i.i, double 0x400921FB54442D18) - tail call void @___rz(i64 %.fca.1.extract.i.i.i, double 0xBFE921FB54442D18) - tail call void @___rxy(i64 %.fca.1.extract.i.i.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rzz(i64 %.fca.1.extract.i133.i.i, i64 %.fca.1.extract.i.i.i, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %.fca.1.extract.i133.i.i, double 0xBFF921FB54442D18) - tail call void @___rxy(i64 %.fca.1.extract.i.i.i, double 0x3FF921FB54442D18, double 0x400921FB54442D18) - tail call void @___rz(i64 %.fca.1.extract.i.i.i, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %.fca.1.extract.i.i.i, double 0x3FE921FB54442D18) - %lazy_measure.i.i = tail call i64 @___lazy_measure(i64 %.fca.1.extract.i.i.i) - tail call void @___qfree(i64 %.fca.1.extract.i.i.i) +__hugr__.__tk2_qalloc.111.exit.i.i: ; preds = %__hugr__.__tk2_qalloc.97.exit.i.i + tail call void @___reset(i64 %qalloc.i128.i.i) + tail call void @___rxy(i64 %qalloc.i128.i.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) + tail call void @___rz(i64 %qalloc.i128.i.i, double 0x400921FB54442D18) + tail call void @___rxy(i64 %qalloc.i134.i.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) + tail call void @___rz(i64 %qalloc.i134.i.i, double 0x400921FB54442D18) + tail call void @___rz(i64 %qalloc.i134.i.i, double 0xBFE921FB54442D18) + tail call void @___rxy(i64 %qalloc.i134.i.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) + tail call void @___rzz(i64 %qalloc.i128.i.i, i64 %qalloc.i134.i.i, double 0x3FF921FB54442D18) + tail call void @___rz(i64 %qalloc.i128.i.i, double 0xBFF921FB54442D18) + tail call void @___rxy(i64 %qalloc.i134.i.i, double 0x3FF921FB54442D18, double 0x400921FB54442D18) + tail call void @___rz(i64 %qalloc.i134.i.i, double 0xBFF921FB54442D18) + tail call void @___rz(i64 %qalloc.i134.i.i, double 0x3FE921FB54442D18) + %lazy_measure.i.i = tail call i64 @___lazy_measure(i64 %qalloc.i134.i.i) + tail call void @___qfree(i64 %qalloc.i134.i.i) %read_bool.i.i = tail call i1 @___read_future_bool(i64 %lazy_measure.i.i) tail call void @___dec_future_refcount(i64 %lazy_measure.i.i) - br i1 %read_bool.i.i, label %cond_256_case_1.i.i, label %7 + br i1 %read_bool.i.i, label %cond_256_case_1.i.i, label %1 -7: ; preds = %__hugr__.__tk2_qalloc.111.exit.i.i - tail call void @___qfree(i64 %.fca.1.extract.i133.i.i) - br label %cond_242_case_1.i.i.backedge +1: ; preds = %__hugr__.__tk2_qalloc.111.exit.i.i + tail call void @___qfree(i64 %qalloc.i128.i.i) + br label %cond_242_case_1.backedge.i.i + +cond_242_case_1.backedge.i.i: ; preds = %2, %1 + %qalloc.i.i.i = tail call i64 @___qalloc() + %not_max.not.not.i.i.i = icmp eq i64 %qalloc.i.i.i, -1 + br i1 %not_max.not.not.i.i.i, label %cond_101_case_0.i.i.i, label %__hugr__.__tk2_qalloc.97.exit.i.i cond_256_case_1.i.i: ; preds = %__hugr__.__tk2_qalloc.111.exit.i.i - tail call void @___rz(i64 %.fca.1.extract.i.i, double 0x3FE921FB54442D18) - tail call void @___rz(i64 %.fca.1.extract.i.i, double 0x400921FB54442D18) - tail call void @___rxy(i64 %.fca.1.extract.i133.i.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rzz(i64 %.fca.1.extract.i.i, i64 %.fca.1.extract.i133.i.i, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %.fca.1.extract.i.i, double 0xBFF921FB54442D18) - tail call void @___rxy(i64 %.fca.1.extract.i133.i.i, double 0x3FF921FB54442D18, double 0x400921FB54442D18) - tail call void @___rz(i64 %.fca.1.extract.i133.i.i, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %.fca.1.extract.i133.i.i, double 0x3FE921FB54442D18) - %lazy_measure67.i.i = tail call i64 @___lazy_measure(i64 %.fca.1.extract.i133.i.i) - tail call void @___qfree(i64 %.fca.1.extract.i133.i.i) + tail call void @___rz(i64 %qalloc.i.i, double 0x3FE921FB54442D18) + tail call void @___rz(i64 %qalloc.i.i, double 0x400921FB54442D18) + tail call void @___rxy(i64 %qalloc.i128.i.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) + tail call void @___rzz(i64 %qalloc.i.i, i64 %qalloc.i128.i.i, double 0x3FF921FB54442D18) + tail call void @___rz(i64 %qalloc.i.i, double 0xBFF921FB54442D18) + tail call void @___rxy(i64 %qalloc.i128.i.i, double 0x3FF921FB54442D18, double 0x400921FB54442D18) + tail call void @___rz(i64 %qalloc.i128.i.i, double 0xBFF921FB54442D18) + tail call void @___rz(i64 %qalloc.i128.i.i, double 0x3FE921FB54442D18) + %lazy_measure67.i.i = tail call i64 @___lazy_measure(i64 %qalloc.i128.i.i) + tail call void @___qfree(i64 %qalloc.i128.i.i) %read_bool80.i.i = tail call i1 @___read_future_bool(i64 %lazy_measure67.i.i) tail call void @___dec_future_refcount(i64 %lazy_measure67.i.i) - br i1 %read_bool80.i.i, label %__hugr__.main.1.exit, label %8 - -8: ; preds = %cond_256_case_1.i.i - tail call void @___rxy(i64 %.fca.1.extract.i.i, double 0x400921FB54442D18, double 0.000000e+00) - br label %cond_242_case_1.i.i.backedge + br i1 %read_bool80.i.i, label %__hugr__.main.1.exit, label %2 -cond_242_case_1.i.i.backedge: ; preds = %8, %7 - br label %cond_242_case_1.i.i +2: ; preds = %cond_256_case_1.i.i + tail call void @___rxy(i64 %qalloc.i.i, double 0x400921FB54442D18, double 0.000000e+00) + br label %cond_242_case_1.backedge.i.i __hugr__.main.1.exit: ; preds = %cond_256_case_1.i.i - %lazy_measure.i = tail call i64 @___lazy_measure(i64 %.fca.1.extract.i.i) - tail call void @___qfree(i64 %.fca.1.extract.i.i) + %lazy_measure.i = tail call i64 @___lazy_measure(i64 %qalloc.i.i) + tail call void @___qfree(i64 %qalloc.i.i) %read_bool.i = tail call i1 @___read_future_bool(i64 %lazy_measure.i) tail call void @___dec_future_refcount(i64 %lazy_measure.i) - tail call void @print_bool(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @res_result.457DE32D.0, i64 0, i64 0), i64 16, i1 %read_bool.i) - %9 = tail call i64 @teardown() - ret i64 %9 + tail call void @print_bool(ptr nonnull @res_result.457DE32D.0, i64 16, i1 %read_bool.i) + %3 = tail call i64 @teardown() + ret i64 %3 } declare void @setup(i64) local_unnamed_addr diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-discard_qb_array/discard_qb_array_x86_64-unknown-linux-gnu b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-discard_qb_array/discard_qb_array_x86_64-unknown-linux-gnu index 794a55a63..849877232 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-discard_qb_array/discard_qb_array_x86_64-unknown-linux-gnu +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-discard_qb_array/discard_qb_array_x86_64-unknown-linux-gnu @@ -1,6 +1,6 @@ ; ModuleID = 'hugr' source_filename = "hugr" -target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" +target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" @"e_Array alre.5A300C2A.0" = private constant [57 x i8] c"8EXIT:INT:Array already contains an element at this index" @@ -8,14 +8,14 @@ target triple = "x86_64-unknown-linux-gnu" @"e_Array cont.EFA5AC45.0" = private constant [70 x i8] c"EEXIT:INT:Array contains non-borrowed elements and cannot be discarded" @"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." -declare i8* @heap_alloc(i64) local_unnamed_addr +declare ptr @heap_alloc(i64) local_unnamed_addr ; Function Attrs: noreturn -declare void @panic(i32, i8*) local_unnamed_addr #0 +declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @___qfree(i64) local_unnamed_addr -declare void @heap_free(i8*) local_unnamed_addr +declare void @heap_free(ptr) local_unnamed_addr declare i64 @___qalloc() local_unnamed_addr @@ -24,194 +24,264 @@ declare void @___reset(i64) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr { entry: tail call void @setup(i64 %0) - %1 = tail call i8* @heap_alloc(i64 80) - %2 = bitcast i8* %1 to i64* - %3 = tail call i8* @heap_alloc(i64 8) - %4 = bitcast i8* %3 to i64* - store i64 -1, i64* %4, align 1 - br label %cond_20_case_1.i - -cond_20_case_1.i: ; preds = %cond_exit_20.i, %entry - %"15_0.sroa.0.0114.i" = phi i64 [ 0, %entry ], [ %5, %cond_exit_20.i ] - %5 = add nuw nsw i64 %"15_0.sroa.0.0114.i", 1 + %1 = tail call ptr @heap_alloc(i64 80) + %2 = tail call ptr @heap_alloc(i64 8) + store i64 -1, ptr %2, align 1 %qalloc.i.i = tail call i64 @___qalloc() - %not_max.not.i.i = icmp eq i64 %qalloc.i.i, -1 - br i1 %not_max.not.i.i, label %id_bb.i.i, label %reset_bb.i.i + %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 + br i1 %not_max.not.not.i.i, label %cond_211_case_0.i.i, label %__barray_check_bounds.exit.i -reset_bb.i.i: ; preds = %cond_20_case_1.i - tail call void @___reset(i64 %qalloc.i.i) - br label %id_bb.i.i - -id_bb.i.i: ; preds = %reset_bb.i.i, %cond_20_case_1.i - %6 = insertvalue { i1, i64 } { i1 true, i64 poison }, i64 %qalloc.i.i, 1 - %7 = select i1 %not_max.not.i.i, { i1, i64 } { i1 false, i64 poison }, { i1, i64 } %6 - %.fca.0.extract.i.i = extractvalue { i1, i64 } %7, 0 - br i1 %.fca.0.extract.i.i, label %__barray_check_bounds.exit.i, label %cond_211_case_0.i.i - -cond_211_case_0.i.i: ; preds = %id_bb.i.i - tail call void @panic(i32 1001, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @"e_No more qu.3B2EEBF0.0", i64 0, i64 0)) +cond_211_case_0.i.i: ; preds = %cond_exit_20.i.8, %cond_exit_20.i.7, %cond_exit_20.i.6, %cond_exit_20.i.5, %cond_exit_20.i.4, %cond_exit_20.i.3, %cond_exit_20.i.2, %cond_exit_20.i.1, %cond_exit_20.i, %entry + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__barray_check_bounds.exit.i: ; preds = %id_bb.i.i - %8 = lshr i64 %"15_0.sroa.0.0114.i", 6 - %9 = getelementptr inbounds i64, i64* %4, i64 %8 - %10 = load i64, i64* %9, align 4 - %11 = shl nuw nsw i64 1, %"15_0.sroa.0.0114.i" - %12 = and i64 %10, %11 - %.not.i.i = icmp eq i64 %12, 0 - br i1 %.not.i.i, label %panic.i.i, label %cond_exit_20.i - -panic.i.i: ; preds = %__barray_check_bounds.exit.i - tail call void @panic(i32 1002, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @"e_Array alre.5A300C2A.0", i64 0, i64 0)) +__barray_check_bounds.exit.i: ; preds = %entry + tail call void @___reset(i64 %qalloc.i.i) + %3 = load i64, ptr %2, align 4 + %4 = trunc i64 %3 to i1 + br i1 %4, label %cond_exit_20.i, label %panic.i.i + +panic.i.i: ; preds = %__barray_check_bounds.exit.i.9, %__barray_check_bounds.exit.i.8, %__barray_check_bounds.exit.i.7, %__barray_check_bounds.exit.i.6, %__barray_check_bounds.exit.i.5, %__barray_check_bounds.exit.i.4, %__barray_check_bounds.exit.i.3, %__barray_check_bounds.exit.i.2, %__barray_check_bounds.exit.i.1, %__barray_check_bounds.exit.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable cond_exit_20.i: ; preds = %__barray_check_bounds.exit.i - %.fca.1.extract.i.i = extractvalue { i1, i64 } %7, 1 - %13 = xor i64 %10, %11 - store i64 %13, i64* %9, align 4 - %14 = getelementptr inbounds i64, i64* %2, i64 %"15_0.sroa.0.0114.i" - store i64 %.fca.1.extract.i.i, i64* %14, align 4 - %exitcond.not.i = icmp eq i64 %5, 10 - br i1 %exitcond.not.i, label %loop_out.preheader.preheader.i, label %cond_20_case_1.i - -loop_out.preheader.preheader.i: ; preds = %cond_exit_20.i - %15 = load i64, i64* %4, align 4 - %16 = and i64 %15, 1 - %.not.i99.i.i.i = icmp eq i64 %16, 0 - br i1 %.not.i99.i.i.i, label %cond_380_case_1.i.i, label %panic.i.i.i.i - -mask_block_err.i.i.i.i: ; preds = %cond_380_case_1.i.9.i - tail call void @panic(i32 1002, i8* getelementptr inbounds ([70 x i8], [70 x i8]* @"e_Array cont.EFA5AC45.0", i64 0, i64 0)) + %5 = and i64 %3, -2 + store i64 %5, ptr %2, align 4 + store i64 %qalloc.i.i, ptr %1, align 4 + %qalloc.i.i.1 = tail call i64 @___qalloc() + %not_max.not.not.i.i.1 = icmp eq i64 %qalloc.i.i.1, -1 + br i1 %not_max.not.not.i.i.1, label %cond_211_case_0.i.i, label %__barray_check_bounds.exit.i.1 + +__barray_check_bounds.exit.i.1: ; preds = %cond_exit_20.i + tail call void @___reset(i64 %qalloc.i.i.1) + %6 = load i64, ptr %2, align 4 + %7 = and i64 %6, 2 + %.not = icmp eq i64 %7, 0 + br i1 %.not, label %panic.i.i, label %cond_exit_20.i.1 + +cond_exit_20.i.1: ; preds = %__barray_check_bounds.exit.i.1 + %8 = and i64 %6, -3 + store i64 %8, ptr %2, align 4 + %9 = getelementptr inbounds nuw i8, ptr %1, i64 8 + store i64 %qalloc.i.i.1, ptr %9, align 4 + %qalloc.i.i.2 = tail call i64 @___qalloc() + %not_max.not.not.i.i.2 = icmp eq i64 %qalloc.i.i.2, -1 + br i1 %not_max.not.not.i.i.2, label %cond_211_case_0.i.i, label %__barray_check_bounds.exit.i.2 + +__barray_check_bounds.exit.i.2: ; preds = %cond_exit_20.i.1 + tail call void @___reset(i64 %qalloc.i.i.2) + %10 = load i64, ptr %2, align 4 + %11 = and i64 %10, 4 + %.not1 = icmp eq i64 %11, 0 + br i1 %.not1, label %panic.i.i, label %cond_exit_20.i.2 + +cond_exit_20.i.2: ; preds = %__barray_check_bounds.exit.i.2 + %12 = and i64 %10, -5 + store i64 %12, ptr %2, align 4 + %13 = getelementptr inbounds nuw i8, ptr %1, i64 16 + store i64 %qalloc.i.i.2, ptr %13, align 4 + %qalloc.i.i.3 = tail call i64 @___qalloc() + %not_max.not.not.i.i.3 = icmp eq i64 %qalloc.i.i.3, -1 + br i1 %not_max.not.not.i.i.3, label %cond_211_case_0.i.i, label %__barray_check_bounds.exit.i.3 + +__barray_check_bounds.exit.i.3: ; preds = %cond_exit_20.i.2 + tail call void @___reset(i64 %qalloc.i.i.3) + %14 = load i64, ptr %2, align 4 + %15 = and i64 %14, 8 + %.not2 = icmp eq i64 %15, 0 + br i1 %.not2, label %panic.i.i, label %cond_exit_20.i.3 + +cond_exit_20.i.3: ; preds = %__barray_check_bounds.exit.i.3 + %16 = and i64 %14, -9 + store i64 %16, ptr %2, align 4 + %17 = getelementptr inbounds nuw i8, ptr %1, i64 24 + store i64 %qalloc.i.i.3, ptr %17, align 4 + %qalloc.i.i.4 = tail call i64 @___qalloc() + %not_max.not.not.i.i.4 = icmp eq i64 %qalloc.i.i.4, -1 + br i1 %not_max.not.not.i.i.4, label %cond_211_case_0.i.i, label %__barray_check_bounds.exit.i.4 + +__barray_check_bounds.exit.i.4: ; preds = %cond_exit_20.i.3 + tail call void @___reset(i64 %qalloc.i.i.4) + %18 = load i64, ptr %2, align 4 + %19 = and i64 %18, 16 + %.not3 = icmp eq i64 %19, 0 + br i1 %.not3, label %panic.i.i, label %cond_exit_20.i.4 + +cond_exit_20.i.4: ; preds = %__barray_check_bounds.exit.i.4 + %20 = and i64 %18, -17 + store i64 %20, ptr %2, align 4 + %21 = getelementptr inbounds nuw i8, ptr %1, i64 32 + store i64 %qalloc.i.i.4, ptr %21, align 4 + %qalloc.i.i.5 = tail call i64 @___qalloc() + %not_max.not.not.i.i.5 = icmp eq i64 %qalloc.i.i.5, -1 + br i1 %not_max.not.not.i.i.5, label %cond_211_case_0.i.i, label %__barray_check_bounds.exit.i.5 + +__barray_check_bounds.exit.i.5: ; preds = %cond_exit_20.i.4 + tail call void @___reset(i64 %qalloc.i.i.5) + %22 = load i64, ptr %2, align 4 + %23 = and i64 %22, 32 + %.not4 = icmp eq i64 %23, 0 + br i1 %.not4, label %panic.i.i, label %cond_exit_20.i.5 + +cond_exit_20.i.5: ; preds = %__barray_check_bounds.exit.i.5 + %24 = and i64 %22, -33 + store i64 %24, ptr %2, align 4 + %25 = getelementptr inbounds nuw i8, ptr %1, i64 40 + store i64 %qalloc.i.i.5, ptr %25, align 4 + %qalloc.i.i.6 = tail call i64 @___qalloc() + %not_max.not.not.i.i.6 = icmp eq i64 %qalloc.i.i.6, -1 + br i1 %not_max.not.not.i.i.6, label %cond_211_case_0.i.i, label %__barray_check_bounds.exit.i.6 + +__barray_check_bounds.exit.i.6: ; preds = %cond_exit_20.i.5 + tail call void @___reset(i64 %qalloc.i.i.6) + %26 = load i64, ptr %2, align 4 + %27 = and i64 %26, 64 + %.not5 = icmp eq i64 %27, 0 + br i1 %.not5, label %panic.i.i, label %cond_exit_20.i.6 + +cond_exit_20.i.6: ; preds = %__barray_check_bounds.exit.i.6 + %28 = and i64 %26, -65 + store i64 %28, ptr %2, align 4 + %29 = getelementptr inbounds nuw i8, ptr %1, i64 48 + store i64 %qalloc.i.i.6, ptr %29, align 4 + %qalloc.i.i.7 = tail call i64 @___qalloc() + %not_max.not.not.i.i.7 = icmp eq i64 %qalloc.i.i.7, -1 + br i1 %not_max.not.not.i.i.7, label %cond_211_case_0.i.i, label %__barray_check_bounds.exit.i.7 + +__barray_check_bounds.exit.i.7: ; preds = %cond_exit_20.i.6 + tail call void @___reset(i64 %qalloc.i.i.7) + %30 = load i64, ptr %2, align 4 + %31 = and i64 %30, 128 + %.not6 = icmp eq i64 %31, 0 + br i1 %.not6, label %panic.i.i, label %cond_exit_20.i.7 + +cond_exit_20.i.7: ; preds = %__barray_check_bounds.exit.i.7 + %32 = and i64 %30, -129 + store i64 %32, ptr %2, align 4 + %33 = getelementptr inbounds nuw i8, ptr %1, i64 56 + store i64 %qalloc.i.i.7, ptr %33, align 4 + %qalloc.i.i.8 = tail call i64 @___qalloc() + %not_max.not.not.i.i.8 = icmp eq i64 %qalloc.i.i.8, -1 + br i1 %not_max.not.not.i.i.8, label %cond_211_case_0.i.i, label %__barray_check_bounds.exit.i.8 + +__barray_check_bounds.exit.i.8: ; preds = %cond_exit_20.i.7 + tail call void @___reset(i64 %qalloc.i.i.8) + %34 = load i64, ptr %2, align 4 + %35 = and i64 %34, 256 + %.not7 = icmp eq i64 %35, 0 + br i1 %.not7, label %panic.i.i, label %cond_exit_20.i.8 + +cond_exit_20.i.8: ; preds = %__barray_check_bounds.exit.i.8 + %36 = and i64 %34, -257 + store i64 %36, ptr %2, align 4 + %37 = getelementptr inbounds nuw i8, ptr %1, i64 64 + store i64 %qalloc.i.i.8, ptr %37, align 4 + %qalloc.i.i.9 = tail call i64 @___qalloc() + %not_max.not.not.i.i.9 = icmp eq i64 %qalloc.i.i.9, -1 + br i1 %not_max.not.not.i.i.9, label %cond_211_case_0.i.i, label %__barray_check_bounds.exit.i.9 + +__barray_check_bounds.exit.i.9: ; preds = %cond_exit_20.i.8 + tail call void @___reset(i64 %qalloc.i.i.9) + %38 = load i64, ptr %2, align 4 + %39 = and i64 %38, 512 + %.not8 = icmp eq i64 %39, 0 + br i1 %.not8, label %panic.i.i, label %cond_exit_20.i.9 + +cond_exit_20.i.9: ; preds = %__barray_check_bounds.exit.i.9 + %40 = and i64 %38, -513 + store i64 %40, ptr %2, align 4 + %41 = getelementptr inbounds nuw i8, ptr %1, i64 72 + store i64 %qalloc.i.i.9, ptr %41, align 4 + %"120.fca.0.insert.i" = insertvalue { ptr, ptr, i64 } poison, ptr %1, 0 + %"120.fca.1.insert.i" = insertvalue { ptr, ptr, i64 } %"120.fca.0.insert.i", ptr %2, 1 + %"120.fca.2.insert.i" = insertvalue { ptr, ptr, i64 } %"120.fca.1.insert.i", i64 0, 2 + %42 = insertvalue { { ptr, ptr, i64 }, i64 } poison, { ptr, ptr, i64 } %"120.fca.2.insert.i", 0 + br label %__barray_check_bounds.exit.i.i.i + +43: ; preds = %"__hugr__.$__next__$$t(qubit)$n(10).299.exit.thread.i.i" + %44 = lshr i64 %.fca.1.0.0.2.extract.i.i.i, 6 + %45 = getelementptr i64, ptr %.fca.1.0.0.1.extract.i.i.i, i64 %44 + %46 = load i64, ptr %45, align 4 + %47 = and i64 %.fca.1.0.0.2.extract.i.i.i, 63 + %48 = sub nuw nsw i64 64, %47 + %49 = lshr i64 -1, %48 + %50 = icmp eq i64 %47, 0 + %51 = select i1 %50, i64 0, i64 %49 + %52 = or i64 %46, %51 + store i64 %52, ptr %45, align 4 + %last_valid.i.i.i.i = add i64 %.fca.1.0.0.2.extract.i.i.i, 9 + %53 = lshr i64 %last_valid.i.i.i.i, 6 + %54 = getelementptr inbounds nuw i64, ptr %.fca.1.0.0.1.extract.i.i.i, i64 %53 + %55 = load i64, ptr %54, align 4 + %56 = and i64 %last_valid.i.i.i.i, 63 + %57 = shl nsw i64 -2, %56 + %58 = icmp eq i64 %56, 63 + %59 = select i1 %58, i64 0, i64 %57 + %60 = or i64 %55, %59 + store i64 %60, ptr %54, align 4 + %reass.sub.i.i.i.i = sub nsw i64 %53, %44 + %.not.i.i.i.i = icmp eq i64 %reass.sub.i.i.i.i, -1 + br i1 %.not.i.i.i.i, label %__hugr__.main.1.exit, label %mask_block_ok.i.i.i.i + +61: ; preds = %mask_block_ok.i.i.i.i + %62 = add nuw i64 %.02.i.i.i.i, 1 + %exitcond.not.i.i.i.i = icmp eq i64 %.02.i.i.i.i, %reass.sub.i.i.i.i + br i1 %exitcond.not.i.i.i.i, label %__hugr__.main.1.exit, label %mask_block_ok.i.i.i.i + +mask_block_ok.i.i.i.i: ; preds = %43, %61 + %.02.i.i.i.i = phi i64 [ %62, %61 ], [ 0, %43 ] + %gep.i.i.i.i = getelementptr i64, ptr %45, i64 %.02.i.i.i.i + %63 = load i64, ptr %gep.i.i.i.i, align 4 + %64 = icmp eq i64 %63, -1 + br i1 %64, label %61, label %mask_block_err.i.i.i.i + +mask_block_err.i.i.i.i: ; preds = %mask_block_ok.i.i.i.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -panic.i.i.i.i: ; preds = %cond_380_case_1.i.8.i, %cond_380_case_1.i.7.i, %cond_380_case_1.i.6.i, %cond_380_case_1.i.5.i, %cond_380_case_1.i.4.i, %cond_380_case_1.i.3.i, %cond_380_case_1.i.2.i, %cond_380_case_1.i.1.i, %cond_380_case_1.i.i, %loop_out.preheader.preheader.i - tail call void @panic(i32 1002, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @"e_Array elem.E746B1A3.0", i64 0, i64 0)) +__barray_check_bounds.exit.i.i.i: ; preds = %"__hugr__.$__next__$$t(qubit)$n(10).299.exit.thread.i.i", %cond_exit_20.i.9 + %.fca.2.extract83.i185.i.i = phi i64 [ 0, %cond_exit_20.i.9 ], [ %.fca.1.0.0.2.extract.i.i.i, %"__hugr__.$__next__$$t(qubit)$n(10).299.exit.thread.i.i" ] + %.fca.1.extract82.i184.i.i = phi ptr [ %2, %cond_exit_20.i.9 ], [ %.fca.1.0.0.1.extract.i.i.i, %"__hugr__.$__next__$$t(qubit)$n(10).299.exit.thread.i.i" ] + %.fca.0.extract81.i183.i.i = phi ptr [ %1, %cond_exit_20.i.9 ], [ %.fca.1.0.0.0.extract.i.i.i, %"__hugr__.$__next__$$t(qubit)$n(10).299.exit.thread.i.i" ] + %"291_0.0182.i.i" = phi i64 [ 0, %cond_exit_20.i.9 ], [ %72, %"__hugr__.$__next__$$t(qubit)$n(10).299.exit.thread.i.i" ] + %.pn181.i.i = phi { { ptr, ptr, i64 }, i64 } [ %42, %cond_exit_20.i.9 ], [ %80, %"__hugr__.$__next__$$t(qubit)$n(10).299.exit.thread.i.i" ] + %65 = add i64 %"291_0.0182.i.i", %.fca.2.extract83.i185.i.i + %66 = lshr i64 %65, 6 + %67 = getelementptr inbounds nuw i64, ptr %.fca.1.extract82.i184.i.i, i64 %66 + %68 = load i64, ptr %67, align 4 + %69 = and i64 %65, 63 + %70 = lshr i64 %68, %69 + %71 = trunc i64 %70 to i1 + br i1 %71, label %panic.i.i.i.i, label %"__hugr__.$__next__$$t(qubit)$n(10).299.exit.thread.i.i" + +panic.i.i.i.i: ; preds = %__barray_check_bounds.exit.i.i.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -cond_380_case_1.i.i: ; preds = %loop_out.preheader.preheader.i - %17 = xor i64 %15, 1 - store i64 %17, i64* %4, align 4 - %18 = load i64, i64* %2, align 4 - tail call void @___qfree(i64 %18) - %19 = load i64, i64* %4, align 4 - %20 = and i64 %19, 2 - %.not.i99.i.i.1.i = icmp eq i64 %20, 0 - br i1 %.not.i99.i.i.1.i, label %cond_380_case_1.i.1.i, label %panic.i.i.i.i - -cond_380_case_1.i.1.i: ; preds = %cond_380_case_1.i.i - %21 = xor i64 %19, 2 - store i64 %21, i64* %4, align 4 - %22 = getelementptr inbounds i8, i8* %1, i64 8 - %23 = bitcast i8* %22 to i64* - %24 = load i64, i64* %23, align 4 - tail call void @___qfree(i64 %24) - %25 = load i64, i64* %4, align 4 - %26 = and i64 %25, 4 - %.not.i99.i.i.2.i = icmp eq i64 %26, 0 - br i1 %.not.i99.i.i.2.i, label %cond_380_case_1.i.2.i, label %panic.i.i.i.i - -cond_380_case_1.i.2.i: ; preds = %cond_380_case_1.i.1.i - %27 = xor i64 %25, 4 - store i64 %27, i64* %4, align 4 - %28 = getelementptr inbounds i8, i8* %1, i64 16 - %29 = bitcast i8* %28 to i64* - %30 = load i64, i64* %29, align 4 - tail call void @___qfree(i64 %30) - %31 = load i64, i64* %4, align 4 - %32 = and i64 %31, 8 - %.not.i99.i.i.3.i = icmp eq i64 %32, 0 - br i1 %.not.i99.i.i.3.i, label %cond_380_case_1.i.3.i, label %panic.i.i.i.i - -cond_380_case_1.i.3.i: ; preds = %cond_380_case_1.i.2.i - %33 = xor i64 %31, 8 - store i64 %33, i64* %4, align 4 - %34 = getelementptr inbounds i8, i8* %1, i64 24 - %35 = bitcast i8* %34 to i64* - %36 = load i64, i64* %35, align 4 - tail call void @___qfree(i64 %36) - %37 = load i64, i64* %4, align 4 - %38 = and i64 %37, 16 - %.not.i99.i.i.4.i = icmp eq i64 %38, 0 - br i1 %.not.i99.i.i.4.i, label %cond_380_case_1.i.4.i, label %panic.i.i.i.i - -cond_380_case_1.i.4.i: ; preds = %cond_380_case_1.i.3.i - %39 = xor i64 %37, 16 - store i64 %39, i64* %4, align 4 - %40 = getelementptr inbounds i8, i8* %1, i64 32 - %41 = bitcast i8* %40 to i64* - %42 = load i64, i64* %41, align 4 - tail call void @___qfree(i64 %42) - %43 = load i64, i64* %4, align 4 - %44 = and i64 %43, 32 - %.not.i99.i.i.5.i = icmp eq i64 %44, 0 - br i1 %.not.i99.i.i.5.i, label %cond_380_case_1.i.5.i, label %panic.i.i.i.i - -cond_380_case_1.i.5.i: ; preds = %cond_380_case_1.i.4.i - %45 = xor i64 %43, 32 - store i64 %45, i64* %4, align 4 - %46 = getelementptr inbounds i8, i8* %1, i64 40 - %47 = bitcast i8* %46 to i64* - %48 = load i64, i64* %47, align 4 - tail call void @___qfree(i64 %48) - %49 = load i64, i64* %4, align 4 - %50 = and i64 %49, 64 - %.not.i99.i.i.6.i = icmp eq i64 %50, 0 - br i1 %.not.i99.i.i.6.i, label %cond_380_case_1.i.6.i, label %panic.i.i.i.i - -cond_380_case_1.i.6.i: ; preds = %cond_380_case_1.i.5.i - %51 = xor i64 %49, 64 - store i64 %51, i64* %4, align 4 - %52 = getelementptr inbounds i8, i8* %1, i64 48 - %53 = bitcast i8* %52 to i64* - %54 = load i64, i64* %53, align 4 - tail call void @___qfree(i64 %54) - %55 = load i64, i64* %4, align 4 - %56 = and i64 %55, 128 - %.not.i99.i.i.7.i = icmp eq i64 %56, 0 - br i1 %.not.i99.i.i.7.i, label %cond_380_case_1.i.7.i, label %panic.i.i.i.i - -cond_380_case_1.i.7.i: ; preds = %cond_380_case_1.i.6.i - %57 = xor i64 %55, 128 - store i64 %57, i64* %4, align 4 - %58 = getelementptr inbounds i8, i8* %1, i64 56 - %59 = bitcast i8* %58 to i64* - %60 = load i64, i64* %59, align 4 - tail call void @___qfree(i64 %60) - %61 = load i64, i64* %4, align 4 - %62 = and i64 %61, 256 - %.not.i99.i.i.8.i = icmp eq i64 %62, 0 - br i1 %.not.i99.i.i.8.i, label %cond_380_case_1.i.8.i, label %panic.i.i.i.i - -cond_380_case_1.i.8.i: ; preds = %cond_380_case_1.i.7.i - %63 = xor i64 %61, 256 - store i64 %63, i64* %4, align 4 - %64 = getelementptr inbounds i8, i8* %1, i64 64 - %65 = bitcast i8* %64 to i64* - %66 = load i64, i64* %65, align 4 - tail call void @___qfree(i64 %66) - %67 = load i64, i64* %4, align 4 - %68 = and i64 %67, 512 - %.not.i99.i.i.9.i = icmp eq i64 %68, 0 - br i1 %.not.i99.i.i.9.i, label %cond_380_case_1.i.9.i, label %panic.i.i.i.i - -cond_380_case_1.i.9.i: ; preds = %cond_380_case_1.i.8.i - %69 = xor i64 %67, 512 - store i64 %69, i64* %4, align 4 - %70 = getelementptr inbounds i8, i8* %1, i64 72 - %71 = bitcast i8* %70 to i64* - %72 = load i64, i64* %71, align 4 - tail call void @___qfree(i64 %72) - %73 = load i64, i64* %4, align 4 - %74 = or i64 %73, -1024 - store i64 %74, i64* %4, align 4 - %75 = icmp eq i64 %74, -1 - br i1 %75, label %__hugr__.main.1.exit, label %mask_block_err.i.i.i.i - -__hugr__.main.1.exit: ; preds = %cond_380_case_1.i.9.i - tail call void @heap_free(i8* nonnull %1) - tail call void @heap_free(i8* nonnull %3) - %76 = tail call i64 @teardown() - ret i64 %76 +"__hugr__.$__next__$$t(qubit)$n(10).299.exit.thread.i.i": ; preds = %__barray_check_bounds.exit.i.i.i + %72 = add nuw nsw i64 %"291_0.0182.i.i", 1 + %73 = shl nuw i64 1, %69 + %74 = xor i64 %73, %68 + store i64 %74, ptr %67, align 4 + %75 = getelementptr inbounds i64, ptr %.fca.0.extract81.i183.i.i, i64 %65 + %76 = load i64, ptr %75, align 4 + %.fca.1.0.0.0.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn181.i.i, 0, 0 + %.fca.1.0.0.1.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn181.i.i, 0, 1 + %.fca.1.0.0.2.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn181.i.i, 0, 2 + %77 = insertvalue { { ptr, ptr, i64 }, i64 } %.pn181.i.i, i64 %72, 1 + %78 = insertvalue { { ptr, ptr, i64 }, i64 } %77, ptr %.fca.1.0.0.0.extract.i.i.i, 0, 0 + %79 = insertvalue { { ptr, ptr, i64 }, i64 } %78, ptr %.fca.1.0.0.1.extract.i.i.i, 0, 1 + %80 = insertvalue { { ptr, ptr, i64 }, i64 } %79, i64 %.fca.1.0.0.2.extract.i.i.i, 0, 2 + tail call void @___qfree(i64 %76) + %.not.i.i = icmp eq i64 %"291_0.0182.i.i", 9 + br i1 %.not.i.i, label %43, label %__barray_check_bounds.exit.i.i.i + +__hugr__.main.1.exit: ; preds = %61, %43 + tail call void @heap_free(ptr %.fca.1.0.0.0.extract.i.i.i) + tail call void @heap_free(ptr nonnull %.fca.1.0.0.1.extract.i.i.i) + %81 = tail call i64 @teardown() + ret i64 %81 } declare void @setup(i64) local_unnamed_addr diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-flip_some/flip_some_x86_64-unknown-linux-gnu b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-flip_some/flip_some_x86_64-unknown-linux-gnu index cab4ef0bf..9dced28f8 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-flip_some/flip_some_x86_64-unknown-linux-gnu +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-flip_some/flip_some_x86_64-unknown-linux-gnu @@ -1,6 +1,6 @@ ; ModuleID = 'hugr' source_filename = "hugr" -target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" +target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" @res_c0.7C14CD6E.0 = private constant [13 x i8] c"\0CUSER:BOOL:c0" @@ -17,14 +17,14 @@ declare i1 @___read_future_bool(i64) local_unnamed_addr declare void @___dec_future_refcount(i64) local_unnamed_addr -declare void @print_bool(i8*, i64, i1) local_unnamed_addr +declare void @print_bool(ptr, i64, i1) local_unnamed_addr declare i64 @___qalloc() local_unnamed_addr declare void @___reset(i64) local_unnamed_addr ; Function Attrs: noreturn -declare void @panic(i32, i8*) local_unnamed_addr #0 +declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @___rxy(i64, double, double) local_unnamed_addr @@ -32,110 +32,70 @@ define i64 @qmain(i64 %0) local_unnamed_addr { entry: tail call void @setup(i64 %0) %qalloc.i.i = tail call i64 @___qalloc() - %not_max.not.i.i = icmp eq i64 %qalloc.i.i, -1 - br i1 %not_max.not.i.i, label %id_bb.i.i, label %reset_bb.i.i + %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 + br i1 %not_max.not.not.i.i, label %cond_40_case_0.i.i, label %__hugr__.__tk2_qalloc.36.exit.i -reset_bb.i.i: ; preds = %entry - tail call void @___reset(i64 %qalloc.i.i) - br label %id_bb.i.i - -id_bb.i.i: ; preds = %reset_bb.i.i, %entry - %1 = insertvalue { i1, i64 } { i1 true, i64 poison }, i64 %qalloc.i.i, 1 - %2 = select i1 %not_max.not.i.i, { i1, i64 } { i1 false, i64 poison }, { i1, i64 } %1 - %.fca.0.extract.i.i = extractvalue { i1, i64 } %2, 0 - br i1 %.fca.0.extract.i.i, label %__hugr__.__tk2_qalloc.36.exit.i, label %cond_40_case_0.i.i - -cond_40_case_0.i.i: ; preds = %id_bb.i.i - tail call void @panic(i32 1001, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @"e_No more qu.3B2EEBF0.0", i64 0, i64 0)) +cond_40_case_0.i.i: ; preds = %entry + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_qalloc.36.exit.i: ; preds = %id_bb.i.i - %.fca.1.extract.i.i = extractvalue { i1, i64 } %2, 1 - tail call void @___rxy(i64 %.fca.1.extract.i.i, double 0x400921FB54442D18, double 0.000000e+00) +__hugr__.__tk2_qalloc.36.exit.i: ; preds = %entry + tail call void @___reset(i64 %qalloc.i.i) + tail call void @___rxy(i64 %qalloc.i.i, double 0x400921FB54442D18, double 0.000000e+00) %qalloc.i101.i = tail call i64 @___qalloc() - %not_max.not.i102.i = icmp eq i64 %qalloc.i101.i, -1 - br i1 %not_max.not.i102.i, label %id_bb.i105.i, label %reset_bb.i103.i - -reset_bb.i103.i: ; preds = %__hugr__.__tk2_qalloc.36.exit.i - tail call void @___reset(i64 %qalloc.i101.i) - br label %id_bb.i105.i + %not_max.not.not.i102.i = icmp eq i64 %qalloc.i101.i, -1 + br i1 %not_max.not.not.i102.i, label %cond_54_case_0.i.i, label %__hugr__.__tk2_qalloc.50.exit.i -id_bb.i105.i: ; preds = %reset_bb.i103.i, %__hugr__.__tk2_qalloc.36.exit.i - %3 = insertvalue { i1, i64 } { i1 true, i64 poison }, i64 %qalloc.i101.i, 1 - %4 = select i1 %not_max.not.i102.i, { i1, i64 } { i1 false, i64 poison }, { i1, i64 } %3 - %.fca.0.extract.i104.i = extractvalue { i1, i64 } %4, 0 - br i1 %.fca.0.extract.i104.i, label %__hugr__.__tk2_qalloc.50.exit.i, label %cond_54_case_0.i.i - -cond_54_case_0.i.i: ; preds = %id_bb.i105.i - tail call void @panic(i32 1001, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @"e_No more qu.3B2EEBF0.0", i64 0, i64 0)) +cond_54_case_0.i.i: ; preds = %__hugr__.__tk2_qalloc.36.exit.i + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_qalloc.50.exit.i: ; preds = %id_bb.i105.i - %.fca.1.extract.i106.i = extractvalue { i1, i64 } %4, 1 - %qalloc.i107.i = tail call i64 @___qalloc() - %not_max.not.i108.i = icmp eq i64 %qalloc.i107.i, -1 - br i1 %not_max.not.i108.i, label %id_bb.i111.i, label %reset_bb.i109.i - -reset_bb.i109.i: ; preds = %__hugr__.__tk2_qalloc.50.exit.i - tail call void @___reset(i64 %qalloc.i107.i) - br label %id_bb.i111.i - -id_bb.i111.i: ; preds = %reset_bb.i109.i, %__hugr__.__tk2_qalloc.50.exit.i - %5 = insertvalue { i1, i64 } { i1 true, i64 poison }, i64 %qalloc.i107.i, 1 - %6 = select i1 %not_max.not.i108.i, { i1, i64 } { i1 false, i64 poison }, { i1, i64 } %5 - %.fca.0.extract.i110.i = extractvalue { i1, i64 } %6, 0 - br i1 %.fca.0.extract.i110.i, label %__hugr__.__tk2_qalloc.64.exit.i, label %cond_68_case_0.i.i +__hugr__.__tk2_qalloc.50.exit.i: ; preds = %__hugr__.__tk2_qalloc.36.exit.i + tail call void @___reset(i64 %qalloc.i101.i) + %qalloc.i103.i = tail call i64 @___qalloc() + %not_max.not.not.i104.i = icmp eq i64 %qalloc.i103.i, -1 + br i1 %not_max.not.not.i104.i, label %cond_68_case_0.i.i, label %__hugr__.__tk2_qalloc.64.exit.i -cond_68_case_0.i.i: ; preds = %id_bb.i111.i - tail call void @panic(i32 1001, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @"e_No more qu.3B2EEBF0.0", i64 0, i64 0)) +cond_68_case_0.i.i: ; preds = %__hugr__.__tk2_qalloc.50.exit.i + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_qalloc.64.exit.i: ; preds = %id_bb.i111.i - %.fca.1.extract.i112.i = extractvalue { i1, i64 } %6, 1 - tail call void @___rxy(i64 %.fca.1.extract.i112.i, double 0x400921FB54442D18, double 0.000000e+00) - %qalloc.i113.i = tail call i64 @___qalloc() - %not_max.not.i114.i = icmp eq i64 %qalloc.i113.i, -1 - br i1 %not_max.not.i114.i, label %id_bb.i117.i, label %reset_bb.i115.i - -reset_bb.i115.i: ; preds = %__hugr__.__tk2_qalloc.64.exit.i - tail call void @___reset(i64 %qalloc.i113.i) - br label %id_bb.i117.i - -id_bb.i117.i: ; preds = %reset_bb.i115.i, %__hugr__.__tk2_qalloc.64.exit.i - %7 = insertvalue { i1, i64 } { i1 true, i64 poison }, i64 %qalloc.i113.i, 1 - %8 = select i1 %not_max.not.i114.i, { i1, i64 } { i1 false, i64 poison }, { i1, i64 } %7 - %.fca.0.extract.i116.i = extractvalue { i1, i64 } %8, 0 - br i1 %.fca.0.extract.i116.i, label %__hugr__.main.1.exit, label %cond_82_case_0.i.i - -cond_82_case_0.i.i: ; preds = %id_bb.i117.i - tail call void @panic(i32 1001, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @"e_No more qu.3B2EEBF0.0", i64 0, i64 0)) +__hugr__.__tk2_qalloc.64.exit.i: ; preds = %__hugr__.__tk2_qalloc.50.exit.i + tail call void @___reset(i64 %qalloc.i103.i) + tail call void @___rxy(i64 %qalloc.i103.i, double 0x400921FB54442D18, double 0.000000e+00) + %qalloc.i105.i = tail call i64 @___qalloc() + %not_max.not.not.i106.i = icmp eq i64 %qalloc.i105.i, -1 + br i1 %not_max.not.not.i106.i, label %cond_82_case_0.i.i, label %__hugr__.main.1.exit + +cond_82_case_0.i.i: ; preds = %__hugr__.__tk2_qalloc.64.exit.i + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.main.1.exit: ; preds = %id_bb.i117.i - %.fca.1.extract.i118.i = extractvalue { i1, i64 } %8, 1 - %lazy_measure.i = tail call i64 @___lazy_measure(i64 %.fca.1.extract.i.i) - tail call void @___qfree(i64 %.fca.1.extract.i.i) +__hugr__.main.1.exit: ; preds = %__hugr__.__tk2_qalloc.64.exit.i + tail call void @___reset(i64 %qalloc.i105.i) + %lazy_measure.i = tail call i64 @___lazy_measure(i64 %qalloc.i.i) + tail call void @___qfree(i64 %qalloc.i.i) %read_bool.i = tail call i1 @___read_future_bool(i64 %lazy_measure.i) tail call void @___dec_future_refcount(i64 %lazy_measure.i) - tail call void @print_bool(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @res_c0.7C14CD6E.0, i64 0, i64 0), i64 12, i1 %read_bool.i) - %lazy_measure22.i = tail call i64 @___lazy_measure(i64 %.fca.1.extract.i106.i) - tail call void @___qfree(i64 %.fca.1.extract.i106.i) + tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool.i) + %lazy_measure22.i = tail call i64 @___lazy_measure(i64 %qalloc.i101.i) + tail call void @___qfree(i64 %qalloc.i101.i) %read_bool35.i = tail call i1 @___read_future_bool(i64 %lazy_measure22.i) tail call void @___dec_future_refcount(i64 %lazy_measure22.i) - tail call void @print_bool(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @res_c1.1F7A6571.0, i64 0, i64 0), i64 12, i1 %read_bool35.i) - %lazy_measure44.i = tail call i64 @___lazy_measure(i64 %.fca.1.extract.i112.i) - tail call void @___qfree(i64 %.fca.1.extract.i112.i) + tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool35.i) + %lazy_measure44.i = tail call i64 @___lazy_measure(i64 %qalloc.i103.i) + tail call void @___qfree(i64 %qalloc.i103.i) %read_bool57.i = tail call i1 @___read_future_bool(i64 %lazy_measure44.i) tail call void @___dec_future_refcount(i64 %lazy_measure44.i) - tail call void @print_bool(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @res_c2.60825383.0, i64 0, i64 0), i64 12, i1 %read_bool57.i) - tail call void @___rxy(i64 %.fca.1.extract.i118.i, double 0x400921FB54442D18, double 0.000000e+00) - %lazy_measure67.i = tail call i64 @___lazy_measure(i64 %.fca.1.extract.i118.i) - tail call void @___qfree(i64 %.fca.1.extract.i118.i) + tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool57.i) + tail call void @___rxy(i64 %qalloc.i105.i, double 0x400921FB54442D18, double 0.000000e+00) + %lazy_measure67.i = tail call i64 @___lazy_measure(i64 %qalloc.i105.i) + tail call void @___qfree(i64 %qalloc.i105.i) %read_bool80.i = tail call i1 @___read_future_bool(i64 %lazy_measure67.i) tail call void @___dec_future_refcount(i64 %lazy_measure67.i) - tail call void @print_bool(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @res_c3.B223E16D.0, i64 0, i64 0), i64 12, i1 %read_bool80.i) - %9 = tail call i64 @teardown() - ret i64 %9 + tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool80.i) + %1 = tail call i64 @teardown() + ret i64 %1 } declare void @setup(i64) local_unnamed_addr diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-measure_qb_array/measure_qb_array_x86_64-unknown-linux-gnu b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-measure_qb_array/measure_qb_array_x86_64-unknown-linux-gnu index 9951b3a8c..a6f9d1720 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-measure_qb_array/measure_qb_array_x86_64-unknown-linux-gnu +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-measure_qb_array/measure_qb_array_x86_64-unknown-linux-gnu @@ -1,6 +1,6 @@ ; ModuleID = 'hugr' source_filename = "hugr" -target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" +target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" @"e_Array alre.5A300C2A.0" = private constant [57 x i8] c"8EXIT:INT:Array already contains an element at this index" @@ -8,12 +8,12 @@ target triple = "x86_64-unknown-linux-gnu" @"e_Array cont.EFA5AC45.0" = private constant [70 x i8] c"EEXIT:INT:Array contains non-borrowed elements and cannot be discarded" @"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." -declare i8* @heap_alloc(i64) local_unnamed_addr +declare ptr @heap_alloc(i64) local_unnamed_addr ; Function Attrs: noreturn -declare void @panic(i32, i8*) local_unnamed_addr #0 +declare void @panic(i32, ptr) local_unnamed_addr #0 -declare void @heap_free(i8*) local_unnamed_addr +declare void @heap_free(ptr) local_unnamed_addr declare void @___dec_future_refcount(i64) local_unnamed_addr @@ -30,279 +30,600 @@ declare void @___reset(i64) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr { entry: tail call void @setup(i64 %0) - %1 = tail call i8* @heap_alloc(i64 80) - %2 = bitcast i8* %1 to i64* - %3 = tail call i8* @heap_alloc(i64 8) - %4 = bitcast i8* %3 to i64* - store i64 -1, i64* %4, align 1 - br label %cond_20_case_1.i - -cond_20_case_1.i: ; preds = %cond_exit_20.i, %entry - %"15_0.sroa.0.0294.i" = phi i64 [ 0, %entry ], [ %5, %cond_exit_20.i ] - %5 = add nuw nsw i64 %"15_0.sroa.0.0294.i", 1 + %1 = tail call ptr @heap_alloc(i64 80) + %2 = tail call ptr @heap_alloc(i64 8) + store i64 -1, ptr %2, align 1 %qalloc.i.i = tail call i64 @___qalloc() - %not_max.not.i.i = icmp eq i64 %qalloc.i.i, -1 - br i1 %not_max.not.i.i, label %id_bb.i.i, label %reset_bb.i.i + %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 + br i1 %not_max.not.not.i.i, label %cond_236_case_0.i.i, label %__barray_check_bounds.exit.i -reset_bb.i.i: ; preds = %cond_20_case_1.i - tail call void @___reset(i64 %qalloc.i.i) - br label %id_bb.i.i - -id_bb.i.i: ; preds = %reset_bb.i.i, %cond_20_case_1.i - %6 = insertvalue { i1, i64 } { i1 true, i64 poison }, i64 %qalloc.i.i, 1 - %7 = select i1 %not_max.not.i.i, { i1, i64 } { i1 false, i64 poison }, { i1, i64 } %6 - %.fca.0.extract.i.i = extractvalue { i1, i64 } %7, 0 - br i1 %.fca.0.extract.i.i, label %__barray_check_bounds.exit.i, label %cond_236_case_0.i.i - -cond_236_case_0.i.i: ; preds = %id_bb.i.i - tail call void @panic(i32 1001, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @"e_No more qu.3B2EEBF0.0", i64 0, i64 0)) +cond_236_case_0.i.i: ; preds = %cond_exit_20.i.8, %cond_exit_20.i.7, %cond_exit_20.i.6, %cond_exit_20.i.5, %cond_exit_20.i.4, %cond_exit_20.i.3, %cond_exit_20.i.2, %cond_exit_20.i.1, %cond_exit_20.i, %entry + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__barray_check_bounds.exit.i: ; preds = %id_bb.i.i - %8 = lshr i64 %"15_0.sroa.0.0294.i", 6 - %9 = getelementptr inbounds i64, i64* %4, i64 %8 - %10 = load i64, i64* %9, align 4 - %11 = shl nuw nsw i64 1, %"15_0.sroa.0.0294.i" - %12 = and i64 %10, %11 - %.not.i.i = icmp eq i64 %12, 0 - br i1 %.not.i.i, label %panic.i.i, label %cond_exit_20.i - -panic.i.i: ; preds = %__barray_check_bounds.exit.i - tail call void @panic(i32 1002, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @"e_Array alre.5A300C2A.0", i64 0, i64 0)) +__barray_check_bounds.exit.i: ; preds = %entry + tail call void @___reset(i64 %qalloc.i.i) + %3 = load i64, ptr %2, align 4 + %4 = trunc i64 %3 to i1 + br i1 %4, label %cond_exit_20.i, label %panic.i.i + +panic.i.i: ; preds = %__barray_check_bounds.exit.i.9, %__barray_check_bounds.exit.i.8, %__barray_check_bounds.exit.i.7, %__barray_check_bounds.exit.i.6, %__barray_check_bounds.exit.i.5, %__barray_check_bounds.exit.i.4, %__barray_check_bounds.exit.i.3, %__barray_check_bounds.exit.i.2, %__barray_check_bounds.exit.i.1, %__barray_check_bounds.exit.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable cond_exit_20.i: ; preds = %__barray_check_bounds.exit.i - %.fca.1.extract.i.i = extractvalue { i1, i64 } %7, 1 - %13 = xor i64 %10, %11 - store i64 %13, i64* %9, align 4 - %14 = getelementptr inbounds i64, i64* %2, i64 %"15_0.sroa.0.0294.i" - store i64 %.fca.1.extract.i.i, i64* %14, align 4 - %exitcond.not.i = icmp eq i64 %5, 10 - br i1 %exitcond.not.i, label %loop_out.i, label %cond_20_case_1.i - -loop_out.i: ; preds = %cond_exit_20.i - %15 = load i64, i64* %4, align 4 - %16 = and i64 %15, 1 - %.not.i258.i = icmp eq i64 %16, 0 - br i1 %.not.i258.i, label %__barray_mask_borrow.exit.i, label %panic.i259.i - -panic.i259.i: ; preds = %loop_out.i - tail call void @panic(i32 1002, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @"e_Array elem.E746B1A3.0", i64 0, i64 0)) + %5 = and i64 %3, -2 + store i64 %5, ptr %2, align 4 + store i64 %qalloc.i.i, ptr %1, align 4 + %qalloc.i.i.1 = tail call i64 @___qalloc() + %not_max.not.not.i.i.1 = icmp eq i64 %qalloc.i.i.1, -1 + br i1 %not_max.not.not.i.i.1, label %cond_236_case_0.i.i, label %__barray_check_bounds.exit.i.1 + +__barray_check_bounds.exit.i.1: ; preds = %cond_exit_20.i + tail call void @___reset(i64 %qalloc.i.i.1) + %6 = load i64, ptr %2, align 4 + %7 = and i64 %6, 2 + %.not = icmp eq i64 %7, 0 + br i1 %.not, label %panic.i.i, label %cond_exit_20.i.1 + +cond_exit_20.i.1: ; preds = %__barray_check_bounds.exit.i.1 + %8 = and i64 %6, -3 + store i64 %8, ptr %2, align 4 + %9 = getelementptr inbounds nuw i8, ptr %1, i64 8 + store i64 %qalloc.i.i.1, ptr %9, align 4 + %qalloc.i.i.2 = tail call i64 @___qalloc() + %not_max.not.not.i.i.2 = icmp eq i64 %qalloc.i.i.2, -1 + br i1 %not_max.not.not.i.i.2, label %cond_236_case_0.i.i, label %__barray_check_bounds.exit.i.2 + +__barray_check_bounds.exit.i.2: ; preds = %cond_exit_20.i.1 + tail call void @___reset(i64 %qalloc.i.i.2) + %10 = load i64, ptr %2, align 4 + %11 = and i64 %10, 4 + %.not1 = icmp eq i64 %11, 0 + br i1 %.not1, label %panic.i.i, label %cond_exit_20.i.2 + +cond_exit_20.i.2: ; preds = %__barray_check_bounds.exit.i.2 + %12 = and i64 %10, -5 + store i64 %12, ptr %2, align 4 + %13 = getelementptr inbounds nuw i8, ptr %1, i64 16 + store i64 %qalloc.i.i.2, ptr %13, align 4 + %qalloc.i.i.3 = tail call i64 @___qalloc() + %not_max.not.not.i.i.3 = icmp eq i64 %qalloc.i.i.3, -1 + br i1 %not_max.not.not.i.i.3, label %cond_236_case_0.i.i, label %__barray_check_bounds.exit.i.3 + +__barray_check_bounds.exit.i.3: ; preds = %cond_exit_20.i.2 + tail call void @___reset(i64 %qalloc.i.i.3) + %14 = load i64, ptr %2, align 4 + %15 = and i64 %14, 8 + %.not2 = icmp eq i64 %15, 0 + br i1 %.not2, label %panic.i.i, label %cond_exit_20.i.3 + +cond_exit_20.i.3: ; preds = %__barray_check_bounds.exit.i.3 + %16 = and i64 %14, -9 + store i64 %16, ptr %2, align 4 + %17 = getelementptr inbounds nuw i8, ptr %1, i64 24 + store i64 %qalloc.i.i.3, ptr %17, align 4 + %qalloc.i.i.4 = tail call i64 @___qalloc() + %not_max.not.not.i.i.4 = icmp eq i64 %qalloc.i.i.4, -1 + br i1 %not_max.not.not.i.i.4, label %cond_236_case_0.i.i, label %__barray_check_bounds.exit.i.4 + +__barray_check_bounds.exit.i.4: ; preds = %cond_exit_20.i.3 + tail call void @___reset(i64 %qalloc.i.i.4) + %18 = load i64, ptr %2, align 4 + %19 = and i64 %18, 16 + %.not3 = icmp eq i64 %19, 0 + br i1 %.not3, label %panic.i.i, label %cond_exit_20.i.4 + +cond_exit_20.i.4: ; preds = %__barray_check_bounds.exit.i.4 + %20 = and i64 %18, -17 + store i64 %20, ptr %2, align 4 + %21 = getelementptr inbounds nuw i8, ptr %1, i64 32 + store i64 %qalloc.i.i.4, ptr %21, align 4 + %qalloc.i.i.5 = tail call i64 @___qalloc() + %not_max.not.not.i.i.5 = icmp eq i64 %qalloc.i.i.5, -1 + br i1 %not_max.not.not.i.i.5, label %cond_236_case_0.i.i, label %__barray_check_bounds.exit.i.5 + +__barray_check_bounds.exit.i.5: ; preds = %cond_exit_20.i.4 + tail call void @___reset(i64 %qalloc.i.i.5) + %22 = load i64, ptr %2, align 4 + %23 = and i64 %22, 32 + %.not4 = icmp eq i64 %23, 0 + br i1 %.not4, label %panic.i.i, label %cond_exit_20.i.5 + +cond_exit_20.i.5: ; preds = %__barray_check_bounds.exit.i.5 + %24 = and i64 %22, -33 + store i64 %24, ptr %2, align 4 + %25 = getelementptr inbounds nuw i8, ptr %1, i64 40 + store i64 %qalloc.i.i.5, ptr %25, align 4 + %qalloc.i.i.6 = tail call i64 @___qalloc() + %not_max.not.not.i.i.6 = icmp eq i64 %qalloc.i.i.6, -1 + br i1 %not_max.not.not.i.i.6, label %cond_236_case_0.i.i, label %__barray_check_bounds.exit.i.6 + +__barray_check_bounds.exit.i.6: ; preds = %cond_exit_20.i.5 + tail call void @___reset(i64 %qalloc.i.i.6) + %26 = load i64, ptr %2, align 4 + %27 = and i64 %26, 64 + %.not5 = icmp eq i64 %27, 0 + br i1 %.not5, label %panic.i.i, label %cond_exit_20.i.6 + +cond_exit_20.i.6: ; preds = %__barray_check_bounds.exit.i.6 + %28 = and i64 %26, -65 + store i64 %28, ptr %2, align 4 + %29 = getelementptr inbounds nuw i8, ptr %1, i64 48 + store i64 %qalloc.i.i.6, ptr %29, align 4 + %qalloc.i.i.7 = tail call i64 @___qalloc() + %not_max.not.not.i.i.7 = icmp eq i64 %qalloc.i.i.7, -1 + br i1 %not_max.not.not.i.i.7, label %cond_236_case_0.i.i, label %__barray_check_bounds.exit.i.7 + +__barray_check_bounds.exit.i.7: ; preds = %cond_exit_20.i.6 + tail call void @___reset(i64 %qalloc.i.i.7) + %30 = load i64, ptr %2, align 4 + %31 = and i64 %30, 128 + %.not6 = icmp eq i64 %31, 0 + br i1 %.not6, label %panic.i.i, label %cond_exit_20.i.7 + +cond_exit_20.i.7: ; preds = %__barray_check_bounds.exit.i.7 + %32 = and i64 %30, -129 + store i64 %32, ptr %2, align 4 + %33 = getelementptr inbounds nuw i8, ptr %1, i64 56 + store i64 %qalloc.i.i.7, ptr %33, align 4 + %qalloc.i.i.8 = tail call i64 @___qalloc() + %not_max.not.not.i.i.8 = icmp eq i64 %qalloc.i.i.8, -1 + br i1 %not_max.not.not.i.i.8, label %cond_236_case_0.i.i, label %__barray_check_bounds.exit.i.8 + +__barray_check_bounds.exit.i.8: ; preds = %cond_exit_20.i.7 + tail call void @___reset(i64 %qalloc.i.i.8) + %34 = load i64, ptr %2, align 4 + %35 = and i64 %34, 256 + %.not7 = icmp eq i64 %35, 0 + br i1 %.not7, label %panic.i.i, label %cond_exit_20.i.8 + +cond_exit_20.i.8: ; preds = %__barray_check_bounds.exit.i.8 + %36 = and i64 %34, -257 + store i64 %36, ptr %2, align 4 + %37 = getelementptr inbounds nuw i8, ptr %1, i64 64 + store i64 %qalloc.i.i.8, ptr %37, align 4 + %qalloc.i.i.9 = tail call i64 @___qalloc() + %not_max.not.not.i.i.9 = icmp eq i64 %qalloc.i.i.9, -1 + br i1 %not_max.not.not.i.i.9, label %cond_236_case_0.i.i, label %__barray_check_bounds.exit.i.9 + +__barray_check_bounds.exit.i.9: ; preds = %cond_exit_20.i.8 + tail call void @___reset(i64 %qalloc.i.i.9) + %38 = load i64, ptr %2, align 4 + %39 = and i64 %38, 512 + %.not8 = icmp eq i64 %39, 0 + br i1 %.not8, label %panic.i.i, label %cond_exit_20.i.9 + +cond_exit_20.i.9: ; preds = %__barray_check_bounds.exit.i.9 + %40 = and i64 %38, -513 + store i64 %40, ptr %2, align 4 + %41 = getelementptr inbounds nuw i8, ptr %1, i64 72 + store i64 %qalloc.i.i.9, ptr %41, align 4 + %"128.fca.0.insert.i" = insertvalue { ptr, ptr, i64 } poison, ptr %1, 0 + %"128.fca.1.insert.i" = insertvalue { ptr, ptr, i64 } %"128.fca.0.insert.i", ptr %2, 1 + %"128.fca.2.insert.i" = insertvalue { ptr, ptr, i64 } %"128.fca.1.insert.i", i64 0, 2 + %42 = load i64, ptr %2, align 4 + %43 = trunc i64 %42 to i1 + br i1 %43, label %panic.i257.i, label %__barray_mask_borrow.exit.i + +panic.i257.i: ; preds = %cond_exit_20.i.9 + tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_mask_borrow.exit.i: ; preds = %loop_out.i - %17 = xor i64 %15, 1 - store i64 %17, i64* %4, align 4 - %18 = load i64, i64* %2, align 4 - tail call void @___rxy(i64 %18, double 0x400921FB54442D18, double 0.000000e+00) - %19 = load i64, i64* %4, align 4 - %20 = and i64 %19, 1 - %.not.i260.i = icmp eq i64 %20, 0 - br i1 %.not.i260.i, label %panic.i261.i, label %__barray_mask_return.exit262.i - -panic.i261.i: ; preds = %__barray_mask_borrow.exit.i - tail call void @panic(i32 1002, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @"e_Array alre.5A300C2A.0", i64 0, i64 0)) - unreachable +__barray_mask_borrow.exit.i: ; preds = %cond_exit_20.i.9 + %44 = or disjoint i64 %42, 1 + store i64 %44, ptr %2, align 4 + %45 = load i64, ptr %1, align 4 + tail call void @___rxy(i64 %45, double 0x400921FB54442D18, double 0.000000e+00) + %46 = load i64, ptr %2, align 4 + %47 = trunc i64 %46 to i1 + br i1 %47, label %__barray_mask_return.exit259.i, label %panic.i258.i -__barray_mask_return.exit262.i: ; preds = %__barray_mask_borrow.exit.i - %21 = xor i64 %19, 1 - store i64 %21, i64* %4, align 4 - store i64 %18, i64* %2, align 4 - %22 = load i64, i64* %4, align 4 - %23 = and i64 %22, 4 - %.not.i263.i = icmp eq i64 %23, 0 - br i1 %.not.i263.i, label %__barray_mask_borrow.exit265.i, label %panic.i264.i - -panic.i264.i: ; preds = %__barray_mask_return.exit262.i - tail call void @panic(i32 1002, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @"e_Array elem.E746B1A3.0", i64 0, i64 0)) +panic.i258.i: ; preds = %__barray_mask_borrow.exit.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_mask_borrow.exit265.i: ; preds = %__barray_mask_return.exit262.i - %24 = xor i64 %22, 4 - store i64 %24, i64* %4, align 4 - %25 = getelementptr inbounds i8, i8* %1, i64 16 - %26 = bitcast i8* %25 to i64* - %27 = load i64, i64* %26, align 4 - tail call void @___rxy(i64 %27, double 0x400921FB54442D18, double 0.000000e+00) - %28 = load i64, i64* %4, align 4 - %29 = and i64 %28, 4 - %.not.i266.i = icmp eq i64 %29, 0 - br i1 %.not.i266.i, label %panic.i267.i, label %__barray_mask_return.exit268.i - -panic.i267.i: ; preds = %__barray_mask_borrow.exit265.i - tail call void @panic(i32 1002, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @"e_Array alre.5A300C2A.0", i64 0, i64 0)) +__barray_mask_return.exit259.i: ; preds = %__barray_mask_borrow.exit.i + %48 = and i64 %46, -2 + store i64 %48, ptr %2, align 4 + store i64 %45, ptr %1, align 4 + %49 = load i64, ptr %2, align 4 + %50 = and i64 %49, 4 + %.not.i = icmp eq i64 %50, 0 + br i1 %.not.i, label %__barray_mask_borrow.exit261.i, label %panic.i260.i + +panic.i260.i: ; preds = %__barray_mask_return.exit259.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_mask_return.exit268.i: ; preds = %__barray_mask_borrow.exit265.i - %30 = xor i64 %28, 4 - store i64 %30, i64* %4, align 4 - store i64 %27, i64* %26, align 4 - %31 = load i64, i64* %4, align 4 - %32 = and i64 %31, 8 - %.not.i269.i = icmp eq i64 %32, 0 - br i1 %.not.i269.i, label %__barray_mask_borrow.exit271.i, label %panic.i270.i - -panic.i270.i: ; preds = %__barray_mask_return.exit268.i - tail call void @panic(i32 1002, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @"e_Array elem.E746B1A3.0", i64 0, i64 0)) +__barray_mask_borrow.exit261.i: ; preds = %__barray_mask_return.exit259.i + %51 = or disjoint i64 %49, 4 + store i64 %51, ptr %2, align 4 + %52 = load i64, ptr %13, align 4 + tail call void @___rxy(i64 %52, double 0x400921FB54442D18, double 0.000000e+00) + %53 = load i64, ptr %2, align 4 + %54 = and i64 %53, 4 + %.not289.i = icmp eq i64 %54, 0 + br i1 %.not289.i, label %panic.i262.i, label %__barray_mask_return.exit263.i + +panic.i262.i: ; preds = %__barray_mask_borrow.exit261.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_mask_borrow.exit271.i: ; preds = %__barray_mask_return.exit268.i - %33 = xor i64 %31, 8 - store i64 %33, i64* %4, align 4 - %34 = getelementptr inbounds i8, i8* %1, i64 24 - %35 = bitcast i8* %34 to i64* - %36 = load i64, i64* %35, align 4 - tail call void @___rxy(i64 %36, double 0x400921FB54442D18, double 0.000000e+00) - %37 = load i64, i64* %4, align 4 - %38 = and i64 %37, 8 - %.not.i272.i = icmp eq i64 %38, 0 - br i1 %.not.i272.i, label %panic.i273.i, label %__barray_mask_return.exit274.i - -panic.i273.i: ; preds = %__barray_mask_borrow.exit271.i - tail call void @panic(i32 1002, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @"e_Array alre.5A300C2A.0", i64 0, i64 0)) +__barray_mask_return.exit263.i: ; preds = %__barray_mask_borrow.exit261.i + %55 = and i64 %53, -5 + store i64 %55, ptr %2, align 4 + store i64 %52, ptr %13, align 4 + %56 = load i64, ptr %2, align 4 + %57 = and i64 %56, 8 + %.not290.i = icmp eq i64 %57, 0 + br i1 %.not290.i, label %__barray_mask_borrow.exit265.i, label %panic.i264.i + +panic.i264.i: ; preds = %__barray_mask_return.exit263.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_mask_return.exit274.i: ; preds = %__barray_mask_borrow.exit271.i - %39 = xor i64 %37, 8 - store i64 %39, i64* %4, align 4 - store i64 %36, i64* %35, align 4 - %40 = load i64, i64* %4, align 4 - %41 = and i64 %40, 512 - %.not.i275.i = icmp eq i64 %41, 0 - br i1 %.not.i275.i, label %__barray_mask_borrow.exit277.i, label %panic.i276.i - -panic.i276.i: ; preds = %__barray_mask_return.exit274.i - tail call void @panic(i32 1002, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @"e_Array elem.E746B1A3.0", i64 0, i64 0)) +__barray_mask_borrow.exit265.i: ; preds = %__barray_mask_return.exit263.i + %58 = or disjoint i64 %56, 8 + store i64 %58, ptr %2, align 4 + %59 = load i64, ptr %17, align 4 + tail call void @___rxy(i64 %59, double 0x400921FB54442D18, double 0.000000e+00) + %60 = load i64, ptr %2, align 4 + %61 = and i64 %60, 8 + %.not291.i = icmp eq i64 %61, 0 + br i1 %.not291.i, label %panic.i266.i, label %__barray_mask_return.exit267.i + +panic.i266.i: ; preds = %__barray_mask_borrow.exit265.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_mask_borrow.exit277.i: ; preds = %__barray_mask_return.exit274.i - %42 = xor i64 %40, 512 - store i64 %42, i64* %4, align 4 - %43 = getelementptr inbounds i8, i8* %1, i64 72 - %44 = bitcast i8* %43 to i64* - %45 = load i64, i64* %44, align 4 - tail call void @___rxy(i64 %45, double 0x400921FB54442D18, double 0.000000e+00) - %46 = load i64, i64* %4, align 4 - %47 = and i64 %46, 512 - %.not.i278.i = icmp eq i64 %47, 0 - br i1 %.not.i278.i, label %panic.i279.i, label %__barray_mask_return.exit280.i +__barray_mask_return.exit267.i: ; preds = %__barray_mask_borrow.exit265.i + %62 = and i64 %60, -9 + store i64 %62, ptr %2, align 4 + store i64 %59, ptr %17, align 4 + %63 = load i64, ptr %2, align 4 + %64 = and i64 %63, 512 + %.not292.i = icmp eq i64 %64, 0 + br i1 %.not292.i, label %__barray_mask_borrow.exit269.i, label %panic.i268.i + +panic.i268.i: ; preds = %__barray_mask_return.exit267.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") + unreachable -panic.i279.i: ; preds = %__barray_mask_borrow.exit277.i - tail call void @panic(i32 1002, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @"e_Array alre.5A300C2A.0", i64 0, i64 0)) +__barray_mask_borrow.exit269.i: ; preds = %__barray_mask_return.exit267.i + %65 = or disjoint i64 %63, 512 + store i64 %65, ptr %2, align 4 + %66 = load i64, ptr %41, align 4 + tail call void @___rxy(i64 %66, double 0x400921FB54442D18, double 0.000000e+00) + %67 = load i64, ptr %2, align 4 + %68 = and i64 %67, 512 + %.not293.i = icmp eq i64 %68, 0 + br i1 %.not293.i, label %panic.i270.i, label %__barray_mask_return.exit271.i + +panic.i270.i: ; preds = %__barray_mask_borrow.exit269.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_mask_return.exit280.i: ; preds = %__barray_mask_borrow.exit277.i - %48 = xor i64 %46, 512 - store i64 %48, i64* %4, align 4 - store i64 %45, i64* %44, align 4 - %49 = tail call i8* @heap_alloc(i64 240) - %50 = bitcast i8* %49 to { i1, i64, i1 }* - %51 = tail call i8* @heap_alloc(i64 8) - %52 = bitcast i8* %51 to i64* - store i64 -1, i64* %52, align 1 - br label %56 - -mask_block_ok.i.i.i.i: ; preds = %cond_exit_353.i.i - %53 = load i64, i64* %4, align 4 - %54 = or i64 %53, -1024 - store i64 %54, i64* %4, align 4 - %55 = icmp eq i64 %54, -1 - br i1 %55, label %"__hugr__.$measure_array$$n(10).277.exit.i", label %mask_block_err.i.i.i.i - -"__hugr__.$measure_array$$n(10).277.exit.i": ; preds = %mask_block_ok.i.i.i.i - tail call void @heap_free(i8* nonnull %1) - tail call void @heap_free(i8* nonnull %3) - br label %__barray_check_bounds.exit283.i +__barray_mask_return.exit271.i: ; preds = %__barray_mask_borrow.exit269.i + %69 = and i64 %67, -513 + store i64 %69, ptr %2, align 4 + store i64 %66, ptr %41, align 4 + %70 = insertvalue { { ptr, ptr, i64 }, i64 } poison, { ptr, ptr, i64 } %"128.fca.2.insert.i", 0 + %71 = tail call ptr @heap_alloc(i64 240) + %72 = tail call ptr @heap_alloc(i64 8) + store i64 -1, ptr %72, align 1 + br label %__barray_check_bounds.exit.i.i.i + +73: ; preds = %loop_body.i.i + %74 = lshr i64 %.fca.2.extract83.i.i.i, 6 + %75 = getelementptr i64, ptr %.fca.1.extract82.i.i.i, i64 %74 + %76 = load i64, ptr %75, align 4 + %77 = and i64 %.fca.2.extract83.i.i.i, 63 + %78 = sub nuw nsw i64 64, %77 + %79 = lshr i64 -1, %78 + %80 = icmp eq i64 %77, 0 + %81 = select i1 %80, i64 0, i64 %79 + %82 = or i64 %76, %81 + store i64 %82, ptr %75, align 4 + %last_valid.i.i.i.i = add i64 %.fca.2.extract83.i.i.i, 9 + %83 = lshr i64 %last_valid.i.i.i.i, 6 + %84 = getelementptr inbounds nuw i64, ptr %.fca.1.extract82.i.i.i, i64 %83 + %85 = load i64, ptr %84, align 4 + %86 = and i64 %last_valid.i.i.i.i, 63 + %87 = shl nsw i64 -2, %86 + %88 = icmp eq i64 %86, 63 + %89 = select i1 %88, i64 0, i64 %87 + %90 = or i64 %85, %89 + store i64 %90, ptr %84, align 4 + %reass.sub.i.i.i.i = sub nsw i64 %83, %74 + %.not.i.i.i.i = icmp eq i64 %reass.sub.i.i.i.i, -1 + br i1 %.not.i.i.i.i, label %"__hugr__.$measure_array$$n(10).277.exit.i", label %mask_block_ok.i.i.i.i + +91: ; preds = %mask_block_ok.i.i.i.i + %92 = add nuw i64 %.02.i.i.i.i, 1 + %exitcond.not.i.i.i.i = icmp eq i64 %.02.i.i.i.i, %reass.sub.i.i.i.i + br i1 %exitcond.not.i.i.i.i, label %"__hugr__.$measure_array$$n(10).277.exit.i", label %mask_block_ok.i.i.i.i + +mask_block_ok.i.i.i.i: ; preds = %73, %91 + %.02.i.i.i.i = phi i64 [ %92, %91 ], [ 0, %73 ] + %gep.i.i.i.i = getelementptr i64, ptr %75, i64 %.02.i.i.i.i + %93 = load i64, ptr %gep.i.i.i.i, align 4 + %94 = icmp eq i64 %93, -1 + br i1 %94, label %91, label %mask_block_err.i.i.i.i mask_block_err.i.i.i.i: ; preds = %mask_block_ok.i.i.i.i - tail call void @panic(i32 1002, i8* getelementptr inbounds ([70 x i8], [70 x i8]* @"e_Array cont.EFA5AC45.0", i64 0, i64 0)) + tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -56: ; preds = %cond_exit_353.i.i, %__barray_mask_return.exit280.i - %"303_0.sroa.15.0.i296.i" = phi i64 [ 0, %__barray_mask_return.exit280.i ], [ %57, %cond_exit_353.i.i ] - %57 = add nuw nsw i64 %"303_0.sroa.15.0.i296.i", 1 - %58 = lshr i64 %"303_0.sroa.15.0.i296.i", 6 - %59 = getelementptr inbounds i64, i64* %4, i64 %58 - %60 = load i64, i64* %59, align 4 - %61 = shl nuw nsw i64 1, %"303_0.sroa.15.0.i296.i" - %62 = and i64 %60, %61 - %.not.i99.i.i.i = icmp eq i64 %62, 0 - br i1 %.not.i99.i.i.i, label %__barray_check_bounds.exit.i.i, label %panic.i.i.i.i - -panic.i.i.i.i: ; preds = %56 - tail call void @panic(i32 1002, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @"e_Array elem.E746B1A3.0", i64 0, i64 0)) +__barray_check_bounds.exit.i.i.i: ; preds = %loop_body.i.i, %__barray_mask_return.exit271.i + %.fca.2.extract83.i187.i.i = phi i64 [ 0, %__barray_mask_return.exit271.i ], [ %.fca.2.extract83.i.i.i, %loop_body.i.i ] + %.fca.1.extract82.i186.i.i = phi ptr [ %2, %__barray_mask_return.exit271.i ], [ %.fca.1.extract82.i.i.i, %loop_body.i.i ] + %.fca.0.extract81.i185.i.i = phi ptr [ %1, %__barray_mask_return.exit271.i ], [ %.fca.0.extract81.i.i.i, %loop_body.i.i ] + %"303_0.sroa.15.0184.i.i" = phi i64 [ 0, %__barray_mask_return.exit271.i ], [ %95, %loop_body.i.i ] + %.pn165183.i.i = phi { { ptr, ptr, i64 }, i64 } [ %70, %__barray_mask_return.exit271.i ], [ %110, %loop_body.i.i ] + %95 = add nuw nsw i64 %"303_0.sroa.15.0184.i.i", 1 + %96 = add i64 %"303_0.sroa.15.0184.i.i", %.fca.2.extract83.i187.i.i + %97 = lshr i64 %96, 6 + %98 = getelementptr inbounds nuw i64, ptr %.fca.1.extract82.i186.i.i, i64 %97 + %99 = load i64, ptr %98, align 4 + %100 = and i64 %96, 63 + %101 = lshr i64 %99, %100 + %102 = trunc i64 %101 to i1 + br i1 %102, label %panic.i.i.i.i, label %__barray_check_bounds.exit.i.i + +panic.i.i.i.i: ; preds = %__barray_check_bounds.exit.i.i.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_check_bounds.exit.i.i: ; preds = %56 - %63 = xor i64 %60, %61 - store i64 %63, i64* %59, align 4 - %64 = getelementptr inbounds i64, i64* %2, i64 %"303_0.sroa.15.0.i296.i" - %65 = load i64, i64* %64, align 4 - %lazy_measure.i.i = tail call i64 @___lazy_measure(i64 %65) - tail call void @___qfree(i64 %65) - %66 = getelementptr inbounds i64, i64* %52, i64 %58 - %67 = load i64, i64* %66, align 4 - %68 = and i64 %67, %61 - %.not.i.i.i = icmp eq i64 %68, 0 - br i1 %.not.i.i.i, label %panic.i.i.i, label %cond_exit_353.i.i +__barray_check_bounds.exit.i.i: ; preds = %__barray_check_bounds.exit.i.i.i + %103 = shl nuw i64 1, %100 + %104 = xor i64 %103, %99 + store i64 %104, ptr %98, align 4 + %105 = getelementptr inbounds i64, ptr %.fca.0.extract81.i185.i.i, i64 %96 + %106 = load i64, ptr %105, align 4 + %lazy_measure.i.i = tail call i64 @___lazy_measure(i64 %106) + tail call void @___qfree(i64 %106) + %107 = load i64, ptr %72, align 4 + %108 = lshr i64 %107, %"303_0.sroa.15.0184.i.i" + %109 = trunc i64 %108 to i1 + br i1 %109, label %loop_body.i.i, label %panic.i.i.i panic.i.i.i: ; preds = %__barray_check_bounds.exit.i.i - tail call void @panic(i32 1002, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @"e_Array alre.5A300C2A.0", i64 0, i64 0)) + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -cond_exit_353.i.i: ; preds = %__barray_check_bounds.exit.i.i - %"367_054.fca.1.insert.i.i" = insertvalue { i1, i64, i1 } { i1 true, i64 poison, i1 poison }, i64 %lazy_measure.i.i, 1 - %69 = xor i64 %67, %61 - store i64 %69, i64* %66, align 4 - %70 = getelementptr inbounds { i1, i64, i1 }, { i1, i64, i1 }* %50, i64 %"303_0.sroa.15.0.i296.i" - store { i1, i64, i1 } %"367_054.fca.1.insert.i.i", { i1, i64, i1 }* %70, align 4 - %exitcond297.not.i = icmp eq i64 %57, 10 - br i1 %exitcond297.not.i, label %mask_block_ok.i.i.i.i, label %56 - -cond_87_case_0.i: ; preds = %cond_exit_87.i - %71 = load i64, i64* %52, align 4 - %72 = or i64 %71, -1024 - store i64 %72, i64* %52, align 4 - %73 = icmp eq i64 %72, -1 - br i1 %73, label %__hugr__.main.1.exit, label %mask_block_err.i.i - -mask_block_err.i.i: ; preds = %cond_87_case_0.i - tail call void @panic(i32 1002, i8* getelementptr inbounds ([70 x i8], [70 x i8]* @"e_Array cont.EFA5AC45.0", i64 0, i64 0)) +loop_body.i.i: ; preds = %__barray_check_bounds.exit.i.i + %"367_054.fca.1.insert.i.i" = insertvalue { i1, i64, i1 } { i1 true, i64 poison, i1 undef }, i64 %lazy_measure.i.i, 1 + %"367_054.fca.2.insert.i.i" = insertvalue { i1, i64, i1 } %"367_054.fca.1.insert.i.i", i1 undef, 2 + %110 = insertvalue { { ptr, ptr, i64 }, i64 } %.pn165183.i.i, i64 %95, 1 + %111 = shl nuw nsw i64 1, %"303_0.sroa.15.0184.i.i" + %112 = xor i64 %107, %111 + store i64 %112, ptr %72, align 4 + %113 = getelementptr inbounds nuw { i1, i64, i1 }, ptr %71, i64 %"303_0.sroa.15.0184.i.i" + store { i1, i64, i1 } %"367_054.fca.2.insert.i.i", ptr %113, align 4 + %114 = extractvalue { { ptr, ptr, i64 }, i64 } %.pn165183.i.i, 0 + %.fca.0.extract81.i.i.i = extractvalue { ptr, ptr, i64 } %114, 0 + %.fca.1.extract82.i.i.i = extractvalue { ptr, ptr, i64 } %114, 1 + %.fca.2.extract83.i.i.i = extractvalue { ptr, ptr, i64 } %114, 2 + %exitcond.not.i.i = icmp eq i64 %95, 10 + br i1 %exitcond.not.i.i, label %73, label %__barray_check_bounds.exit.i.i.i + +"__hugr__.$measure_array$$n(10).277.exit.i": ; preds = %91, %73 + tail call void @heap_free(ptr %.fca.0.extract81.i.i.i) + tail call void @heap_free(ptr nonnull %.fca.1.extract82.i.i.i) + %115 = load i64, ptr %72, align 4 + %116 = trunc i64 %115 to i1 + br i1 %116, label %cond_exit_87.thread.i, label %__barray_mask_borrow.exit278.i + +mask_block_err.i.i: ; preds = %cond_exit_87.thread.9.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_check_bounds.exit283.i: ; preds = %"__hugr__.$measure_array$$n(10).277.exit.i", %cond_exit_87.i - %"90_0.0.i1" = phi i64 [ 0, %"__hugr__.$measure_array$$n(10).277.exit.i" ], [ %74, %cond_exit_87.i ] - %74 = add nuw nsw i64 %"90_0.0.i1", 1 - %75 = lshr i64 %"90_0.0.i1", 6 - %76 = getelementptr inbounds i64, i64* %52, i64 %75 - %77 = load i64, i64* %76, align 4 - %78 = shl nuw nsw i64 1, %"90_0.0.i1" - %79 = and i64 %77, %78 - %.not.i = icmp eq i64 %79, 0 - br i1 %.not.i, label %__barray_mask_borrow.exit288.i, label %cond_exit_87.i - -__barray_mask_borrow.exit288.i: ; preds = %__barray_check_bounds.exit283.i - %80 = xor i64 %77, %78 - store i64 %80, i64* %76, align 4 - %81 = getelementptr inbounds { i1, i64, i1 }, { i1, i64, i1 }* %50, i64 %"90_0.0.i1" - %82 = load { i1, i64, i1 }, { i1, i64, i1 }* %81, align 4 - %.fca.0.extract179.i = extractvalue { i1, i64, i1 } %82, 0 - br i1 %.fca.0.extract179.i, label %cond_390_case_1.i, label %cond_exit_87.i - -cond_exit_87.i: ; preds = %cond_390_case_1.i, %__barray_mask_borrow.exit288.i, %__barray_check_bounds.exit283.i - %exitcond.not = icmp eq i64 %74, 10 - br i1 %exitcond.not, label %cond_87_case_0.i, label %__barray_check_bounds.exit283.i - -cond_390_case_1.i: ; preds = %__barray_mask_borrow.exit288.i - %.fca.1.extract.i = extractvalue { i1, i64, i1 } %82, 1 +__barray_mask_borrow.exit278.i: ; preds = %"__hugr__.$measure_array$$n(10).277.exit.i" + %117 = or disjoint i64 %115, 1 + store i64 %117, ptr %72, align 4 + %118 = load { i1, i64, i1 }, ptr %71, align 4 + %.fca.0.extract179.i = extractvalue { i1, i64, i1 } %118, 0 + br i1 %.fca.0.extract179.i, label %cond_390_case_1.i, label %cond_exit_87.thread.i + +cond_exit_87.thread.i: ; preds = %cond_390_case_1.i, %__barray_mask_borrow.exit278.i, %"__hugr__.$measure_array$$n(10).277.exit.i" + %119 = phi i64 [ %.pre.i, %cond_390_case_1.i ], [ %117, %__barray_mask_borrow.exit278.i ], [ %115, %"__hugr__.$measure_array$$n(10).277.exit.i" ] + %120 = and i64 %119, 2 + %.not311.i = icmp eq i64 %120, 0 + br i1 %.not311.i, label %__barray_mask_borrow.exit278.1.i, label %cond_exit_87.thread.1.i + +__barray_mask_borrow.exit278.1.i: ; preds = %cond_exit_87.thread.i + %121 = or disjoint i64 %119, 2 + store i64 %121, ptr %72, align 4 + %122 = getelementptr inbounds nuw i8, ptr %71, i64 24 + %123 = load { i1, i64, i1 }, ptr %122, align 4 + %.fca.0.extract179.1.i = extractvalue { i1, i64, i1 } %123, 0 + br i1 %.fca.0.extract179.1.i, label %cond_390_case_1.1.i, label %cond_exit_87.thread.1.i + +cond_390_case_1.1.i: ; preds = %__barray_mask_borrow.exit278.1.i + %.fca.1.extract.1.i = extractvalue { i1, i64, i1 } %123, 1 + tail call void @___dec_future_refcount(i64 %.fca.1.extract.1.i) + %.pre302.i = load i64, ptr %72, align 4 + br label %cond_exit_87.thread.1.i + +cond_exit_87.thread.1.i: ; preds = %cond_390_case_1.1.i, %__barray_mask_borrow.exit278.1.i, %cond_exit_87.thread.i + %124 = phi i64 [ %.pre302.i, %cond_390_case_1.1.i ], [ %121, %__barray_mask_borrow.exit278.1.i ], [ %119, %cond_exit_87.thread.i ] + %125 = and i64 %124, 4 + %.not312.i = icmp eq i64 %125, 0 + br i1 %.not312.i, label %__barray_mask_borrow.exit278.2.i, label %cond_exit_87.thread.2.i + +__barray_mask_borrow.exit278.2.i: ; preds = %cond_exit_87.thread.1.i + %126 = or disjoint i64 %124, 4 + store i64 %126, ptr %72, align 4 + %127 = getelementptr inbounds nuw i8, ptr %71, i64 48 + %128 = load { i1, i64, i1 }, ptr %127, align 4 + %.fca.0.extract179.2.i = extractvalue { i1, i64, i1 } %128, 0 + br i1 %.fca.0.extract179.2.i, label %cond_390_case_1.2.i, label %cond_exit_87.thread.2.i + +cond_390_case_1.2.i: ; preds = %__barray_mask_borrow.exit278.2.i + %.fca.1.extract.2.i = extractvalue { i1, i64, i1 } %128, 1 + tail call void @___dec_future_refcount(i64 %.fca.1.extract.2.i) + %.pre303.i = load i64, ptr %72, align 4 + br label %cond_exit_87.thread.2.i + +cond_exit_87.thread.2.i: ; preds = %cond_390_case_1.2.i, %__barray_mask_borrow.exit278.2.i, %cond_exit_87.thread.1.i + %129 = phi i64 [ %.pre303.i, %cond_390_case_1.2.i ], [ %126, %__barray_mask_borrow.exit278.2.i ], [ %124, %cond_exit_87.thread.1.i ] + %130 = and i64 %129, 8 + %.not313.i = icmp eq i64 %130, 0 + br i1 %.not313.i, label %__barray_mask_borrow.exit278.3.i, label %cond_exit_87.thread.3.i + +__barray_mask_borrow.exit278.3.i: ; preds = %cond_exit_87.thread.2.i + %131 = or disjoint i64 %129, 8 + store i64 %131, ptr %72, align 4 + %132 = getelementptr inbounds nuw i8, ptr %71, i64 72 + %133 = load { i1, i64, i1 }, ptr %132, align 4 + %.fca.0.extract179.3.i = extractvalue { i1, i64, i1 } %133, 0 + br i1 %.fca.0.extract179.3.i, label %cond_390_case_1.3.i, label %cond_exit_87.thread.3.i + +cond_390_case_1.3.i: ; preds = %__barray_mask_borrow.exit278.3.i + %.fca.1.extract.3.i = extractvalue { i1, i64, i1 } %133, 1 + tail call void @___dec_future_refcount(i64 %.fca.1.extract.3.i) + %.pre304.i = load i64, ptr %72, align 4 + br label %cond_exit_87.thread.3.i + +cond_exit_87.thread.3.i: ; preds = %cond_390_case_1.3.i, %__barray_mask_borrow.exit278.3.i, %cond_exit_87.thread.2.i + %134 = phi i64 [ %.pre304.i, %cond_390_case_1.3.i ], [ %131, %__barray_mask_borrow.exit278.3.i ], [ %129, %cond_exit_87.thread.2.i ] + %135 = and i64 %134, 16 + %.not314.i = icmp eq i64 %135, 0 + br i1 %.not314.i, label %__barray_mask_borrow.exit278.4.i, label %cond_exit_87.thread.4.i + +__barray_mask_borrow.exit278.4.i: ; preds = %cond_exit_87.thread.3.i + %136 = or disjoint i64 %134, 16 + store i64 %136, ptr %72, align 4 + %137 = getelementptr inbounds nuw i8, ptr %71, i64 96 + %138 = load { i1, i64, i1 }, ptr %137, align 4 + %.fca.0.extract179.4.i = extractvalue { i1, i64, i1 } %138, 0 + br i1 %.fca.0.extract179.4.i, label %cond_390_case_1.4.i, label %cond_exit_87.thread.4.i + +cond_390_case_1.4.i: ; preds = %__barray_mask_borrow.exit278.4.i + %.fca.1.extract.4.i = extractvalue { i1, i64, i1 } %138, 1 + tail call void @___dec_future_refcount(i64 %.fca.1.extract.4.i) + %.pre305.i = load i64, ptr %72, align 4 + br label %cond_exit_87.thread.4.i + +cond_exit_87.thread.4.i: ; preds = %cond_390_case_1.4.i, %__barray_mask_borrow.exit278.4.i, %cond_exit_87.thread.3.i + %139 = phi i64 [ %.pre305.i, %cond_390_case_1.4.i ], [ %136, %__barray_mask_borrow.exit278.4.i ], [ %134, %cond_exit_87.thread.3.i ] + %140 = and i64 %139, 32 + %.not315.i = icmp eq i64 %140, 0 + br i1 %.not315.i, label %__barray_mask_borrow.exit278.5.i, label %cond_exit_87.thread.5.i + +__barray_mask_borrow.exit278.5.i: ; preds = %cond_exit_87.thread.4.i + %141 = or disjoint i64 %139, 32 + store i64 %141, ptr %72, align 4 + %142 = getelementptr inbounds nuw i8, ptr %71, i64 120 + %143 = load { i1, i64, i1 }, ptr %142, align 4 + %.fca.0.extract179.5.i = extractvalue { i1, i64, i1 } %143, 0 + br i1 %.fca.0.extract179.5.i, label %cond_390_case_1.5.i, label %cond_exit_87.thread.5.i + +cond_390_case_1.5.i: ; preds = %__barray_mask_borrow.exit278.5.i + %.fca.1.extract.5.i = extractvalue { i1, i64, i1 } %143, 1 + tail call void @___dec_future_refcount(i64 %.fca.1.extract.5.i) + %.pre306.i = load i64, ptr %72, align 4 + br label %cond_exit_87.thread.5.i + +cond_exit_87.thread.5.i: ; preds = %cond_390_case_1.5.i, %__barray_mask_borrow.exit278.5.i, %cond_exit_87.thread.4.i + %144 = phi i64 [ %.pre306.i, %cond_390_case_1.5.i ], [ %141, %__barray_mask_borrow.exit278.5.i ], [ %139, %cond_exit_87.thread.4.i ] + %145 = and i64 %144, 64 + %.not316.i = icmp eq i64 %145, 0 + br i1 %.not316.i, label %__barray_mask_borrow.exit278.6.i, label %cond_exit_87.thread.6.i + +__barray_mask_borrow.exit278.6.i: ; preds = %cond_exit_87.thread.5.i + %146 = or disjoint i64 %144, 64 + store i64 %146, ptr %72, align 4 + %147 = getelementptr inbounds nuw i8, ptr %71, i64 144 + %148 = load { i1, i64, i1 }, ptr %147, align 4 + %.fca.0.extract179.6.i = extractvalue { i1, i64, i1 } %148, 0 + br i1 %.fca.0.extract179.6.i, label %cond_390_case_1.6.i, label %cond_exit_87.thread.6.i + +cond_390_case_1.6.i: ; preds = %__barray_mask_borrow.exit278.6.i + %.fca.1.extract.6.i = extractvalue { i1, i64, i1 } %148, 1 + tail call void @___dec_future_refcount(i64 %.fca.1.extract.6.i) + %.pre307.i = load i64, ptr %72, align 4 + br label %cond_exit_87.thread.6.i + +cond_exit_87.thread.6.i: ; preds = %cond_390_case_1.6.i, %__barray_mask_borrow.exit278.6.i, %cond_exit_87.thread.5.i + %149 = phi i64 [ %.pre307.i, %cond_390_case_1.6.i ], [ %146, %__barray_mask_borrow.exit278.6.i ], [ %144, %cond_exit_87.thread.5.i ] + %150 = and i64 %149, 128 + %.not317.i = icmp eq i64 %150, 0 + br i1 %.not317.i, label %__barray_mask_borrow.exit278.7.i, label %cond_exit_87.thread.7.i + +__barray_mask_borrow.exit278.7.i: ; preds = %cond_exit_87.thread.6.i + %151 = or disjoint i64 %149, 128 + store i64 %151, ptr %72, align 4 + %152 = getelementptr inbounds nuw i8, ptr %71, i64 168 + %153 = load { i1, i64, i1 }, ptr %152, align 4 + %.fca.0.extract179.7.i = extractvalue { i1, i64, i1 } %153, 0 + br i1 %.fca.0.extract179.7.i, label %cond_390_case_1.7.i, label %cond_exit_87.thread.7.i + +cond_390_case_1.7.i: ; preds = %__barray_mask_borrow.exit278.7.i + %.fca.1.extract.7.i = extractvalue { i1, i64, i1 } %153, 1 + tail call void @___dec_future_refcount(i64 %.fca.1.extract.7.i) + %.pre308.i = load i64, ptr %72, align 4 + br label %cond_exit_87.thread.7.i + +cond_exit_87.thread.7.i: ; preds = %cond_390_case_1.7.i, %__barray_mask_borrow.exit278.7.i, %cond_exit_87.thread.6.i + %154 = phi i64 [ %.pre308.i, %cond_390_case_1.7.i ], [ %151, %__barray_mask_borrow.exit278.7.i ], [ %149, %cond_exit_87.thread.6.i ] + %155 = and i64 %154, 256 + %.not318.i = icmp eq i64 %155, 0 + br i1 %.not318.i, label %__barray_mask_borrow.exit278.8.i, label %cond_exit_87.thread.8.i + +__barray_mask_borrow.exit278.8.i: ; preds = %cond_exit_87.thread.7.i + %156 = or disjoint i64 %154, 256 + store i64 %156, ptr %72, align 4 + %157 = getelementptr inbounds nuw i8, ptr %71, i64 192 + %158 = load { i1, i64, i1 }, ptr %157, align 4 + %.fca.0.extract179.8.i = extractvalue { i1, i64, i1 } %158, 0 + br i1 %.fca.0.extract179.8.i, label %cond_390_case_1.8.i, label %cond_exit_87.thread.8.i + +cond_390_case_1.8.i: ; preds = %__barray_mask_borrow.exit278.8.i + %.fca.1.extract.8.i = extractvalue { i1, i64, i1 } %158, 1 + tail call void @___dec_future_refcount(i64 %.fca.1.extract.8.i) + %.pre309.i = load i64, ptr %72, align 4 + br label %cond_exit_87.thread.8.i + +cond_exit_87.thread.8.i: ; preds = %cond_390_case_1.8.i, %__barray_mask_borrow.exit278.8.i, %cond_exit_87.thread.7.i + %159 = phi i64 [ %.pre309.i, %cond_390_case_1.8.i ], [ %156, %__barray_mask_borrow.exit278.8.i ], [ %154, %cond_exit_87.thread.7.i ] + %160 = and i64 %159, 512 + %.not319.i = icmp eq i64 %160, 0 + br i1 %.not319.i, label %__barray_mask_borrow.exit278.9.i, label %cond_exit_87.thread.9.i + +__barray_mask_borrow.exit278.9.i: ; preds = %cond_exit_87.thread.8.i + %161 = or disjoint i64 %159, 512 + store i64 %161, ptr %72, align 4 + %162 = getelementptr inbounds nuw i8, ptr %71, i64 216 + %163 = load { i1, i64, i1 }, ptr %162, align 4 + %.fca.0.extract179.9.i = extractvalue { i1, i64, i1 } %163, 0 + br i1 %.fca.0.extract179.9.i, label %cond_390_case_1.9.i, label %cond_exit_87.thread.9.i + +cond_390_case_1.9.i: ; preds = %__barray_mask_borrow.exit278.9.i + %.fca.1.extract.9.i = extractvalue { i1, i64, i1 } %163, 1 + tail call void @___dec_future_refcount(i64 %.fca.1.extract.9.i) + %.pre310.i = load i64, ptr %72, align 4 + br label %cond_exit_87.thread.9.i + +cond_exit_87.thread.9.i: ; preds = %cond_390_case_1.9.i, %__barray_mask_borrow.exit278.9.i, %cond_exit_87.thread.8.i + %164 = phi i64 [ %.pre310.i, %cond_390_case_1.9.i ], [ %161, %__barray_mask_borrow.exit278.9.i ], [ %159, %cond_exit_87.thread.8.i ] + %165 = or i64 %164, -1024 + store i64 %165, ptr %72, align 4 + %166 = icmp eq i64 %165, -1 + br i1 %166, label %__hugr__.main.1.exit, label %mask_block_err.i.i + +cond_390_case_1.i: ; preds = %__barray_mask_borrow.exit278.i + %.fca.1.extract.i = extractvalue { i1, i64, i1 } %118, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.i) - br label %cond_exit_87.i - -__hugr__.main.1.exit: ; preds = %cond_87_case_0.i - tail call void @heap_free(i8* %49) - tail call void @heap_free(i8* nonnull %51) - %83 = tail call i64 @teardown() - ret i64 %83 + %.pre.i = load i64, ptr %72, align 4 + br label %cond_exit_87.thread.i + +__hugr__.main.1.exit: ; preds = %cond_exit_87.thread.9.i + tail call void @heap_free(ptr %71) + tail call void @heap_free(ptr nonnull %72) + %167 = tail call i64 @teardown() + ret i64 %167 } declare void @setup(i64) local_unnamed_addr diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-no_results/no_results_x86_64-unknown-linux-gnu b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-no_results/no_results_x86_64-unknown-linux-gnu index 798877d60..970d19465 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-no_results/no_results_x86_64-unknown-linux-gnu +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-no_results/no_results_x86_64-unknown-linux-gnu @@ -1,6 +1,6 @@ ; ModuleID = 'hugr' source_filename = "hugr" -target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" +target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" @"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." @@ -16,7 +16,7 @@ declare i64 @___qalloc() local_unnamed_addr declare void @___reset(i64) local_unnamed_addr ; Function Attrs: noreturn -declare void @panic(i32, i8*) local_unnamed_addr #0 +declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @___rxy(i64, double, double) local_unnamed_addr @@ -26,32 +26,22 @@ define i64 @qmain(i64 %0) local_unnamed_addr { entry: tail call void @setup(i64 %0) %qalloc.i.i = tail call i64 @___qalloc() - %not_max.not.i.i = icmp eq i64 %qalloc.i.i, -1 - br i1 %not_max.not.i.i, label %id_bb.i.i, label %reset_bb.i.i + %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 + br i1 %not_max.not.not.i.i, label %cond_18_case_0.i.i, label %__hugr__.bar.1.exit -reset_bb.i.i: ; preds = %entry - tail call void @___reset(i64 %qalloc.i.i) - br label %id_bb.i.i - -id_bb.i.i: ; preds = %reset_bb.i.i, %entry - %1 = insertvalue { i1, i64 } { i1 true, i64 poison }, i64 %qalloc.i.i, 1 - %2 = select i1 %not_max.not.i.i, { i1, i64 } { i1 false, i64 poison }, { i1, i64 } %1 - %.fca.0.extract.i.i = extractvalue { i1, i64 } %2, 0 - br i1 %.fca.0.extract.i.i, label %__hugr__.bar.1.exit, label %cond_18_case_0.i.i - -cond_18_case_0.i.i: ; preds = %id_bb.i.i - tail call void @panic(i32 1001, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @"e_No more qu.3B2EEBF0.0", i64 0, i64 0)) +cond_18_case_0.i.i: ; preds = %entry + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.bar.1.exit: ; preds = %id_bb.i.i - %.fca.1.extract.i.i = extractvalue { i1, i64 } %2, 1 - tail call void @___rxy(i64 %.fca.1.extract.i.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %.fca.1.extract.i.i, double 0x400921FB54442D18) - %lazy_measure.i = tail call i64 @___lazy_measure(i64 %.fca.1.extract.i.i) - tail call void @___qfree(i64 %.fca.1.extract.i.i) +__hugr__.bar.1.exit: ; preds = %entry + tail call void @___reset(i64 %qalloc.i.i) + tail call void @___rxy(i64 %qalloc.i.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) + tail call void @___rz(i64 %qalloc.i.i, double 0x400921FB54442D18) + %lazy_measure.i = tail call i64 @___lazy_measure(i64 %qalloc.i.i) + tail call void @___qfree(i64 %qalloc.i.i) tail call void @___dec_future_refcount(i64 %lazy_measure.i) - %3 = tail call i64 @teardown() - ret i64 %3 + %1 = tail call i64 @teardown() + ret i64 %1 } declare void @setup(i64) local_unnamed_addr diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-postselect_exit/postselect_exit_x86_64-unknown-linux-gnu b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-postselect_exit/postselect_exit_x86_64-unknown-linux-gnu index bd17cb1d4..adda0f836 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-postselect_exit/postselect_exit_x86_64-unknown-linux-gnu +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-postselect_exit/postselect_exit_x86_64-unknown-linux-gnu @@ -1,6 +1,6 @@ ; ModuleID = 'hugr' source_filename = "hugr" -target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" +target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" @e_Postselect.558881BF.0 = private constant [30 x i8] c"\1DEXIT:INT:Postselection failed" @@ -18,9 +18,9 @@ declare i1 @___read_future_bool(i64) local_unnamed_addr declare void @___dec_future_refcount(i64) local_unnamed_addr ; Function Attrs: noreturn -declare void @panic(i32, i8*) local_unnamed_addr #0 +declare void @panic(i32, ptr) local_unnamed_addr #0 -declare void @print_bool(i8*, i64, i1) local_unnamed_addr +declare void @print_bool(ptr, i64, i1) local_unnamed_addr declare i64 @___qalloc() local_unnamed_addr @@ -34,44 +34,34 @@ define i64 @qmain(i64 %0) local_unnamed_addr { entry: tail call void @setup(i64 %0) %qalloc.i.i = tail call i64 @___qalloc() - %not_max.not.i.i = icmp eq i64 %qalloc.i.i, -1 - br i1 %not_max.not.i.i, label %id_bb.i.i, label %reset_bb.i.i + %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 + br i1 %not_max.not.not.i.i, label %cond_39_case_0.i.i, label %__hugr__.__tk2_qalloc.35.exit.i -reset_bb.i.i: ; preds = %entry - tail call void @___reset(i64 %qalloc.i.i) - br label %id_bb.i.i - -id_bb.i.i: ; preds = %reset_bb.i.i, %entry - %1 = insertvalue { i1, i64 } { i1 true, i64 poison }, i64 %qalloc.i.i, 1 - %2 = select i1 %not_max.not.i.i, { i1, i64 } { i1 false, i64 poison }, { i1, i64 } %1 - %.fca.0.extract.i.i = extractvalue { i1, i64 } %2, 0 - br i1 %.fca.0.extract.i.i, label %__hugr__.__tk2_qalloc.35.exit.i, label %cond_39_case_0.i.i - -cond_39_case_0.i.i: ; preds = %id_bb.i.i - tail call void @panic(i32 1001, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @"e_No more qu.3B2EEBF0.0", i64 0, i64 0)) +cond_39_case_0.i.i: ; preds = %entry + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_qalloc.35.exit.i: ; preds = %id_bb.i.i - %.fca.1.extract.i.i = extractvalue { i1, i64 } %2, 1 - tail call void @___rxy(i64 %.fca.1.extract.i.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %.fca.1.extract.i.i, double 0x400921FB54442D18) - %lazy_measure.i = tail call i64 @___lazy_measure(i64 %.fca.1.extract.i.i) - tail call void @___qfree(i64 %.fca.1.extract.i.i) +__hugr__.__tk2_qalloc.35.exit.i: ; preds = %entry + tail call void @___reset(i64 %qalloc.i.i) + tail call void @___rxy(i64 %qalloc.i.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) + tail call void @___rz(i64 %qalloc.i.i, double 0x400921FB54442D18) + %lazy_measure.i = tail call i64 @___lazy_measure(i64 %qalloc.i.i) + tail call void @___qfree(i64 %qalloc.i.i) tail call void @___inc_future_refcount(i64 %lazy_measure.i) %read_bool.i = tail call i1 @___read_future_bool(i64 %lazy_measure.i) tail call void @___dec_future_refcount(i64 %lazy_measure.i) - br i1 %read_bool.i, label %3, label %__hugr__.main.1.exit + br i1 %read_bool.i, label %1, label %__hugr__.main.1.exit -3: ; preds = %__hugr__.__tk2_qalloc.35.exit.i - tail call void @panic(i32 42, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @e_Postselect.558881BF.0, i64 0, i64 0)) +1: ; preds = %__hugr__.__tk2_qalloc.35.exit.i + tail call void @panic(i32 42, ptr nonnull @e_Postselect.558881BF.0) unreachable __hugr__.main.1.exit: ; preds = %__hugr__.__tk2_qalloc.35.exit.i %read_bool63.i = tail call i1 @___read_future_bool(i64 %lazy_measure.i) tail call void @___dec_future_refcount(i64 %lazy_measure.i) - tail call void @print_bool(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @res_c.1C9EF4D1.0, i64 0, i64 0), i64 11, i1 %read_bool63.i) - %4 = tail call i64 @teardown() - ret i64 %4 + tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool63.i) + %2 = tail call i64 @teardown() + ret i64 %2 } declare void @setup(i64) local_unnamed_addr diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-postselect_panic/postselect_panic_x86_64-unknown-linux-gnu b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-postselect_panic/postselect_panic_x86_64-unknown-linux-gnu index fed135763..a673fa439 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-postselect_panic/postselect_panic_x86_64-unknown-linux-gnu +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-postselect_panic/postselect_panic_x86_64-unknown-linux-gnu @@ -1,6 +1,6 @@ ; ModuleID = 'hugr' source_filename = "hugr" -target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" +target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" @e_Postselect.558881BF.0 = private constant [30 x i8] c"\1DEXIT:INT:Postselection failed" @@ -18,9 +18,9 @@ declare i1 @___read_future_bool(i64) local_unnamed_addr declare void @___dec_future_refcount(i64) local_unnamed_addr ; Function Attrs: noreturn -declare void @panic(i32, i8*) local_unnamed_addr #0 +declare void @panic(i32, ptr) local_unnamed_addr #0 -declare void @print_bool(i8*, i64, i1) local_unnamed_addr +declare void @print_bool(ptr, i64, i1) local_unnamed_addr declare i64 @___qalloc() local_unnamed_addr @@ -34,44 +34,34 @@ define i64 @qmain(i64 %0) local_unnamed_addr { entry: tail call void @setup(i64 %0) %qalloc.i.i = tail call i64 @___qalloc() - %not_max.not.i.i = icmp eq i64 %qalloc.i.i, -1 - br i1 %not_max.not.i.i, label %id_bb.i.i, label %reset_bb.i.i + %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 + br i1 %not_max.not.not.i.i, label %cond_39_case_0.i.i, label %__hugr__.__tk2_qalloc.35.exit.i -reset_bb.i.i: ; preds = %entry - tail call void @___reset(i64 %qalloc.i.i) - br label %id_bb.i.i - -id_bb.i.i: ; preds = %reset_bb.i.i, %entry - %1 = insertvalue { i1, i64 } { i1 true, i64 poison }, i64 %qalloc.i.i, 1 - %2 = select i1 %not_max.not.i.i, { i1, i64 } { i1 false, i64 poison }, { i1, i64 } %1 - %.fca.0.extract.i.i = extractvalue { i1, i64 } %2, 0 - br i1 %.fca.0.extract.i.i, label %__hugr__.__tk2_qalloc.35.exit.i, label %cond_39_case_0.i.i - -cond_39_case_0.i.i: ; preds = %id_bb.i.i - tail call void @panic(i32 1001, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @"e_No more qu.3B2EEBF0.0", i64 0, i64 0)) +cond_39_case_0.i.i: ; preds = %entry + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_qalloc.35.exit.i: ; preds = %id_bb.i.i - %.fca.1.extract.i.i = extractvalue { i1, i64 } %2, 1 - tail call void @___rxy(i64 %.fca.1.extract.i.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %.fca.1.extract.i.i, double 0x400921FB54442D18) - %lazy_measure.i = tail call i64 @___lazy_measure(i64 %.fca.1.extract.i.i) - tail call void @___qfree(i64 %.fca.1.extract.i.i) +__hugr__.__tk2_qalloc.35.exit.i: ; preds = %entry + tail call void @___reset(i64 %qalloc.i.i) + tail call void @___rxy(i64 %qalloc.i.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) + tail call void @___rz(i64 %qalloc.i.i, double 0x400921FB54442D18) + %lazy_measure.i = tail call i64 @___lazy_measure(i64 %qalloc.i.i) + tail call void @___qfree(i64 %qalloc.i.i) tail call void @___inc_future_refcount(i64 %lazy_measure.i) %read_bool.i = tail call i1 @___read_future_bool(i64 %lazy_measure.i) tail call void @___dec_future_refcount(i64 %lazy_measure.i) - br i1 %read_bool.i, label %3, label %__hugr__.main.1.exit + br i1 %read_bool.i, label %1, label %__hugr__.main.1.exit -3: ; preds = %__hugr__.__tk2_qalloc.35.exit.i - tail call void @panic(i32 1001, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @e_Postselect.558881BF.0, i64 0, i64 0)) +1: ; preds = %__hugr__.__tk2_qalloc.35.exit.i + tail call void @panic(i32 1001, ptr nonnull @e_Postselect.558881BF.0) unreachable __hugr__.main.1.exit: ; preds = %__hugr__.__tk2_qalloc.35.exit.i %read_bool63.i = tail call i1 @___read_future_bool(i64 %lazy_measure.i) tail call void @___dec_future_refcount(i64 %lazy_measure.i) - tail call void @print_bool(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @res_c.1C9EF4D1.0, i64 0, i64 0), i64 11, i1 %read_bool63.i) - %4 = tail call i64 @teardown() - ret i64 %4 + tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool63.i) + %2 = tail call i64 @teardown() + ret i64 %2 } declare void @setup(i64) local_unnamed_addr diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-print_current_shot/print_current_shot_x86_64-unknown-linux-gnu b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-print_current_shot/print_current_shot_x86_64-unknown-linux-gnu index 8f36109c0..eac1eb476 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-print_current_shot/print_current_shot_x86_64-unknown-linux-gnu +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-print_current_shot/print_current_shot_x86_64-unknown-linux-gnu @@ -1,19 +1,19 @@ ; ModuleID = 'hugr' source_filename = "hugr" -target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" +target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" @res_shot.6D86EAF7.0 = private constant [14 x i8] c"\0DUSER:INT:shot" declare i64 @get_current_shot() local_unnamed_addr -declare void @print_int(i8*, i64, i64) local_unnamed_addr +declare void @print_int(ptr, i64, i64) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr { entry: tail call void @setup(i64 %0) %shot.i = tail call i64 @get_current_shot() - tail call void @print_int(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @res_shot.6D86EAF7.0, i64 0, i64 0), i64 13, i64 %shot.i) + tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot.i) %1 = tail call i64 @teardown() ret i64 %1 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-rng/rng_x86_64-unknown-linux-gnu b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-rng/rng_x86_64-unknown-linux-gnu index a9ff4d595..3292c11e6 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-rng/rng_x86_64-unknown-linux-gnu +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-rng/rng_x86_64-unknown-linux-gnu @@ -1,6 +1,6 @@ ; ModuleID = 'hugr' source_filename = "hugr" -target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" +target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" @res_rint.B928E41E.0 = private constant [14 x i8] c"\0DUSER:INT:rint" @@ -17,9 +17,9 @@ declare double @random_float() local_unnamed_addr declare i32 @random_rng(i32) local_unnamed_addr -declare void @print_int(i8*, i64, i64) local_unnamed_addr +declare void @print_int(ptr, i64, i64) local_unnamed_addr -declare void @print_float(i8*, i64, double) local_unnamed_addr +declare void @print_float(ptr, i64, double) local_unnamed_addr declare void @random_seed(i64) local_unnamed_addr @@ -34,19 +34,19 @@ entry: %1 = sext i32 %rintb.i to i64 %2 = sext i32 %rint20.i to i64 %3 = sext i32 %rint.i to i64 - tail call void @print_int(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @res_rint.B928E41E.0, i64 0, i64 0), i64 13, i64 %3) - tail call void @print_int(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @res_rint1.0884EC03.0, i64 0, i64 0), i64 14, i64 %2) - tail call void @print_float(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @res_rfloat.F0E4DD2C.0, i64 0, i64 0), i64 17, double %rfloat.i) - tail call void @print_int(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @res_rint_bnd.CB1E6B0D.0, i64 0, i64 0), i64 17, i64 %1) + tail call void @print_int(ptr nonnull @res_rint.B928E41E.0, i64 13, i64 %3) + tail call void @print_int(ptr nonnull @res_rint1.0884EC03.0, i64 14, i64 %2) + tail call void @print_float(ptr nonnull @res_rfloat.F0E4DD2C.0, i64 17, double %rfloat.i) + tail call void @print_int(ptr nonnull @res_rint_bnd.CB1E6B0D.0, i64 17, i64 %1) tail call void @random_seed(i64 84) %rint53.i = tail call i32 @random_int() %rfloat55.i = tail call double @random_float() %rintb58.i = tail call i32 @random_rng(i32 200) %4 = sext i32 %rintb58.i to i64 %5 = sext i32 %rint53.i to i64 - tail call void @print_int(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @res_rint2.F0335598.0, i64 0, i64 0), i64 14, i64 %5) - tail call void @print_float(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @res_rfloat2.4DAB941F.0, i64 0, i64 0), i64 18, double %rfloat55.i) - tail call void @print_int(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @res_rint_bnd2.169DE399.0, i64 0, i64 0), i64 18, i64 %4) + tail call void @print_int(ptr nonnull @res_rint2.F0335598.0, i64 14, i64 %5) + tail call void @print_float(ptr nonnull @res_rfloat2.4DAB941F.0, i64 18, double %rfloat55.i) + tail call void @print_int(ptr nonnull @res_rint_bnd2.169DE399.0, i64 18, i64 %4) %6 = tail call i64 @teardown() ret i64 %6 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-rus/rus_x86_64-unknown-linux-gnu b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-rus/rus_x86_64-unknown-linux-gnu index f02c48787..ed9940c71 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-rus/rus_x86_64-unknown-linux-gnu +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-rus/rus_x86_64-unknown-linux-gnu @@ -1,6 +1,6 @@ ; ModuleID = 'hugr' source_filename = "hugr" -target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" +target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" @res_result.457DE32D.0 = private constant [17 x i8] c"\10USER:BOOL:result" @@ -14,14 +14,14 @@ declare i1 @___read_future_bool(i64) local_unnamed_addr declare void @___dec_future_refcount(i64) local_unnamed_addr -declare void @print_bool(i8*, i64, i1) local_unnamed_addr +declare void @print_bool(ptr, i64, i1) local_unnamed_addr declare i64 @___qalloc() local_unnamed_addr declare void @___reset(i64) local_unnamed_addr ; Function Attrs: noreturn -declare void @panic(i32, i8*) local_unnamed_addr #0 +declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @___rxy(i64, double, double) local_unnamed_addr @@ -33,119 +33,89 @@ define i64 @qmain(i64 %0) local_unnamed_addr { entry: tail call void @setup(i64 %0) %qalloc.i.i = tail call i64 @___qalloc() - %not_max.not.i.i = icmp eq i64 %qalloc.i.i, -1 - br i1 %not_max.not.i.i, label %id_bb.i.i, label %reset_bb.i.i + %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 + br i1 %not_max.not.not.i.i, label %cond_87_case_0.i.i, label %__hugr__.__tk2_qalloc.83.exit.i -reset_bb.i.i: ; preds = %entry - tail call void @___reset(i64 %qalloc.i.i) - br label %id_bb.i.i - -id_bb.i.i: ; preds = %reset_bb.i.i, %entry - %1 = insertvalue { i1, i64 } { i1 true, i64 poison }, i64 %qalloc.i.i, 1 - %2 = select i1 %not_max.not.i.i, { i1, i64 } { i1 false, i64 poison }, { i1, i64 } %1 - %.fca.0.extract.i.i = extractvalue { i1, i64 } %2, 0 - br i1 %.fca.0.extract.i.i, label %__hugr__.__tk2_qalloc.83.exit.i, label %cond_87_case_0.i.i - -cond_87_case_0.i.i: ; preds = %id_bb.i.i - tail call void @panic(i32 1001, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @"e_No more qu.3B2EEBF0.0", i64 0, i64 0)) +cond_87_case_0.i.i: ; preds = %entry + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_qalloc.83.exit.i: ; preds = %id_bb.i.i - %.fca.1.extract.i.i = extractvalue { i1, i64 } %2, 1 - br label %cond_242_case_1.i.i - -cond_242_case_1.i.i: ; preds = %cond_242_case_1.i.i.backedge, %__hugr__.__tk2_qalloc.83.exit.i - %qalloc.i.i.i = tail call i64 @___qalloc() - %not_max.not.i.i.i = icmp eq i64 %qalloc.i.i.i, -1 - br i1 %not_max.not.i.i.i, label %id_bb.i.i.i, label %reset_bb.i.i.i - -reset_bb.i.i.i: ; preds = %cond_242_case_1.i.i - tail call void @___reset(i64 %qalloc.i.i.i) - br label %id_bb.i.i.i - -id_bb.i.i.i: ; preds = %reset_bb.i.i.i, %cond_242_case_1.i.i - %3 = insertvalue { i1, i64 } { i1 true, i64 poison }, i64 %qalloc.i.i.i, 1 - %4 = select i1 %not_max.not.i.i.i, { i1, i64 } { i1 false, i64 poison }, { i1, i64 } %3 - %.fca.0.extract.i.i.i = extractvalue { i1, i64 } %4, 0 - br i1 %.fca.0.extract.i.i.i, label %__hugr__.__tk2_qalloc.97.exit.i.i, label %cond_101_case_0.i.i.i +__hugr__.__tk2_qalloc.83.exit.i: ; preds = %entry + tail call void @___reset(i64 %qalloc.i.i) + %qalloc.i132.i.i = tail call i64 @___qalloc() + %not_max.not.not.i133.i.i = icmp eq i64 %qalloc.i132.i.i, -1 + br i1 %not_max.not.not.i133.i.i, label %cond_101_case_0.i.i.i, label %__hugr__.__tk2_qalloc.97.exit.i.i -cond_101_case_0.i.i.i: ; preds = %id_bb.i.i.i - tail call void @panic(i32 1001, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @"e_No more qu.3B2EEBF0.0", i64 0, i64 0)) +cond_101_case_0.i.i.i: ; preds = %cond_242_case_1.backedge.i.i, %__hugr__.__tk2_qalloc.83.exit.i + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_qalloc.97.exit.i.i: ; preds = %id_bb.i.i.i - %.fca.1.extract.i.i.i = extractvalue { i1, i64 } %4, 1 +__hugr__.__tk2_qalloc.97.exit.i.i: ; preds = %__hugr__.__tk2_qalloc.83.exit.i, %cond_242_case_1.backedge.i.i + %qalloc.i134.i.i = phi i64 [ %qalloc.i.i.i, %cond_242_case_1.backedge.i.i ], [ %qalloc.i132.i.i, %__hugr__.__tk2_qalloc.83.exit.i ] + tail call void @___reset(i64 %qalloc.i134.i.i) %qalloc.i128.i.i = tail call i64 @___qalloc() - %not_max.not.i129.i.i = icmp eq i64 %qalloc.i128.i.i, -1 - br i1 %not_max.not.i129.i.i, label %id_bb.i132.i.i, label %reset_bb.i130.i.i + %not_max.not.not.i129.i.i = icmp eq i64 %qalloc.i128.i.i, -1 + br i1 %not_max.not.not.i129.i.i, label %cond_115_case_0.i.i.i, label %__hugr__.__tk2_qalloc.111.exit.i.i -reset_bb.i130.i.i: ; preds = %__hugr__.__tk2_qalloc.97.exit.i.i - tail call void @___reset(i64 %qalloc.i128.i.i) - br label %id_bb.i132.i.i - -id_bb.i132.i.i: ; preds = %reset_bb.i130.i.i, %__hugr__.__tk2_qalloc.97.exit.i.i - %5 = insertvalue { i1, i64 } { i1 true, i64 poison }, i64 %qalloc.i128.i.i, 1 - %6 = select i1 %not_max.not.i129.i.i, { i1, i64 } { i1 false, i64 poison }, { i1, i64 } %5 - %.fca.0.extract.i131.i.i = extractvalue { i1, i64 } %6, 0 - br i1 %.fca.0.extract.i131.i.i, label %__hugr__.__tk2_qalloc.111.exit.i.i, label %cond_115_case_0.i.i.i - -cond_115_case_0.i.i.i: ; preds = %id_bb.i132.i.i - tail call void @panic(i32 1001, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @"e_No more qu.3B2EEBF0.0", i64 0, i64 0)) +cond_115_case_0.i.i.i: ; preds = %__hugr__.__tk2_qalloc.97.exit.i.i + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_qalloc.111.exit.i.i: ; preds = %id_bb.i132.i.i - %.fca.1.extract.i133.i.i = extractvalue { i1, i64 } %6, 1 - tail call void @___rxy(i64 %.fca.1.extract.i133.i.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %.fca.1.extract.i133.i.i, double 0x400921FB54442D18) - tail call void @___rxy(i64 %.fca.1.extract.i.i.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %.fca.1.extract.i.i.i, double 0x400921FB54442D18) - tail call void @___rz(i64 %.fca.1.extract.i.i.i, double 0xBFE921FB54442D18) - tail call void @___rxy(i64 %.fca.1.extract.i.i.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rzz(i64 %.fca.1.extract.i133.i.i, i64 %.fca.1.extract.i.i.i, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %.fca.1.extract.i133.i.i, double 0xBFF921FB54442D18) - tail call void @___rxy(i64 %.fca.1.extract.i.i.i, double 0x3FF921FB54442D18, double 0x400921FB54442D18) - tail call void @___rz(i64 %.fca.1.extract.i.i.i, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %.fca.1.extract.i.i.i, double 0x3FE921FB54442D18) - %lazy_measure.i.i = tail call i64 @___lazy_measure(i64 %.fca.1.extract.i.i.i) - tail call void @___qfree(i64 %.fca.1.extract.i.i.i) +__hugr__.__tk2_qalloc.111.exit.i.i: ; preds = %__hugr__.__tk2_qalloc.97.exit.i.i + tail call void @___reset(i64 %qalloc.i128.i.i) + tail call void @___rxy(i64 %qalloc.i128.i.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) + tail call void @___rz(i64 %qalloc.i128.i.i, double 0x400921FB54442D18) + tail call void @___rxy(i64 %qalloc.i134.i.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) + tail call void @___rz(i64 %qalloc.i134.i.i, double 0x400921FB54442D18) + tail call void @___rz(i64 %qalloc.i134.i.i, double 0xBFE921FB54442D18) + tail call void @___rxy(i64 %qalloc.i134.i.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) + tail call void @___rzz(i64 %qalloc.i128.i.i, i64 %qalloc.i134.i.i, double 0x3FF921FB54442D18) + tail call void @___rz(i64 %qalloc.i128.i.i, double 0xBFF921FB54442D18) + tail call void @___rxy(i64 %qalloc.i134.i.i, double 0x3FF921FB54442D18, double 0x400921FB54442D18) + tail call void @___rz(i64 %qalloc.i134.i.i, double 0xBFF921FB54442D18) + tail call void @___rz(i64 %qalloc.i134.i.i, double 0x3FE921FB54442D18) + %lazy_measure.i.i = tail call i64 @___lazy_measure(i64 %qalloc.i134.i.i) + tail call void @___qfree(i64 %qalloc.i134.i.i) %read_bool.i.i = tail call i1 @___read_future_bool(i64 %lazy_measure.i.i) tail call void @___dec_future_refcount(i64 %lazy_measure.i.i) - br i1 %read_bool.i.i, label %cond_256_case_1.i.i, label %7 + br i1 %read_bool.i.i, label %cond_256_case_1.i.i, label %1 -7: ; preds = %__hugr__.__tk2_qalloc.111.exit.i.i - tail call void @___qfree(i64 %.fca.1.extract.i133.i.i) - br label %cond_242_case_1.i.i.backedge +1: ; preds = %__hugr__.__tk2_qalloc.111.exit.i.i + tail call void @___qfree(i64 %qalloc.i128.i.i) + br label %cond_242_case_1.backedge.i.i + +cond_242_case_1.backedge.i.i: ; preds = %2, %1 + %qalloc.i.i.i = tail call i64 @___qalloc() + %not_max.not.not.i.i.i = icmp eq i64 %qalloc.i.i.i, -1 + br i1 %not_max.not.not.i.i.i, label %cond_101_case_0.i.i.i, label %__hugr__.__tk2_qalloc.97.exit.i.i cond_256_case_1.i.i: ; preds = %__hugr__.__tk2_qalloc.111.exit.i.i - tail call void @___rz(i64 %.fca.1.extract.i.i, double 0x3FE921FB54442D18) - tail call void @___rz(i64 %.fca.1.extract.i.i, double 0x400921FB54442D18) - tail call void @___rxy(i64 %.fca.1.extract.i133.i.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rzz(i64 %.fca.1.extract.i.i, i64 %.fca.1.extract.i133.i.i, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %.fca.1.extract.i.i, double 0xBFF921FB54442D18) - tail call void @___rxy(i64 %.fca.1.extract.i133.i.i, double 0x3FF921FB54442D18, double 0x400921FB54442D18) - tail call void @___rz(i64 %.fca.1.extract.i133.i.i, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %.fca.1.extract.i133.i.i, double 0x3FE921FB54442D18) - %lazy_measure67.i.i = tail call i64 @___lazy_measure(i64 %.fca.1.extract.i133.i.i) - tail call void @___qfree(i64 %.fca.1.extract.i133.i.i) + tail call void @___rz(i64 %qalloc.i.i, double 0x3FE921FB54442D18) + tail call void @___rz(i64 %qalloc.i.i, double 0x400921FB54442D18) + tail call void @___rxy(i64 %qalloc.i128.i.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) + tail call void @___rzz(i64 %qalloc.i.i, i64 %qalloc.i128.i.i, double 0x3FF921FB54442D18) + tail call void @___rz(i64 %qalloc.i.i, double 0xBFF921FB54442D18) + tail call void @___rxy(i64 %qalloc.i128.i.i, double 0x3FF921FB54442D18, double 0x400921FB54442D18) + tail call void @___rz(i64 %qalloc.i128.i.i, double 0xBFF921FB54442D18) + tail call void @___rz(i64 %qalloc.i128.i.i, double 0x3FE921FB54442D18) + %lazy_measure67.i.i = tail call i64 @___lazy_measure(i64 %qalloc.i128.i.i) + tail call void @___qfree(i64 %qalloc.i128.i.i) %read_bool80.i.i = tail call i1 @___read_future_bool(i64 %lazy_measure67.i.i) tail call void @___dec_future_refcount(i64 %lazy_measure67.i.i) - br i1 %read_bool80.i.i, label %__hugr__.main.1.exit, label %8 - -8: ; preds = %cond_256_case_1.i.i - tail call void @___rxy(i64 %.fca.1.extract.i.i, double 0x400921FB54442D18, double 0.000000e+00) - br label %cond_242_case_1.i.i.backedge + br i1 %read_bool80.i.i, label %__hugr__.main.1.exit, label %2 -cond_242_case_1.i.i.backedge: ; preds = %8, %7 - br label %cond_242_case_1.i.i +2: ; preds = %cond_256_case_1.i.i + tail call void @___rxy(i64 %qalloc.i.i, double 0x400921FB54442D18, double 0.000000e+00) + br label %cond_242_case_1.backedge.i.i __hugr__.main.1.exit: ; preds = %cond_256_case_1.i.i - %lazy_measure.i = tail call i64 @___lazy_measure(i64 %.fca.1.extract.i.i) - tail call void @___qfree(i64 %.fca.1.extract.i.i) + %lazy_measure.i = tail call i64 @___lazy_measure(i64 %qalloc.i.i) + tail call void @___qfree(i64 %qalloc.i.i) %read_bool.i = tail call i1 @___read_future_bool(i64 %lazy_measure.i) tail call void @___dec_future_refcount(i64 %lazy_measure.i) - tail call void @print_bool(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @res_result.457DE32D.0, i64 0, i64 0), i64 16, i1 %read_bool.i) - %9 = tail call i64 @teardown() - ret i64 %9 + tail call void @print_bool(ptr nonnull @res_result.457DE32D.0, i64 16, i1 %read_bool.i) + %3 = tail call i64 @teardown() + ret i64 %3 } declare void @setup(i64) local_unnamed_addr diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-discard_qb_array/discard_qb_array_x86_64-windows-msvc b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-discard_qb_array/discard_qb_array_x86_64-windows-msvc index c7a4dc926..9b53ca4b0 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-discard_qb_array/discard_qb_array_x86_64-windows-msvc +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-discard_qb_array/discard_qb_array_x86_64-windows-msvc @@ -1,6 +1,6 @@ ; ModuleID = 'hugr' source_filename = "hugr" -target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" +target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128" target triple = "x86_64-windows-msvc" @"e_Array alre.5A300C2A.0" = private constant [57 x i8] c"8EXIT:INT:Array already contains an element at this index" @@ -8,14 +8,14 @@ target triple = "x86_64-windows-msvc" @"e_Array cont.EFA5AC45.0" = private constant [70 x i8] c"EEXIT:INT:Array contains non-borrowed elements and cannot be discarded" @"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." -declare i8* @heap_alloc(i64) local_unnamed_addr +declare ptr @heap_alloc(i64) local_unnamed_addr ; Function Attrs: noreturn -declare void @panic(i32, i8*) local_unnamed_addr #0 +declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @___qfree(i64) local_unnamed_addr -declare void @heap_free(i8*) local_unnamed_addr +declare void @heap_free(ptr) local_unnamed_addr declare i64 @___qalloc() local_unnamed_addr @@ -24,194 +24,264 @@ declare void @___reset(i64) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr { entry: tail call void @setup(i64 %0) - %1 = tail call i8* @heap_alloc(i64 80) - %2 = bitcast i8* %1 to i64* - %3 = tail call i8* @heap_alloc(i64 8) - %4 = bitcast i8* %3 to i64* - store i64 -1, i64* %4, align 1 - br label %cond_20_case_1.i - -cond_20_case_1.i: ; preds = %cond_exit_20.i, %entry - %"15_0.sroa.0.0114.i" = phi i64 [ 0, %entry ], [ %5, %cond_exit_20.i ] - %5 = add nuw nsw i64 %"15_0.sroa.0.0114.i", 1 + %1 = tail call ptr @heap_alloc(i64 80) + %2 = tail call ptr @heap_alloc(i64 8) + store i64 -1, ptr %2, align 1 %qalloc.i.i = tail call i64 @___qalloc() - %not_max.not.i.i = icmp eq i64 %qalloc.i.i, -1 - br i1 %not_max.not.i.i, label %id_bb.i.i, label %reset_bb.i.i + %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 + br i1 %not_max.not.not.i.i, label %cond_211_case_0.i.i, label %__barray_check_bounds.exit.i -reset_bb.i.i: ; preds = %cond_20_case_1.i - tail call void @___reset(i64 %qalloc.i.i) - br label %id_bb.i.i - -id_bb.i.i: ; preds = %reset_bb.i.i, %cond_20_case_1.i - %6 = insertvalue { i1, i64 } { i1 true, i64 poison }, i64 %qalloc.i.i, 1 - %7 = select i1 %not_max.not.i.i, { i1, i64 } { i1 false, i64 poison }, { i1, i64 } %6 - %.fca.0.extract.i.i = extractvalue { i1, i64 } %7, 0 - br i1 %.fca.0.extract.i.i, label %__barray_check_bounds.exit.i, label %cond_211_case_0.i.i - -cond_211_case_0.i.i: ; preds = %id_bb.i.i - tail call void @panic(i32 1001, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @"e_No more qu.3B2EEBF0.0", i64 0, i64 0)) +cond_211_case_0.i.i: ; preds = %cond_exit_20.i.8, %cond_exit_20.i.7, %cond_exit_20.i.6, %cond_exit_20.i.5, %cond_exit_20.i.4, %cond_exit_20.i.3, %cond_exit_20.i.2, %cond_exit_20.i.1, %cond_exit_20.i, %entry + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__barray_check_bounds.exit.i: ; preds = %id_bb.i.i - %8 = lshr i64 %"15_0.sroa.0.0114.i", 6 - %9 = getelementptr inbounds i64, i64* %4, i64 %8 - %10 = load i64, i64* %9, align 4 - %11 = shl nuw nsw i64 1, %"15_0.sroa.0.0114.i" - %12 = and i64 %10, %11 - %.not.i.i = icmp eq i64 %12, 0 - br i1 %.not.i.i, label %panic.i.i, label %cond_exit_20.i - -panic.i.i: ; preds = %__barray_check_bounds.exit.i - tail call void @panic(i32 1002, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @"e_Array alre.5A300C2A.0", i64 0, i64 0)) +__barray_check_bounds.exit.i: ; preds = %entry + tail call void @___reset(i64 %qalloc.i.i) + %3 = load i64, ptr %2, align 4 + %4 = trunc i64 %3 to i1 + br i1 %4, label %cond_exit_20.i, label %panic.i.i + +panic.i.i: ; preds = %__barray_check_bounds.exit.i.9, %__barray_check_bounds.exit.i.8, %__barray_check_bounds.exit.i.7, %__barray_check_bounds.exit.i.6, %__barray_check_bounds.exit.i.5, %__barray_check_bounds.exit.i.4, %__barray_check_bounds.exit.i.3, %__barray_check_bounds.exit.i.2, %__barray_check_bounds.exit.i.1, %__barray_check_bounds.exit.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable cond_exit_20.i: ; preds = %__barray_check_bounds.exit.i - %.fca.1.extract.i.i = extractvalue { i1, i64 } %7, 1 - %13 = xor i64 %10, %11 - store i64 %13, i64* %9, align 4 - %14 = getelementptr inbounds i64, i64* %2, i64 %"15_0.sroa.0.0114.i" - store i64 %.fca.1.extract.i.i, i64* %14, align 4 - %exitcond.not.i = icmp eq i64 %5, 10 - br i1 %exitcond.not.i, label %loop_out.preheader.preheader.i, label %cond_20_case_1.i - -loop_out.preheader.preheader.i: ; preds = %cond_exit_20.i - %15 = load i64, i64* %4, align 4 - %16 = and i64 %15, 1 - %.not.i99.i.i.i = icmp eq i64 %16, 0 - br i1 %.not.i99.i.i.i, label %cond_380_case_1.i.i, label %panic.i.i.i.i - -mask_block_err.i.i.i.i: ; preds = %cond_380_case_1.i.9.i - tail call void @panic(i32 1002, i8* getelementptr inbounds ([70 x i8], [70 x i8]* @"e_Array cont.EFA5AC45.0", i64 0, i64 0)) + %5 = and i64 %3, -2 + store i64 %5, ptr %2, align 4 + store i64 %qalloc.i.i, ptr %1, align 4 + %qalloc.i.i.1 = tail call i64 @___qalloc() + %not_max.not.not.i.i.1 = icmp eq i64 %qalloc.i.i.1, -1 + br i1 %not_max.not.not.i.i.1, label %cond_211_case_0.i.i, label %__barray_check_bounds.exit.i.1 + +__barray_check_bounds.exit.i.1: ; preds = %cond_exit_20.i + tail call void @___reset(i64 %qalloc.i.i.1) + %6 = load i64, ptr %2, align 4 + %7 = and i64 %6, 2 + %.not = icmp eq i64 %7, 0 + br i1 %.not, label %panic.i.i, label %cond_exit_20.i.1 + +cond_exit_20.i.1: ; preds = %__barray_check_bounds.exit.i.1 + %8 = and i64 %6, -3 + store i64 %8, ptr %2, align 4 + %9 = getelementptr inbounds nuw i8, ptr %1, i64 8 + store i64 %qalloc.i.i.1, ptr %9, align 4 + %qalloc.i.i.2 = tail call i64 @___qalloc() + %not_max.not.not.i.i.2 = icmp eq i64 %qalloc.i.i.2, -1 + br i1 %not_max.not.not.i.i.2, label %cond_211_case_0.i.i, label %__barray_check_bounds.exit.i.2 + +__barray_check_bounds.exit.i.2: ; preds = %cond_exit_20.i.1 + tail call void @___reset(i64 %qalloc.i.i.2) + %10 = load i64, ptr %2, align 4 + %11 = and i64 %10, 4 + %.not1 = icmp eq i64 %11, 0 + br i1 %.not1, label %panic.i.i, label %cond_exit_20.i.2 + +cond_exit_20.i.2: ; preds = %__barray_check_bounds.exit.i.2 + %12 = and i64 %10, -5 + store i64 %12, ptr %2, align 4 + %13 = getelementptr inbounds nuw i8, ptr %1, i64 16 + store i64 %qalloc.i.i.2, ptr %13, align 4 + %qalloc.i.i.3 = tail call i64 @___qalloc() + %not_max.not.not.i.i.3 = icmp eq i64 %qalloc.i.i.3, -1 + br i1 %not_max.not.not.i.i.3, label %cond_211_case_0.i.i, label %__barray_check_bounds.exit.i.3 + +__barray_check_bounds.exit.i.3: ; preds = %cond_exit_20.i.2 + tail call void @___reset(i64 %qalloc.i.i.3) + %14 = load i64, ptr %2, align 4 + %15 = and i64 %14, 8 + %.not2 = icmp eq i64 %15, 0 + br i1 %.not2, label %panic.i.i, label %cond_exit_20.i.3 + +cond_exit_20.i.3: ; preds = %__barray_check_bounds.exit.i.3 + %16 = and i64 %14, -9 + store i64 %16, ptr %2, align 4 + %17 = getelementptr inbounds nuw i8, ptr %1, i64 24 + store i64 %qalloc.i.i.3, ptr %17, align 4 + %qalloc.i.i.4 = tail call i64 @___qalloc() + %not_max.not.not.i.i.4 = icmp eq i64 %qalloc.i.i.4, -1 + br i1 %not_max.not.not.i.i.4, label %cond_211_case_0.i.i, label %__barray_check_bounds.exit.i.4 + +__barray_check_bounds.exit.i.4: ; preds = %cond_exit_20.i.3 + tail call void @___reset(i64 %qalloc.i.i.4) + %18 = load i64, ptr %2, align 4 + %19 = and i64 %18, 16 + %.not3 = icmp eq i64 %19, 0 + br i1 %.not3, label %panic.i.i, label %cond_exit_20.i.4 + +cond_exit_20.i.4: ; preds = %__barray_check_bounds.exit.i.4 + %20 = and i64 %18, -17 + store i64 %20, ptr %2, align 4 + %21 = getelementptr inbounds nuw i8, ptr %1, i64 32 + store i64 %qalloc.i.i.4, ptr %21, align 4 + %qalloc.i.i.5 = tail call i64 @___qalloc() + %not_max.not.not.i.i.5 = icmp eq i64 %qalloc.i.i.5, -1 + br i1 %not_max.not.not.i.i.5, label %cond_211_case_0.i.i, label %__barray_check_bounds.exit.i.5 + +__barray_check_bounds.exit.i.5: ; preds = %cond_exit_20.i.4 + tail call void @___reset(i64 %qalloc.i.i.5) + %22 = load i64, ptr %2, align 4 + %23 = and i64 %22, 32 + %.not4 = icmp eq i64 %23, 0 + br i1 %.not4, label %panic.i.i, label %cond_exit_20.i.5 + +cond_exit_20.i.5: ; preds = %__barray_check_bounds.exit.i.5 + %24 = and i64 %22, -33 + store i64 %24, ptr %2, align 4 + %25 = getelementptr inbounds nuw i8, ptr %1, i64 40 + store i64 %qalloc.i.i.5, ptr %25, align 4 + %qalloc.i.i.6 = tail call i64 @___qalloc() + %not_max.not.not.i.i.6 = icmp eq i64 %qalloc.i.i.6, -1 + br i1 %not_max.not.not.i.i.6, label %cond_211_case_0.i.i, label %__barray_check_bounds.exit.i.6 + +__barray_check_bounds.exit.i.6: ; preds = %cond_exit_20.i.5 + tail call void @___reset(i64 %qalloc.i.i.6) + %26 = load i64, ptr %2, align 4 + %27 = and i64 %26, 64 + %.not5 = icmp eq i64 %27, 0 + br i1 %.not5, label %panic.i.i, label %cond_exit_20.i.6 + +cond_exit_20.i.6: ; preds = %__barray_check_bounds.exit.i.6 + %28 = and i64 %26, -65 + store i64 %28, ptr %2, align 4 + %29 = getelementptr inbounds nuw i8, ptr %1, i64 48 + store i64 %qalloc.i.i.6, ptr %29, align 4 + %qalloc.i.i.7 = tail call i64 @___qalloc() + %not_max.not.not.i.i.7 = icmp eq i64 %qalloc.i.i.7, -1 + br i1 %not_max.not.not.i.i.7, label %cond_211_case_0.i.i, label %__barray_check_bounds.exit.i.7 + +__barray_check_bounds.exit.i.7: ; preds = %cond_exit_20.i.6 + tail call void @___reset(i64 %qalloc.i.i.7) + %30 = load i64, ptr %2, align 4 + %31 = and i64 %30, 128 + %.not6 = icmp eq i64 %31, 0 + br i1 %.not6, label %panic.i.i, label %cond_exit_20.i.7 + +cond_exit_20.i.7: ; preds = %__barray_check_bounds.exit.i.7 + %32 = and i64 %30, -129 + store i64 %32, ptr %2, align 4 + %33 = getelementptr inbounds nuw i8, ptr %1, i64 56 + store i64 %qalloc.i.i.7, ptr %33, align 4 + %qalloc.i.i.8 = tail call i64 @___qalloc() + %not_max.not.not.i.i.8 = icmp eq i64 %qalloc.i.i.8, -1 + br i1 %not_max.not.not.i.i.8, label %cond_211_case_0.i.i, label %__barray_check_bounds.exit.i.8 + +__barray_check_bounds.exit.i.8: ; preds = %cond_exit_20.i.7 + tail call void @___reset(i64 %qalloc.i.i.8) + %34 = load i64, ptr %2, align 4 + %35 = and i64 %34, 256 + %.not7 = icmp eq i64 %35, 0 + br i1 %.not7, label %panic.i.i, label %cond_exit_20.i.8 + +cond_exit_20.i.8: ; preds = %__barray_check_bounds.exit.i.8 + %36 = and i64 %34, -257 + store i64 %36, ptr %2, align 4 + %37 = getelementptr inbounds nuw i8, ptr %1, i64 64 + store i64 %qalloc.i.i.8, ptr %37, align 4 + %qalloc.i.i.9 = tail call i64 @___qalloc() + %not_max.not.not.i.i.9 = icmp eq i64 %qalloc.i.i.9, -1 + br i1 %not_max.not.not.i.i.9, label %cond_211_case_0.i.i, label %__barray_check_bounds.exit.i.9 + +__barray_check_bounds.exit.i.9: ; preds = %cond_exit_20.i.8 + tail call void @___reset(i64 %qalloc.i.i.9) + %38 = load i64, ptr %2, align 4 + %39 = and i64 %38, 512 + %.not8 = icmp eq i64 %39, 0 + br i1 %.not8, label %panic.i.i, label %cond_exit_20.i.9 + +cond_exit_20.i.9: ; preds = %__barray_check_bounds.exit.i.9 + %40 = and i64 %38, -513 + store i64 %40, ptr %2, align 4 + %41 = getelementptr inbounds nuw i8, ptr %1, i64 72 + store i64 %qalloc.i.i.9, ptr %41, align 4 + %"120.fca.0.insert.i" = insertvalue { ptr, ptr, i64 } poison, ptr %1, 0 + %"120.fca.1.insert.i" = insertvalue { ptr, ptr, i64 } %"120.fca.0.insert.i", ptr %2, 1 + %"120.fca.2.insert.i" = insertvalue { ptr, ptr, i64 } %"120.fca.1.insert.i", i64 0, 2 + %42 = insertvalue { { ptr, ptr, i64 }, i64 } poison, { ptr, ptr, i64 } %"120.fca.2.insert.i", 0 + br label %__barray_check_bounds.exit.i.i.i + +43: ; preds = %"__hugr__.$__next__$$t(qubit)$n(10).299.exit.thread.i.i" + %44 = lshr i64 %.fca.1.0.0.2.extract.i.i.i, 6 + %45 = getelementptr i64, ptr %.fca.1.0.0.1.extract.i.i.i, i64 %44 + %46 = load i64, ptr %45, align 4 + %47 = and i64 %.fca.1.0.0.2.extract.i.i.i, 63 + %48 = sub nuw nsw i64 64, %47 + %49 = lshr i64 -1, %48 + %50 = icmp eq i64 %47, 0 + %51 = select i1 %50, i64 0, i64 %49 + %52 = or i64 %46, %51 + store i64 %52, ptr %45, align 4 + %last_valid.i.i.i.i = add i64 %.fca.1.0.0.2.extract.i.i.i, 9 + %53 = lshr i64 %last_valid.i.i.i.i, 6 + %54 = getelementptr inbounds nuw i64, ptr %.fca.1.0.0.1.extract.i.i.i, i64 %53 + %55 = load i64, ptr %54, align 4 + %56 = and i64 %last_valid.i.i.i.i, 63 + %57 = shl nsw i64 -2, %56 + %58 = icmp eq i64 %56, 63 + %59 = select i1 %58, i64 0, i64 %57 + %60 = or i64 %55, %59 + store i64 %60, ptr %54, align 4 + %reass.sub.i.i.i.i = sub nsw i64 %53, %44 + %.not.i.i.i.i = icmp eq i64 %reass.sub.i.i.i.i, -1 + br i1 %.not.i.i.i.i, label %__hugr__.main.1.exit, label %mask_block_ok.i.i.i.i + +61: ; preds = %mask_block_ok.i.i.i.i + %62 = add nuw i64 %.02.i.i.i.i, 1 + %exitcond.not.i.i.i.i = icmp eq i64 %.02.i.i.i.i, %reass.sub.i.i.i.i + br i1 %exitcond.not.i.i.i.i, label %__hugr__.main.1.exit, label %mask_block_ok.i.i.i.i + +mask_block_ok.i.i.i.i: ; preds = %43, %61 + %.02.i.i.i.i = phi i64 [ %62, %61 ], [ 0, %43 ] + %gep.i.i.i.i = getelementptr i64, ptr %45, i64 %.02.i.i.i.i + %63 = load i64, ptr %gep.i.i.i.i, align 4 + %64 = icmp eq i64 %63, -1 + br i1 %64, label %61, label %mask_block_err.i.i.i.i + +mask_block_err.i.i.i.i: ; preds = %mask_block_ok.i.i.i.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -panic.i.i.i.i: ; preds = %cond_380_case_1.i.8.i, %cond_380_case_1.i.7.i, %cond_380_case_1.i.6.i, %cond_380_case_1.i.5.i, %cond_380_case_1.i.4.i, %cond_380_case_1.i.3.i, %cond_380_case_1.i.2.i, %cond_380_case_1.i.1.i, %cond_380_case_1.i.i, %loop_out.preheader.preheader.i - tail call void @panic(i32 1002, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @"e_Array elem.E746B1A3.0", i64 0, i64 0)) +__barray_check_bounds.exit.i.i.i: ; preds = %"__hugr__.$__next__$$t(qubit)$n(10).299.exit.thread.i.i", %cond_exit_20.i.9 + %.fca.2.extract83.i185.i.i = phi i64 [ 0, %cond_exit_20.i.9 ], [ %.fca.1.0.0.2.extract.i.i.i, %"__hugr__.$__next__$$t(qubit)$n(10).299.exit.thread.i.i" ] + %.fca.1.extract82.i184.i.i = phi ptr [ %2, %cond_exit_20.i.9 ], [ %.fca.1.0.0.1.extract.i.i.i, %"__hugr__.$__next__$$t(qubit)$n(10).299.exit.thread.i.i" ] + %.fca.0.extract81.i183.i.i = phi ptr [ %1, %cond_exit_20.i.9 ], [ %.fca.1.0.0.0.extract.i.i.i, %"__hugr__.$__next__$$t(qubit)$n(10).299.exit.thread.i.i" ] + %"291_0.0182.i.i" = phi i64 [ 0, %cond_exit_20.i.9 ], [ %72, %"__hugr__.$__next__$$t(qubit)$n(10).299.exit.thread.i.i" ] + %.pn181.i.i = phi { { ptr, ptr, i64 }, i64 } [ %42, %cond_exit_20.i.9 ], [ %80, %"__hugr__.$__next__$$t(qubit)$n(10).299.exit.thread.i.i" ] + %65 = add i64 %"291_0.0182.i.i", %.fca.2.extract83.i185.i.i + %66 = lshr i64 %65, 6 + %67 = getelementptr inbounds nuw i64, ptr %.fca.1.extract82.i184.i.i, i64 %66 + %68 = load i64, ptr %67, align 4 + %69 = and i64 %65, 63 + %70 = lshr i64 %68, %69 + %71 = trunc i64 %70 to i1 + br i1 %71, label %panic.i.i.i.i, label %"__hugr__.$__next__$$t(qubit)$n(10).299.exit.thread.i.i" + +panic.i.i.i.i: ; preds = %__barray_check_bounds.exit.i.i.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -cond_380_case_1.i.i: ; preds = %loop_out.preheader.preheader.i - %17 = xor i64 %15, 1 - store i64 %17, i64* %4, align 4 - %18 = load i64, i64* %2, align 4 - tail call void @___qfree(i64 %18) - %19 = load i64, i64* %4, align 4 - %20 = and i64 %19, 2 - %.not.i99.i.i.1.i = icmp eq i64 %20, 0 - br i1 %.not.i99.i.i.1.i, label %cond_380_case_1.i.1.i, label %panic.i.i.i.i - -cond_380_case_1.i.1.i: ; preds = %cond_380_case_1.i.i - %21 = xor i64 %19, 2 - store i64 %21, i64* %4, align 4 - %22 = getelementptr inbounds i8, i8* %1, i64 8 - %23 = bitcast i8* %22 to i64* - %24 = load i64, i64* %23, align 4 - tail call void @___qfree(i64 %24) - %25 = load i64, i64* %4, align 4 - %26 = and i64 %25, 4 - %.not.i99.i.i.2.i = icmp eq i64 %26, 0 - br i1 %.not.i99.i.i.2.i, label %cond_380_case_1.i.2.i, label %panic.i.i.i.i - -cond_380_case_1.i.2.i: ; preds = %cond_380_case_1.i.1.i - %27 = xor i64 %25, 4 - store i64 %27, i64* %4, align 4 - %28 = getelementptr inbounds i8, i8* %1, i64 16 - %29 = bitcast i8* %28 to i64* - %30 = load i64, i64* %29, align 4 - tail call void @___qfree(i64 %30) - %31 = load i64, i64* %4, align 4 - %32 = and i64 %31, 8 - %.not.i99.i.i.3.i = icmp eq i64 %32, 0 - br i1 %.not.i99.i.i.3.i, label %cond_380_case_1.i.3.i, label %panic.i.i.i.i - -cond_380_case_1.i.3.i: ; preds = %cond_380_case_1.i.2.i - %33 = xor i64 %31, 8 - store i64 %33, i64* %4, align 4 - %34 = getelementptr inbounds i8, i8* %1, i64 24 - %35 = bitcast i8* %34 to i64* - %36 = load i64, i64* %35, align 4 - tail call void @___qfree(i64 %36) - %37 = load i64, i64* %4, align 4 - %38 = and i64 %37, 16 - %.not.i99.i.i.4.i = icmp eq i64 %38, 0 - br i1 %.not.i99.i.i.4.i, label %cond_380_case_1.i.4.i, label %panic.i.i.i.i - -cond_380_case_1.i.4.i: ; preds = %cond_380_case_1.i.3.i - %39 = xor i64 %37, 16 - store i64 %39, i64* %4, align 4 - %40 = getelementptr inbounds i8, i8* %1, i64 32 - %41 = bitcast i8* %40 to i64* - %42 = load i64, i64* %41, align 4 - tail call void @___qfree(i64 %42) - %43 = load i64, i64* %4, align 4 - %44 = and i64 %43, 32 - %.not.i99.i.i.5.i = icmp eq i64 %44, 0 - br i1 %.not.i99.i.i.5.i, label %cond_380_case_1.i.5.i, label %panic.i.i.i.i - -cond_380_case_1.i.5.i: ; preds = %cond_380_case_1.i.4.i - %45 = xor i64 %43, 32 - store i64 %45, i64* %4, align 4 - %46 = getelementptr inbounds i8, i8* %1, i64 40 - %47 = bitcast i8* %46 to i64* - %48 = load i64, i64* %47, align 4 - tail call void @___qfree(i64 %48) - %49 = load i64, i64* %4, align 4 - %50 = and i64 %49, 64 - %.not.i99.i.i.6.i = icmp eq i64 %50, 0 - br i1 %.not.i99.i.i.6.i, label %cond_380_case_1.i.6.i, label %panic.i.i.i.i - -cond_380_case_1.i.6.i: ; preds = %cond_380_case_1.i.5.i - %51 = xor i64 %49, 64 - store i64 %51, i64* %4, align 4 - %52 = getelementptr inbounds i8, i8* %1, i64 48 - %53 = bitcast i8* %52 to i64* - %54 = load i64, i64* %53, align 4 - tail call void @___qfree(i64 %54) - %55 = load i64, i64* %4, align 4 - %56 = and i64 %55, 128 - %.not.i99.i.i.7.i = icmp eq i64 %56, 0 - br i1 %.not.i99.i.i.7.i, label %cond_380_case_1.i.7.i, label %panic.i.i.i.i - -cond_380_case_1.i.7.i: ; preds = %cond_380_case_1.i.6.i - %57 = xor i64 %55, 128 - store i64 %57, i64* %4, align 4 - %58 = getelementptr inbounds i8, i8* %1, i64 56 - %59 = bitcast i8* %58 to i64* - %60 = load i64, i64* %59, align 4 - tail call void @___qfree(i64 %60) - %61 = load i64, i64* %4, align 4 - %62 = and i64 %61, 256 - %.not.i99.i.i.8.i = icmp eq i64 %62, 0 - br i1 %.not.i99.i.i.8.i, label %cond_380_case_1.i.8.i, label %panic.i.i.i.i - -cond_380_case_1.i.8.i: ; preds = %cond_380_case_1.i.7.i - %63 = xor i64 %61, 256 - store i64 %63, i64* %4, align 4 - %64 = getelementptr inbounds i8, i8* %1, i64 64 - %65 = bitcast i8* %64 to i64* - %66 = load i64, i64* %65, align 4 - tail call void @___qfree(i64 %66) - %67 = load i64, i64* %4, align 4 - %68 = and i64 %67, 512 - %.not.i99.i.i.9.i = icmp eq i64 %68, 0 - br i1 %.not.i99.i.i.9.i, label %cond_380_case_1.i.9.i, label %panic.i.i.i.i - -cond_380_case_1.i.9.i: ; preds = %cond_380_case_1.i.8.i - %69 = xor i64 %67, 512 - store i64 %69, i64* %4, align 4 - %70 = getelementptr inbounds i8, i8* %1, i64 72 - %71 = bitcast i8* %70 to i64* - %72 = load i64, i64* %71, align 4 - tail call void @___qfree(i64 %72) - %73 = load i64, i64* %4, align 4 - %74 = or i64 %73, -1024 - store i64 %74, i64* %4, align 4 - %75 = icmp eq i64 %74, -1 - br i1 %75, label %__hugr__.main.1.exit, label %mask_block_err.i.i.i.i - -__hugr__.main.1.exit: ; preds = %cond_380_case_1.i.9.i - tail call void @heap_free(i8* nonnull %1) - tail call void @heap_free(i8* nonnull %3) - %76 = tail call i64 @teardown() - ret i64 %76 +"__hugr__.$__next__$$t(qubit)$n(10).299.exit.thread.i.i": ; preds = %__barray_check_bounds.exit.i.i.i + %72 = add nuw nsw i64 %"291_0.0182.i.i", 1 + %73 = shl nuw i64 1, %69 + %74 = xor i64 %73, %68 + store i64 %74, ptr %67, align 4 + %75 = getelementptr inbounds i64, ptr %.fca.0.extract81.i183.i.i, i64 %65 + %76 = load i64, ptr %75, align 4 + %.fca.1.0.0.0.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn181.i.i, 0, 0 + %.fca.1.0.0.1.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn181.i.i, 0, 1 + %.fca.1.0.0.2.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn181.i.i, 0, 2 + %77 = insertvalue { { ptr, ptr, i64 }, i64 } %.pn181.i.i, i64 %72, 1 + %78 = insertvalue { { ptr, ptr, i64 }, i64 } %77, ptr %.fca.1.0.0.0.extract.i.i.i, 0, 0 + %79 = insertvalue { { ptr, ptr, i64 }, i64 } %78, ptr %.fca.1.0.0.1.extract.i.i.i, 0, 1 + %80 = insertvalue { { ptr, ptr, i64 }, i64 } %79, i64 %.fca.1.0.0.2.extract.i.i.i, 0, 2 + tail call void @___qfree(i64 %76) + %.not.i.i = icmp eq i64 %"291_0.0182.i.i", 9 + br i1 %.not.i.i, label %43, label %__barray_check_bounds.exit.i.i.i + +__hugr__.main.1.exit: ; preds = %61, %43 + tail call void @heap_free(ptr %.fca.1.0.0.0.extract.i.i.i) + tail call void @heap_free(ptr nonnull %.fca.1.0.0.1.extract.i.i.i) + %81 = tail call i64 @teardown() + ret i64 %81 } declare void @setup(i64) local_unnamed_addr diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-flip_some/flip_some_x86_64-windows-msvc b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-flip_some/flip_some_x86_64-windows-msvc index ed0a6e2b5..9806d626b 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-flip_some/flip_some_x86_64-windows-msvc +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-flip_some/flip_some_x86_64-windows-msvc @@ -1,6 +1,6 @@ ; ModuleID = 'hugr' source_filename = "hugr" -target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" +target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128" target triple = "x86_64-windows-msvc" @res_c0.7C14CD6E.0 = private constant [13 x i8] c"\0CUSER:BOOL:c0" @@ -17,14 +17,14 @@ declare i1 @___read_future_bool(i64) local_unnamed_addr declare void @___dec_future_refcount(i64) local_unnamed_addr -declare void @print_bool(i8*, i64, i1) local_unnamed_addr +declare void @print_bool(ptr, i64, i1) local_unnamed_addr declare i64 @___qalloc() local_unnamed_addr declare void @___reset(i64) local_unnamed_addr ; Function Attrs: noreturn -declare void @panic(i32, i8*) local_unnamed_addr #0 +declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @___rxy(i64, double, double) local_unnamed_addr @@ -32,110 +32,70 @@ define i64 @qmain(i64 %0) local_unnamed_addr { entry: tail call void @setup(i64 %0) %qalloc.i.i = tail call i64 @___qalloc() - %not_max.not.i.i = icmp eq i64 %qalloc.i.i, -1 - br i1 %not_max.not.i.i, label %id_bb.i.i, label %reset_bb.i.i + %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 + br i1 %not_max.not.not.i.i, label %cond_40_case_0.i.i, label %__hugr__.__tk2_qalloc.36.exit.i -reset_bb.i.i: ; preds = %entry - tail call void @___reset(i64 %qalloc.i.i) - br label %id_bb.i.i - -id_bb.i.i: ; preds = %reset_bb.i.i, %entry - %1 = insertvalue { i1, i64 } { i1 true, i64 poison }, i64 %qalloc.i.i, 1 - %2 = select i1 %not_max.not.i.i, { i1, i64 } { i1 false, i64 poison }, { i1, i64 } %1 - %.fca.0.extract.i.i = extractvalue { i1, i64 } %2, 0 - br i1 %.fca.0.extract.i.i, label %__hugr__.__tk2_qalloc.36.exit.i, label %cond_40_case_0.i.i - -cond_40_case_0.i.i: ; preds = %id_bb.i.i - tail call void @panic(i32 1001, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @"e_No more qu.3B2EEBF0.0", i64 0, i64 0)) +cond_40_case_0.i.i: ; preds = %entry + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_qalloc.36.exit.i: ; preds = %id_bb.i.i - %.fca.1.extract.i.i = extractvalue { i1, i64 } %2, 1 - tail call void @___rxy(i64 %.fca.1.extract.i.i, double 0x400921FB54442D18, double 0.000000e+00) +__hugr__.__tk2_qalloc.36.exit.i: ; preds = %entry + tail call void @___reset(i64 %qalloc.i.i) + tail call void @___rxy(i64 %qalloc.i.i, double 0x400921FB54442D18, double 0.000000e+00) %qalloc.i101.i = tail call i64 @___qalloc() - %not_max.not.i102.i = icmp eq i64 %qalloc.i101.i, -1 - br i1 %not_max.not.i102.i, label %id_bb.i105.i, label %reset_bb.i103.i - -reset_bb.i103.i: ; preds = %__hugr__.__tk2_qalloc.36.exit.i - tail call void @___reset(i64 %qalloc.i101.i) - br label %id_bb.i105.i + %not_max.not.not.i102.i = icmp eq i64 %qalloc.i101.i, -1 + br i1 %not_max.not.not.i102.i, label %cond_54_case_0.i.i, label %__hugr__.__tk2_qalloc.50.exit.i -id_bb.i105.i: ; preds = %reset_bb.i103.i, %__hugr__.__tk2_qalloc.36.exit.i - %3 = insertvalue { i1, i64 } { i1 true, i64 poison }, i64 %qalloc.i101.i, 1 - %4 = select i1 %not_max.not.i102.i, { i1, i64 } { i1 false, i64 poison }, { i1, i64 } %3 - %.fca.0.extract.i104.i = extractvalue { i1, i64 } %4, 0 - br i1 %.fca.0.extract.i104.i, label %__hugr__.__tk2_qalloc.50.exit.i, label %cond_54_case_0.i.i - -cond_54_case_0.i.i: ; preds = %id_bb.i105.i - tail call void @panic(i32 1001, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @"e_No more qu.3B2EEBF0.0", i64 0, i64 0)) +cond_54_case_0.i.i: ; preds = %__hugr__.__tk2_qalloc.36.exit.i + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_qalloc.50.exit.i: ; preds = %id_bb.i105.i - %.fca.1.extract.i106.i = extractvalue { i1, i64 } %4, 1 - %qalloc.i107.i = tail call i64 @___qalloc() - %not_max.not.i108.i = icmp eq i64 %qalloc.i107.i, -1 - br i1 %not_max.not.i108.i, label %id_bb.i111.i, label %reset_bb.i109.i - -reset_bb.i109.i: ; preds = %__hugr__.__tk2_qalloc.50.exit.i - tail call void @___reset(i64 %qalloc.i107.i) - br label %id_bb.i111.i - -id_bb.i111.i: ; preds = %reset_bb.i109.i, %__hugr__.__tk2_qalloc.50.exit.i - %5 = insertvalue { i1, i64 } { i1 true, i64 poison }, i64 %qalloc.i107.i, 1 - %6 = select i1 %not_max.not.i108.i, { i1, i64 } { i1 false, i64 poison }, { i1, i64 } %5 - %.fca.0.extract.i110.i = extractvalue { i1, i64 } %6, 0 - br i1 %.fca.0.extract.i110.i, label %__hugr__.__tk2_qalloc.64.exit.i, label %cond_68_case_0.i.i +__hugr__.__tk2_qalloc.50.exit.i: ; preds = %__hugr__.__tk2_qalloc.36.exit.i + tail call void @___reset(i64 %qalloc.i101.i) + %qalloc.i103.i = tail call i64 @___qalloc() + %not_max.not.not.i104.i = icmp eq i64 %qalloc.i103.i, -1 + br i1 %not_max.not.not.i104.i, label %cond_68_case_0.i.i, label %__hugr__.__tk2_qalloc.64.exit.i -cond_68_case_0.i.i: ; preds = %id_bb.i111.i - tail call void @panic(i32 1001, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @"e_No more qu.3B2EEBF0.0", i64 0, i64 0)) +cond_68_case_0.i.i: ; preds = %__hugr__.__tk2_qalloc.50.exit.i + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_qalloc.64.exit.i: ; preds = %id_bb.i111.i - %.fca.1.extract.i112.i = extractvalue { i1, i64 } %6, 1 - tail call void @___rxy(i64 %.fca.1.extract.i112.i, double 0x400921FB54442D18, double 0.000000e+00) - %qalloc.i113.i = tail call i64 @___qalloc() - %not_max.not.i114.i = icmp eq i64 %qalloc.i113.i, -1 - br i1 %not_max.not.i114.i, label %id_bb.i117.i, label %reset_bb.i115.i - -reset_bb.i115.i: ; preds = %__hugr__.__tk2_qalloc.64.exit.i - tail call void @___reset(i64 %qalloc.i113.i) - br label %id_bb.i117.i - -id_bb.i117.i: ; preds = %reset_bb.i115.i, %__hugr__.__tk2_qalloc.64.exit.i - %7 = insertvalue { i1, i64 } { i1 true, i64 poison }, i64 %qalloc.i113.i, 1 - %8 = select i1 %not_max.not.i114.i, { i1, i64 } { i1 false, i64 poison }, { i1, i64 } %7 - %.fca.0.extract.i116.i = extractvalue { i1, i64 } %8, 0 - br i1 %.fca.0.extract.i116.i, label %__hugr__.main.1.exit, label %cond_82_case_0.i.i - -cond_82_case_0.i.i: ; preds = %id_bb.i117.i - tail call void @panic(i32 1001, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @"e_No more qu.3B2EEBF0.0", i64 0, i64 0)) +__hugr__.__tk2_qalloc.64.exit.i: ; preds = %__hugr__.__tk2_qalloc.50.exit.i + tail call void @___reset(i64 %qalloc.i103.i) + tail call void @___rxy(i64 %qalloc.i103.i, double 0x400921FB54442D18, double 0.000000e+00) + %qalloc.i105.i = tail call i64 @___qalloc() + %not_max.not.not.i106.i = icmp eq i64 %qalloc.i105.i, -1 + br i1 %not_max.not.not.i106.i, label %cond_82_case_0.i.i, label %__hugr__.main.1.exit + +cond_82_case_0.i.i: ; preds = %__hugr__.__tk2_qalloc.64.exit.i + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.main.1.exit: ; preds = %id_bb.i117.i - %.fca.1.extract.i118.i = extractvalue { i1, i64 } %8, 1 - %lazy_measure.i = tail call i64 @___lazy_measure(i64 %.fca.1.extract.i.i) - tail call void @___qfree(i64 %.fca.1.extract.i.i) +__hugr__.main.1.exit: ; preds = %__hugr__.__tk2_qalloc.64.exit.i + tail call void @___reset(i64 %qalloc.i105.i) + %lazy_measure.i = tail call i64 @___lazy_measure(i64 %qalloc.i.i) + tail call void @___qfree(i64 %qalloc.i.i) %read_bool.i = tail call i1 @___read_future_bool(i64 %lazy_measure.i) tail call void @___dec_future_refcount(i64 %lazy_measure.i) - tail call void @print_bool(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @res_c0.7C14CD6E.0, i64 0, i64 0), i64 12, i1 %read_bool.i) - %lazy_measure22.i = tail call i64 @___lazy_measure(i64 %.fca.1.extract.i106.i) - tail call void @___qfree(i64 %.fca.1.extract.i106.i) + tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool.i) + %lazy_measure22.i = tail call i64 @___lazy_measure(i64 %qalloc.i101.i) + tail call void @___qfree(i64 %qalloc.i101.i) %read_bool35.i = tail call i1 @___read_future_bool(i64 %lazy_measure22.i) tail call void @___dec_future_refcount(i64 %lazy_measure22.i) - tail call void @print_bool(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @res_c1.1F7A6571.0, i64 0, i64 0), i64 12, i1 %read_bool35.i) - %lazy_measure44.i = tail call i64 @___lazy_measure(i64 %.fca.1.extract.i112.i) - tail call void @___qfree(i64 %.fca.1.extract.i112.i) + tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool35.i) + %lazy_measure44.i = tail call i64 @___lazy_measure(i64 %qalloc.i103.i) + tail call void @___qfree(i64 %qalloc.i103.i) %read_bool57.i = tail call i1 @___read_future_bool(i64 %lazy_measure44.i) tail call void @___dec_future_refcount(i64 %lazy_measure44.i) - tail call void @print_bool(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @res_c2.60825383.0, i64 0, i64 0), i64 12, i1 %read_bool57.i) - tail call void @___rxy(i64 %.fca.1.extract.i118.i, double 0x400921FB54442D18, double 0.000000e+00) - %lazy_measure67.i = tail call i64 @___lazy_measure(i64 %.fca.1.extract.i118.i) - tail call void @___qfree(i64 %.fca.1.extract.i118.i) + tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool57.i) + tail call void @___rxy(i64 %qalloc.i105.i, double 0x400921FB54442D18, double 0.000000e+00) + %lazy_measure67.i = tail call i64 @___lazy_measure(i64 %qalloc.i105.i) + tail call void @___qfree(i64 %qalloc.i105.i) %read_bool80.i = tail call i1 @___read_future_bool(i64 %lazy_measure67.i) tail call void @___dec_future_refcount(i64 %lazy_measure67.i) - tail call void @print_bool(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @res_c3.B223E16D.0, i64 0, i64 0), i64 12, i1 %read_bool80.i) - %9 = tail call i64 @teardown() - ret i64 %9 + tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool80.i) + %1 = tail call i64 @teardown() + ret i64 %1 } declare void @setup(i64) local_unnamed_addr diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-measure_qb_array/measure_qb_array_x86_64-windows-msvc b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-measure_qb_array/measure_qb_array_x86_64-windows-msvc index 897d7f3af..e574e3ae1 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-measure_qb_array/measure_qb_array_x86_64-windows-msvc +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-measure_qb_array/measure_qb_array_x86_64-windows-msvc @@ -1,6 +1,6 @@ ; ModuleID = 'hugr' source_filename = "hugr" -target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" +target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128" target triple = "x86_64-windows-msvc" @"e_Array alre.5A300C2A.0" = private constant [57 x i8] c"8EXIT:INT:Array already contains an element at this index" @@ -8,12 +8,12 @@ target triple = "x86_64-windows-msvc" @"e_Array cont.EFA5AC45.0" = private constant [70 x i8] c"EEXIT:INT:Array contains non-borrowed elements and cannot be discarded" @"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." -declare i8* @heap_alloc(i64) local_unnamed_addr +declare ptr @heap_alloc(i64) local_unnamed_addr ; Function Attrs: noreturn -declare void @panic(i32, i8*) local_unnamed_addr #0 +declare void @panic(i32, ptr) local_unnamed_addr #0 -declare void @heap_free(i8*) local_unnamed_addr +declare void @heap_free(ptr) local_unnamed_addr declare void @___dec_future_refcount(i64) local_unnamed_addr @@ -30,279 +30,600 @@ declare void @___reset(i64) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr { entry: tail call void @setup(i64 %0) - %1 = tail call i8* @heap_alloc(i64 80) - %2 = bitcast i8* %1 to i64* - %3 = tail call i8* @heap_alloc(i64 8) - %4 = bitcast i8* %3 to i64* - store i64 -1, i64* %4, align 1 - br label %cond_20_case_1.i - -cond_20_case_1.i: ; preds = %cond_exit_20.i, %entry - %"15_0.sroa.0.0294.i" = phi i64 [ 0, %entry ], [ %5, %cond_exit_20.i ] - %5 = add nuw nsw i64 %"15_0.sroa.0.0294.i", 1 + %1 = tail call ptr @heap_alloc(i64 80) + %2 = tail call ptr @heap_alloc(i64 8) + store i64 -1, ptr %2, align 1 %qalloc.i.i = tail call i64 @___qalloc() - %not_max.not.i.i = icmp eq i64 %qalloc.i.i, -1 - br i1 %not_max.not.i.i, label %id_bb.i.i, label %reset_bb.i.i + %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 + br i1 %not_max.not.not.i.i, label %cond_236_case_0.i.i, label %__barray_check_bounds.exit.i -reset_bb.i.i: ; preds = %cond_20_case_1.i - tail call void @___reset(i64 %qalloc.i.i) - br label %id_bb.i.i - -id_bb.i.i: ; preds = %reset_bb.i.i, %cond_20_case_1.i - %6 = insertvalue { i1, i64 } { i1 true, i64 poison }, i64 %qalloc.i.i, 1 - %7 = select i1 %not_max.not.i.i, { i1, i64 } { i1 false, i64 poison }, { i1, i64 } %6 - %.fca.0.extract.i.i = extractvalue { i1, i64 } %7, 0 - br i1 %.fca.0.extract.i.i, label %__barray_check_bounds.exit.i, label %cond_236_case_0.i.i - -cond_236_case_0.i.i: ; preds = %id_bb.i.i - tail call void @panic(i32 1001, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @"e_No more qu.3B2EEBF0.0", i64 0, i64 0)) +cond_236_case_0.i.i: ; preds = %cond_exit_20.i.8, %cond_exit_20.i.7, %cond_exit_20.i.6, %cond_exit_20.i.5, %cond_exit_20.i.4, %cond_exit_20.i.3, %cond_exit_20.i.2, %cond_exit_20.i.1, %cond_exit_20.i, %entry + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__barray_check_bounds.exit.i: ; preds = %id_bb.i.i - %8 = lshr i64 %"15_0.sroa.0.0294.i", 6 - %9 = getelementptr inbounds i64, i64* %4, i64 %8 - %10 = load i64, i64* %9, align 4 - %11 = shl nuw nsw i64 1, %"15_0.sroa.0.0294.i" - %12 = and i64 %10, %11 - %.not.i.i = icmp eq i64 %12, 0 - br i1 %.not.i.i, label %panic.i.i, label %cond_exit_20.i - -panic.i.i: ; preds = %__barray_check_bounds.exit.i - tail call void @panic(i32 1002, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @"e_Array alre.5A300C2A.0", i64 0, i64 0)) +__barray_check_bounds.exit.i: ; preds = %entry + tail call void @___reset(i64 %qalloc.i.i) + %3 = load i64, ptr %2, align 4 + %4 = trunc i64 %3 to i1 + br i1 %4, label %cond_exit_20.i, label %panic.i.i + +panic.i.i: ; preds = %__barray_check_bounds.exit.i.9, %__barray_check_bounds.exit.i.8, %__barray_check_bounds.exit.i.7, %__barray_check_bounds.exit.i.6, %__barray_check_bounds.exit.i.5, %__barray_check_bounds.exit.i.4, %__barray_check_bounds.exit.i.3, %__barray_check_bounds.exit.i.2, %__barray_check_bounds.exit.i.1, %__barray_check_bounds.exit.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable cond_exit_20.i: ; preds = %__barray_check_bounds.exit.i - %.fca.1.extract.i.i = extractvalue { i1, i64 } %7, 1 - %13 = xor i64 %10, %11 - store i64 %13, i64* %9, align 4 - %14 = getelementptr inbounds i64, i64* %2, i64 %"15_0.sroa.0.0294.i" - store i64 %.fca.1.extract.i.i, i64* %14, align 4 - %exitcond.not.i = icmp eq i64 %5, 10 - br i1 %exitcond.not.i, label %loop_out.i, label %cond_20_case_1.i - -loop_out.i: ; preds = %cond_exit_20.i - %15 = load i64, i64* %4, align 4 - %16 = and i64 %15, 1 - %.not.i258.i = icmp eq i64 %16, 0 - br i1 %.not.i258.i, label %__barray_mask_borrow.exit.i, label %panic.i259.i - -panic.i259.i: ; preds = %loop_out.i - tail call void @panic(i32 1002, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @"e_Array elem.E746B1A3.0", i64 0, i64 0)) + %5 = and i64 %3, -2 + store i64 %5, ptr %2, align 4 + store i64 %qalloc.i.i, ptr %1, align 4 + %qalloc.i.i.1 = tail call i64 @___qalloc() + %not_max.not.not.i.i.1 = icmp eq i64 %qalloc.i.i.1, -1 + br i1 %not_max.not.not.i.i.1, label %cond_236_case_0.i.i, label %__barray_check_bounds.exit.i.1 + +__barray_check_bounds.exit.i.1: ; preds = %cond_exit_20.i + tail call void @___reset(i64 %qalloc.i.i.1) + %6 = load i64, ptr %2, align 4 + %7 = and i64 %6, 2 + %.not = icmp eq i64 %7, 0 + br i1 %.not, label %panic.i.i, label %cond_exit_20.i.1 + +cond_exit_20.i.1: ; preds = %__barray_check_bounds.exit.i.1 + %8 = and i64 %6, -3 + store i64 %8, ptr %2, align 4 + %9 = getelementptr inbounds nuw i8, ptr %1, i64 8 + store i64 %qalloc.i.i.1, ptr %9, align 4 + %qalloc.i.i.2 = tail call i64 @___qalloc() + %not_max.not.not.i.i.2 = icmp eq i64 %qalloc.i.i.2, -1 + br i1 %not_max.not.not.i.i.2, label %cond_236_case_0.i.i, label %__barray_check_bounds.exit.i.2 + +__barray_check_bounds.exit.i.2: ; preds = %cond_exit_20.i.1 + tail call void @___reset(i64 %qalloc.i.i.2) + %10 = load i64, ptr %2, align 4 + %11 = and i64 %10, 4 + %.not1 = icmp eq i64 %11, 0 + br i1 %.not1, label %panic.i.i, label %cond_exit_20.i.2 + +cond_exit_20.i.2: ; preds = %__barray_check_bounds.exit.i.2 + %12 = and i64 %10, -5 + store i64 %12, ptr %2, align 4 + %13 = getelementptr inbounds nuw i8, ptr %1, i64 16 + store i64 %qalloc.i.i.2, ptr %13, align 4 + %qalloc.i.i.3 = tail call i64 @___qalloc() + %not_max.not.not.i.i.3 = icmp eq i64 %qalloc.i.i.3, -1 + br i1 %not_max.not.not.i.i.3, label %cond_236_case_0.i.i, label %__barray_check_bounds.exit.i.3 + +__barray_check_bounds.exit.i.3: ; preds = %cond_exit_20.i.2 + tail call void @___reset(i64 %qalloc.i.i.3) + %14 = load i64, ptr %2, align 4 + %15 = and i64 %14, 8 + %.not2 = icmp eq i64 %15, 0 + br i1 %.not2, label %panic.i.i, label %cond_exit_20.i.3 + +cond_exit_20.i.3: ; preds = %__barray_check_bounds.exit.i.3 + %16 = and i64 %14, -9 + store i64 %16, ptr %2, align 4 + %17 = getelementptr inbounds nuw i8, ptr %1, i64 24 + store i64 %qalloc.i.i.3, ptr %17, align 4 + %qalloc.i.i.4 = tail call i64 @___qalloc() + %not_max.not.not.i.i.4 = icmp eq i64 %qalloc.i.i.4, -1 + br i1 %not_max.not.not.i.i.4, label %cond_236_case_0.i.i, label %__barray_check_bounds.exit.i.4 + +__barray_check_bounds.exit.i.4: ; preds = %cond_exit_20.i.3 + tail call void @___reset(i64 %qalloc.i.i.4) + %18 = load i64, ptr %2, align 4 + %19 = and i64 %18, 16 + %.not3 = icmp eq i64 %19, 0 + br i1 %.not3, label %panic.i.i, label %cond_exit_20.i.4 + +cond_exit_20.i.4: ; preds = %__barray_check_bounds.exit.i.4 + %20 = and i64 %18, -17 + store i64 %20, ptr %2, align 4 + %21 = getelementptr inbounds nuw i8, ptr %1, i64 32 + store i64 %qalloc.i.i.4, ptr %21, align 4 + %qalloc.i.i.5 = tail call i64 @___qalloc() + %not_max.not.not.i.i.5 = icmp eq i64 %qalloc.i.i.5, -1 + br i1 %not_max.not.not.i.i.5, label %cond_236_case_0.i.i, label %__barray_check_bounds.exit.i.5 + +__barray_check_bounds.exit.i.5: ; preds = %cond_exit_20.i.4 + tail call void @___reset(i64 %qalloc.i.i.5) + %22 = load i64, ptr %2, align 4 + %23 = and i64 %22, 32 + %.not4 = icmp eq i64 %23, 0 + br i1 %.not4, label %panic.i.i, label %cond_exit_20.i.5 + +cond_exit_20.i.5: ; preds = %__barray_check_bounds.exit.i.5 + %24 = and i64 %22, -33 + store i64 %24, ptr %2, align 4 + %25 = getelementptr inbounds nuw i8, ptr %1, i64 40 + store i64 %qalloc.i.i.5, ptr %25, align 4 + %qalloc.i.i.6 = tail call i64 @___qalloc() + %not_max.not.not.i.i.6 = icmp eq i64 %qalloc.i.i.6, -1 + br i1 %not_max.not.not.i.i.6, label %cond_236_case_0.i.i, label %__barray_check_bounds.exit.i.6 + +__barray_check_bounds.exit.i.6: ; preds = %cond_exit_20.i.5 + tail call void @___reset(i64 %qalloc.i.i.6) + %26 = load i64, ptr %2, align 4 + %27 = and i64 %26, 64 + %.not5 = icmp eq i64 %27, 0 + br i1 %.not5, label %panic.i.i, label %cond_exit_20.i.6 + +cond_exit_20.i.6: ; preds = %__barray_check_bounds.exit.i.6 + %28 = and i64 %26, -65 + store i64 %28, ptr %2, align 4 + %29 = getelementptr inbounds nuw i8, ptr %1, i64 48 + store i64 %qalloc.i.i.6, ptr %29, align 4 + %qalloc.i.i.7 = tail call i64 @___qalloc() + %not_max.not.not.i.i.7 = icmp eq i64 %qalloc.i.i.7, -1 + br i1 %not_max.not.not.i.i.7, label %cond_236_case_0.i.i, label %__barray_check_bounds.exit.i.7 + +__barray_check_bounds.exit.i.7: ; preds = %cond_exit_20.i.6 + tail call void @___reset(i64 %qalloc.i.i.7) + %30 = load i64, ptr %2, align 4 + %31 = and i64 %30, 128 + %.not6 = icmp eq i64 %31, 0 + br i1 %.not6, label %panic.i.i, label %cond_exit_20.i.7 + +cond_exit_20.i.7: ; preds = %__barray_check_bounds.exit.i.7 + %32 = and i64 %30, -129 + store i64 %32, ptr %2, align 4 + %33 = getelementptr inbounds nuw i8, ptr %1, i64 56 + store i64 %qalloc.i.i.7, ptr %33, align 4 + %qalloc.i.i.8 = tail call i64 @___qalloc() + %not_max.not.not.i.i.8 = icmp eq i64 %qalloc.i.i.8, -1 + br i1 %not_max.not.not.i.i.8, label %cond_236_case_0.i.i, label %__barray_check_bounds.exit.i.8 + +__barray_check_bounds.exit.i.8: ; preds = %cond_exit_20.i.7 + tail call void @___reset(i64 %qalloc.i.i.8) + %34 = load i64, ptr %2, align 4 + %35 = and i64 %34, 256 + %.not7 = icmp eq i64 %35, 0 + br i1 %.not7, label %panic.i.i, label %cond_exit_20.i.8 + +cond_exit_20.i.8: ; preds = %__barray_check_bounds.exit.i.8 + %36 = and i64 %34, -257 + store i64 %36, ptr %2, align 4 + %37 = getelementptr inbounds nuw i8, ptr %1, i64 64 + store i64 %qalloc.i.i.8, ptr %37, align 4 + %qalloc.i.i.9 = tail call i64 @___qalloc() + %not_max.not.not.i.i.9 = icmp eq i64 %qalloc.i.i.9, -1 + br i1 %not_max.not.not.i.i.9, label %cond_236_case_0.i.i, label %__barray_check_bounds.exit.i.9 + +__barray_check_bounds.exit.i.9: ; preds = %cond_exit_20.i.8 + tail call void @___reset(i64 %qalloc.i.i.9) + %38 = load i64, ptr %2, align 4 + %39 = and i64 %38, 512 + %.not8 = icmp eq i64 %39, 0 + br i1 %.not8, label %panic.i.i, label %cond_exit_20.i.9 + +cond_exit_20.i.9: ; preds = %__barray_check_bounds.exit.i.9 + %40 = and i64 %38, -513 + store i64 %40, ptr %2, align 4 + %41 = getelementptr inbounds nuw i8, ptr %1, i64 72 + store i64 %qalloc.i.i.9, ptr %41, align 4 + %"128.fca.0.insert.i" = insertvalue { ptr, ptr, i64 } poison, ptr %1, 0 + %"128.fca.1.insert.i" = insertvalue { ptr, ptr, i64 } %"128.fca.0.insert.i", ptr %2, 1 + %"128.fca.2.insert.i" = insertvalue { ptr, ptr, i64 } %"128.fca.1.insert.i", i64 0, 2 + %42 = load i64, ptr %2, align 4 + %43 = trunc i64 %42 to i1 + br i1 %43, label %panic.i257.i, label %__barray_mask_borrow.exit.i + +panic.i257.i: ; preds = %cond_exit_20.i.9 + tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_mask_borrow.exit.i: ; preds = %loop_out.i - %17 = xor i64 %15, 1 - store i64 %17, i64* %4, align 4 - %18 = load i64, i64* %2, align 4 - tail call void @___rxy(i64 %18, double 0x400921FB54442D18, double 0.000000e+00) - %19 = load i64, i64* %4, align 4 - %20 = and i64 %19, 1 - %.not.i260.i = icmp eq i64 %20, 0 - br i1 %.not.i260.i, label %panic.i261.i, label %__barray_mask_return.exit262.i - -panic.i261.i: ; preds = %__barray_mask_borrow.exit.i - tail call void @panic(i32 1002, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @"e_Array alre.5A300C2A.0", i64 0, i64 0)) - unreachable +__barray_mask_borrow.exit.i: ; preds = %cond_exit_20.i.9 + %44 = or disjoint i64 %42, 1 + store i64 %44, ptr %2, align 4 + %45 = load i64, ptr %1, align 4 + tail call void @___rxy(i64 %45, double 0x400921FB54442D18, double 0.000000e+00) + %46 = load i64, ptr %2, align 4 + %47 = trunc i64 %46 to i1 + br i1 %47, label %__barray_mask_return.exit259.i, label %panic.i258.i -__barray_mask_return.exit262.i: ; preds = %__barray_mask_borrow.exit.i - %21 = xor i64 %19, 1 - store i64 %21, i64* %4, align 4 - store i64 %18, i64* %2, align 4 - %22 = load i64, i64* %4, align 4 - %23 = and i64 %22, 4 - %.not.i263.i = icmp eq i64 %23, 0 - br i1 %.not.i263.i, label %__barray_mask_borrow.exit265.i, label %panic.i264.i - -panic.i264.i: ; preds = %__barray_mask_return.exit262.i - tail call void @panic(i32 1002, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @"e_Array elem.E746B1A3.0", i64 0, i64 0)) +panic.i258.i: ; preds = %__barray_mask_borrow.exit.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_mask_borrow.exit265.i: ; preds = %__barray_mask_return.exit262.i - %24 = xor i64 %22, 4 - store i64 %24, i64* %4, align 4 - %25 = getelementptr inbounds i8, i8* %1, i64 16 - %26 = bitcast i8* %25 to i64* - %27 = load i64, i64* %26, align 4 - tail call void @___rxy(i64 %27, double 0x400921FB54442D18, double 0.000000e+00) - %28 = load i64, i64* %4, align 4 - %29 = and i64 %28, 4 - %.not.i266.i = icmp eq i64 %29, 0 - br i1 %.not.i266.i, label %panic.i267.i, label %__barray_mask_return.exit268.i - -panic.i267.i: ; preds = %__barray_mask_borrow.exit265.i - tail call void @panic(i32 1002, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @"e_Array alre.5A300C2A.0", i64 0, i64 0)) +__barray_mask_return.exit259.i: ; preds = %__barray_mask_borrow.exit.i + %48 = and i64 %46, -2 + store i64 %48, ptr %2, align 4 + store i64 %45, ptr %1, align 4 + %49 = load i64, ptr %2, align 4 + %50 = and i64 %49, 4 + %.not.i = icmp eq i64 %50, 0 + br i1 %.not.i, label %__barray_mask_borrow.exit261.i, label %panic.i260.i + +panic.i260.i: ; preds = %__barray_mask_return.exit259.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_mask_return.exit268.i: ; preds = %__barray_mask_borrow.exit265.i - %30 = xor i64 %28, 4 - store i64 %30, i64* %4, align 4 - store i64 %27, i64* %26, align 4 - %31 = load i64, i64* %4, align 4 - %32 = and i64 %31, 8 - %.not.i269.i = icmp eq i64 %32, 0 - br i1 %.not.i269.i, label %__barray_mask_borrow.exit271.i, label %panic.i270.i - -panic.i270.i: ; preds = %__barray_mask_return.exit268.i - tail call void @panic(i32 1002, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @"e_Array elem.E746B1A3.0", i64 0, i64 0)) +__barray_mask_borrow.exit261.i: ; preds = %__barray_mask_return.exit259.i + %51 = or disjoint i64 %49, 4 + store i64 %51, ptr %2, align 4 + %52 = load i64, ptr %13, align 4 + tail call void @___rxy(i64 %52, double 0x400921FB54442D18, double 0.000000e+00) + %53 = load i64, ptr %2, align 4 + %54 = and i64 %53, 4 + %.not289.i = icmp eq i64 %54, 0 + br i1 %.not289.i, label %panic.i262.i, label %__barray_mask_return.exit263.i + +panic.i262.i: ; preds = %__barray_mask_borrow.exit261.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_mask_borrow.exit271.i: ; preds = %__barray_mask_return.exit268.i - %33 = xor i64 %31, 8 - store i64 %33, i64* %4, align 4 - %34 = getelementptr inbounds i8, i8* %1, i64 24 - %35 = bitcast i8* %34 to i64* - %36 = load i64, i64* %35, align 4 - tail call void @___rxy(i64 %36, double 0x400921FB54442D18, double 0.000000e+00) - %37 = load i64, i64* %4, align 4 - %38 = and i64 %37, 8 - %.not.i272.i = icmp eq i64 %38, 0 - br i1 %.not.i272.i, label %panic.i273.i, label %__barray_mask_return.exit274.i - -panic.i273.i: ; preds = %__barray_mask_borrow.exit271.i - tail call void @panic(i32 1002, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @"e_Array alre.5A300C2A.0", i64 0, i64 0)) +__barray_mask_return.exit263.i: ; preds = %__barray_mask_borrow.exit261.i + %55 = and i64 %53, -5 + store i64 %55, ptr %2, align 4 + store i64 %52, ptr %13, align 4 + %56 = load i64, ptr %2, align 4 + %57 = and i64 %56, 8 + %.not290.i = icmp eq i64 %57, 0 + br i1 %.not290.i, label %__barray_mask_borrow.exit265.i, label %panic.i264.i + +panic.i264.i: ; preds = %__barray_mask_return.exit263.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_mask_return.exit274.i: ; preds = %__barray_mask_borrow.exit271.i - %39 = xor i64 %37, 8 - store i64 %39, i64* %4, align 4 - store i64 %36, i64* %35, align 4 - %40 = load i64, i64* %4, align 4 - %41 = and i64 %40, 512 - %.not.i275.i = icmp eq i64 %41, 0 - br i1 %.not.i275.i, label %__barray_mask_borrow.exit277.i, label %panic.i276.i - -panic.i276.i: ; preds = %__barray_mask_return.exit274.i - tail call void @panic(i32 1002, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @"e_Array elem.E746B1A3.0", i64 0, i64 0)) +__barray_mask_borrow.exit265.i: ; preds = %__barray_mask_return.exit263.i + %58 = or disjoint i64 %56, 8 + store i64 %58, ptr %2, align 4 + %59 = load i64, ptr %17, align 4 + tail call void @___rxy(i64 %59, double 0x400921FB54442D18, double 0.000000e+00) + %60 = load i64, ptr %2, align 4 + %61 = and i64 %60, 8 + %.not291.i = icmp eq i64 %61, 0 + br i1 %.not291.i, label %panic.i266.i, label %__barray_mask_return.exit267.i + +panic.i266.i: ; preds = %__barray_mask_borrow.exit265.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_mask_borrow.exit277.i: ; preds = %__barray_mask_return.exit274.i - %42 = xor i64 %40, 512 - store i64 %42, i64* %4, align 4 - %43 = getelementptr inbounds i8, i8* %1, i64 72 - %44 = bitcast i8* %43 to i64* - %45 = load i64, i64* %44, align 4 - tail call void @___rxy(i64 %45, double 0x400921FB54442D18, double 0.000000e+00) - %46 = load i64, i64* %4, align 4 - %47 = and i64 %46, 512 - %.not.i278.i = icmp eq i64 %47, 0 - br i1 %.not.i278.i, label %panic.i279.i, label %__barray_mask_return.exit280.i +__barray_mask_return.exit267.i: ; preds = %__barray_mask_borrow.exit265.i + %62 = and i64 %60, -9 + store i64 %62, ptr %2, align 4 + store i64 %59, ptr %17, align 4 + %63 = load i64, ptr %2, align 4 + %64 = and i64 %63, 512 + %.not292.i = icmp eq i64 %64, 0 + br i1 %.not292.i, label %__barray_mask_borrow.exit269.i, label %panic.i268.i + +panic.i268.i: ; preds = %__barray_mask_return.exit267.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") + unreachable -panic.i279.i: ; preds = %__barray_mask_borrow.exit277.i - tail call void @panic(i32 1002, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @"e_Array alre.5A300C2A.0", i64 0, i64 0)) +__barray_mask_borrow.exit269.i: ; preds = %__barray_mask_return.exit267.i + %65 = or disjoint i64 %63, 512 + store i64 %65, ptr %2, align 4 + %66 = load i64, ptr %41, align 4 + tail call void @___rxy(i64 %66, double 0x400921FB54442D18, double 0.000000e+00) + %67 = load i64, ptr %2, align 4 + %68 = and i64 %67, 512 + %.not293.i = icmp eq i64 %68, 0 + br i1 %.not293.i, label %panic.i270.i, label %__barray_mask_return.exit271.i + +panic.i270.i: ; preds = %__barray_mask_borrow.exit269.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_mask_return.exit280.i: ; preds = %__barray_mask_borrow.exit277.i - %48 = xor i64 %46, 512 - store i64 %48, i64* %4, align 4 - store i64 %45, i64* %44, align 4 - %49 = tail call i8* @heap_alloc(i64 240) - %50 = bitcast i8* %49 to { i1, i64, i1 }* - %51 = tail call i8* @heap_alloc(i64 8) - %52 = bitcast i8* %51 to i64* - store i64 -1, i64* %52, align 1 - br label %56 - -mask_block_ok.i.i.i.i: ; preds = %cond_exit_353.i.i - %53 = load i64, i64* %4, align 4 - %54 = or i64 %53, -1024 - store i64 %54, i64* %4, align 4 - %55 = icmp eq i64 %54, -1 - br i1 %55, label %"__hugr__.$measure_array$$n(10).277.exit.i", label %mask_block_err.i.i.i.i - -"__hugr__.$measure_array$$n(10).277.exit.i": ; preds = %mask_block_ok.i.i.i.i - tail call void @heap_free(i8* nonnull %1) - tail call void @heap_free(i8* nonnull %3) - br label %__barray_check_bounds.exit283.i +__barray_mask_return.exit271.i: ; preds = %__barray_mask_borrow.exit269.i + %69 = and i64 %67, -513 + store i64 %69, ptr %2, align 4 + store i64 %66, ptr %41, align 4 + %70 = insertvalue { { ptr, ptr, i64 }, i64 } poison, { ptr, ptr, i64 } %"128.fca.2.insert.i", 0 + %71 = tail call ptr @heap_alloc(i64 240) + %72 = tail call ptr @heap_alloc(i64 8) + store i64 -1, ptr %72, align 1 + br label %__barray_check_bounds.exit.i.i.i + +73: ; preds = %loop_body.i.i + %74 = lshr i64 %.fca.2.extract83.i.i.i, 6 + %75 = getelementptr i64, ptr %.fca.1.extract82.i.i.i, i64 %74 + %76 = load i64, ptr %75, align 4 + %77 = and i64 %.fca.2.extract83.i.i.i, 63 + %78 = sub nuw nsw i64 64, %77 + %79 = lshr i64 -1, %78 + %80 = icmp eq i64 %77, 0 + %81 = select i1 %80, i64 0, i64 %79 + %82 = or i64 %76, %81 + store i64 %82, ptr %75, align 4 + %last_valid.i.i.i.i = add i64 %.fca.2.extract83.i.i.i, 9 + %83 = lshr i64 %last_valid.i.i.i.i, 6 + %84 = getelementptr inbounds nuw i64, ptr %.fca.1.extract82.i.i.i, i64 %83 + %85 = load i64, ptr %84, align 4 + %86 = and i64 %last_valid.i.i.i.i, 63 + %87 = shl nsw i64 -2, %86 + %88 = icmp eq i64 %86, 63 + %89 = select i1 %88, i64 0, i64 %87 + %90 = or i64 %85, %89 + store i64 %90, ptr %84, align 4 + %reass.sub.i.i.i.i = sub nsw i64 %83, %74 + %.not.i.i.i.i = icmp eq i64 %reass.sub.i.i.i.i, -1 + br i1 %.not.i.i.i.i, label %"__hugr__.$measure_array$$n(10).277.exit.i", label %mask_block_ok.i.i.i.i + +91: ; preds = %mask_block_ok.i.i.i.i + %92 = add nuw i64 %.02.i.i.i.i, 1 + %exitcond.not.i.i.i.i = icmp eq i64 %.02.i.i.i.i, %reass.sub.i.i.i.i + br i1 %exitcond.not.i.i.i.i, label %"__hugr__.$measure_array$$n(10).277.exit.i", label %mask_block_ok.i.i.i.i + +mask_block_ok.i.i.i.i: ; preds = %73, %91 + %.02.i.i.i.i = phi i64 [ %92, %91 ], [ 0, %73 ] + %gep.i.i.i.i = getelementptr i64, ptr %75, i64 %.02.i.i.i.i + %93 = load i64, ptr %gep.i.i.i.i, align 4 + %94 = icmp eq i64 %93, -1 + br i1 %94, label %91, label %mask_block_err.i.i.i.i mask_block_err.i.i.i.i: ; preds = %mask_block_ok.i.i.i.i - tail call void @panic(i32 1002, i8* getelementptr inbounds ([70 x i8], [70 x i8]* @"e_Array cont.EFA5AC45.0", i64 0, i64 0)) + tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -56: ; preds = %cond_exit_353.i.i, %__barray_mask_return.exit280.i - %"303_0.sroa.15.0.i296.i" = phi i64 [ 0, %__barray_mask_return.exit280.i ], [ %57, %cond_exit_353.i.i ] - %57 = add nuw nsw i64 %"303_0.sroa.15.0.i296.i", 1 - %58 = lshr i64 %"303_0.sroa.15.0.i296.i", 6 - %59 = getelementptr inbounds i64, i64* %4, i64 %58 - %60 = load i64, i64* %59, align 4 - %61 = shl nuw nsw i64 1, %"303_0.sroa.15.0.i296.i" - %62 = and i64 %60, %61 - %.not.i99.i.i.i = icmp eq i64 %62, 0 - br i1 %.not.i99.i.i.i, label %__barray_check_bounds.exit.i.i, label %panic.i.i.i.i - -panic.i.i.i.i: ; preds = %56 - tail call void @panic(i32 1002, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @"e_Array elem.E746B1A3.0", i64 0, i64 0)) +__barray_check_bounds.exit.i.i.i: ; preds = %loop_body.i.i, %__barray_mask_return.exit271.i + %.fca.2.extract83.i187.i.i = phi i64 [ 0, %__barray_mask_return.exit271.i ], [ %.fca.2.extract83.i.i.i, %loop_body.i.i ] + %.fca.1.extract82.i186.i.i = phi ptr [ %2, %__barray_mask_return.exit271.i ], [ %.fca.1.extract82.i.i.i, %loop_body.i.i ] + %.fca.0.extract81.i185.i.i = phi ptr [ %1, %__barray_mask_return.exit271.i ], [ %.fca.0.extract81.i.i.i, %loop_body.i.i ] + %"303_0.sroa.15.0184.i.i" = phi i64 [ 0, %__barray_mask_return.exit271.i ], [ %95, %loop_body.i.i ] + %.pn165183.i.i = phi { { ptr, ptr, i64 }, i64 } [ %70, %__barray_mask_return.exit271.i ], [ %110, %loop_body.i.i ] + %95 = add nuw nsw i64 %"303_0.sroa.15.0184.i.i", 1 + %96 = add i64 %"303_0.sroa.15.0184.i.i", %.fca.2.extract83.i187.i.i + %97 = lshr i64 %96, 6 + %98 = getelementptr inbounds nuw i64, ptr %.fca.1.extract82.i186.i.i, i64 %97 + %99 = load i64, ptr %98, align 4 + %100 = and i64 %96, 63 + %101 = lshr i64 %99, %100 + %102 = trunc i64 %101 to i1 + br i1 %102, label %panic.i.i.i.i, label %__barray_check_bounds.exit.i.i + +panic.i.i.i.i: ; preds = %__barray_check_bounds.exit.i.i.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_check_bounds.exit.i.i: ; preds = %56 - %63 = xor i64 %60, %61 - store i64 %63, i64* %59, align 4 - %64 = getelementptr inbounds i64, i64* %2, i64 %"303_0.sroa.15.0.i296.i" - %65 = load i64, i64* %64, align 4 - %lazy_measure.i.i = tail call i64 @___lazy_measure(i64 %65) - tail call void @___qfree(i64 %65) - %66 = getelementptr inbounds i64, i64* %52, i64 %58 - %67 = load i64, i64* %66, align 4 - %68 = and i64 %67, %61 - %.not.i.i.i = icmp eq i64 %68, 0 - br i1 %.not.i.i.i, label %panic.i.i.i, label %cond_exit_353.i.i +__barray_check_bounds.exit.i.i: ; preds = %__barray_check_bounds.exit.i.i.i + %103 = shl nuw i64 1, %100 + %104 = xor i64 %103, %99 + store i64 %104, ptr %98, align 4 + %105 = getelementptr inbounds i64, ptr %.fca.0.extract81.i185.i.i, i64 %96 + %106 = load i64, ptr %105, align 4 + %lazy_measure.i.i = tail call i64 @___lazy_measure(i64 %106) + tail call void @___qfree(i64 %106) + %107 = load i64, ptr %72, align 4 + %108 = lshr i64 %107, %"303_0.sroa.15.0184.i.i" + %109 = trunc i64 %108 to i1 + br i1 %109, label %loop_body.i.i, label %panic.i.i.i panic.i.i.i: ; preds = %__barray_check_bounds.exit.i.i - tail call void @panic(i32 1002, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @"e_Array alre.5A300C2A.0", i64 0, i64 0)) + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -cond_exit_353.i.i: ; preds = %__barray_check_bounds.exit.i.i - %"367_054.fca.1.insert.i.i" = insertvalue { i1, i64, i1 } { i1 true, i64 poison, i1 poison }, i64 %lazy_measure.i.i, 1 - %69 = xor i64 %67, %61 - store i64 %69, i64* %66, align 4 - %70 = getelementptr inbounds { i1, i64, i1 }, { i1, i64, i1 }* %50, i64 %"303_0.sroa.15.0.i296.i" - store { i1, i64, i1 } %"367_054.fca.1.insert.i.i", { i1, i64, i1 }* %70, align 4 - %exitcond297.not.i = icmp eq i64 %57, 10 - br i1 %exitcond297.not.i, label %mask_block_ok.i.i.i.i, label %56 - -cond_87_case_0.i: ; preds = %cond_exit_87.i - %71 = load i64, i64* %52, align 4 - %72 = or i64 %71, -1024 - store i64 %72, i64* %52, align 4 - %73 = icmp eq i64 %72, -1 - br i1 %73, label %__hugr__.main.1.exit, label %mask_block_err.i.i - -mask_block_err.i.i: ; preds = %cond_87_case_0.i - tail call void @panic(i32 1002, i8* getelementptr inbounds ([70 x i8], [70 x i8]* @"e_Array cont.EFA5AC45.0", i64 0, i64 0)) +loop_body.i.i: ; preds = %__barray_check_bounds.exit.i.i + %"367_054.fca.1.insert.i.i" = insertvalue { i1, i64, i1 } { i1 true, i64 poison, i1 undef }, i64 %lazy_measure.i.i, 1 + %"367_054.fca.2.insert.i.i" = insertvalue { i1, i64, i1 } %"367_054.fca.1.insert.i.i", i1 undef, 2 + %110 = insertvalue { { ptr, ptr, i64 }, i64 } %.pn165183.i.i, i64 %95, 1 + %111 = shl nuw nsw i64 1, %"303_0.sroa.15.0184.i.i" + %112 = xor i64 %107, %111 + store i64 %112, ptr %72, align 4 + %113 = getelementptr inbounds nuw { i1, i64, i1 }, ptr %71, i64 %"303_0.sroa.15.0184.i.i" + store { i1, i64, i1 } %"367_054.fca.2.insert.i.i", ptr %113, align 4 + %114 = extractvalue { { ptr, ptr, i64 }, i64 } %.pn165183.i.i, 0 + %.fca.0.extract81.i.i.i = extractvalue { ptr, ptr, i64 } %114, 0 + %.fca.1.extract82.i.i.i = extractvalue { ptr, ptr, i64 } %114, 1 + %.fca.2.extract83.i.i.i = extractvalue { ptr, ptr, i64 } %114, 2 + %exitcond.not.i.i = icmp eq i64 %95, 10 + br i1 %exitcond.not.i.i, label %73, label %__barray_check_bounds.exit.i.i.i + +"__hugr__.$measure_array$$n(10).277.exit.i": ; preds = %91, %73 + tail call void @heap_free(ptr %.fca.0.extract81.i.i.i) + tail call void @heap_free(ptr nonnull %.fca.1.extract82.i.i.i) + %115 = load i64, ptr %72, align 4 + %116 = trunc i64 %115 to i1 + br i1 %116, label %cond_exit_87.thread.i, label %__barray_mask_borrow.exit278.i + +mask_block_err.i.i: ; preds = %cond_exit_87.thread.9.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_check_bounds.exit283.i: ; preds = %"__hugr__.$measure_array$$n(10).277.exit.i", %cond_exit_87.i - %"90_0.0.i1" = phi i64 [ 0, %"__hugr__.$measure_array$$n(10).277.exit.i" ], [ %74, %cond_exit_87.i ] - %74 = add nuw nsw i64 %"90_0.0.i1", 1 - %75 = lshr i64 %"90_0.0.i1", 6 - %76 = getelementptr inbounds i64, i64* %52, i64 %75 - %77 = load i64, i64* %76, align 4 - %78 = shl nuw nsw i64 1, %"90_0.0.i1" - %79 = and i64 %77, %78 - %.not.i = icmp eq i64 %79, 0 - br i1 %.not.i, label %__barray_mask_borrow.exit288.i, label %cond_exit_87.i - -__barray_mask_borrow.exit288.i: ; preds = %__barray_check_bounds.exit283.i - %80 = xor i64 %77, %78 - store i64 %80, i64* %76, align 4 - %81 = getelementptr inbounds { i1, i64, i1 }, { i1, i64, i1 }* %50, i64 %"90_0.0.i1" - %82 = load { i1, i64, i1 }, { i1, i64, i1 }* %81, align 4 - %.fca.0.extract179.i = extractvalue { i1, i64, i1 } %82, 0 - br i1 %.fca.0.extract179.i, label %cond_390_case_1.i, label %cond_exit_87.i - -cond_exit_87.i: ; preds = %cond_390_case_1.i, %__barray_mask_borrow.exit288.i, %__barray_check_bounds.exit283.i - %exitcond.not = icmp eq i64 %74, 10 - br i1 %exitcond.not, label %cond_87_case_0.i, label %__barray_check_bounds.exit283.i - -cond_390_case_1.i: ; preds = %__barray_mask_borrow.exit288.i - %.fca.1.extract.i = extractvalue { i1, i64, i1 } %82, 1 +__barray_mask_borrow.exit278.i: ; preds = %"__hugr__.$measure_array$$n(10).277.exit.i" + %117 = or disjoint i64 %115, 1 + store i64 %117, ptr %72, align 4 + %118 = load { i1, i64, i1 }, ptr %71, align 4 + %.fca.0.extract179.i = extractvalue { i1, i64, i1 } %118, 0 + br i1 %.fca.0.extract179.i, label %cond_390_case_1.i, label %cond_exit_87.thread.i + +cond_exit_87.thread.i: ; preds = %cond_390_case_1.i, %__barray_mask_borrow.exit278.i, %"__hugr__.$measure_array$$n(10).277.exit.i" + %119 = phi i64 [ %.pre.i, %cond_390_case_1.i ], [ %117, %__barray_mask_borrow.exit278.i ], [ %115, %"__hugr__.$measure_array$$n(10).277.exit.i" ] + %120 = and i64 %119, 2 + %.not311.i = icmp eq i64 %120, 0 + br i1 %.not311.i, label %__barray_mask_borrow.exit278.1.i, label %cond_exit_87.thread.1.i + +__barray_mask_borrow.exit278.1.i: ; preds = %cond_exit_87.thread.i + %121 = or disjoint i64 %119, 2 + store i64 %121, ptr %72, align 4 + %122 = getelementptr inbounds nuw i8, ptr %71, i64 24 + %123 = load { i1, i64, i1 }, ptr %122, align 4 + %.fca.0.extract179.1.i = extractvalue { i1, i64, i1 } %123, 0 + br i1 %.fca.0.extract179.1.i, label %cond_390_case_1.1.i, label %cond_exit_87.thread.1.i + +cond_390_case_1.1.i: ; preds = %__barray_mask_borrow.exit278.1.i + %.fca.1.extract.1.i = extractvalue { i1, i64, i1 } %123, 1 + tail call void @___dec_future_refcount(i64 %.fca.1.extract.1.i) + %.pre302.i = load i64, ptr %72, align 4 + br label %cond_exit_87.thread.1.i + +cond_exit_87.thread.1.i: ; preds = %cond_390_case_1.1.i, %__barray_mask_borrow.exit278.1.i, %cond_exit_87.thread.i + %124 = phi i64 [ %.pre302.i, %cond_390_case_1.1.i ], [ %121, %__barray_mask_borrow.exit278.1.i ], [ %119, %cond_exit_87.thread.i ] + %125 = and i64 %124, 4 + %.not312.i = icmp eq i64 %125, 0 + br i1 %.not312.i, label %__barray_mask_borrow.exit278.2.i, label %cond_exit_87.thread.2.i + +__barray_mask_borrow.exit278.2.i: ; preds = %cond_exit_87.thread.1.i + %126 = or disjoint i64 %124, 4 + store i64 %126, ptr %72, align 4 + %127 = getelementptr inbounds nuw i8, ptr %71, i64 48 + %128 = load { i1, i64, i1 }, ptr %127, align 4 + %.fca.0.extract179.2.i = extractvalue { i1, i64, i1 } %128, 0 + br i1 %.fca.0.extract179.2.i, label %cond_390_case_1.2.i, label %cond_exit_87.thread.2.i + +cond_390_case_1.2.i: ; preds = %__barray_mask_borrow.exit278.2.i + %.fca.1.extract.2.i = extractvalue { i1, i64, i1 } %128, 1 + tail call void @___dec_future_refcount(i64 %.fca.1.extract.2.i) + %.pre303.i = load i64, ptr %72, align 4 + br label %cond_exit_87.thread.2.i + +cond_exit_87.thread.2.i: ; preds = %cond_390_case_1.2.i, %__barray_mask_borrow.exit278.2.i, %cond_exit_87.thread.1.i + %129 = phi i64 [ %.pre303.i, %cond_390_case_1.2.i ], [ %126, %__barray_mask_borrow.exit278.2.i ], [ %124, %cond_exit_87.thread.1.i ] + %130 = and i64 %129, 8 + %.not313.i = icmp eq i64 %130, 0 + br i1 %.not313.i, label %__barray_mask_borrow.exit278.3.i, label %cond_exit_87.thread.3.i + +__barray_mask_borrow.exit278.3.i: ; preds = %cond_exit_87.thread.2.i + %131 = or disjoint i64 %129, 8 + store i64 %131, ptr %72, align 4 + %132 = getelementptr inbounds nuw i8, ptr %71, i64 72 + %133 = load { i1, i64, i1 }, ptr %132, align 4 + %.fca.0.extract179.3.i = extractvalue { i1, i64, i1 } %133, 0 + br i1 %.fca.0.extract179.3.i, label %cond_390_case_1.3.i, label %cond_exit_87.thread.3.i + +cond_390_case_1.3.i: ; preds = %__barray_mask_borrow.exit278.3.i + %.fca.1.extract.3.i = extractvalue { i1, i64, i1 } %133, 1 + tail call void @___dec_future_refcount(i64 %.fca.1.extract.3.i) + %.pre304.i = load i64, ptr %72, align 4 + br label %cond_exit_87.thread.3.i + +cond_exit_87.thread.3.i: ; preds = %cond_390_case_1.3.i, %__barray_mask_borrow.exit278.3.i, %cond_exit_87.thread.2.i + %134 = phi i64 [ %.pre304.i, %cond_390_case_1.3.i ], [ %131, %__barray_mask_borrow.exit278.3.i ], [ %129, %cond_exit_87.thread.2.i ] + %135 = and i64 %134, 16 + %.not314.i = icmp eq i64 %135, 0 + br i1 %.not314.i, label %__barray_mask_borrow.exit278.4.i, label %cond_exit_87.thread.4.i + +__barray_mask_borrow.exit278.4.i: ; preds = %cond_exit_87.thread.3.i + %136 = or disjoint i64 %134, 16 + store i64 %136, ptr %72, align 4 + %137 = getelementptr inbounds nuw i8, ptr %71, i64 96 + %138 = load { i1, i64, i1 }, ptr %137, align 4 + %.fca.0.extract179.4.i = extractvalue { i1, i64, i1 } %138, 0 + br i1 %.fca.0.extract179.4.i, label %cond_390_case_1.4.i, label %cond_exit_87.thread.4.i + +cond_390_case_1.4.i: ; preds = %__barray_mask_borrow.exit278.4.i + %.fca.1.extract.4.i = extractvalue { i1, i64, i1 } %138, 1 + tail call void @___dec_future_refcount(i64 %.fca.1.extract.4.i) + %.pre305.i = load i64, ptr %72, align 4 + br label %cond_exit_87.thread.4.i + +cond_exit_87.thread.4.i: ; preds = %cond_390_case_1.4.i, %__barray_mask_borrow.exit278.4.i, %cond_exit_87.thread.3.i + %139 = phi i64 [ %.pre305.i, %cond_390_case_1.4.i ], [ %136, %__barray_mask_borrow.exit278.4.i ], [ %134, %cond_exit_87.thread.3.i ] + %140 = and i64 %139, 32 + %.not315.i = icmp eq i64 %140, 0 + br i1 %.not315.i, label %__barray_mask_borrow.exit278.5.i, label %cond_exit_87.thread.5.i + +__barray_mask_borrow.exit278.5.i: ; preds = %cond_exit_87.thread.4.i + %141 = or disjoint i64 %139, 32 + store i64 %141, ptr %72, align 4 + %142 = getelementptr inbounds nuw i8, ptr %71, i64 120 + %143 = load { i1, i64, i1 }, ptr %142, align 4 + %.fca.0.extract179.5.i = extractvalue { i1, i64, i1 } %143, 0 + br i1 %.fca.0.extract179.5.i, label %cond_390_case_1.5.i, label %cond_exit_87.thread.5.i + +cond_390_case_1.5.i: ; preds = %__barray_mask_borrow.exit278.5.i + %.fca.1.extract.5.i = extractvalue { i1, i64, i1 } %143, 1 + tail call void @___dec_future_refcount(i64 %.fca.1.extract.5.i) + %.pre306.i = load i64, ptr %72, align 4 + br label %cond_exit_87.thread.5.i + +cond_exit_87.thread.5.i: ; preds = %cond_390_case_1.5.i, %__barray_mask_borrow.exit278.5.i, %cond_exit_87.thread.4.i + %144 = phi i64 [ %.pre306.i, %cond_390_case_1.5.i ], [ %141, %__barray_mask_borrow.exit278.5.i ], [ %139, %cond_exit_87.thread.4.i ] + %145 = and i64 %144, 64 + %.not316.i = icmp eq i64 %145, 0 + br i1 %.not316.i, label %__barray_mask_borrow.exit278.6.i, label %cond_exit_87.thread.6.i + +__barray_mask_borrow.exit278.6.i: ; preds = %cond_exit_87.thread.5.i + %146 = or disjoint i64 %144, 64 + store i64 %146, ptr %72, align 4 + %147 = getelementptr inbounds nuw i8, ptr %71, i64 144 + %148 = load { i1, i64, i1 }, ptr %147, align 4 + %.fca.0.extract179.6.i = extractvalue { i1, i64, i1 } %148, 0 + br i1 %.fca.0.extract179.6.i, label %cond_390_case_1.6.i, label %cond_exit_87.thread.6.i + +cond_390_case_1.6.i: ; preds = %__barray_mask_borrow.exit278.6.i + %.fca.1.extract.6.i = extractvalue { i1, i64, i1 } %148, 1 + tail call void @___dec_future_refcount(i64 %.fca.1.extract.6.i) + %.pre307.i = load i64, ptr %72, align 4 + br label %cond_exit_87.thread.6.i + +cond_exit_87.thread.6.i: ; preds = %cond_390_case_1.6.i, %__barray_mask_borrow.exit278.6.i, %cond_exit_87.thread.5.i + %149 = phi i64 [ %.pre307.i, %cond_390_case_1.6.i ], [ %146, %__barray_mask_borrow.exit278.6.i ], [ %144, %cond_exit_87.thread.5.i ] + %150 = and i64 %149, 128 + %.not317.i = icmp eq i64 %150, 0 + br i1 %.not317.i, label %__barray_mask_borrow.exit278.7.i, label %cond_exit_87.thread.7.i + +__barray_mask_borrow.exit278.7.i: ; preds = %cond_exit_87.thread.6.i + %151 = or disjoint i64 %149, 128 + store i64 %151, ptr %72, align 4 + %152 = getelementptr inbounds nuw i8, ptr %71, i64 168 + %153 = load { i1, i64, i1 }, ptr %152, align 4 + %.fca.0.extract179.7.i = extractvalue { i1, i64, i1 } %153, 0 + br i1 %.fca.0.extract179.7.i, label %cond_390_case_1.7.i, label %cond_exit_87.thread.7.i + +cond_390_case_1.7.i: ; preds = %__barray_mask_borrow.exit278.7.i + %.fca.1.extract.7.i = extractvalue { i1, i64, i1 } %153, 1 + tail call void @___dec_future_refcount(i64 %.fca.1.extract.7.i) + %.pre308.i = load i64, ptr %72, align 4 + br label %cond_exit_87.thread.7.i + +cond_exit_87.thread.7.i: ; preds = %cond_390_case_1.7.i, %__barray_mask_borrow.exit278.7.i, %cond_exit_87.thread.6.i + %154 = phi i64 [ %.pre308.i, %cond_390_case_1.7.i ], [ %151, %__barray_mask_borrow.exit278.7.i ], [ %149, %cond_exit_87.thread.6.i ] + %155 = and i64 %154, 256 + %.not318.i = icmp eq i64 %155, 0 + br i1 %.not318.i, label %__barray_mask_borrow.exit278.8.i, label %cond_exit_87.thread.8.i + +__barray_mask_borrow.exit278.8.i: ; preds = %cond_exit_87.thread.7.i + %156 = or disjoint i64 %154, 256 + store i64 %156, ptr %72, align 4 + %157 = getelementptr inbounds nuw i8, ptr %71, i64 192 + %158 = load { i1, i64, i1 }, ptr %157, align 4 + %.fca.0.extract179.8.i = extractvalue { i1, i64, i1 } %158, 0 + br i1 %.fca.0.extract179.8.i, label %cond_390_case_1.8.i, label %cond_exit_87.thread.8.i + +cond_390_case_1.8.i: ; preds = %__barray_mask_borrow.exit278.8.i + %.fca.1.extract.8.i = extractvalue { i1, i64, i1 } %158, 1 + tail call void @___dec_future_refcount(i64 %.fca.1.extract.8.i) + %.pre309.i = load i64, ptr %72, align 4 + br label %cond_exit_87.thread.8.i + +cond_exit_87.thread.8.i: ; preds = %cond_390_case_1.8.i, %__barray_mask_borrow.exit278.8.i, %cond_exit_87.thread.7.i + %159 = phi i64 [ %.pre309.i, %cond_390_case_1.8.i ], [ %156, %__barray_mask_borrow.exit278.8.i ], [ %154, %cond_exit_87.thread.7.i ] + %160 = and i64 %159, 512 + %.not319.i = icmp eq i64 %160, 0 + br i1 %.not319.i, label %__barray_mask_borrow.exit278.9.i, label %cond_exit_87.thread.9.i + +__barray_mask_borrow.exit278.9.i: ; preds = %cond_exit_87.thread.8.i + %161 = or disjoint i64 %159, 512 + store i64 %161, ptr %72, align 4 + %162 = getelementptr inbounds nuw i8, ptr %71, i64 216 + %163 = load { i1, i64, i1 }, ptr %162, align 4 + %.fca.0.extract179.9.i = extractvalue { i1, i64, i1 } %163, 0 + br i1 %.fca.0.extract179.9.i, label %cond_390_case_1.9.i, label %cond_exit_87.thread.9.i + +cond_390_case_1.9.i: ; preds = %__barray_mask_borrow.exit278.9.i + %.fca.1.extract.9.i = extractvalue { i1, i64, i1 } %163, 1 + tail call void @___dec_future_refcount(i64 %.fca.1.extract.9.i) + %.pre310.i = load i64, ptr %72, align 4 + br label %cond_exit_87.thread.9.i + +cond_exit_87.thread.9.i: ; preds = %cond_390_case_1.9.i, %__barray_mask_borrow.exit278.9.i, %cond_exit_87.thread.8.i + %164 = phi i64 [ %.pre310.i, %cond_390_case_1.9.i ], [ %161, %__barray_mask_borrow.exit278.9.i ], [ %159, %cond_exit_87.thread.8.i ] + %165 = or i64 %164, -1024 + store i64 %165, ptr %72, align 4 + %166 = icmp eq i64 %165, -1 + br i1 %166, label %__hugr__.main.1.exit, label %mask_block_err.i.i + +cond_390_case_1.i: ; preds = %__barray_mask_borrow.exit278.i + %.fca.1.extract.i = extractvalue { i1, i64, i1 } %118, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.i) - br label %cond_exit_87.i - -__hugr__.main.1.exit: ; preds = %cond_87_case_0.i - tail call void @heap_free(i8* %49) - tail call void @heap_free(i8* nonnull %51) - %83 = tail call i64 @teardown() - ret i64 %83 + %.pre.i = load i64, ptr %72, align 4 + br label %cond_exit_87.thread.i + +__hugr__.main.1.exit: ; preds = %cond_exit_87.thread.9.i + tail call void @heap_free(ptr %71) + tail call void @heap_free(ptr nonnull %72) + %167 = tail call i64 @teardown() + ret i64 %167 } declare void @setup(i64) local_unnamed_addr diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-no_results/no_results_x86_64-windows-msvc b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-no_results/no_results_x86_64-windows-msvc index a3f4b02aa..a85084143 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-no_results/no_results_x86_64-windows-msvc +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-no_results/no_results_x86_64-windows-msvc @@ -1,6 +1,6 @@ ; ModuleID = 'hugr' source_filename = "hugr" -target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" +target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128" target triple = "x86_64-windows-msvc" @"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." @@ -16,7 +16,7 @@ declare i64 @___qalloc() local_unnamed_addr declare void @___reset(i64) local_unnamed_addr ; Function Attrs: noreturn -declare void @panic(i32, i8*) local_unnamed_addr #0 +declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @___rxy(i64, double, double) local_unnamed_addr @@ -26,32 +26,22 @@ define i64 @qmain(i64 %0) local_unnamed_addr { entry: tail call void @setup(i64 %0) %qalloc.i.i = tail call i64 @___qalloc() - %not_max.not.i.i = icmp eq i64 %qalloc.i.i, -1 - br i1 %not_max.not.i.i, label %id_bb.i.i, label %reset_bb.i.i + %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 + br i1 %not_max.not.not.i.i, label %cond_18_case_0.i.i, label %__hugr__.bar.1.exit -reset_bb.i.i: ; preds = %entry - tail call void @___reset(i64 %qalloc.i.i) - br label %id_bb.i.i - -id_bb.i.i: ; preds = %reset_bb.i.i, %entry - %1 = insertvalue { i1, i64 } { i1 true, i64 poison }, i64 %qalloc.i.i, 1 - %2 = select i1 %not_max.not.i.i, { i1, i64 } { i1 false, i64 poison }, { i1, i64 } %1 - %.fca.0.extract.i.i = extractvalue { i1, i64 } %2, 0 - br i1 %.fca.0.extract.i.i, label %__hugr__.bar.1.exit, label %cond_18_case_0.i.i - -cond_18_case_0.i.i: ; preds = %id_bb.i.i - tail call void @panic(i32 1001, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @"e_No more qu.3B2EEBF0.0", i64 0, i64 0)) +cond_18_case_0.i.i: ; preds = %entry + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.bar.1.exit: ; preds = %id_bb.i.i - %.fca.1.extract.i.i = extractvalue { i1, i64 } %2, 1 - tail call void @___rxy(i64 %.fca.1.extract.i.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %.fca.1.extract.i.i, double 0x400921FB54442D18) - %lazy_measure.i = tail call i64 @___lazy_measure(i64 %.fca.1.extract.i.i) - tail call void @___qfree(i64 %.fca.1.extract.i.i) +__hugr__.bar.1.exit: ; preds = %entry + tail call void @___reset(i64 %qalloc.i.i) + tail call void @___rxy(i64 %qalloc.i.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) + tail call void @___rz(i64 %qalloc.i.i, double 0x400921FB54442D18) + %lazy_measure.i = tail call i64 @___lazy_measure(i64 %qalloc.i.i) + tail call void @___qfree(i64 %qalloc.i.i) tail call void @___dec_future_refcount(i64 %lazy_measure.i) - %3 = tail call i64 @teardown() - ret i64 %3 + %1 = tail call i64 @teardown() + ret i64 %1 } declare void @setup(i64) local_unnamed_addr diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-postselect_exit/postselect_exit_x86_64-windows-msvc b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-postselect_exit/postselect_exit_x86_64-windows-msvc index b0ed5b6ba..3fe6d1753 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-postselect_exit/postselect_exit_x86_64-windows-msvc +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-postselect_exit/postselect_exit_x86_64-windows-msvc @@ -1,6 +1,6 @@ ; ModuleID = 'hugr' source_filename = "hugr" -target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" +target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128" target triple = "x86_64-windows-msvc" @e_Postselect.558881BF.0 = private constant [30 x i8] c"\1DEXIT:INT:Postselection failed" @@ -18,9 +18,9 @@ declare i1 @___read_future_bool(i64) local_unnamed_addr declare void @___dec_future_refcount(i64) local_unnamed_addr ; Function Attrs: noreturn -declare void @panic(i32, i8*) local_unnamed_addr #0 +declare void @panic(i32, ptr) local_unnamed_addr #0 -declare void @print_bool(i8*, i64, i1) local_unnamed_addr +declare void @print_bool(ptr, i64, i1) local_unnamed_addr declare i64 @___qalloc() local_unnamed_addr @@ -34,44 +34,34 @@ define i64 @qmain(i64 %0) local_unnamed_addr { entry: tail call void @setup(i64 %0) %qalloc.i.i = tail call i64 @___qalloc() - %not_max.not.i.i = icmp eq i64 %qalloc.i.i, -1 - br i1 %not_max.not.i.i, label %id_bb.i.i, label %reset_bb.i.i + %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 + br i1 %not_max.not.not.i.i, label %cond_39_case_0.i.i, label %__hugr__.__tk2_qalloc.35.exit.i -reset_bb.i.i: ; preds = %entry - tail call void @___reset(i64 %qalloc.i.i) - br label %id_bb.i.i - -id_bb.i.i: ; preds = %reset_bb.i.i, %entry - %1 = insertvalue { i1, i64 } { i1 true, i64 poison }, i64 %qalloc.i.i, 1 - %2 = select i1 %not_max.not.i.i, { i1, i64 } { i1 false, i64 poison }, { i1, i64 } %1 - %.fca.0.extract.i.i = extractvalue { i1, i64 } %2, 0 - br i1 %.fca.0.extract.i.i, label %__hugr__.__tk2_qalloc.35.exit.i, label %cond_39_case_0.i.i - -cond_39_case_0.i.i: ; preds = %id_bb.i.i - tail call void @panic(i32 1001, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @"e_No more qu.3B2EEBF0.0", i64 0, i64 0)) +cond_39_case_0.i.i: ; preds = %entry + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_qalloc.35.exit.i: ; preds = %id_bb.i.i - %.fca.1.extract.i.i = extractvalue { i1, i64 } %2, 1 - tail call void @___rxy(i64 %.fca.1.extract.i.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %.fca.1.extract.i.i, double 0x400921FB54442D18) - %lazy_measure.i = tail call i64 @___lazy_measure(i64 %.fca.1.extract.i.i) - tail call void @___qfree(i64 %.fca.1.extract.i.i) +__hugr__.__tk2_qalloc.35.exit.i: ; preds = %entry + tail call void @___reset(i64 %qalloc.i.i) + tail call void @___rxy(i64 %qalloc.i.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) + tail call void @___rz(i64 %qalloc.i.i, double 0x400921FB54442D18) + %lazy_measure.i = tail call i64 @___lazy_measure(i64 %qalloc.i.i) + tail call void @___qfree(i64 %qalloc.i.i) tail call void @___inc_future_refcount(i64 %lazy_measure.i) %read_bool.i = tail call i1 @___read_future_bool(i64 %lazy_measure.i) tail call void @___dec_future_refcount(i64 %lazy_measure.i) - br i1 %read_bool.i, label %3, label %__hugr__.main.1.exit + br i1 %read_bool.i, label %1, label %__hugr__.main.1.exit -3: ; preds = %__hugr__.__tk2_qalloc.35.exit.i - tail call void @panic(i32 42, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @e_Postselect.558881BF.0, i64 0, i64 0)) +1: ; preds = %__hugr__.__tk2_qalloc.35.exit.i + tail call void @panic(i32 42, ptr nonnull @e_Postselect.558881BF.0) unreachable __hugr__.main.1.exit: ; preds = %__hugr__.__tk2_qalloc.35.exit.i %read_bool63.i = tail call i1 @___read_future_bool(i64 %lazy_measure.i) tail call void @___dec_future_refcount(i64 %lazy_measure.i) - tail call void @print_bool(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @res_c.1C9EF4D1.0, i64 0, i64 0), i64 11, i1 %read_bool63.i) - %4 = tail call i64 @teardown() - ret i64 %4 + tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool63.i) + %2 = tail call i64 @teardown() + ret i64 %2 } declare void @setup(i64) local_unnamed_addr diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-postselect_panic/postselect_panic_x86_64-windows-msvc b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-postselect_panic/postselect_panic_x86_64-windows-msvc index 481cd7577..ebe1633f8 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-postselect_panic/postselect_panic_x86_64-windows-msvc +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-postselect_panic/postselect_panic_x86_64-windows-msvc @@ -1,6 +1,6 @@ ; ModuleID = 'hugr' source_filename = "hugr" -target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" +target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128" target triple = "x86_64-windows-msvc" @e_Postselect.558881BF.0 = private constant [30 x i8] c"\1DEXIT:INT:Postselection failed" @@ -18,9 +18,9 @@ declare i1 @___read_future_bool(i64) local_unnamed_addr declare void @___dec_future_refcount(i64) local_unnamed_addr ; Function Attrs: noreturn -declare void @panic(i32, i8*) local_unnamed_addr #0 +declare void @panic(i32, ptr) local_unnamed_addr #0 -declare void @print_bool(i8*, i64, i1) local_unnamed_addr +declare void @print_bool(ptr, i64, i1) local_unnamed_addr declare i64 @___qalloc() local_unnamed_addr @@ -34,44 +34,34 @@ define i64 @qmain(i64 %0) local_unnamed_addr { entry: tail call void @setup(i64 %0) %qalloc.i.i = tail call i64 @___qalloc() - %not_max.not.i.i = icmp eq i64 %qalloc.i.i, -1 - br i1 %not_max.not.i.i, label %id_bb.i.i, label %reset_bb.i.i + %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 + br i1 %not_max.not.not.i.i, label %cond_39_case_0.i.i, label %__hugr__.__tk2_qalloc.35.exit.i -reset_bb.i.i: ; preds = %entry - tail call void @___reset(i64 %qalloc.i.i) - br label %id_bb.i.i - -id_bb.i.i: ; preds = %reset_bb.i.i, %entry - %1 = insertvalue { i1, i64 } { i1 true, i64 poison }, i64 %qalloc.i.i, 1 - %2 = select i1 %not_max.not.i.i, { i1, i64 } { i1 false, i64 poison }, { i1, i64 } %1 - %.fca.0.extract.i.i = extractvalue { i1, i64 } %2, 0 - br i1 %.fca.0.extract.i.i, label %__hugr__.__tk2_qalloc.35.exit.i, label %cond_39_case_0.i.i - -cond_39_case_0.i.i: ; preds = %id_bb.i.i - tail call void @panic(i32 1001, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @"e_No more qu.3B2EEBF0.0", i64 0, i64 0)) +cond_39_case_0.i.i: ; preds = %entry + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_qalloc.35.exit.i: ; preds = %id_bb.i.i - %.fca.1.extract.i.i = extractvalue { i1, i64 } %2, 1 - tail call void @___rxy(i64 %.fca.1.extract.i.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %.fca.1.extract.i.i, double 0x400921FB54442D18) - %lazy_measure.i = tail call i64 @___lazy_measure(i64 %.fca.1.extract.i.i) - tail call void @___qfree(i64 %.fca.1.extract.i.i) +__hugr__.__tk2_qalloc.35.exit.i: ; preds = %entry + tail call void @___reset(i64 %qalloc.i.i) + tail call void @___rxy(i64 %qalloc.i.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) + tail call void @___rz(i64 %qalloc.i.i, double 0x400921FB54442D18) + %lazy_measure.i = tail call i64 @___lazy_measure(i64 %qalloc.i.i) + tail call void @___qfree(i64 %qalloc.i.i) tail call void @___inc_future_refcount(i64 %lazy_measure.i) %read_bool.i = tail call i1 @___read_future_bool(i64 %lazy_measure.i) tail call void @___dec_future_refcount(i64 %lazy_measure.i) - br i1 %read_bool.i, label %3, label %__hugr__.main.1.exit + br i1 %read_bool.i, label %1, label %__hugr__.main.1.exit -3: ; preds = %__hugr__.__tk2_qalloc.35.exit.i - tail call void @panic(i32 1001, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @e_Postselect.558881BF.0, i64 0, i64 0)) +1: ; preds = %__hugr__.__tk2_qalloc.35.exit.i + tail call void @panic(i32 1001, ptr nonnull @e_Postselect.558881BF.0) unreachable __hugr__.main.1.exit: ; preds = %__hugr__.__tk2_qalloc.35.exit.i %read_bool63.i = tail call i1 @___read_future_bool(i64 %lazy_measure.i) tail call void @___dec_future_refcount(i64 %lazy_measure.i) - tail call void @print_bool(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @res_c.1C9EF4D1.0, i64 0, i64 0), i64 11, i1 %read_bool63.i) - %4 = tail call i64 @teardown() - ret i64 %4 + tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool63.i) + %2 = tail call i64 @teardown() + ret i64 %2 } declare void @setup(i64) local_unnamed_addr diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-print_current_shot/print_current_shot_x86_64-windows-msvc b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-print_current_shot/print_current_shot_x86_64-windows-msvc index 4d6d33224..8b23d24de 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-print_current_shot/print_current_shot_x86_64-windows-msvc +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-print_current_shot/print_current_shot_x86_64-windows-msvc @@ -1,19 +1,19 @@ ; ModuleID = 'hugr' source_filename = "hugr" -target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" +target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128" target triple = "x86_64-windows-msvc" @res_shot.6D86EAF7.0 = private constant [14 x i8] c"\0DUSER:INT:shot" declare i64 @get_current_shot() local_unnamed_addr -declare void @print_int(i8*, i64, i64) local_unnamed_addr +declare void @print_int(ptr, i64, i64) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr { entry: tail call void @setup(i64 %0) %shot.i = tail call i64 @get_current_shot() - tail call void @print_int(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @res_shot.6D86EAF7.0, i64 0, i64 0), i64 13, i64 %shot.i) + tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot.i) %1 = tail call i64 @teardown() ret i64 %1 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-rng/rng_x86_64-windows-msvc b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-rng/rng_x86_64-windows-msvc index c2c5d790c..a17a58b3d 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-rng/rng_x86_64-windows-msvc +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-rng/rng_x86_64-windows-msvc @@ -1,6 +1,6 @@ ; ModuleID = 'hugr' source_filename = "hugr" -target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" +target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128" target triple = "x86_64-windows-msvc" @res_rint.B928E41E.0 = private constant [14 x i8] c"\0DUSER:INT:rint" @@ -17,9 +17,9 @@ declare double @random_float() local_unnamed_addr declare i32 @random_rng(i32) local_unnamed_addr -declare void @print_int(i8*, i64, i64) local_unnamed_addr +declare void @print_int(ptr, i64, i64) local_unnamed_addr -declare void @print_float(i8*, i64, double) local_unnamed_addr +declare void @print_float(ptr, i64, double) local_unnamed_addr declare void @random_seed(i64) local_unnamed_addr @@ -34,19 +34,19 @@ entry: %1 = sext i32 %rintb.i to i64 %2 = sext i32 %rint20.i to i64 %3 = sext i32 %rint.i to i64 - tail call void @print_int(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @res_rint.B928E41E.0, i64 0, i64 0), i64 13, i64 %3) - tail call void @print_int(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @res_rint1.0884EC03.0, i64 0, i64 0), i64 14, i64 %2) - tail call void @print_float(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @res_rfloat.F0E4DD2C.0, i64 0, i64 0), i64 17, double %rfloat.i) - tail call void @print_int(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @res_rint_bnd.CB1E6B0D.0, i64 0, i64 0), i64 17, i64 %1) + tail call void @print_int(ptr nonnull @res_rint.B928E41E.0, i64 13, i64 %3) + tail call void @print_int(ptr nonnull @res_rint1.0884EC03.0, i64 14, i64 %2) + tail call void @print_float(ptr nonnull @res_rfloat.F0E4DD2C.0, i64 17, double %rfloat.i) + tail call void @print_int(ptr nonnull @res_rint_bnd.CB1E6B0D.0, i64 17, i64 %1) tail call void @random_seed(i64 84) %rint53.i = tail call i32 @random_int() %rfloat55.i = tail call double @random_float() %rintb58.i = tail call i32 @random_rng(i32 200) %4 = sext i32 %rintb58.i to i64 %5 = sext i32 %rint53.i to i64 - tail call void @print_int(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @res_rint2.F0335598.0, i64 0, i64 0), i64 14, i64 %5) - tail call void @print_float(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @res_rfloat2.4DAB941F.0, i64 0, i64 0), i64 18, double %rfloat55.i) - tail call void @print_int(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @res_rint_bnd2.169DE399.0, i64 0, i64 0), i64 18, i64 %4) + tail call void @print_int(ptr nonnull @res_rint2.F0335598.0, i64 14, i64 %5) + tail call void @print_float(ptr nonnull @res_rfloat2.4DAB941F.0, i64 18, double %rfloat55.i) + tail call void @print_int(ptr nonnull @res_rint_bnd2.169DE399.0, i64 18, i64 %4) %6 = tail call i64 @teardown() ret i64 %6 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-rus/rus_x86_64-windows-msvc b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-rus/rus_x86_64-windows-msvc index ad7d56709..d9e8e4d01 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-rus/rus_x86_64-windows-msvc +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-rus/rus_x86_64-windows-msvc @@ -1,6 +1,6 @@ ; ModuleID = 'hugr' source_filename = "hugr" -target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" +target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128" target triple = "x86_64-windows-msvc" @res_result.457DE32D.0 = private constant [17 x i8] c"\10USER:BOOL:result" @@ -14,14 +14,14 @@ declare i1 @___read_future_bool(i64) local_unnamed_addr declare void @___dec_future_refcount(i64) local_unnamed_addr -declare void @print_bool(i8*, i64, i1) local_unnamed_addr +declare void @print_bool(ptr, i64, i1) local_unnamed_addr declare i64 @___qalloc() local_unnamed_addr declare void @___reset(i64) local_unnamed_addr ; Function Attrs: noreturn -declare void @panic(i32, i8*) local_unnamed_addr #0 +declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @___rxy(i64, double, double) local_unnamed_addr @@ -33,119 +33,89 @@ define i64 @qmain(i64 %0) local_unnamed_addr { entry: tail call void @setup(i64 %0) %qalloc.i.i = tail call i64 @___qalloc() - %not_max.not.i.i = icmp eq i64 %qalloc.i.i, -1 - br i1 %not_max.not.i.i, label %id_bb.i.i, label %reset_bb.i.i + %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 + br i1 %not_max.not.not.i.i, label %cond_87_case_0.i.i, label %__hugr__.__tk2_qalloc.83.exit.i -reset_bb.i.i: ; preds = %entry - tail call void @___reset(i64 %qalloc.i.i) - br label %id_bb.i.i - -id_bb.i.i: ; preds = %reset_bb.i.i, %entry - %1 = insertvalue { i1, i64 } { i1 true, i64 poison }, i64 %qalloc.i.i, 1 - %2 = select i1 %not_max.not.i.i, { i1, i64 } { i1 false, i64 poison }, { i1, i64 } %1 - %.fca.0.extract.i.i = extractvalue { i1, i64 } %2, 0 - br i1 %.fca.0.extract.i.i, label %__hugr__.__tk2_qalloc.83.exit.i, label %cond_87_case_0.i.i - -cond_87_case_0.i.i: ; preds = %id_bb.i.i - tail call void @panic(i32 1001, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @"e_No more qu.3B2EEBF0.0", i64 0, i64 0)) +cond_87_case_0.i.i: ; preds = %entry + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_qalloc.83.exit.i: ; preds = %id_bb.i.i - %.fca.1.extract.i.i = extractvalue { i1, i64 } %2, 1 - br label %cond_242_case_1.i.i - -cond_242_case_1.i.i: ; preds = %cond_242_case_1.i.i.backedge, %__hugr__.__tk2_qalloc.83.exit.i - %qalloc.i.i.i = tail call i64 @___qalloc() - %not_max.not.i.i.i = icmp eq i64 %qalloc.i.i.i, -1 - br i1 %not_max.not.i.i.i, label %id_bb.i.i.i, label %reset_bb.i.i.i - -reset_bb.i.i.i: ; preds = %cond_242_case_1.i.i - tail call void @___reset(i64 %qalloc.i.i.i) - br label %id_bb.i.i.i - -id_bb.i.i.i: ; preds = %reset_bb.i.i.i, %cond_242_case_1.i.i - %3 = insertvalue { i1, i64 } { i1 true, i64 poison }, i64 %qalloc.i.i.i, 1 - %4 = select i1 %not_max.not.i.i.i, { i1, i64 } { i1 false, i64 poison }, { i1, i64 } %3 - %.fca.0.extract.i.i.i = extractvalue { i1, i64 } %4, 0 - br i1 %.fca.0.extract.i.i.i, label %__hugr__.__tk2_qalloc.97.exit.i.i, label %cond_101_case_0.i.i.i +__hugr__.__tk2_qalloc.83.exit.i: ; preds = %entry + tail call void @___reset(i64 %qalloc.i.i) + %qalloc.i132.i.i = tail call i64 @___qalloc() + %not_max.not.not.i133.i.i = icmp eq i64 %qalloc.i132.i.i, -1 + br i1 %not_max.not.not.i133.i.i, label %cond_101_case_0.i.i.i, label %__hugr__.__tk2_qalloc.97.exit.i.i -cond_101_case_0.i.i.i: ; preds = %id_bb.i.i.i - tail call void @panic(i32 1001, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @"e_No more qu.3B2EEBF0.0", i64 0, i64 0)) +cond_101_case_0.i.i.i: ; preds = %cond_242_case_1.backedge.i.i, %__hugr__.__tk2_qalloc.83.exit.i + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_qalloc.97.exit.i.i: ; preds = %id_bb.i.i.i - %.fca.1.extract.i.i.i = extractvalue { i1, i64 } %4, 1 +__hugr__.__tk2_qalloc.97.exit.i.i: ; preds = %__hugr__.__tk2_qalloc.83.exit.i, %cond_242_case_1.backedge.i.i + %qalloc.i134.i.i = phi i64 [ %qalloc.i.i.i, %cond_242_case_1.backedge.i.i ], [ %qalloc.i132.i.i, %__hugr__.__tk2_qalloc.83.exit.i ] + tail call void @___reset(i64 %qalloc.i134.i.i) %qalloc.i128.i.i = tail call i64 @___qalloc() - %not_max.not.i129.i.i = icmp eq i64 %qalloc.i128.i.i, -1 - br i1 %not_max.not.i129.i.i, label %id_bb.i132.i.i, label %reset_bb.i130.i.i + %not_max.not.not.i129.i.i = icmp eq i64 %qalloc.i128.i.i, -1 + br i1 %not_max.not.not.i129.i.i, label %cond_115_case_0.i.i.i, label %__hugr__.__tk2_qalloc.111.exit.i.i -reset_bb.i130.i.i: ; preds = %__hugr__.__tk2_qalloc.97.exit.i.i - tail call void @___reset(i64 %qalloc.i128.i.i) - br label %id_bb.i132.i.i - -id_bb.i132.i.i: ; preds = %reset_bb.i130.i.i, %__hugr__.__tk2_qalloc.97.exit.i.i - %5 = insertvalue { i1, i64 } { i1 true, i64 poison }, i64 %qalloc.i128.i.i, 1 - %6 = select i1 %not_max.not.i129.i.i, { i1, i64 } { i1 false, i64 poison }, { i1, i64 } %5 - %.fca.0.extract.i131.i.i = extractvalue { i1, i64 } %6, 0 - br i1 %.fca.0.extract.i131.i.i, label %__hugr__.__tk2_qalloc.111.exit.i.i, label %cond_115_case_0.i.i.i - -cond_115_case_0.i.i.i: ; preds = %id_bb.i132.i.i - tail call void @panic(i32 1001, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @"e_No more qu.3B2EEBF0.0", i64 0, i64 0)) +cond_115_case_0.i.i.i: ; preds = %__hugr__.__tk2_qalloc.97.exit.i.i + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_qalloc.111.exit.i.i: ; preds = %id_bb.i132.i.i - %.fca.1.extract.i133.i.i = extractvalue { i1, i64 } %6, 1 - tail call void @___rxy(i64 %.fca.1.extract.i133.i.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %.fca.1.extract.i133.i.i, double 0x400921FB54442D18) - tail call void @___rxy(i64 %.fca.1.extract.i.i.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %.fca.1.extract.i.i.i, double 0x400921FB54442D18) - tail call void @___rz(i64 %.fca.1.extract.i.i.i, double 0xBFE921FB54442D18) - tail call void @___rxy(i64 %.fca.1.extract.i.i.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rzz(i64 %.fca.1.extract.i133.i.i, i64 %.fca.1.extract.i.i.i, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %.fca.1.extract.i133.i.i, double 0xBFF921FB54442D18) - tail call void @___rxy(i64 %.fca.1.extract.i.i.i, double 0x3FF921FB54442D18, double 0x400921FB54442D18) - tail call void @___rz(i64 %.fca.1.extract.i.i.i, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %.fca.1.extract.i.i.i, double 0x3FE921FB54442D18) - %lazy_measure.i.i = tail call i64 @___lazy_measure(i64 %.fca.1.extract.i.i.i) - tail call void @___qfree(i64 %.fca.1.extract.i.i.i) +__hugr__.__tk2_qalloc.111.exit.i.i: ; preds = %__hugr__.__tk2_qalloc.97.exit.i.i + tail call void @___reset(i64 %qalloc.i128.i.i) + tail call void @___rxy(i64 %qalloc.i128.i.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) + tail call void @___rz(i64 %qalloc.i128.i.i, double 0x400921FB54442D18) + tail call void @___rxy(i64 %qalloc.i134.i.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) + tail call void @___rz(i64 %qalloc.i134.i.i, double 0x400921FB54442D18) + tail call void @___rz(i64 %qalloc.i134.i.i, double 0xBFE921FB54442D18) + tail call void @___rxy(i64 %qalloc.i134.i.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) + tail call void @___rzz(i64 %qalloc.i128.i.i, i64 %qalloc.i134.i.i, double 0x3FF921FB54442D18) + tail call void @___rz(i64 %qalloc.i128.i.i, double 0xBFF921FB54442D18) + tail call void @___rxy(i64 %qalloc.i134.i.i, double 0x3FF921FB54442D18, double 0x400921FB54442D18) + tail call void @___rz(i64 %qalloc.i134.i.i, double 0xBFF921FB54442D18) + tail call void @___rz(i64 %qalloc.i134.i.i, double 0x3FE921FB54442D18) + %lazy_measure.i.i = tail call i64 @___lazy_measure(i64 %qalloc.i134.i.i) + tail call void @___qfree(i64 %qalloc.i134.i.i) %read_bool.i.i = tail call i1 @___read_future_bool(i64 %lazy_measure.i.i) tail call void @___dec_future_refcount(i64 %lazy_measure.i.i) - br i1 %read_bool.i.i, label %cond_256_case_1.i.i, label %7 + br i1 %read_bool.i.i, label %cond_256_case_1.i.i, label %1 -7: ; preds = %__hugr__.__tk2_qalloc.111.exit.i.i - tail call void @___qfree(i64 %.fca.1.extract.i133.i.i) - br label %cond_242_case_1.i.i.backedge +1: ; preds = %__hugr__.__tk2_qalloc.111.exit.i.i + tail call void @___qfree(i64 %qalloc.i128.i.i) + br label %cond_242_case_1.backedge.i.i + +cond_242_case_1.backedge.i.i: ; preds = %2, %1 + %qalloc.i.i.i = tail call i64 @___qalloc() + %not_max.not.not.i.i.i = icmp eq i64 %qalloc.i.i.i, -1 + br i1 %not_max.not.not.i.i.i, label %cond_101_case_0.i.i.i, label %__hugr__.__tk2_qalloc.97.exit.i.i cond_256_case_1.i.i: ; preds = %__hugr__.__tk2_qalloc.111.exit.i.i - tail call void @___rz(i64 %.fca.1.extract.i.i, double 0x3FE921FB54442D18) - tail call void @___rz(i64 %.fca.1.extract.i.i, double 0x400921FB54442D18) - tail call void @___rxy(i64 %.fca.1.extract.i133.i.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rzz(i64 %.fca.1.extract.i.i, i64 %.fca.1.extract.i133.i.i, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %.fca.1.extract.i.i, double 0xBFF921FB54442D18) - tail call void @___rxy(i64 %.fca.1.extract.i133.i.i, double 0x3FF921FB54442D18, double 0x400921FB54442D18) - tail call void @___rz(i64 %.fca.1.extract.i133.i.i, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %.fca.1.extract.i133.i.i, double 0x3FE921FB54442D18) - %lazy_measure67.i.i = tail call i64 @___lazy_measure(i64 %.fca.1.extract.i133.i.i) - tail call void @___qfree(i64 %.fca.1.extract.i133.i.i) + tail call void @___rz(i64 %qalloc.i.i, double 0x3FE921FB54442D18) + tail call void @___rz(i64 %qalloc.i.i, double 0x400921FB54442D18) + tail call void @___rxy(i64 %qalloc.i128.i.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) + tail call void @___rzz(i64 %qalloc.i.i, i64 %qalloc.i128.i.i, double 0x3FF921FB54442D18) + tail call void @___rz(i64 %qalloc.i.i, double 0xBFF921FB54442D18) + tail call void @___rxy(i64 %qalloc.i128.i.i, double 0x3FF921FB54442D18, double 0x400921FB54442D18) + tail call void @___rz(i64 %qalloc.i128.i.i, double 0xBFF921FB54442D18) + tail call void @___rz(i64 %qalloc.i128.i.i, double 0x3FE921FB54442D18) + %lazy_measure67.i.i = tail call i64 @___lazy_measure(i64 %qalloc.i128.i.i) + tail call void @___qfree(i64 %qalloc.i128.i.i) %read_bool80.i.i = tail call i1 @___read_future_bool(i64 %lazy_measure67.i.i) tail call void @___dec_future_refcount(i64 %lazy_measure67.i.i) - br i1 %read_bool80.i.i, label %__hugr__.main.1.exit, label %8 - -8: ; preds = %cond_256_case_1.i.i - tail call void @___rxy(i64 %.fca.1.extract.i.i, double 0x400921FB54442D18, double 0.000000e+00) - br label %cond_242_case_1.i.i.backedge + br i1 %read_bool80.i.i, label %__hugr__.main.1.exit, label %2 -cond_242_case_1.i.i.backedge: ; preds = %8, %7 - br label %cond_242_case_1.i.i +2: ; preds = %cond_256_case_1.i.i + tail call void @___rxy(i64 %qalloc.i.i, double 0x400921FB54442D18, double 0.000000e+00) + br label %cond_242_case_1.backedge.i.i __hugr__.main.1.exit: ; preds = %cond_256_case_1.i.i - %lazy_measure.i = tail call i64 @___lazy_measure(i64 %.fca.1.extract.i.i) - tail call void @___qfree(i64 %.fca.1.extract.i.i) + %lazy_measure.i = tail call i64 @___lazy_measure(i64 %qalloc.i.i) + tail call void @___qfree(i64 %qalloc.i.i) %read_bool.i = tail call i1 @___read_future_bool(i64 %lazy_measure.i) tail call void @___dec_future_refcount(i64 %lazy_measure.i) - tail call void @print_bool(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @res_result.457DE32D.0, i64 0, i64 0), i64 16, i1 %read_bool.i) - %9 = tail call i64 @teardown() - ret i64 %9 + tail call void @print_bool(ptr nonnull @res_result.457DE32D.0, i64 16, i1 %read_bool.i) + %3 = tail call i64 @teardown() + ret i64 %3 } declare void @setup(i64) local_unnamed_addr diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm14_call_args.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm14_call_args.snap deleted file mode 100644 index 98a1ae2ec..000000000 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm14_call_args.snap +++ /dev/null @@ -1,80 +0,0 @@ ---- -source: qis-compiler/rust/gpu.rs -expression: mod_str ---- -; ModuleID = 'test_context' -source_filename = "test_context" - -@arg_types = private unnamed_addr constant [7 x i8] c"iifb:v\00", align 1 -@no_gpu_error = private unnamed_addr constant [27 x i8] c"No error message available\00", align 1 - -define private i64 @_hl.main.1(i64 %0, i64 %1, i64 %2, i64 %3, double %4, i1 %5) { -alloca_block: - br label %entry_block - -entry_block: ; preds = %alloca_block - %gpu_input_blob = alloca [25 x i8], align 1 - %dest_ptr = getelementptr inbounds [25 x i8], [25 x i8]* %gpu_input_blob, i64 0, i64 0 - %arg_i64_tmp = alloca i64, align 8 - store i64 %2, i64* %arg_i64_tmp, align 4 - %arg_i8_ptr = bitcast i64* %arg_i64_tmp to [8 x i8]* - %6 = bitcast [8 x i8]* %arg_i8_ptr to i8* - call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %dest_ptr, i8* align 1 %6, i64 8, i1 false) - %dest_ptr7 = getelementptr inbounds [25 x i8], [25 x i8]* %gpu_input_blob, i64 0, i64 8 - %arg_i64_tmp8 = alloca i64, align 8 - store i64 %3, i64* %arg_i64_tmp8, align 4 - %arg_i8_ptr9 = bitcast i64* %arg_i64_tmp8 to [8 x i8]* - %7 = bitcast [8 x i8]* %arg_i8_ptr9 to i8* - call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %dest_ptr7, i8* align 1 %7, i64 8, i1 false) - %dest_ptr10 = getelementptr inbounds [25 x i8], [25 x i8]* %gpu_input_blob, i64 0, i64 16 - %arg_f64_tmp = alloca double, align 8 - store double %4, double* %arg_f64_tmp, align 8 - %arg_i8_ptr11 = bitcast double* %arg_f64_tmp to [8 x i8]* - %8 = bitcast [8 x i8]* %arg_i8_ptr11 to i8* - call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %dest_ptr10, i8* align 1 %8, i64 8, i1 false) - %dest_ptr12 = getelementptr inbounds [25 x i8], [25 x i8]* %gpu_input_blob, i64 0, i64 24 - %arg_i8 = zext i1 %5 to i8 - store i8 %arg_i8, i8* %dest_ptr12, align 1 - %gpu_input_blob_ptr = getelementptr inbounds [25 x i8], [25 x i8]* %gpu_input_blob, i64 0, i64 0 - %9 = call i8 @gpu_call(i64 %0, i64 %1, i64 25, i8* %gpu_input_blob_ptr, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @arg_types, i32 0, i32 0)) - call void @validate_gpu_response(i8 %9) - ret i64 %0 -} - -declare i8 @gpu_call(i64, i64, i64, i8*, i8*) - -; Function Attrs: argmemonly nofree nounwind willreturn -declare void @llvm.memcpy.p0i8.p0i8.i64(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i64, i1 immarg) #0 - -; Function Attrs: noinline -define void @validate_gpu_response(i8 %0) #1 { -entry: - %success = icmp ne i8 %0, 0 - br i1 %success, label %ok, label %err - -ok: ; preds = %entry - ret void - -err: ; preds = %entry - call void @gpu_error_handler() - unreachable -} - -; Function Attrs: noinline -define void @gpu_error_handler() #1 { -entry: - %error_message = call i8* @gpu_get_error() - %is_null = icmp eq i8* %error_message, null - %error_message_nonnull = select i1 %is_null, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @no_gpu_error, i32 0, i32 0), i8* %error_message - call void @panic_str(i32 70002, i8* %error_message_nonnull) - unreachable -} - -declare i8* @gpu_get_error() - -; Function Attrs: noreturn -declare void @panic_str(i32, i8*) #2 - -attributes #0 = { argmemonly nofree nounwind willreturn } -attributes #1 = { noinline } -attributes #2 = { noreturn } diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm14_lookup_by_id.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm14_lookup_by_id.snap deleted file mode 100644 index 6468af749..000000000 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm14_lookup_by_id.snap +++ /dev/null @@ -1,14 +0,0 @@ ---- -source: qis-compiler/rust/gpu.rs -expression: mod_str ---- -; ModuleID = 'test_context' -source_filename = "test_context" - -define private i64 @_hl.main.1({} %0) { -alloca_block: - br label %entry_block - -entry_block: ; preds = %alloca_block - ret i64 42 -} diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_call_args.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_call_args.snap new file mode 100644 index 000000000..a3f31f8a9 --- /dev/null +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_call_args.snap @@ -0,0 +1,73 @@ +--- +source: qis-compiler/rust/gpu.rs +expression: mod_str +--- +; ModuleID = 'test_context' +source_filename = "test_context" + +@arg_types = private unnamed_addr constant [7 x i8] c"iifb:v\00", align 1 +@no_gpu_error = private unnamed_addr constant [27 x i8] c"No error message available\00", align 1 + +define private i64 @_hl.main.1(i64 %0, i64 %1, i64 %2, i64 %3, double %4, i1 %5) { +alloca_block: + br label %entry_block + +entry_block: ; preds = %alloca_block + %gpu_input_blob = alloca [25 x i8], align 1 + %dest_ptr = getelementptr inbounds [25 x i8], ptr %gpu_input_blob, i64 0, i64 0 + %arg_i64_tmp = alloca i64, align 8 + store i64 %2, ptr %arg_i64_tmp, align 4 + call void @llvm.memcpy.p0.p0.i64(ptr align 1 %dest_ptr, ptr align 1 %arg_i64_tmp, i64 8, i1 false) + %dest_ptr7 = getelementptr inbounds [25 x i8], ptr %gpu_input_blob, i64 0, i64 8 + %arg_i64_tmp8 = alloca i64, align 8 + store i64 %3, ptr %arg_i64_tmp8, align 4 + call void @llvm.memcpy.p0.p0.i64(ptr align 1 %dest_ptr7, ptr align 1 %arg_i64_tmp8, i64 8, i1 false) + %dest_ptr9 = getelementptr inbounds [25 x i8], ptr %gpu_input_blob, i64 0, i64 16 + %arg_f64_tmp = alloca double, align 8 + store double %4, ptr %arg_f64_tmp, align 8 + call void @llvm.memcpy.p0.p0.i64(ptr align 1 %dest_ptr9, ptr align 1 %arg_f64_tmp, i64 8, i1 false) + %dest_ptr10 = getelementptr inbounds [25 x i8], ptr %gpu_input_blob, i64 0, i64 24 + %arg_i8 = zext i1 %5 to i8 + store i8 %arg_i8, ptr %dest_ptr10, align 1 + %6 = call i8 @gpu_call(i64 %0, i64 %1, i64 25, ptr %gpu_input_blob, ptr @arg_types) + call void @validate_gpu_response(i8 %6) + ret i64 %0 +} + +declare i8 @gpu_call(i64, i64, i64, ptr, ptr) + +; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite) +declare void @llvm.memcpy.p0.p0.i64(ptr noalias writeonly captures(none), ptr noalias readonly captures(none), i64, i1 immarg) #0 + +; Function Attrs: noinline +define void @validate_gpu_response(i8 %0) #1 { +entry: + %success = icmp ne i8 %0, 0 + br i1 %success, label %ok, label %err + +ok: ; preds = %entry + ret void + +err: ; preds = %entry + call void @gpu_error_handler() + unreachable +} + +; Function Attrs: noinline +define void @gpu_error_handler() #1 { +entry: + %error_message = call ptr @gpu_get_error() + %is_null = icmp eq ptr %error_message, null + %error_message_nonnull = select i1 %is_null, ptr @no_gpu_error, ptr %error_message + call void @panic_str(i32 70002, ptr %error_message_nonnull) + unreachable +} + +declare ptr @gpu_get_error() + +; Function Attrs: noreturn +declare void @panic_str(i32, ptr) #2 + +attributes #0 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) } +attributes #1 = { noinline } +attributes #2 = { noreturn } diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm14_call_ret_float.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_call_ret_float.snap similarity index 62% rename from qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm14_call_ret_float.snap rename to qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_call_ret_float.snap index 85ffc5c72..183d203da 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm14_call_ret_float.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_call_ret_float.snap @@ -14,13 +14,12 @@ alloca_block: entry_block: ; preds = %alloca_block %gpu_input_blob = alloca [0 x i8], align 1 - %gpu_input_blob_ptr = getelementptr inbounds [0 x i8], [0 x i8]* %gpu_input_blob, i64 0, i64 0 - %2 = call i8 @gpu_call(i64 %0, i64 %1, i64 0, i8* %gpu_input_blob_ptr, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @arg_types, i32 0, i32 0)) + %2 = call i8 @gpu_call(i64 %0, i64 %1, i64 0, ptr %gpu_input_blob, ptr @arg_types) call void @validate_gpu_response(i8 %2) ret i64 %0 } -declare i8 @gpu_call(i64, i64, i64, i8*, i8*) +declare i8 @gpu_call(i64, i64, i64, ptr, ptr) ; Function Attrs: noinline define void @validate_gpu_response(i8 %0) #0 { @@ -39,17 +38,17 @@ err: ; preds = %entry ; Function Attrs: noinline define void @gpu_error_handler() #0 { entry: - %error_message = call i8* @gpu_get_error() - %is_null = icmp eq i8* %error_message, null - %error_message_nonnull = select i1 %is_null, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @no_gpu_error, i32 0, i32 0), i8* %error_message - call void @panic_str(i32 70002, i8* %error_message_nonnull) + %error_message = call ptr @gpu_get_error() + %is_null = icmp eq ptr %error_message, null + %error_message_nonnull = select i1 %is_null, ptr @no_gpu_error, ptr %error_message + call void @panic_str(i32 70002, ptr %error_message_nonnull) unreachable } -declare i8* @gpu_get_error() +declare ptr @gpu_get_error() ; Function Attrs: noreturn -declare void @panic_str(i32, i8*) #1 +declare void @panic_str(i32, ptr) #1 attributes #0 = { noinline } attributes #1 = { noreturn } diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm14_call_ret_int.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_call_ret_int.snap similarity index 62% rename from qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm14_call_ret_int.snap rename to qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_call_ret_int.snap index 7b0cc8b75..ff7b54d2c 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm14_call_ret_int.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_call_ret_int.snap @@ -14,13 +14,12 @@ alloca_block: entry_block: ; preds = %alloca_block %gpu_input_blob = alloca [0 x i8], align 1 - %gpu_input_blob_ptr = getelementptr inbounds [0 x i8], [0 x i8]* %gpu_input_blob, i64 0, i64 0 - %2 = call i8 @gpu_call(i64 %0, i64 %1, i64 0, i8* %gpu_input_blob_ptr, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @arg_types, i32 0, i32 0)) + %2 = call i8 @gpu_call(i64 %0, i64 %1, i64 0, ptr %gpu_input_blob, ptr @arg_types) call void @validate_gpu_response(i8 %2) ret i64 %0 } -declare i8 @gpu_call(i64, i64, i64, i8*, i8*) +declare i8 @gpu_call(i64, i64, i64, ptr, ptr) ; Function Attrs: noinline define void @validate_gpu_response(i8 %0) #0 { @@ -39,17 +38,17 @@ err: ; preds = %entry ; Function Attrs: noinline define void @gpu_error_handler() #0 { entry: - %error_message = call i8* @gpu_get_error() - %is_null = icmp eq i8* %error_message, null - %error_message_nonnull = select i1 %is_null, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @no_gpu_error, i32 0, i32 0), i8* %error_message - call void @panic_str(i32 70002, i8* %error_message_nonnull) + %error_message = call ptr @gpu_get_error() + %is_null = icmp eq ptr %error_message, null + %error_message_nonnull = select i1 %is_null, ptr @no_gpu_error, ptr %error_message + call void @panic_str(i32 70002, ptr %error_message_nonnull) unreachable } -declare i8* @gpu_get_error() +declare ptr @gpu_get_error() ; Function Attrs: noreturn -declare void @panic_str(i32, i8*) #1 +declare void @panic_str(i32, ptr) #1 attributes #0 = { noinline } attributes #1 = { noreturn } diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm14_dispose_context.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_dispose_context.snap similarity index 73% rename from qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm14_dispose_context.snap rename to qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_dispose_context.snap index 7ba4c6376..4526a3284 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm14_dispose_context.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_dispose_context.snap @@ -36,17 +36,17 @@ err: ; preds = %entry ; Function Attrs: noinline define void @gpu_error_handler() #0 { entry: - %error_message = call i8* @gpu_get_error() - %is_null = icmp eq i8* %error_message, null - %error_message_nonnull = select i1 %is_null, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @no_gpu_error, i32 0, i32 0), i8* %error_message - call void @panic_str(i32 70002, i8* %error_message_nonnull) + %error_message = call ptr @gpu_get_error() + %is_null = icmp eq ptr %error_message, null + %error_message_nonnull = select i1 %is_null, ptr @no_gpu_error, ptr %error_message + call void @panic_str(i32 70002, ptr %error_message_nonnull) unreachable } -declare i8* @gpu_get_error() +declare ptr @gpu_get_error() ; Function Attrs: noreturn -declare void @panic_str(i32, i8*) #1 +declare void @panic_str(i32, ptr) #1 attributes #0 = { noinline } attributes #1 = { noreturn } diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm14_get_context.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_get_context.snap similarity index 73% rename from qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm14_get_context.snap rename to qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_get_context.snap index cad6348bb..b70f099a7 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm14_get_context.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_get_context.snap @@ -15,9 +15,9 @@ alloca_block: entry_block: ; preds = %alloca_block call void @run_gpu_validation() %gpu_ref_ptr = alloca i64, align 8 - %gpu_ref_call = call i8 @gpu_init(i64 %0, i64* %gpu_ref_ptr) + %gpu_ref_call = call i8 @gpu_init(i64 %0, ptr %gpu_ref_ptr) call void @validate_gpu_response(i8 %gpu_ref_call) - %gpu_ref = load i64, i64* %gpu_ref_ptr, align 4 + %gpu_ref = load i64, ptr %gpu_ref_ptr, align 4 %1 = insertvalue { i1, i64 } { i1 true, i64 poison }, i64 %gpu_ref, 1 ret { i1, i64 } %1 } @@ -25,7 +25,7 @@ entry_block: ; preds = %alloca_block ; Function Attrs: noinline define void @run_gpu_validation() #0 { entry: - %validated = load i8, i8* @gpu_validated, align 1 + %validated = load i8, ptr @gpu_validated, align 1 %already_validated = icmp ne i8 %validated, 0 br i1 %already_validated, label %done, label %validate @@ -35,7 +35,7 @@ done: ; preds = %entry validate: ; preds = %entry %validate_call = call i8 @gpu_validate_api(i64 0, i64 1, i64 0) call void @validate_gpu_response(i8 %validate_call) - store i8 1, i8* @gpu_validated, align 1 + store i8 1, ptr @gpu_validated, align 1 ret void } @@ -58,19 +58,19 @@ err: ; preds = %entry ; Function Attrs: noinline define void @gpu_error_handler() #0 { entry: - %error_message = call i8* @gpu_get_error() - %is_null = icmp eq i8* %error_message, null - %error_message_nonnull = select i1 %is_null, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @no_gpu_error, i32 0, i32 0), i8* %error_message - call void @panic_str(i32 70002, i8* %error_message_nonnull) + %error_message = call ptr @gpu_get_error() + %is_null = icmp eq ptr %error_message, null + %error_message_nonnull = select i1 %is_null, ptr @no_gpu_error, ptr %error_message + call void @panic_str(i32 70002, ptr %error_message_nonnull) unreachable } -declare i8* @gpu_get_error() +declare ptr @gpu_get_error() ; Function Attrs: noreturn -declare void @panic_str(i32, i8*) #1 +declare void @panic_str(i32, ptr) #1 -declare i8 @gpu_init(i64, i64*) +declare i8 @gpu_init(i64, ptr) attributes #0 = { noinline } attributes #1 = { noreturn } diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm14_lookup.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_lookup_by_id.snap similarity index 100% rename from qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm14_lookup.snap rename to qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_lookup_by_id.snap diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm14_lookup_by_name.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_lookup_by_name.snap similarity index 70% rename from qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm14_lookup_by_name.snap rename to qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_lookup_by_name.snap index b878a95a5..16f6b9474 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm14_lookup_by_name.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_lookup_by_name.snap @@ -23,29 +23,29 @@ entry_block: ; preds = %alloca_block ; Function Attrs: noinline define i64 @gpu_function_id_example_function() #0 { entry: - %function_id = load i8, i8* @gpu_cache_is_set_function_id_example_function, align 1 + %function_id = load i8, ptr @gpu_cache_is_set_function_id_example_function, align 1 %needs_lookup = icmp eq i8 %function_id, 0 br i1 %needs_lookup, label %lookup, label %read_cache lookup: ; preds = %entry call void @run_gpu_validation() %function_id_ptr = alloca i64, align 8 - %function_id_call = call i8 @gpu_get_function_id(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @function_name, i32 0, i32 0), i64* %function_id_ptr) + %function_id_call = call i8 @gpu_get_function_id(ptr @function_name, ptr %function_id_ptr) call void @validate_gpu_response(i8 %function_id_call) - %function_id2 = load i64, i64* %function_id_ptr, align 4 - store i64 %function_id2, i64* @gpu_cache_function_id_example_function, align 4 - store i8 1, i8* @gpu_cache_is_set_function_id_example_function, align 1 + %function_id2 = load i64, ptr %function_id_ptr, align 4 + store i64 %function_id2, ptr @gpu_cache_function_id_example_function, align 4 + store i8 1, ptr @gpu_cache_is_set_function_id_example_function, align 1 ret i64 %function_id2 read_cache: ; preds = %entry - %function_id1 = load i64, i64* @gpu_cache_function_id_example_function, align 4 + %function_id1 = load i64, ptr @gpu_cache_function_id_example_function, align 4 ret i64 %function_id1 } ; Function Attrs: noinline define void @run_gpu_validation() #0 { entry: - %validated = load i8, i8* @gpu_validated, align 1 + %validated = load i8, ptr @gpu_validated, align 1 %already_validated = icmp ne i8 %validated, 0 br i1 %already_validated, label %done, label %validate @@ -55,7 +55,7 @@ done: ; preds = %entry validate: ; preds = %entry %validate_call = call i8 @gpu_validate_api(i64 0, i64 1, i64 0) call void @validate_gpu_response(i8 %validate_call) - store i8 1, i8* @gpu_validated, align 1 + store i8 1, ptr @gpu_validated, align 1 ret void } @@ -78,19 +78,19 @@ err: ; preds = %entry ; Function Attrs: noinline define void @gpu_error_handler() #0 { entry: - %error_message = call i8* @gpu_get_error() - %is_null = icmp eq i8* %error_message, null - %error_message_nonnull = select i1 %is_null, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @no_gpu_error, i32 0, i32 0), i8* %error_message - call void @panic_str(i32 70002, i8* %error_message_nonnull) + %error_message = call ptr @gpu_get_error() + %is_null = icmp eq ptr %error_message, null + %error_message_nonnull = select i1 %is_null, ptr @no_gpu_error, ptr %error_message + call void @panic_str(i32 70002, ptr %error_message_nonnull) unreachable } -declare i8* @gpu_get_error() +declare ptr @gpu_get_error() ; Function Attrs: noreturn -declare void @panic_str(i32, i8*) #1 +declare void @panic_str(i32, ptr) #1 -declare i8 @gpu_get_function_id(i8*, i64*) +declare i8 @gpu_get_function_id(ptr, ptr) attributes #0 = { noinline } attributes #1 = { noreturn } diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm14_read_result_float.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_read_result_float.snap similarity index 57% rename from qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm14_read_result_float.snap rename to qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_read_result_float.snap index eedc05542..51b59263f 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm14_read_result_float.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_read_result_float.snap @@ -13,17 +13,15 @@ alloca_block: entry_block: ; preds = %alloca_block %int_result = alloca i64, align 8 - %result_ptr = bitcast i64* %int_result to i8* - %read_status = call i8 @gpu_get_result(i64 %0, i64 8, i8* %result_ptr) + %read_status = call i8 @gpu_get_result(i64 %0, i64 8, ptr %int_result) call void @validate_gpu_response(i8 %read_status) - %float_result_ptr = bitcast i64* %int_result to double* - %float_result = load double, double* %float_result_ptr, align 8 - %mrv = insertvalue { i64, double } undef, i64 %0, 0 - %mrv6 = insertvalue { i64, double } %mrv, double %float_result, 1 + %result = load double, ptr %int_result, align 8 + %mrv = insertvalue { i64, double } poison, i64 %0, 0 + %mrv6 = insertvalue { i64, double } %mrv, double %result, 1 ret { i64, double } %mrv6 } -declare i8 @gpu_get_result(i64, i64, i8*) +declare i8 @gpu_get_result(i64, i64, ptr) ; Function Attrs: noinline define void @validate_gpu_response(i8 %0) #0 { @@ -42,17 +40,17 @@ err: ; preds = %entry ; Function Attrs: noinline define void @gpu_error_handler() #0 { entry: - %error_message = call i8* @gpu_get_error() - %is_null = icmp eq i8* %error_message, null - %error_message_nonnull = select i1 %is_null, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @no_gpu_error, i32 0, i32 0), i8* %error_message - call void @panic_str(i32 70002, i8* %error_message_nonnull) + %error_message = call ptr @gpu_get_error() + %is_null = icmp eq ptr %error_message, null + %error_message_nonnull = select i1 %is_null, ptr @no_gpu_error, ptr %error_message + call void @panic_str(i32 70002, ptr %error_message_nonnull) unreachable } -declare i8* @gpu_get_error() +declare ptr @gpu_get_error() ; Function Attrs: noreturn -declare void @panic_str(i32, i8*) #1 +declare void @panic_str(i32, ptr) #1 attributes #0 = { noinline } attributes #1 = { noreturn } diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm14_read_result_int.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_read_result_int.snap similarity index 58% rename from qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm14_read_result_int.snap rename to qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_read_result_int.snap index 9cce5d931..be1f010ca 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm14_read_result_int.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_read_result_int.snap @@ -13,16 +13,15 @@ alloca_block: entry_block: ; preds = %alloca_block %int_result = alloca i64, align 8 - %result_ptr = bitcast i64* %int_result to i8* - %read_status = call i8 @gpu_get_result(i64 %0, i64 8, i8* %result_ptr) + %read_status = call i8 @gpu_get_result(i64 %0, i64 8, ptr %int_result) call void @validate_gpu_response(i8 %read_status) - %int_result2 = load i64, i64* %int_result, align 4 - %mrv = insertvalue { i64, i64 } undef, i64 %0, 0 - %mrv7 = insertvalue { i64, i64 } %mrv, i64 %int_result2, 1 - ret { i64, i64 } %mrv7 + %result = load i64, ptr %int_result, align 4 + %mrv = insertvalue { i64, i64 } poison, i64 %0, 0 + %mrv6 = insertvalue { i64, i64 } %mrv, i64 %result, 1 + ret { i64, i64 } %mrv6 } -declare i8 @gpu_get_result(i64, i64, i8*) +declare i8 @gpu_get_result(i64, i64, ptr) ; Function Attrs: noinline define void @validate_gpu_response(i8 %0) #0 { @@ -41,17 +40,17 @@ err: ; preds = %entry ; Function Attrs: noinline define void @gpu_error_handler() #0 { entry: - %error_message = call i8* @gpu_get_error() - %is_null = icmp eq i8* %error_message, null - %error_message_nonnull = select i1 %is_null, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @no_gpu_error, i32 0, i32 0), i8* %error_message - call void @panic_str(i32 70002, i8* %error_message_nonnull) + %error_message = call ptr @gpu_get_error() + %is_null = icmp eq ptr %error_message, null + %error_message_nonnull = select i1 %is_null, ptr @no_gpu_error, ptr %error_message + call void @panic_str(i32 70002, ptr %error_message_nonnull) unreachable } -declare i8* @gpu_get_error() +declare ptr @gpu_get_error() ; Function Attrs: noreturn -declare void @panic_str(i32, i8*) #1 +declare void @panic_str(i32, ptr) #1 attributes #0 = { noinline } attributes #1 = { noreturn } diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm14_call_args.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm14_call_args.snap deleted file mode 100644 index e2b7b72a3..000000000 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm14_call_args.snap +++ /dev/null @@ -1,104 +0,0 @@ ---- -source: qis-compiler/rust/gpu.rs -expression: mod_str ---- -; ModuleID = 'test_context' -source_filename = "test_context" - -@arg_types = private unnamed_addr constant [7 x i8] c"iifb:v\00", align 1 -@no_gpu_error = private unnamed_addr constant [27 x i8] c"No error message available\00", align 1 - -define private i64 @_hl.main.1(i64 %0, i64 %1, i64 %2, i64 %3, double %4, i1 %5) { -alloca_block: - %"0" = alloca i64, align 8 - %"2_0" = alloca i64, align 8 - %"2_1" = alloca i64, align 8 - %"2_2" = alloca i64, align 8 - %"2_3" = alloca i64, align 8 - %"2_4" = alloca double, align 8 - %"2_5" = alloca i1, align 1 - %"4_0" = alloca i64, align 8 - br label %entry_block - -entry_block: ; preds = %alloca_block - store i64 %0, i64* %"2_0", align 4 - store i64 %1, i64* %"2_1", align 4 - store i64 %2, i64* %"2_2", align 4 - store i64 %3, i64* %"2_3", align 4 - store double %4, double* %"2_4", align 8 - store i1 %5, i1* %"2_5", align 1 - %"2_01" = load i64, i64* %"2_0", align 4 - %"2_12" = load i64, i64* %"2_1", align 4 - %"2_23" = load i64, i64* %"2_2", align 4 - %"2_34" = load i64, i64* %"2_3", align 4 - %"2_45" = load double, double* %"2_4", align 8 - %"2_56" = load i1, i1* %"2_5", align 1 - %gpu_input_blob = alloca [25 x i8], align 1 - %dest_ptr = getelementptr inbounds [25 x i8], [25 x i8]* %gpu_input_blob, i64 0, i64 0 - %arg_i64_tmp = alloca i64, align 8 - store i64 %"2_23", i64* %arg_i64_tmp, align 4 - %arg_i8_ptr = bitcast i64* %arg_i64_tmp to [8 x i8]* - %6 = bitcast [8 x i8]* %arg_i8_ptr to i8* - call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %dest_ptr, i8* align 1 %6, i64 8, i1 false) - %dest_ptr7 = getelementptr inbounds [25 x i8], [25 x i8]* %gpu_input_blob, i64 0, i64 8 - %arg_i64_tmp8 = alloca i64, align 8 - store i64 %"2_34", i64* %arg_i64_tmp8, align 4 - %arg_i8_ptr9 = bitcast i64* %arg_i64_tmp8 to [8 x i8]* - %7 = bitcast [8 x i8]* %arg_i8_ptr9 to i8* - call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %dest_ptr7, i8* align 1 %7, i64 8, i1 false) - %dest_ptr10 = getelementptr inbounds [25 x i8], [25 x i8]* %gpu_input_blob, i64 0, i64 16 - %arg_f64_tmp = alloca double, align 8 - store double %"2_45", double* %arg_f64_tmp, align 8 - %arg_i8_ptr11 = bitcast double* %arg_f64_tmp to [8 x i8]* - %8 = bitcast [8 x i8]* %arg_i8_ptr11 to i8* - call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %dest_ptr10, i8* align 1 %8, i64 8, i1 false) - %dest_ptr12 = getelementptr inbounds [25 x i8], [25 x i8]* %gpu_input_blob, i64 0, i64 24 - %arg_i8 = zext i1 %"2_56" to i8 - store i8 %arg_i8, i8* %dest_ptr12, align 1 - %gpu_input_blob_ptr = getelementptr inbounds [25 x i8], [25 x i8]* %gpu_input_blob, i64 0, i64 0 - %9 = call i8 @gpu_call(i64 %"2_01", i64 %"2_12", i64 25, i8* %gpu_input_blob_ptr, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @arg_types, i32 0, i32 0)) - call void @validate_gpu_response(i8 %9) - store i64 %"2_01", i64* %"4_0", align 4 - %"4_013" = load i64, i64* %"4_0", align 4 - store i64 %"4_013", i64* %"0", align 4 - %"014" = load i64, i64* %"0", align 4 - ret i64 %"014" -} - -declare i8 @gpu_call(i64, i64, i64, i8*, i8*) - -; Function Attrs: argmemonly nofree nounwind willreturn -declare void @llvm.memcpy.p0i8.p0i8.i64(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i64, i1 immarg) #0 - -; Function Attrs: noinline -define void @validate_gpu_response(i8 %0) #1 { -entry: - %success = icmp ne i8 %0, 0 - br i1 %success, label %ok, label %err - -ok: ; preds = %entry - ret void - -err: ; preds = %entry - call void @gpu_error_handler() - unreachable -} - -; Function Attrs: noinline -define void @gpu_error_handler() #1 { -entry: - %error_message = call i8* @gpu_get_error() - %is_null = icmp eq i8* %error_message, null - %error_message_nonnull = select i1 %is_null, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @no_gpu_error, i32 0, i32 0), i8* %error_message - call void @panic_str(i32 70002, i8* %error_message_nonnull) - unreachable -} - -declare i8* @gpu_get_error() - -; Function Attrs: noreturn -declare void @panic_str(i32, i8*) #2 - -attributes #0 = { argmemonly nofree nounwind willreturn } -attributes #1 = { noinline } -attributes #2 = { noreturn } diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm14_lookup_by_id.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm14_lookup_by_id.snap deleted file mode 100644 index 19c0b4ee3..000000000 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm14_lookup_by_id.snap +++ /dev/null @@ -1,23 +0,0 @@ ---- -source: qis-compiler/rust/gpu.rs -expression: mod_str ---- -; ModuleID = 'test_context' -source_filename = "test_context" - -define private i64 @_hl.main.1({} %0) { -alloca_block: - %"0" = alloca i64, align 8 - %"2_0" = alloca {}, align 8 - %"4_0" = alloca i64, align 8 - br label %entry_block - -entry_block: ; preds = %alloca_block - store {} %0, {}* %"2_0", align 1 - %"2_01" = load {}, {}* %"2_0", align 1 - store i64 42, i64* %"4_0", align 4 - %"4_02" = load i64, i64* %"4_0", align 4 - store i64 %"4_02", i64* %"0", align 4 - %"03" = load i64, i64* %"0", align 4 - ret i64 %"03" -} diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_call_args.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_call_args.snap new file mode 100644 index 000000000..390081dcd --- /dev/null +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_call_args.snap @@ -0,0 +1,97 @@ +--- +source: qis-compiler/rust/gpu.rs +expression: mod_str +--- +; ModuleID = 'test_context' +source_filename = "test_context" + +@arg_types = private unnamed_addr constant [7 x i8] c"iifb:v\00", align 1 +@no_gpu_error = private unnamed_addr constant [27 x i8] c"No error message available\00", align 1 + +define private i64 @_hl.main.1(i64 %0, i64 %1, i64 %2, i64 %3, double %4, i1 %5) { +alloca_block: + %"0" = alloca i64, align 8 + %"2_0" = alloca i64, align 8 + %"2_1" = alloca i64, align 8 + %"2_2" = alloca i64, align 8 + %"2_3" = alloca i64, align 8 + %"2_4" = alloca double, align 8 + %"2_5" = alloca i1, align 1 + %"4_0" = alloca i64, align 8 + br label %entry_block + +entry_block: ; preds = %alloca_block + store i64 %0, ptr %"2_0", align 4 + store i64 %1, ptr %"2_1", align 4 + store i64 %2, ptr %"2_2", align 4 + store i64 %3, ptr %"2_3", align 4 + store double %4, ptr %"2_4", align 8 + store i1 %5, ptr %"2_5", align 1 + %"2_01" = load i64, ptr %"2_0", align 4 + %"2_12" = load i64, ptr %"2_1", align 4 + %"2_23" = load i64, ptr %"2_2", align 4 + %"2_34" = load i64, ptr %"2_3", align 4 + %"2_45" = load double, ptr %"2_4", align 8 + %"2_56" = load i1, ptr %"2_5", align 1 + %gpu_input_blob = alloca [25 x i8], align 1 + %dest_ptr = getelementptr inbounds [25 x i8], ptr %gpu_input_blob, i64 0, i64 0 + %arg_i64_tmp = alloca i64, align 8 + store i64 %"2_23", ptr %arg_i64_tmp, align 4 + call void @llvm.memcpy.p0.p0.i64(ptr align 1 %dest_ptr, ptr align 1 %arg_i64_tmp, i64 8, i1 false) + %dest_ptr7 = getelementptr inbounds [25 x i8], ptr %gpu_input_blob, i64 0, i64 8 + %arg_i64_tmp8 = alloca i64, align 8 + store i64 %"2_34", ptr %arg_i64_tmp8, align 4 + call void @llvm.memcpy.p0.p0.i64(ptr align 1 %dest_ptr7, ptr align 1 %arg_i64_tmp8, i64 8, i1 false) + %dest_ptr9 = getelementptr inbounds [25 x i8], ptr %gpu_input_blob, i64 0, i64 16 + %arg_f64_tmp = alloca double, align 8 + store double %"2_45", ptr %arg_f64_tmp, align 8 + call void @llvm.memcpy.p0.p0.i64(ptr align 1 %dest_ptr9, ptr align 1 %arg_f64_tmp, i64 8, i1 false) + %dest_ptr10 = getelementptr inbounds [25 x i8], ptr %gpu_input_blob, i64 0, i64 24 + %arg_i8 = zext i1 %"2_56" to i8 + store i8 %arg_i8, ptr %dest_ptr10, align 1 + %6 = call i8 @gpu_call(i64 %"2_01", i64 %"2_12", i64 25, ptr %gpu_input_blob, ptr @arg_types) + call void @validate_gpu_response(i8 %6) + store i64 %"2_01", ptr %"4_0", align 4 + %"4_011" = load i64, ptr %"4_0", align 4 + store i64 %"4_011", ptr %"0", align 4 + %"012" = load i64, ptr %"0", align 4 + ret i64 %"012" +} + +declare i8 @gpu_call(i64, i64, i64, ptr, ptr) + +; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite) +declare void @llvm.memcpy.p0.p0.i64(ptr noalias writeonly captures(none), ptr noalias readonly captures(none), i64, i1 immarg) #0 + +; Function Attrs: noinline +define void @validate_gpu_response(i8 %0) #1 { +entry: + %success = icmp ne i8 %0, 0 + br i1 %success, label %ok, label %err + +ok: ; preds = %entry + ret void + +err: ; preds = %entry + call void @gpu_error_handler() + unreachable +} + +; Function Attrs: noinline +define void @gpu_error_handler() #1 { +entry: + %error_message = call ptr @gpu_get_error() + %is_null = icmp eq ptr %error_message, null + %error_message_nonnull = select i1 %is_null, ptr @no_gpu_error, ptr %error_message + call void @panic_str(i32 70002, ptr %error_message_nonnull) + unreachable +} + +declare ptr @gpu_get_error() + +; Function Attrs: noreturn +declare void @panic_str(i32, ptr) #2 + +attributes #0 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) } +attributes #1 = { noinline } +attributes #2 = { noreturn } diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm14_call_ret_float.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_call_ret_float.snap similarity index 54% rename from qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm14_call_ret_float.snap rename to qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_call_ret_float.snap index e2e6fcab2..1caeca966 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm14_call_ret_float.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_call_ret_float.snap @@ -17,22 +17,21 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - store i64 %0, i64* %"2_0", align 4 - store i64 %1, i64* %"2_1", align 4 - %"2_01" = load i64, i64* %"2_0", align 4 - %"2_12" = load i64, i64* %"2_1", align 4 + store i64 %0, ptr %"2_0", align 4 + store i64 %1, ptr %"2_1", align 4 + %"2_01" = load i64, ptr %"2_0", align 4 + %"2_12" = load i64, ptr %"2_1", align 4 %gpu_input_blob = alloca [0 x i8], align 1 - %gpu_input_blob_ptr = getelementptr inbounds [0 x i8], [0 x i8]* %gpu_input_blob, i64 0, i64 0 - %2 = call i8 @gpu_call(i64 %"2_01", i64 %"2_12", i64 0, i8* %gpu_input_blob_ptr, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @arg_types, i32 0, i32 0)) + %2 = call i8 @gpu_call(i64 %"2_01", i64 %"2_12", i64 0, ptr %gpu_input_blob, ptr @arg_types) call void @validate_gpu_response(i8 %2) - store i64 %"2_01", i64* %"4_0", align 4 - %"4_03" = load i64, i64* %"4_0", align 4 - store i64 %"4_03", i64* %"0", align 4 - %"04" = load i64, i64* %"0", align 4 + store i64 %"2_01", ptr %"4_0", align 4 + %"4_03" = load i64, ptr %"4_0", align 4 + store i64 %"4_03", ptr %"0", align 4 + %"04" = load i64, ptr %"0", align 4 ret i64 %"04" } -declare i8 @gpu_call(i64, i64, i64, i8*, i8*) +declare i8 @gpu_call(i64, i64, i64, ptr, ptr) ; Function Attrs: noinline define void @validate_gpu_response(i8 %0) #0 { @@ -51,17 +50,17 @@ err: ; preds = %entry ; Function Attrs: noinline define void @gpu_error_handler() #0 { entry: - %error_message = call i8* @gpu_get_error() - %is_null = icmp eq i8* %error_message, null - %error_message_nonnull = select i1 %is_null, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @no_gpu_error, i32 0, i32 0), i8* %error_message - call void @panic_str(i32 70002, i8* %error_message_nonnull) + %error_message = call ptr @gpu_get_error() + %is_null = icmp eq ptr %error_message, null + %error_message_nonnull = select i1 %is_null, ptr @no_gpu_error, ptr %error_message + call void @panic_str(i32 70002, ptr %error_message_nonnull) unreachable } -declare i8* @gpu_get_error() +declare ptr @gpu_get_error() ; Function Attrs: noreturn -declare void @panic_str(i32, i8*) #1 +declare void @panic_str(i32, ptr) #1 attributes #0 = { noinline } attributes #1 = { noreturn } diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm14_call_ret_int.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_call_ret_int.snap similarity index 54% rename from qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm14_call_ret_int.snap rename to qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_call_ret_int.snap index 1a9c2f702..45adc2e10 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm14_call_ret_int.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_call_ret_int.snap @@ -17,22 +17,21 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - store i64 %0, i64* %"2_0", align 4 - store i64 %1, i64* %"2_1", align 4 - %"2_01" = load i64, i64* %"2_0", align 4 - %"2_12" = load i64, i64* %"2_1", align 4 + store i64 %0, ptr %"2_0", align 4 + store i64 %1, ptr %"2_1", align 4 + %"2_01" = load i64, ptr %"2_0", align 4 + %"2_12" = load i64, ptr %"2_1", align 4 %gpu_input_blob = alloca [0 x i8], align 1 - %gpu_input_blob_ptr = getelementptr inbounds [0 x i8], [0 x i8]* %gpu_input_blob, i64 0, i64 0 - %2 = call i8 @gpu_call(i64 %"2_01", i64 %"2_12", i64 0, i8* %gpu_input_blob_ptr, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @arg_types, i32 0, i32 0)) + %2 = call i8 @gpu_call(i64 %"2_01", i64 %"2_12", i64 0, ptr %gpu_input_blob, ptr @arg_types) call void @validate_gpu_response(i8 %2) - store i64 %"2_01", i64* %"4_0", align 4 - %"4_03" = load i64, i64* %"4_0", align 4 - store i64 %"4_03", i64* %"0", align 4 - %"04" = load i64, i64* %"0", align 4 + store i64 %"2_01", ptr %"4_0", align 4 + %"4_03" = load i64, ptr %"4_0", align 4 + store i64 %"4_03", ptr %"0", align 4 + %"04" = load i64, ptr %"0", align 4 ret i64 %"04" } -declare i8 @gpu_call(i64, i64, i64, i8*, i8*) +declare i8 @gpu_call(i64, i64, i64, ptr, ptr) ; Function Attrs: noinline define void @validate_gpu_response(i8 %0) #0 { @@ -51,17 +50,17 @@ err: ; preds = %entry ; Function Attrs: noinline define void @gpu_error_handler() #0 { entry: - %error_message = call i8* @gpu_get_error() - %is_null = icmp eq i8* %error_message, null - %error_message_nonnull = select i1 %is_null, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @no_gpu_error, i32 0, i32 0), i8* %error_message - call void @panic_str(i32 70002, i8* %error_message_nonnull) + %error_message = call ptr @gpu_get_error() + %is_null = icmp eq ptr %error_message, null + %error_message_nonnull = select i1 %is_null, ptr @no_gpu_error, ptr %error_message + call void @panic_str(i32 70002, ptr %error_message_nonnull) unreachable } -declare i8* @gpu_get_error() +declare ptr @gpu_get_error() ; Function Attrs: noreturn -declare void @panic_str(i32, i8*) #1 +declare void @panic_str(i32, ptr) #1 attributes #0 = { noinline } attributes #1 = { noreturn } diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm14_dispose_context.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_dispose_context.snap similarity index 70% rename from qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm14_dispose_context.snap rename to qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_dispose_context.snap index 777cfa6ce..8c124c2e5 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm14_dispose_context.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_dispose_context.snap @@ -13,8 +13,8 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - store i64 %0, i64* %"2_0", align 4 - %"2_01" = load i64, i64* %"2_0", align 4 + store i64 %0, ptr %"2_0", align 4 + %"2_01" = load i64, ptr %"2_0", align 4 %1 = call i8 @gpu_discard(i64 %"2_01") call void @validate_gpu_response(i8 %1) ret void @@ -39,17 +39,17 @@ err: ; preds = %entry ; Function Attrs: noinline define void @gpu_error_handler() #0 { entry: - %error_message = call i8* @gpu_get_error() - %is_null = icmp eq i8* %error_message, null - %error_message_nonnull = select i1 %is_null, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @no_gpu_error, i32 0, i32 0), i8* %error_message - call void @panic_str(i32 70002, i8* %error_message_nonnull) + %error_message = call ptr @gpu_get_error() + %is_null = icmp eq ptr %error_message, null + %error_message_nonnull = select i1 %is_null, ptr @no_gpu_error, ptr %error_message + call void @panic_str(i32 70002, ptr %error_message_nonnull) unreachable } -declare i8* @gpu_get_error() +declare ptr @gpu_get_error() ; Function Attrs: noreturn -declare void @panic_str(i32, i8*) #1 +declare void @panic_str(i32, ptr) #1 attributes #0 = { noinline } attributes #1 = { noreturn } diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm14_get_context.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_get_context.snap similarity index 66% rename from qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm14_get_context.snap rename to qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_get_context.snap index 8f769cc48..c42daa1d7 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm14_get_context.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_get_context.snap @@ -16,25 +16,25 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - store i64 %0, i64* %"2_0", align 4 - %"2_01" = load i64, i64* %"2_0", align 4 + store i64 %0, ptr %"2_0", align 4 + %"2_01" = load i64, ptr %"2_0", align 4 call void @run_gpu_validation() %gpu_ref_ptr = alloca i64, align 8 - %gpu_ref_call = call i8 @gpu_init(i64 %"2_01", i64* %gpu_ref_ptr) + %gpu_ref_call = call i8 @gpu_init(i64 %"2_01", ptr %gpu_ref_ptr) call void @validate_gpu_response(i8 %gpu_ref_call) - %gpu_ref = load i64, i64* %gpu_ref_ptr, align 4 + %gpu_ref = load i64, ptr %gpu_ref_ptr, align 4 %1 = insertvalue { i1, i64 } { i1 true, i64 poison }, i64 %gpu_ref, 1 - store { i1, i64 } %1, { i1, i64 }* %"4_0", align 4 - %"4_02" = load { i1, i64 }, { i1, i64 }* %"4_0", align 4 - store { i1, i64 } %"4_02", { i1, i64 }* %"0", align 4 - %"03" = load { i1, i64 }, { i1, i64 }* %"0", align 4 + store { i1, i64 } %1, ptr %"4_0", align 4 + %"4_02" = load { i1, i64 }, ptr %"4_0", align 4 + store { i1, i64 } %"4_02", ptr %"0", align 4 + %"03" = load { i1, i64 }, ptr %"0", align 4 ret { i1, i64 } %"03" } ; Function Attrs: noinline define void @run_gpu_validation() #0 { entry: - %validated = load i8, i8* @gpu_validated, align 1 + %validated = load i8, ptr @gpu_validated, align 1 %already_validated = icmp ne i8 %validated, 0 br i1 %already_validated, label %done, label %validate @@ -44,7 +44,7 @@ done: ; preds = %entry validate: ; preds = %entry %validate_call = call i8 @gpu_validate_api(i64 0, i64 1, i64 0) call void @validate_gpu_response(i8 %validate_call) - store i8 1, i8* @gpu_validated, align 1 + store i8 1, ptr @gpu_validated, align 1 ret void } @@ -67,19 +67,19 @@ err: ; preds = %entry ; Function Attrs: noinline define void @gpu_error_handler() #0 { entry: - %error_message = call i8* @gpu_get_error() - %is_null = icmp eq i8* %error_message, null - %error_message_nonnull = select i1 %is_null, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @no_gpu_error, i32 0, i32 0), i8* %error_message - call void @panic_str(i32 70002, i8* %error_message_nonnull) + %error_message = call ptr @gpu_get_error() + %is_null = icmp eq ptr %error_message, null + %error_message_nonnull = select i1 %is_null, ptr @no_gpu_error, ptr %error_message + call void @panic_str(i32 70002, ptr %error_message_nonnull) unreachable } -declare i8* @gpu_get_error() +declare ptr @gpu_get_error() ; Function Attrs: noreturn -declare void @panic_str(i32, i8*) #1 +declare void @panic_str(i32, ptr) #1 -declare i8 @gpu_init(i64, i64*) +declare i8 @gpu_init(i64, ptr) attributes #0 = { noinline } attributes #1 = { noreturn } diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm14_lookup.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_lookup_by_id.snap similarity index 62% rename from qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm14_lookup.snap rename to qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_lookup_by_id.snap index 19c0b4ee3..a8991cc12 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm14_lookup.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_lookup_by_id.snap @@ -13,11 +13,11 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - store {} %0, {}* %"2_0", align 1 - %"2_01" = load {}, {}* %"2_0", align 1 - store i64 42, i64* %"4_0", align 4 - %"4_02" = load i64, i64* %"4_0", align 4 - store i64 %"4_02", i64* %"0", align 4 - %"03" = load i64, i64* %"0", align 4 + store {} %0, ptr %"2_0", align 1 + %"2_01" = load {}, ptr %"2_0", align 1 + store i64 42, ptr %"4_0", align 4 + %"4_02" = load i64, ptr %"4_0", align 4 + store i64 %"4_02", ptr %"0", align 4 + %"03" = load i64, ptr %"0", align 4 ret i64 %"03" } diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm14_lookup_by_name.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_lookup_by_name.snap similarity index 66% rename from qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm14_lookup_by_name.snap rename to qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_lookup_by_name.snap index c376790f4..949bc7fd3 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm14_lookup_by_name.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_lookup_by_name.snap @@ -19,42 +19,42 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - store {} %0, {}* %"2_0", align 1 - %"2_01" = load {}, {}* %"2_0", align 1 + store {} %0, ptr %"2_0", align 1 + %"2_01" = load {}, ptr %"2_0", align 1 %function_id_call = call i64 @gpu_function_id_example_function() - store i64 %function_id_call, i64* %"4_0", align 4 - %"4_02" = load i64, i64* %"4_0", align 4 - store i64 %"4_02", i64* %"0", align 4 - %"03" = load i64, i64* %"0", align 4 + store i64 %function_id_call, ptr %"4_0", align 4 + %"4_02" = load i64, ptr %"4_0", align 4 + store i64 %"4_02", ptr %"0", align 4 + %"03" = load i64, ptr %"0", align 4 ret i64 %"03" } ; Function Attrs: noinline define i64 @gpu_function_id_example_function() #0 { entry: - %function_id = load i8, i8* @gpu_cache_is_set_function_id_example_function, align 1 + %function_id = load i8, ptr @gpu_cache_is_set_function_id_example_function, align 1 %needs_lookup = icmp eq i8 %function_id, 0 br i1 %needs_lookup, label %lookup, label %read_cache lookup: ; preds = %entry call void @run_gpu_validation() %function_id_ptr = alloca i64, align 8 - %function_id_call = call i8 @gpu_get_function_id(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @function_name, i32 0, i32 0), i64* %function_id_ptr) + %function_id_call = call i8 @gpu_get_function_id(ptr @function_name, ptr %function_id_ptr) call void @validate_gpu_response(i8 %function_id_call) - %function_id2 = load i64, i64* %function_id_ptr, align 4 - store i64 %function_id2, i64* @gpu_cache_function_id_example_function, align 4 - store i8 1, i8* @gpu_cache_is_set_function_id_example_function, align 1 + %function_id2 = load i64, ptr %function_id_ptr, align 4 + store i64 %function_id2, ptr @gpu_cache_function_id_example_function, align 4 + store i8 1, ptr @gpu_cache_is_set_function_id_example_function, align 1 ret i64 %function_id2 read_cache: ; preds = %entry - %function_id1 = load i64, i64* @gpu_cache_function_id_example_function, align 4 + %function_id1 = load i64, ptr @gpu_cache_function_id_example_function, align 4 ret i64 %function_id1 } ; Function Attrs: noinline define void @run_gpu_validation() #0 { entry: - %validated = load i8, i8* @gpu_validated, align 1 + %validated = load i8, ptr @gpu_validated, align 1 %already_validated = icmp ne i8 %validated, 0 br i1 %already_validated, label %done, label %validate @@ -64,7 +64,7 @@ done: ; preds = %entry validate: ; preds = %entry %validate_call = call i8 @gpu_validate_api(i64 0, i64 1, i64 0) call void @validate_gpu_response(i8 %validate_call) - store i8 1, i8* @gpu_validated, align 1 + store i8 1, ptr @gpu_validated, align 1 ret void } @@ -87,19 +87,19 @@ err: ; preds = %entry ; Function Attrs: noinline define void @gpu_error_handler() #0 { entry: - %error_message = call i8* @gpu_get_error() - %is_null = icmp eq i8* %error_message, null - %error_message_nonnull = select i1 %is_null, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @no_gpu_error, i32 0, i32 0), i8* %error_message - call void @panic_str(i32 70002, i8* %error_message_nonnull) + %error_message = call ptr @gpu_get_error() + %is_null = icmp eq ptr %error_message, null + %error_message_nonnull = select i1 %is_null, ptr @no_gpu_error, ptr %error_message + call void @panic_str(i32 70002, ptr %error_message_nonnull) unreachable } -declare i8* @gpu_get_error() +declare ptr @gpu_get_error() ; Function Attrs: noreturn -declare void @panic_str(i32, i8*) #1 +declare void @panic_str(i32, ptr) #1 -declare i8 @gpu_get_function_id(i8*, i64*) +declare i8 @gpu_get_function_id(ptr, ptr) attributes #0 = { noinline } attributes #1 = { noreturn } diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm14_read_result_float.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_read_result_float.snap similarity index 52% rename from qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm14_read_result_float.snap rename to qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_read_result_float.snap index 989b067db..60f12af23 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm14_read_result_float.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_read_result_float.snap @@ -17,28 +17,26 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - store i64 %0, i64* %"2_0", align 4 - %"2_01" = load i64, i64* %"2_0", align 4 + store i64 %0, ptr %"2_0", align 4 + %"2_01" = load i64, ptr %"2_0", align 4 %int_result = alloca i64, align 8 - %result_ptr = bitcast i64* %int_result to i8* - %read_status = call i8 @gpu_get_result(i64 %"2_01", i64 8, i8* %result_ptr) + %read_status = call i8 @gpu_get_result(i64 %"2_01", i64 8, ptr %int_result) call void @validate_gpu_response(i8 %read_status) - %float_result_ptr = bitcast i64* %int_result to double* - %float_result = load double, double* %float_result_ptr, align 8 - store i64 %"2_01", i64* %"4_0", align 4 - store double %float_result, double* %"4_1", align 8 - %"4_02" = load i64, i64* %"4_0", align 4 - %"4_13" = load double, double* %"4_1", align 8 - store i64 %"4_02", i64* %"0", align 4 - store double %"4_13", double* %"1", align 8 - %"04" = load i64, i64* %"0", align 4 - %"15" = load double, double* %"1", align 8 - %mrv = insertvalue { i64, double } undef, i64 %"04", 0 + %result = load double, ptr %int_result, align 8 + store i64 %"2_01", ptr %"4_0", align 4 + store double %result, ptr %"4_1", align 8 + %"4_02" = load i64, ptr %"4_0", align 4 + %"4_13" = load double, ptr %"4_1", align 8 + store i64 %"4_02", ptr %"0", align 4 + store double %"4_13", ptr %"1", align 8 + %"04" = load i64, ptr %"0", align 4 + %"15" = load double, ptr %"1", align 8 + %mrv = insertvalue { i64, double } poison, i64 %"04", 0 %mrv6 = insertvalue { i64, double } %mrv, double %"15", 1 ret { i64, double } %mrv6 } -declare i8 @gpu_get_result(i64, i64, i8*) +declare i8 @gpu_get_result(i64, i64, ptr) ; Function Attrs: noinline define void @validate_gpu_response(i8 %0) #0 { @@ -57,17 +55,17 @@ err: ; preds = %entry ; Function Attrs: noinline define void @gpu_error_handler() #0 { entry: - %error_message = call i8* @gpu_get_error() - %is_null = icmp eq i8* %error_message, null - %error_message_nonnull = select i1 %is_null, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @no_gpu_error, i32 0, i32 0), i8* %error_message - call void @panic_str(i32 70002, i8* %error_message_nonnull) + %error_message = call ptr @gpu_get_error() + %is_null = icmp eq ptr %error_message, null + %error_message_nonnull = select i1 %is_null, ptr @no_gpu_error, ptr %error_message + call void @panic_str(i32 70002, ptr %error_message_nonnull) unreachable } -declare i8* @gpu_get_error() +declare ptr @gpu_get_error() ; Function Attrs: noreturn -declare void @panic_str(i32, i8*) #1 +declare void @panic_str(i32, ptr) #1 attributes #0 = { noinline } attributes #1 = { noreturn } diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm14_read_result_int.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_read_result_int.snap similarity index 50% rename from qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm14_read_result_int.snap rename to qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_read_result_int.snap index 973b00862..71033e667 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm14_read_result_int.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_read_result_int.snap @@ -17,27 +17,26 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - store i64 %0, i64* %"2_0", align 4 - %"2_01" = load i64, i64* %"2_0", align 4 + store i64 %0, ptr %"2_0", align 4 + %"2_01" = load i64, ptr %"2_0", align 4 %int_result = alloca i64, align 8 - %result_ptr = bitcast i64* %int_result to i8* - %read_status = call i8 @gpu_get_result(i64 %"2_01", i64 8, i8* %result_ptr) + %read_status = call i8 @gpu_get_result(i64 %"2_01", i64 8, ptr %int_result) call void @validate_gpu_response(i8 %read_status) - %int_result2 = load i64, i64* %int_result, align 4 - store i64 %"2_01", i64* %"4_0", align 4 - store i64 %int_result2, i64* %"4_1", align 4 - %"4_03" = load i64, i64* %"4_0", align 4 - %"4_14" = load i64, i64* %"4_1", align 4 - store i64 %"4_03", i64* %"0", align 4 - store i64 %"4_14", i64* %"1", align 4 - %"05" = load i64, i64* %"0", align 4 - %"16" = load i64, i64* %"1", align 4 - %mrv = insertvalue { i64, i64 } undef, i64 %"05", 0 - %mrv7 = insertvalue { i64, i64 } %mrv, i64 %"16", 1 - ret { i64, i64 } %mrv7 + %result = load i64, ptr %int_result, align 4 + store i64 %"2_01", ptr %"4_0", align 4 + store i64 %result, ptr %"4_1", align 4 + %"4_02" = load i64, ptr %"4_0", align 4 + %"4_13" = load i64, ptr %"4_1", align 4 + store i64 %"4_02", ptr %"0", align 4 + store i64 %"4_13", ptr %"1", align 4 + %"04" = load i64, ptr %"0", align 4 + %"15" = load i64, ptr %"1", align 4 + %mrv = insertvalue { i64, i64 } poison, i64 %"04", 0 + %mrv6 = insertvalue { i64, i64 } %mrv, i64 %"15", 1 + ret { i64, i64 } %mrv6 } -declare i8 @gpu_get_result(i64, i64, i8*) +declare i8 @gpu_get_result(i64, i64, ptr) ; Function Attrs: noinline define void @validate_gpu_response(i8 %0) #0 { @@ -56,17 +55,17 @@ err: ; preds = %entry ; Function Attrs: noinline define void @gpu_error_handler() #0 { entry: - %error_message = call i8* @gpu_get_error() - %is_null = icmp eq i8* %error_message, null - %error_message_nonnull = select i1 %is_null, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @no_gpu_error, i32 0, i32 0), i8* %error_message - call void @panic_str(i32 70002, i8* %error_message_nonnull) + %error_message = call ptr @gpu_get_error() + %is_null = icmp eq ptr %error_message, null + %error_message_nonnull = select i1 %is_null, ptr @no_gpu_error, ptr %error_message + call void @panic_str(i32 70002, ptr %error_message_nonnull) unreachable } -declare i8* @gpu_get_error() +declare ptr @gpu_get_error() ; Function Attrs: noreturn -declare void @panic_str(i32, i8*) #1 +declare void @panic_str(i32, ptr) #1 attributes #0 = { noinline } attributes #1 = { noreturn } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@llvm14_1.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@llvm14_1.snap deleted file mode 100644 index 0298f02be..000000000 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@llvm14_1.snap +++ /dev/null @@ -1,37 +0,0 @@ ---- -source: tket-qsystem/src/llvm/debug.rs -expression: mod_str ---- -; ModuleID = 'test_context' -source_filename = "test_context" - -@res_test_state.900F7606.0 = private constant [29 x i8] c"\1CUSER:STATE:test_state_result" - -define private [2 x i64] @_hl.main.1([2 x i64] %0) { -alloca_block: - br label %entry_block - -entry_block: ; preds = %alloca_block - %tag_len = load i8, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @res_test_state.900F7606.0, i32 0, i32 0), align 1 - %tag_len2 = zext i8 %tag_len to i64 - %1 = alloca i64, i32 2, align 8 - %2 = bitcast i64* %1 to [2 x i64]* - store [2 x i64] %0, [2 x i64]* %2, align 4 - %out_arr_alloca = alloca <{ i32, i32, i64*, i1* }>, align 8 - %x_ptr = getelementptr inbounds <{ i32, i32, i64*, i1* }>, <{ i32, i32, i64*, i1* }>* %out_arr_alloca, i32 0, i32 0 - %y_ptr = getelementptr inbounds <{ i32, i32, i64*, i1* }>, <{ i32, i32, i64*, i1* }>* %out_arr_alloca, i32 0, i32 1 - %arr_ptr = getelementptr inbounds <{ i32, i32, i64*, i1* }>, <{ i32, i32, i64*, i1* }>* %out_arr_alloca, i32 0, i32 2 - %mask_ptr = getelementptr inbounds <{ i32, i32, i64*, i1* }>, <{ i32, i32, i64*, i1* }>* %out_arr_alloca, i32 0, i32 3 - %3 = alloca i1, i32 2, align 1 - %4 = bitcast i1* %3 to [2 x i1]* - store [2 x i1] zeroinitializer, [2 x i1]* %4, align 1 - store i32 2, i32* %x_ptr, align 4 - store i32 1, i32* %y_ptr, align 4 - store i64* %1, i64** %arr_ptr, align 8 - store i1* %3, i1** %mask_ptr, align 8 - %5 = load <{ i32, i32, i64*, i1* }>, <{ i32, i32, i64*, i1* }>* %out_arr_alloca, align 1 - call void @print_state_result(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @res_test_state.900F7606.0, i32 0, i32 0), i64 %tag_len2, <{ i32, i32, i64*, i1* }>* %out_arr_alloca) - ret [2 x i64] %0 -} - -declare void @print_state_result(i8*, i64, <{ i32, i32, i64*, i1* }>*) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@llvm14_2.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@llvm14_2.snap deleted file mode 100644 index 29a830699..000000000 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@llvm14_2.snap +++ /dev/null @@ -1,37 +0,0 @@ ---- -source: tket-qsystem/src/llvm/debug.rs -expression: mod_str ---- -; ModuleID = 'test_context' -source_filename = "test_context" - -@res_test_state.900F7606.0 = private constant [29 x i8] c"\1CUSER:STATE:test_state_result" - -define private { i64*, i64 } @_hl.main.1({ i64*, i64 } %0) { -alloca_block: - br label %entry_block - -entry_block: ; preds = %alloca_block - %tag_len = load i8, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @res_test_state.900F7606.0, i32 0, i32 0), align 1 - %tag_len2 = zext i8 %tag_len to i64 - %array_ptr = extractvalue { i64*, i64 } %0, 0 - %array_offset = extractvalue { i64*, i64 } %0, 1 - %1 = getelementptr inbounds i64, i64* %array_ptr, i64 %array_offset - %out_arr_alloca = alloca <{ i32, i32, i64*, i1* }>, align 8 - %x_ptr = getelementptr inbounds <{ i32, i32, i64*, i1* }>, <{ i32, i32, i64*, i1* }>* %out_arr_alloca, i32 0, i32 0 - %y_ptr = getelementptr inbounds <{ i32, i32, i64*, i1* }>, <{ i32, i32, i64*, i1* }>* %out_arr_alloca, i32 0, i32 1 - %arr_ptr = getelementptr inbounds <{ i32, i32, i64*, i1* }>, <{ i32, i32, i64*, i1* }>* %out_arr_alloca, i32 0, i32 2 - %mask_ptr = getelementptr inbounds <{ i32, i32, i64*, i1* }>, <{ i32, i32, i64*, i1* }>* %out_arr_alloca, i32 0, i32 3 - %2 = alloca i1, i32 2, align 1 - %3 = bitcast i1* %2 to [2 x i1]* - store [2 x i1] zeroinitializer, [2 x i1]* %3, align 1 - store i32 2, i32* %x_ptr, align 4 - store i32 1, i32* %y_ptr, align 4 - store i64* %1, i64** %arr_ptr, align 8 - store i1* %2, i1** %mask_ptr, align 8 - %4 = load <{ i32, i32, i64*, i1* }>, <{ i32, i32, i64*, i1* }>* %out_arr_alloca, align 1 - call void @print_state_result(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @res_test_state.900F7606.0, i32 0, i32 0), i64 %tag_len2, <{ i32, i32, i64*, i1* }>* %out_arr_alloca) - ret { i64*, i64 } %0 -} - -declare void @print_state_result(i8*, i64, <{ i32, i32, i64*, i1* }>*) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@llvm21_1.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@llvm21_1.snap new file mode 100644 index 000000000..6cef542c4 --- /dev/null +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@llvm21_1.snap @@ -0,0 +1,35 @@ +--- +source: tket-qsystem/src/llvm/debug.rs +expression: mod_str +--- +; ModuleID = 'test_context' +source_filename = "test_context" + +@res_test_state.900F7606.0 = private constant [29 x i8] c"\1CUSER:STATE:test_state_result" + +define private [2 x i64] @_hl.main.1([2 x i64] %0) { +alloca_block: + br label %entry_block + +entry_block: ; preds = %alloca_block + %tag_len = load i8, ptr @res_test_state.900F7606.0, align 1 + %tag_len2 = zext i8 %tag_len to i64 + %1 = alloca i64, i32 2, align 8 + store [2 x i64] %0, ptr %1, align 4 + %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 + %x_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 0 + %y_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 1 + %arr_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 2 + %mask_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 3 + %2 = alloca i1, i32 2, align 1 + store [2 x i1] zeroinitializer, ptr %2, align 1 + store i32 2, ptr %x_ptr, align 4 + store i32 1, ptr %y_ptr, align 4 + store ptr %1, ptr %arr_ptr, align 8 + store ptr %2, ptr %mask_ptr, align 8 + %3 = load <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, align 1 + call void @print_state_result(ptr @res_test_state.900F7606.0, i64 %tag_len2, ptr %out_arr_alloca) + ret [2 x i64] %0 +} + +declare void @print_state_result(ptr, i64, ptr) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@llvm21_2.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@llvm21_2.snap new file mode 100644 index 000000000..9ffb6c0ef --- /dev/null +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@llvm21_2.snap @@ -0,0 +1,36 @@ +--- +source: tket-qsystem/src/llvm/debug.rs +expression: mod_str +--- +; ModuleID = 'test_context' +source_filename = "test_context" + +@res_test_state.900F7606.0 = private constant [29 x i8] c"\1CUSER:STATE:test_state_result" + +define private { ptr, i64 } @_hl.main.1({ ptr, i64 } %0) { +alloca_block: + br label %entry_block + +entry_block: ; preds = %alloca_block + %tag_len = load i8, ptr @res_test_state.900F7606.0, align 1 + %tag_len2 = zext i8 %tag_len to i64 + %array_ptr = extractvalue { ptr, i64 } %0, 0 + %array_offset = extractvalue { ptr, i64 } %0, 1 + %1 = getelementptr inbounds [2 x i64], ptr %array_ptr, i64 %array_offset + %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 + %x_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 0 + %y_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 1 + %arr_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 2 + %mask_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 3 + %2 = alloca i1, i32 2, align 1 + store [2 x i1] zeroinitializer, ptr %2, align 1 + store i32 2, ptr %x_ptr, align 4 + store i32 1, ptr %y_ptr, align 4 + store ptr %1, ptr %arr_ptr, align 8 + store ptr %2, ptr %mask_ptr, align 8 + %3 = load <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, align 1 + call void @print_state_result(ptr @res_test_state.900F7606.0, i64 %tag_len2, ptr %out_arr_alloca) + ret { ptr, i64 } %0 +} + +declare void @print_state_result(ptr, i64, ptr) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@pre-mem2reg@llvm14_1.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@pre-mem2reg@llvm14_1.snap deleted file mode 100644 index cade8dba6..000000000 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@pre-mem2reg@llvm14_1.snap +++ /dev/null @@ -1,46 +0,0 @@ ---- -source: tket-qsystem/src/llvm/debug.rs -expression: mod_str ---- -; ModuleID = 'test_context' -source_filename = "test_context" - -@res_test_state.900F7606.0 = private constant [29 x i8] c"\1CUSER:STATE:test_state_result" - -define private [2 x i64] @_hl.main.1([2 x i64] %0) { -alloca_block: - %"0" = alloca [2 x i64], align 8 - %"2_0" = alloca [2 x i64], align 8 - %"4_0" = alloca [2 x i64], align 8 - br label %entry_block - -entry_block: ; preds = %alloca_block - store [2 x i64] %0, [2 x i64]* %"2_0", align 4 - %"2_01" = load [2 x i64], [2 x i64]* %"2_0", align 4 - %tag_len = load i8, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @res_test_state.900F7606.0, i32 0, i32 0), align 1 - %tag_len2 = zext i8 %tag_len to i64 - %1 = alloca i64, i32 2, align 8 - %2 = bitcast i64* %1 to [2 x i64]* - store [2 x i64] %"2_01", [2 x i64]* %2, align 4 - %out_arr_alloca = alloca <{ i32, i32, i64*, i1* }>, align 8 - %x_ptr = getelementptr inbounds <{ i32, i32, i64*, i1* }>, <{ i32, i32, i64*, i1* }>* %out_arr_alloca, i32 0, i32 0 - %y_ptr = getelementptr inbounds <{ i32, i32, i64*, i1* }>, <{ i32, i32, i64*, i1* }>* %out_arr_alloca, i32 0, i32 1 - %arr_ptr = getelementptr inbounds <{ i32, i32, i64*, i1* }>, <{ i32, i32, i64*, i1* }>* %out_arr_alloca, i32 0, i32 2 - %mask_ptr = getelementptr inbounds <{ i32, i32, i64*, i1* }>, <{ i32, i32, i64*, i1* }>* %out_arr_alloca, i32 0, i32 3 - %3 = alloca i1, i32 2, align 1 - %4 = bitcast i1* %3 to [2 x i1]* - store [2 x i1] zeroinitializer, [2 x i1]* %4, align 1 - store i32 2, i32* %x_ptr, align 4 - store i32 1, i32* %y_ptr, align 4 - store i64* %1, i64** %arr_ptr, align 8 - store i1* %3, i1** %mask_ptr, align 8 - %5 = load <{ i32, i32, i64*, i1* }>, <{ i32, i32, i64*, i1* }>* %out_arr_alloca, align 1 - call void @print_state_result(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @res_test_state.900F7606.0, i32 0, i32 0), i64 %tag_len2, <{ i32, i32, i64*, i1* }>* %out_arr_alloca) - store [2 x i64] %"2_01", [2 x i64]* %"4_0", align 4 - %"4_03" = load [2 x i64], [2 x i64]* %"4_0", align 4 - store [2 x i64] %"4_03", [2 x i64]* %"0", align 4 - %"04" = load [2 x i64], [2 x i64]* %"0", align 4 - ret [2 x i64] %"04" -} - -declare void @print_state_result(i8*, i64, <{ i32, i32, i64*, i1* }>*) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@pre-mem2reg@llvm14_2.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@pre-mem2reg@llvm14_2.snap deleted file mode 100644 index a29e3306c..000000000 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@pre-mem2reg@llvm14_2.snap +++ /dev/null @@ -1,46 +0,0 @@ ---- -source: tket-qsystem/src/llvm/debug.rs -expression: mod_str ---- -; ModuleID = 'test_context' -source_filename = "test_context" - -@res_test_state.900F7606.0 = private constant [29 x i8] c"\1CUSER:STATE:test_state_result" - -define private { i64*, i64 } @_hl.main.1({ i64*, i64 } %0) { -alloca_block: - %"0" = alloca { i64*, i64 }, align 8 - %"2_0" = alloca { i64*, i64 }, align 8 - %"4_0" = alloca { i64*, i64 }, align 8 - br label %entry_block - -entry_block: ; preds = %alloca_block - store { i64*, i64 } %0, { i64*, i64 }* %"2_0", align 8 - %"2_01" = load { i64*, i64 }, { i64*, i64 }* %"2_0", align 8 - %tag_len = load i8, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @res_test_state.900F7606.0, i32 0, i32 0), align 1 - %tag_len2 = zext i8 %tag_len to i64 - %array_ptr = extractvalue { i64*, i64 } %"2_01", 0 - %array_offset = extractvalue { i64*, i64 } %"2_01", 1 - %1 = getelementptr inbounds i64, i64* %array_ptr, i64 %array_offset - %out_arr_alloca = alloca <{ i32, i32, i64*, i1* }>, align 8 - %x_ptr = getelementptr inbounds <{ i32, i32, i64*, i1* }>, <{ i32, i32, i64*, i1* }>* %out_arr_alloca, i32 0, i32 0 - %y_ptr = getelementptr inbounds <{ i32, i32, i64*, i1* }>, <{ i32, i32, i64*, i1* }>* %out_arr_alloca, i32 0, i32 1 - %arr_ptr = getelementptr inbounds <{ i32, i32, i64*, i1* }>, <{ i32, i32, i64*, i1* }>* %out_arr_alloca, i32 0, i32 2 - %mask_ptr = getelementptr inbounds <{ i32, i32, i64*, i1* }>, <{ i32, i32, i64*, i1* }>* %out_arr_alloca, i32 0, i32 3 - %2 = alloca i1, i32 2, align 1 - %3 = bitcast i1* %2 to [2 x i1]* - store [2 x i1] zeroinitializer, [2 x i1]* %3, align 1 - store i32 2, i32* %x_ptr, align 4 - store i32 1, i32* %y_ptr, align 4 - store i64* %1, i64** %arr_ptr, align 8 - store i1* %2, i1** %mask_ptr, align 8 - %4 = load <{ i32, i32, i64*, i1* }>, <{ i32, i32, i64*, i1* }>* %out_arr_alloca, align 1 - call void @print_state_result(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @res_test_state.900F7606.0, i32 0, i32 0), i64 %tag_len2, <{ i32, i32, i64*, i1* }>* %out_arr_alloca) - store { i64*, i64 } %"2_01", { i64*, i64 }* %"4_0", align 8 - %"4_03" = load { i64*, i64 }, { i64*, i64 }* %"4_0", align 8 - store { i64*, i64 } %"4_03", { i64*, i64 }* %"0", align 8 - %"04" = load { i64*, i64 }, { i64*, i64 }* %"0", align 8 - ret { i64*, i64 } %"04" -} - -declare void @print_state_result(i8*, i64, <{ i32, i32, i64*, i1* }>*) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@pre-mem2reg@llvm21_1.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@pre-mem2reg@llvm21_1.snap new file mode 100644 index 000000000..eae96bd39 --- /dev/null +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@pre-mem2reg@llvm21_1.snap @@ -0,0 +1,44 @@ +--- +source: tket-qsystem/src/llvm/debug.rs +expression: mod_str +--- +; ModuleID = 'test_context' +source_filename = "test_context" + +@res_test_state.900F7606.0 = private constant [29 x i8] c"\1CUSER:STATE:test_state_result" + +define private [2 x i64] @_hl.main.1([2 x i64] %0) { +alloca_block: + %"0" = alloca [2 x i64], align 8 + %"2_0" = alloca [2 x i64], align 8 + %"4_0" = alloca [2 x i64], align 8 + br label %entry_block + +entry_block: ; preds = %alloca_block + store [2 x i64] %0, ptr %"2_0", align 4 + %"2_01" = load [2 x i64], ptr %"2_0", align 4 + %tag_len = load i8, ptr @res_test_state.900F7606.0, align 1 + %tag_len2 = zext i8 %tag_len to i64 + %1 = alloca i64, i32 2, align 8 + store [2 x i64] %"2_01", ptr %1, align 4 + %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 + %x_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 0 + %y_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 1 + %arr_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 2 + %mask_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 3 + %2 = alloca i1, i32 2, align 1 + store [2 x i1] zeroinitializer, ptr %2, align 1 + store i32 2, ptr %x_ptr, align 4 + store i32 1, ptr %y_ptr, align 4 + store ptr %1, ptr %arr_ptr, align 8 + store ptr %2, ptr %mask_ptr, align 8 + %3 = load <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, align 1 + call void @print_state_result(ptr @res_test_state.900F7606.0, i64 %tag_len2, ptr %out_arr_alloca) + store [2 x i64] %"2_01", ptr %"4_0", align 4 + %"4_03" = load [2 x i64], ptr %"4_0", align 4 + store [2 x i64] %"4_03", ptr %"0", align 4 + %"04" = load [2 x i64], ptr %"0", align 4 + ret [2 x i64] %"04" +} + +declare void @print_state_result(ptr, i64, ptr) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@pre-mem2reg@llvm21_2.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@pre-mem2reg@llvm21_2.snap new file mode 100644 index 000000000..19f0e9938 --- /dev/null +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@pre-mem2reg@llvm21_2.snap @@ -0,0 +1,45 @@ +--- +source: tket-qsystem/src/llvm/debug.rs +expression: mod_str +--- +; ModuleID = 'test_context' +source_filename = "test_context" + +@res_test_state.900F7606.0 = private constant [29 x i8] c"\1CUSER:STATE:test_state_result" + +define private { ptr, i64 } @_hl.main.1({ ptr, i64 } %0) { +alloca_block: + %"0" = alloca { ptr, i64 }, align 8 + %"2_0" = alloca { ptr, i64 }, align 8 + %"4_0" = alloca { ptr, i64 }, align 8 + br label %entry_block + +entry_block: ; preds = %alloca_block + store { ptr, i64 } %0, ptr %"2_0", align 8 + %"2_01" = load { ptr, i64 }, ptr %"2_0", align 8 + %tag_len = load i8, ptr @res_test_state.900F7606.0, align 1 + %tag_len2 = zext i8 %tag_len to i64 + %array_ptr = extractvalue { ptr, i64 } %"2_01", 0 + %array_offset = extractvalue { ptr, i64 } %"2_01", 1 + %1 = getelementptr inbounds [2 x i64], ptr %array_ptr, i64 %array_offset + %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 + %x_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 0 + %y_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 1 + %arr_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 2 + %mask_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 3 + %2 = alloca i1, i32 2, align 1 + store [2 x i1] zeroinitializer, ptr %2, align 1 + store i32 2, ptr %x_ptr, align 4 + store i32 1, ptr %y_ptr, align 4 + store ptr %1, ptr %arr_ptr, align 8 + store ptr %2, ptr %mask_ptr, align 8 + %3 = load <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, align 1 + call void @print_state_result(ptr @res_test_state.900F7606.0, i64 %tag_len2, ptr %out_arr_alloca) + store { ptr, i64 } %"2_01", ptr %"4_0", align 8 + %"4_03" = load { ptr, i64 }, ptr %"4_0", align 8 + store { ptr, i64 } %"4_03", ptr %"0", align 8 + %"04" = load { ptr, i64 }, ptr %"0", align 8 + ret { ptr, i64 } %"04" +} + +declare void @print_state_result(ptr, i64, ptr) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm14_1.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_1.snap similarity index 100% rename from tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm14_1.snap rename to tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_1.snap diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm14_5.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_2.snap similarity index 89% rename from tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm14_5.snap rename to tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_2.snap index 52322ecfe..949d6c932 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm14_5.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_2.snap @@ -11,7 +11,7 @@ alloca_block: entry_block: ; preds = %alloca_block call void @___inc_future_refcount(i64 %0) - %mrv = insertvalue { i64, i64 } undef, i64 %0, 0 + %mrv = insertvalue { i64, i64 } poison, i64 %0, 0 %mrv6 = insertvalue { i64, i64 } %mrv, i64 %0, 1 ret { i64, i64 } %mrv6 } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm14_3.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_3.snap similarity index 100% rename from tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm14_3.snap rename to tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_3.snap diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm14_4.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_4.snap similarity index 100% rename from tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm14_4.snap rename to tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_4.snap diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm14_2.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_5.snap similarity index 89% rename from tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm14_2.snap rename to tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_5.snap index 52322ecfe..949d6c932 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm14_2.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_5.snap @@ -11,7 +11,7 @@ alloca_block: entry_block: ; preds = %alloca_block call void @___inc_future_refcount(i64 %0) - %mrv = insertvalue { i64, i64 } undef, i64 %0, 0 + %mrv = insertvalue { i64, i64 } poison, i64 %0, 0 %mrv6 = insertvalue { i64, i64 } %mrv, i64 %0, 1 ret { i64, i64 } %mrv6 } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm14_6.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_6.snap similarity index 100% rename from tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm14_6.snap rename to tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_6.snap diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm14_1.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_1.snap similarity index 72% rename from tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm14_1.snap rename to tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_1.snap index f811b7c27..ce5462b4f 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm14_1.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_1.snap @@ -13,15 +13,15 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - store i64 %0, i64* %"2_0", align 4 - %"2_01" = load i64, i64* %"2_0", align 4 + store i64 %0, ptr %"2_0", align 4 + %"2_01" = load i64, ptr %"2_0", align 4 %read_bool = call i1 @___read_future_bool(i64 %"2_01") call void @___dec_future_refcount(i64 %"2_01") %measure = select i1 %read_bool, i1 true, i1 false - store i1 %measure, i1* %"4_0", align 1 - %"4_02" = load i1, i1* %"4_0", align 1 - store i1 %"4_02", i1* %"0", align 1 - %"03" = load i1, i1* %"0", align 1 + store i1 %measure, ptr %"4_0", align 1 + %"4_02" = load i1, ptr %"4_0", align 1 + store i1 %"4_02", ptr %"0", align 1 + %"03" = load i1, ptr %"0", align 1 ret i1 %"03" } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm14_2.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_2.snap similarity index 57% rename from tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm14_2.snap rename to tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_2.snap index 54cfcbcd8..f04141d33 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm14_2.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_2.snap @@ -15,18 +15,18 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - store i64 %0, i64* %"2_0", align 4 - %"2_01" = load i64, i64* %"2_0", align 4 + store i64 %0, ptr %"2_0", align 4 + %"2_01" = load i64, ptr %"2_0", align 4 call void @___inc_future_refcount(i64 %"2_01") - store i64 %"2_01", i64* %"4_0", align 4 - store i64 %"2_01", i64* %"4_1", align 4 - %"4_02" = load i64, i64* %"4_0", align 4 - %"4_13" = load i64, i64* %"4_1", align 4 - store i64 %"4_02", i64* %"0", align 4 - store i64 %"4_13", i64* %"1", align 4 - %"04" = load i64, i64* %"0", align 4 - %"15" = load i64, i64* %"1", align 4 - %mrv = insertvalue { i64, i64 } undef, i64 %"04", 0 + store i64 %"2_01", ptr %"4_0", align 4 + store i64 %"2_01", ptr %"4_1", align 4 + %"4_02" = load i64, ptr %"4_0", align 4 + %"4_13" = load i64, ptr %"4_1", align 4 + store i64 %"4_02", ptr %"0", align 4 + store i64 %"4_13", ptr %"1", align 4 + %"04" = load i64, ptr %"0", align 4 + %"15" = load i64, ptr %"1", align 4 + %mrv = insertvalue { i64, i64 } poison, i64 %"04", 0 %mrv6 = insertvalue { i64, i64 } %mrv, i64 %"15", 1 ret { i64, i64 } %mrv6 } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm14_3.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_3.snap similarity index 84% rename from tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm14_3.snap rename to tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_3.snap index d61ec467f..8e92eedc4 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm14_3.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_3.snap @@ -11,8 +11,8 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - store i64 %0, i64* %"2_0", align 4 - %"2_01" = load i64, i64* %"2_0", align 4 + store i64 %0, ptr %"2_0", align 4 + %"2_01" = load i64, ptr %"2_0", align 4 call void @___dec_future_refcount(i64 %"2_01") ret void } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm14_4.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_4.snap similarity index 70% rename from tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm14_4.snap rename to tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_4.snap index d14303ab1..e669065ce 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm14_4.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_4.snap @@ -13,14 +13,14 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - store i64 %0, i64* %"2_0", align 4 - %"2_01" = load i64, i64* %"2_0", align 4 + store i64 %0, ptr %"2_0", align 4 + %"2_01" = load i64, ptr %"2_0", align 4 %read_uint = call i64 @___read_future_uint(i64 %"2_01") call void @___dec_future_refcount(i64 %"2_01") - store i64 %read_uint, i64* %"4_0", align 4 - %"4_02" = load i64, i64* %"4_0", align 4 - store i64 %"4_02", i64* %"0", align 4 - %"03" = load i64, i64* %"0", align 4 + store i64 %read_uint, ptr %"4_0", align 4 + %"4_02" = load i64, ptr %"4_0", align 4 + store i64 %"4_02", ptr %"0", align 4 + %"03" = load i64, ptr %"0", align 4 ret i64 %"03" } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm14_5.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_5.snap similarity index 57% rename from tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm14_5.snap rename to tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_5.snap index 54cfcbcd8..f04141d33 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm14_5.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_5.snap @@ -15,18 +15,18 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - store i64 %0, i64* %"2_0", align 4 - %"2_01" = load i64, i64* %"2_0", align 4 + store i64 %0, ptr %"2_0", align 4 + %"2_01" = load i64, ptr %"2_0", align 4 call void @___inc_future_refcount(i64 %"2_01") - store i64 %"2_01", i64* %"4_0", align 4 - store i64 %"2_01", i64* %"4_1", align 4 - %"4_02" = load i64, i64* %"4_0", align 4 - %"4_13" = load i64, i64* %"4_1", align 4 - store i64 %"4_02", i64* %"0", align 4 - store i64 %"4_13", i64* %"1", align 4 - %"04" = load i64, i64* %"0", align 4 - %"15" = load i64, i64* %"1", align 4 - %mrv = insertvalue { i64, i64 } undef, i64 %"04", 0 + store i64 %"2_01", ptr %"4_0", align 4 + store i64 %"2_01", ptr %"4_1", align 4 + %"4_02" = load i64, ptr %"4_0", align 4 + %"4_13" = load i64, ptr %"4_1", align 4 + store i64 %"4_02", ptr %"0", align 4 + store i64 %"4_13", ptr %"1", align 4 + %"04" = load i64, ptr %"0", align 4 + %"15" = load i64, ptr %"1", align 4 + %mrv = insertvalue { i64, i64 } poison, i64 %"04", 0 %mrv6 = insertvalue { i64, i64 } %mrv, i64 %"15", 1 ret { i64, i64 } %mrv6 } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm14_6.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_6.snap similarity index 84% rename from tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm14_6.snap rename to tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_6.snap index d61ec467f..8e92eedc4 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm14_6.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_6.snap @@ -11,8 +11,8 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - store i64 %0, i64* %"2_0", align 4 - %"2_01" = load i64, i64* %"2_0", align 4 + store i64 %0, ptr %"2_0", align 4 + %"2_01" = load i64, ptr %"2_0", align 4 call void @___dec_future_refcount(i64 %"2_01") ret void } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__exit_emit@llvm14_0.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__exit_emit@llvm21_0.snap similarity index 56% rename from tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__exit_emit@llvm14_0.snap rename to tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__exit_emit@llvm21_0.snap index cedb8cc11..88fc5a496 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__exit_emit@llvm14_0.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__exit_emit@llvm21_0.snap @@ -12,15 +12,15 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %2 = extractvalue { i32, i8* } { i32 42, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @e_EXIT.2B78BC40.0, i32 0, i32 0) }, 0 - %3 = extractvalue { i32, i8* } { i32 42, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @e_EXIT.2B78BC40.0, i32 0, i32 0) }, 1 - call void @panic(i32 %2, i8* %3) - %mrv = insertvalue { i64, i64 } undef, i64 0, 0 + %2 = extractvalue { i32, ptr } { i32 42, ptr @e_EXIT.2B78BC40.0 }, 0 + %3 = extractvalue { i32, ptr } { i32 42, ptr @e_EXIT.2B78BC40.0 }, 1 + call void @panic(i32 %2, ptr %3) + %mrv = insertvalue { i64, i64 } poison, i64 0, 0 %mrv8 = insertvalue { i64, i64 } %mrv, i64 0, 1 ret { i64, i64 } %mrv8 } ; Function Attrs: noreturn -declare void @panic(i32, i8*) #0 +declare void @panic(i32, ptr) #0 attributes #0 = { noreturn } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__exit_emit@pre-mem2reg@llvm14_0.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__exit_emit@pre-mem2reg@llvm14_0.snap deleted file mode 100644 index 852d29dd3..000000000 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__exit_emit@pre-mem2reg@llvm14_0.snap +++ /dev/null @@ -1,47 +0,0 @@ ---- -source: tket-qsystem/src/llvm/prelude.rs -expression: mod_str ---- -; ModuleID = 'test_context' -source_filename = "test_context" - -@e_EXIT.2B78BC40.0 = private constant [14 x i8] c"\0DEXIT:INT:EXIT" - -define private { i64, i64 } @_hl.main.1(i64 %0, i64 %1) { -alloca_block: - %"0" = alloca i64, align 8 - %"1" = alloca i64, align 8 - %"5_0" = alloca { i32, i8* }, align 8 - %"2_0" = alloca i64, align 8 - %"2_1" = alloca i64, align 8 - %"6_0" = alloca i64, align 8 - %"6_1" = alloca i64, align 8 - br label %entry_block - -entry_block: ; preds = %alloca_block - store { i32, i8* } { i32 42, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @e_EXIT.2B78BC40.0, i32 0, i32 0) }, { i32, i8* }* %"5_0", align 8 - store i64 %0, i64* %"2_0", align 4 - store i64 %1, i64* %"2_1", align 4 - %"5_01" = load { i32, i8* }, { i32, i8* }* %"5_0", align 8 - %"2_02" = load i64, i64* %"2_0", align 4 - %"2_13" = load i64, i64* %"2_1", align 4 - %2 = extractvalue { i32, i8* } %"5_01", 0 - %3 = extractvalue { i32, i8* } %"5_01", 1 - call void @panic(i32 %2, i8* %3) - store i64 0, i64* %"6_0", align 4 - store i64 0, i64* %"6_1", align 4 - %"6_04" = load i64, i64* %"6_0", align 4 - %"6_15" = load i64, i64* %"6_1", align 4 - store i64 %"6_04", i64* %"0", align 4 - store i64 %"6_15", i64* %"1", align 4 - %"06" = load i64, i64* %"0", align 4 - %"17" = load i64, i64* %"1", align 4 - %mrv = insertvalue { i64, i64 } undef, i64 %"06", 0 - %mrv8 = insertvalue { i64, i64 } %mrv, i64 %"17", 1 - ret { i64, i64 } %mrv8 -} - -; Function Attrs: noreturn -declare void @panic(i32, i8*) #0 - -attributes #0 = { noreturn } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__exit_emit@pre-mem2reg@llvm21_0.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__exit_emit@pre-mem2reg@llvm21_0.snap new file mode 100644 index 000000000..ae8288017 --- /dev/null +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__exit_emit@pre-mem2reg@llvm21_0.snap @@ -0,0 +1,47 @@ +--- +source: tket-qsystem/src/llvm/prelude.rs +expression: mod_str +--- +; ModuleID = 'test_context' +source_filename = "test_context" + +@e_EXIT.2B78BC40.0 = private constant [14 x i8] c"\0DEXIT:INT:EXIT" + +define private { i64, i64 } @_hl.main.1(i64 %0, i64 %1) { +alloca_block: + %"0" = alloca i64, align 8 + %"1" = alloca i64, align 8 + %"5_0" = alloca { i32, ptr }, align 8 + %"2_0" = alloca i64, align 8 + %"2_1" = alloca i64, align 8 + %"6_0" = alloca i64, align 8 + %"6_1" = alloca i64, align 8 + br label %entry_block + +entry_block: ; preds = %alloca_block + store { i32, ptr } { i32 42, ptr @e_EXIT.2B78BC40.0 }, ptr %"5_0", align 8 + store i64 %0, ptr %"2_0", align 4 + store i64 %1, ptr %"2_1", align 4 + %"5_01" = load { i32, ptr }, ptr %"5_0", align 8 + %"2_02" = load i64, ptr %"2_0", align 4 + %"2_13" = load i64, ptr %"2_1", align 4 + %2 = extractvalue { i32, ptr } %"5_01", 0 + %3 = extractvalue { i32, ptr } %"5_01", 1 + call void @panic(i32 %2, ptr %3) + store i64 0, ptr %"6_0", align 4 + store i64 0, ptr %"6_1", align 4 + %"6_04" = load i64, ptr %"6_0", align 4 + %"6_15" = load i64, ptr %"6_1", align 4 + store i64 %"6_04", ptr %"0", align 4 + store i64 %"6_15", ptr %"1", align 4 + %"06" = load i64, ptr %"0", align 4 + %"17" = load i64, ptr %"1", align 4 + %mrv = insertvalue { i64, i64 } poison, i64 %"06", 0 + %mrv8 = insertvalue { i64, i64 } %mrv, i64 %"17", 1 + ret { i64, i64 } %mrv8 +} + +; Function Attrs: noreturn +declare void @panic(i32, ptr) #0 + +attributes #0 = { noreturn } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__panic_emit@llvm14_0.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__panic_emit@llvm21_0.snap similarity index 57% rename from tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__panic_emit@llvm14_0.snap rename to tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__panic_emit@llvm21_0.snap index 585301d77..b376096b2 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__panic_emit@llvm14_0.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__panic_emit@llvm21_0.snap @@ -12,16 +12,16 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %2 = extractvalue { i32, i8* } { i32 42, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @e_PANIC.DF25FD88.0, i32 0, i32 0) }, 0 + %2 = extractvalue { i32, ptr } { i32 42, ptr @e_PANIC.DF25FD88.0 }, 0 %shift_code = add i32 %2, 1000 - %3 = extractvalue { i32, i8* } { i32 42, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @e_PANIC.DF25FD88.0, i32 0, i32 0) }, 1 - call void @panic(i32 %shift_code, i8* %3) - %mrv = insertvalue { i64, i64 } undef, i64 0, 0 + %3 = extractvalue { i32, ptr } { i32 42, ptr @e_PANIC.DF25FD88.0 }, 1 + call void @panic(i32 %shift_code, ptr %3) + %mrv = insertvalue { i64, i64 } poison, i64 0, 0 %mrv8 = insertvalue { i64, i64 } %mrv, i64 0, 1 ret { i64, i64 } %mrv8 } ; Function Attrs: noreturn -declare void @panic(i32, i8*) #0 +declare void @panic(i32, ptr) #0 attributes #0 = { noreturn } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__panic_emit@pre-mem2reg@llvm14_0.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__panic_emit@pre-mem2reg@llvm14_0.snap deleted file mode 100644 index 69dc76664..000000000 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__panic_emit@pre-mem2reg@llvm14_0.snap +++ /dev/null @@ -1,48 +0,0 @@ ---- -source: tket-qsystem/src/llvm/prelude.rs -expression: mod_str ---- -; ModuleID = 'test_context' -source_filename = "test_context" - -@e_PANIC.DF25FD88.0 = private constant [15 x i8] c"\0EEXIT:INT:PANIC" - -define private { i64, i64 } @_hl.main.1(i64 %0, i64 %1) { -alloca_block: - %"0" = alloca i64, align 8 - %"1" = alloca i64, align 8 - %"5_0" = alloca { i32, i8* }, align 8 - %"2_0" = alloca i64, align 8 - %"2_1" = alloca i64, align 8 - %"6_0" = alloca i64, align 8 - %"6_1" = alloca i64, align 8 - br label %entry_block - -entry_block: ; preds = %alloca_block - store { i32, i8* } { i32 42, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @e_PANIC.DF25FD88.0, i32 0, i32 0) }, { i32, i8* }* %"5_0", align 8 - store i64 %0, i64* %"2_0", align 4 - store i64 %1, i64* %"2_1", align 4 - %"5_01" = load { i32, i8* }, { i32, i8* }* %"5_0", align 8 - %"2_02" = load i64, i64* %"2_0", align 4 - %"2_13" = load i64, i64* %"2_1", align 4 - %2 = extractvalue { i32, i8* } %"5_01", 0 - %shift_code = add i32 %2, 1000 - %3 = extractvalue { i32, i8* } %"5_01", 1 - call void @panic(i32 %shift_code, i8* %3) - store i64 0, i64* %"6_0", align 4 - store i64 0, i64* %"6_1", align 4 - %"6_04" = load i64, i64* %"6_0", align 4 - %"6_15" = load i64, i64* %"6_1", align 4 - store i64 %"6_04", i64* %"0", align 4 - store i64 %"6_15", i64* %"1", align 4 - %"06" = load i64, i64* %"0", align 4 - %"17" = load i64, i64* %"1", align 4 - %mrv = insertvalue { i64, i64 } undef, i64 %"06", 0 - %mrv8 = insertvalue { i64, i64 } %mrv, i64 %"17", 1 - ret { i64, i64 } %mrv8 -} - -; Function Attrs: noreturn -declare void @panic(i32, i8*) #0 - -attributes #0 = { noreturn } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__panic_emit@pre-mem2reg@llvm21_0.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__panic_emit@pre-mem2reg@llvm21_0.snap new file mode 100644 index 000000000..d748ec514 --- /dev/null +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__panic_emit@pre-mem2reg@llvm21_0.snap @@ -0,0 +1,48 @@ +--- +source: tket-qsystem/src/llvm/prelude.rs +expression: mod_str +--- +; ModuleID = 'test_context' +source_filename = "test_context" + +@e_PANIC.DF25FD88.0 = private constant [15 x i8] c"\0EEXIT:INT:PANIC" + +define private { i64, i64 } @_hl.main.1(i64 %0, i64 %1) { +alloca_block: + %"0" = alloca i64, align 8 + %"1" = alloca i64, align 8 + %"5_0" = alloca { i32, ptr }, align 8 + %"2_0" = alloca i64, align 8 + %"2_1" = alloca i64, align 8 + %"6_0" = alloca i64, align 8 + %"6_1" = alloca i64, align 8 + br label %entry_block + +entry_block: ; preds = %alloca_block + store { i32, ptr } { i32 42, ptr @e_PANIC.DF25FD88.0 }, ptr %"5_0", align 8 + store i64 %0, ptr %"2_0", align 4 + store i64 %1, ptr %"2_1", align 4 + %"5_01" = load { i32, ptr }, ptr %"5_0", align 8 + %"2_02" = load i64, ptr %"2_0", align 4 + %"2_13" = load i64, ptr %"2_1", align 4 + %2 = extractvalue { i32, ptr } %"5_01", 0 + %shift_code = add i32 %2, 1000 + %3 = extractvalue { i32, ptr } %"5_01", 1 + call void @panic(i32 %shift_code, ptr %3) + store i64 0, ptr %"6_0", align 4 + store i64 0, ptr %"6_1", align 4 + %"6_04" = load i64, ptr %"6_0", align 4 + %"6_15" = load i64, ptr %"6_1", align 4 + store i64 %"6_04", ptr %"0", align 4 + store i64 %"6_15", ptr %"1", align 4 + %"06" = load i64, ptr %"0", align 4 + %"17" = load i64, ptr %"1", align 4 + %mrv = insertvalue { i64, i64 } poison, i64 %"06", 0 + %mrv8 = insertvalue { i64, i64 } %mrv, i64 %"17", 1 + ret { i64, i64 } %mrv8 +} + +; Function Attrs: noreturn +declare void @panic(i32, ptr) #0 + +attributes #0 = { noreturn } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm14_1.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_1.snap similarity index 100% rename from tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm14_1.snap rename to tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_1.snap diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm14_10.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_10.snap similarity index 100% rename from tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm14_10.snap rename to tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_10.snap diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm14_2.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_2.snap similarity index 90% rename from tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm14_2.snap rename to tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_2.snap index ca593d05a..26f8a1abf 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm14_2.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_2.snap @@ -11,7 +11,7 @@ alloca_block: entry_block: ; preds = %alloca_block call void @___rzz(i64 %0, i64 %1, double %2) - %mrv = insertvalue { i64, i64 } undef, i64 %0, 0 + %mrv = insertvalue { i64, i64 } poison, i64 %0, 0 %mrv8 = insertvalue { i64, i64 } %mrv, i64 %1, 1 ret { i64, i64 } %mrv8 } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm14_3.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_3.snap similarity index 100% rename from tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm14_3.snap rename to tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_3.snap diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm14_4.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_4.snap similarity index 100% rename from tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm14_4.snap rename to tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_4.snap diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm14_5.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_5.snap similarity index 100% rename from tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm14_5.snap rename to tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_5.snap diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm14_6.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_6.snap similarity index 100% rename from tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm14_6.snap rename to tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_6.snap diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm14_7.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_7.snap similarity index 100% rename from tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm14_7.snap rename to tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_7.snap diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm14_8.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_8.snap similarity index 100% rename from tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm14_8.snap rename to tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_8.snap diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm14_9.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_9.snap similarity index 91% rename from tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm14_9.snap rename to tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_9.snap index ccddf87dc..d8cfed095 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm14_9.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_9.snap @@ -13,7 +13,7 @@ entry_block: ; preds = %alloca_block %lazy_measure = call i64 @___lazy_measure(i64 %0) call void @___reset(i64 %0) %1 = insertvalue { i1, i64, i1 } { i1 true, i64 poison, i1 poison }, i64 %lazy_measure, 1 - %mrv = insertvalue { i64, { i1, i64, i1 } } undef, i64 %0, 0 + %mrv = insertvalue { i64, { i1, i64, i1 } } poison, i64 %0, 0 %mrv10 = insertvalue { i64, { i1, i64, i1 } } %mrv, { i1, i64, i1 } %1, 1 ret { i64, { i1, i64, i1 } } %mrv10 } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm14_1.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_1.snap similarity index 60% rename from tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm14_1.snap rename to tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_1.snap index fb8bd9e09..95db98663 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm14_1.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_1.snap @@ -14,15 +14,15 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - store i64 %0, i64* %"2_0", align 4 - store double %1, double* %"2_1", align 8 - %"2_01" = load i64, i64* %"2_0", align 4 - %"2_12" = load double, double* %"2_1", align 8 + store i64 %0, ptr %"2_0", align 4 + store double %1, ptr %"2_1", align 8 + %"2_01" = load i64, ptr %"2_0", align 4 + %"2_12" = load double, ptr %"2_1", align 8 call void @___rz(i64 %"2_01", double %"2_12") - store i64 %"2_01", i64* %"4_0", align 4 - %"4_03" = load i64, i64* %"4_0", align 4 - store i64 %"4_03", i64* %"0", align 4 - %"04" = load i64, i64* %"0", align 4 + store i64 %"2_01", ptr %"4_0", align 4 + %"4_03" = load i64, ptr %"4_0", align 4 + store i64 %"4_03", ptr %"0", align 4 + %"04" = load i64, ptr %"0", align 4 ret i64 %"04" } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm14_10.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_10.snap similarity index 68% rename from tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm14_10.snap rename to tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_10.snap index fe551a2b1..a58dee6d7 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm14_10.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_10.snap @@ -13,14 +13,14 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - store i64 %0, i64* %"2_0", align 4 - %"2_01" = load i64, i64* %"2_0", align 4 + store i64 %0, ptr %"2_0", align 4 + %"2_01" = load i64, ptr %"2_0", align 4 %lazy_measure_leaked = call i64 @___lazy_measure_leaked(i64 %"2_01") call void @___qfree(i64 %"2_01") - store i64 %lazy_measure_leaked, i64* %"4_0", align 4 - %"4_02" = load i64, i64* %"4_0", align 4 - store i64 %"4_02", i64* %"0", align 4 - %"03" = load i64, i64* %"0", align 4 + store i64 %lazy_measure_leaked, ptr %"4_0", align 4 + %"4_02" = load i64, ptr %"4_0", align 4 + store i64 %"4_02", ptr %"0", align 4 + %"03" = load i64, ptr %"0", align 4 ret i64 %"03" } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm14_2.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_2.snap similarity index 52% rename from tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm14_2.snap rename to tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_2.snap index 553eed50c..4fa279e21 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm14_2.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_2.snap @@ -17,22 +17,22 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - store i64 %0, i64* %"2_0", align 4 - store i64 %1, i64* %"2_1", align 4 - store double %2, double* %"2_2", align 8 - %"2_01" = load i64, i64* %"2_0", align 4 - %"2_12" = load i64, i64* %"2_1", align 4 - %"2_23" = load double, double* %"2_2", align 8 + store i64 %0, ptr %"2_0", align 4 + store i64 %1, ptr %"2_1", align 4 + store double %2, ptr %"2_2", align 8 + %"2_01" = load i64, ptr %"2_0", align 4 + %"2_12" = load i64, ptr %"2_1", align 4 + %"2_23" = load double, ptr %"2_2", align 8 call void @___rzz(i64 %"2_01", i64 %"2_12", double %"2_23") - store i64 %"2_01", i64* %"4_0", align 4 - store i64 %"2_12", i64* %"4_1", align 4 - %"4_04" = load i64, i64* %"4_0", align 4 - %"4_15" = load i64, i64* %"4_1", align 4 - store i64 %"4_04", i64* %"0", align 4 - store i64 %"4_15", i64* %"1", align 4 - %"06" = load i64, i64* %"0", align 4 - %"17" = load i64, i64* %"1", align 4 - %mrv = insertvalue { i64, i64 } undef, i64 %"06", 0 + store i64 %"2_01", ptr %"4_0", align 4 + store i64 %"2_12", ptr %"4_1", align 4 + %"4_04" = load i64, ptr %"4_0", align 4 + %"4_15" = load i64, ptr %"4_1", align 4 + store i64 %"4_04", ptr %"0", align 4 + store i64 %"4_15", ptr %"1", align 4 + %"06" = load i64, ptr %"0", align 4 + %"17" = load i64, ptr %"1", align 4 + %mrv = insertvalue { i64, i64 } poison, i64 %"06", 0 %mrv8 = insertvalue { i64, i64 } %mrv, i64 %"17", 1 ret { i64, i64 } %mrv8 } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm14_3.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_3.snap similarity index 58% rename from tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm14_3.snap rename to tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_3.snap index 7626c2648..a665df84b 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm14_3.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_3.snap @@ -15,17 +15,17 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - store i64 %0, i64* %"2_0", align 4 - store double %1, double* %"2_1", align 8 - store double %2, double* %"2_2", align 8 - %"2_01" = load i64, i64* %"2_0", align 4 - %"2_12" = load double, double* %"2_1", align 8 - %"2_23" = load double, double* %"2_2", align 8 + store i64 %0, ptr %"2_0", align 4 + store double %1, ptr %"2_1", align 8 + store double %2, ptr %"2_2", align 8 + %"2_01" = load i64, ptr %"2_0", align 4 + %"2_12" = load double, ptr %"2_1", align 8 + %"2_23" = load double, ptr %"2_2", align 8 call void @___rxy(i64 %"2_01", double %"2_12", double %"2_23") - store i64 %"2_01", i64* %"4_0", align 4 - %"4_04" = load i64, i64* %"4_0", align 4 - store i64 %"4_04", i64* %"0", align 4 - %"05" = load i64, i64* %"0", align 4 + store i64 %"2_01", ptr %"4_0", align 4 + %"4_04" = load i64, ptr %"4_0", align 4 + store i64 %"4_04", ptr %"0", align 4 + %"05" = load i64, ptr %"0", align 4 ret i64 %"05" } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm14_4.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_4.snap similarity index 55% rename from tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm14_4.snap rename to tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_4.snap index 253c6f592..e6a423e70 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm14_4.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_4.snap @@ -16,21 +16,21 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - store i64 %0, i64* %"2_0", align 4 - %"2_01" = load i64, i64* %"2_0", align 4 - store i64 %"2_01", i64* %"6_0", align 4 - %"6_02" = load i64, i64* %"6_0", align 4 + store i64 %0, ptr %"2_0", align 4 + %"2_01" = load i64, ptr %"2_0", align 4 + store i64 %"2_01", ptr %"6_0", align 4 + %"6_02" = load i64, ptr %"6_0", align 4 %lazy_measure = call i64 @___lazy_measure(i64 %"6_02") call void @___qfree(i64 %"6_02") - store i64 %lazy_measure, i64* %"8_0", align 4 - %"8_03" = load i64, i64* %"8_0", align 4 + store i64 %lazy_measure, ptr %"8_0", align 4 + %"8_03" = load i64, ptr %"8_0", align 4 %1 = insertvalue { i1, i64, i1 } { i1 true, i64 poison, i1 poison }, i64 %"8_03", 1 - store { i1, i64, i1 } %1, { i1, i64, i1 }* %"9_0", align 4 - %"9_04" = load { i1, i64, i1 }, { i1, i64, i1 }* %"9_0", align 4 - store { i1, i64, i1 } %"9_04", { i1, i64, i1 }* %"4_0", align 4 - %"4_05" = load { i1, i64, i1 }, { i1, i64, i1 }* %"4_0", align 4 - store { i1, i64, i1 } %"4_05", { i1, i64, i1 }* %"0", align 4 - %"06" = load { i1, i64, i1 }, { i1, i64, i1 }* %"0", align 4 + store { i1, i64, i1 } %1, ptr %"9_0", align 4 + %"9_04" = load { i1, i64, i1 }, ptr %"9_0", align 4 + store { i1, i64, i1 } %"9_04", ptr %"4_0", align 4 + %"4_05" = load { i1, i64, i1 }, ptr %"4_0", align 4 + store { i1, i64, i1 } %"4_05", ptr %"0", align 4 + %"06" = load { i1, i64, i1 }, ptr %"0", align 4 ret { i1, i64, i1 } %"06" } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm14_5.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_5.snap similarity index 68% rename from tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm14_5.snap rename to tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_5.snap index 0e91c3e57..14bf496bb 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm14_5.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_5.snap @@ -13,14 +13,14 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - store i64 %0, i64* %"2_0", align 4 - %"2_01" = load i64, i64* %"2_0", align 4 + store i64 %0, ptr %"2_0", align 4 + %"2_01" = load i64, ptr %"2_0", align 4 %lazy_measure = call i64 @___lazy_measure(i64 %"2_01") call void @___qfree(i64 %"2_01") - store i64 %lazy_measure, i64* %"4_0", align 4 - %"4_02" = load i64, i64* %"4_0", align 4 - store i64 %"4_02", i64* %"0", align 4 - %"03" = load i64, i64* %"0", align 4 + store i64 %lazy_measure, ptr %"4_0", align 4 + %"4_02" = load i64, ptr %"4_0", align 4 + store i64 %"4_02", ptr %"0", align 4 + %"03" = load i64, ptr %"0", align 4 ret i64 %"03" } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm14_6.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_6.snap similarity index 80% rename from tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm14_6.snap rename to tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_6.snap index 6bd67e371..94a4707fe 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm14_6.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_6.snap @@ -23,10 +23,10 @@ reset_bb: ; preds = %entry_block id_bb: ; preds = %entry_block, %reset_bb %0 = insertvalue { i1, i64 } { i1 true, i64 poison }, i64 %qalloc, 1 %1 = select i1 %not_max, { i1, i64 } %0, { i1, i64 } { i1 false, i64 poison } - store { i1, i64 } %1, { i1, i64 }* %"4_0", align 4 - %"4_01" = load { i1, i64 }, { i1, i64 }* %"4_0", align 4 - store { i1, i64 } %"4_01", { i1, i64 }* %"0", align 4 - %"02" = load { i1, i64 }, { i1, i64 }* %"0", align 4 + store { i1, i64 } %1, ptr %"4_0", align 4 + %"4_01" = load { i1, i64 }, ptr %"4_0", align 4 + store { i1, i64 } %"4_01", ptr %"0", align 4 + %"02" = load { i1, i64 }, ptr %"0", align 4 ret { i1, i64 } %"02" } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm14_7.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_7.snap similarity index 83% rename from tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm14_7.snap rename to tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_7.snap index faa50933f..57ab67f89 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm14_7.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_7.snap @@ -11,8 +11,8 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - store i64 %0, i64* %"2_0", align 4 - %"2_01" = load i64, i64* %"2_0", align 4 + store i64 %0, ptr %"2_0", align 4 + %"2_01" = load i64, ptr %"2_0", align 4 call void @___qfree(i64 %"2_01") ret void } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm14_8.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_8.snap similarity index 65% rename from tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm14_8.snap rename to tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_8.snap index b3b3ea33d..174e32169 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm14_8.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_8.snap @@ -13,13 +13,13 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - store i64 %0, i64* %"2_0", align 4 - %"2_01" = load i64, i64* %"2_0", align 4 + store i64 %0, ptr %"2_0", align 4 + %"2_01" = load i64, ptr %"2_0", align 4 call void @___reset(i64 %"2_01") - store i64 %"2_01", i64* %"4_0", align 4 - %"4_02" = load i64, i64* %"4_0", align 4 - store i64 %"4_02", i64* %"0", align 4 - %"03" = load i64, i64* %"0", align 4 + store i64 %"2_01", ptr %"4_0", align 4 + %"4_02" = load i64, ptr %"4_0", align 4 + store i64 %"4_02", ptr %"0", align 4 + %"03" = load i64, ptr %"0", align 4 ret i64 %"03" } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm14_9.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_9.snap similarity index 50% rename from tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm14_9.snap rename to tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_9.snap index ed21c02e0..433458455 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm14_9.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_9.snap @@ -19,28 +19,28 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - store i64 %0, i64* %"2_0", align 4 - %"2_01" = load i64, i64* %"2_0", align 4 - store i64 %"2_01", i64* %"6_0", align 4 - %"6_02" = load i64, i64* %"6_0", align 4 + store i64 %0, ptr %"2_0", align 4 + %"2_01" = load i64, ptr %"2_0", align 4 + store i64 %"2_01", ptr %"6_0", align 4 + %"6_02" = load i64, ptr %"6_0", align 4 %lazy_measure = call i64 @___lazy_measure(i64 %"6_02") call void @___reset(i64 %"6_02") - store i64 %"6_02", i64* %"8_0", align 4 - store i64 %lazy_measure, i64* %"8_1", align 4 - %"8_13" = load i64, i64* %"8_1", align 4 + store i64 %"6_02", ptr %"8_0", align 4 + store i64 %lazy_measure, ptr %"8_1", align 4 + %"8_13" = load i64, ptr %"8_1", align 4 %1 = insertvalue { i1, i64, i1 } { i1 true, i64 poison, i1 poison }, i64 %"8_13", 1 - store { i1, i64, i1 } %1, { i1, i64, i1 }* %"9_0", align 4 - %"8_04" = load i64, i64* %"8_0", align 4 - %"9_05" = load { i1, i64, i1 }, { i1, i64, i1 }* %"9_0", align 4 - store i64 %"8_04", i64* %"4_0", align 4 - store { i1, i64, i1 } %"9_05", { i1, i64, i1 }* %"4_1", align 4 - %"4_06" = load i64, i64* %"4_0", align 4 - %"4_17" = load { i1, i64, i1 }, { i1, i64, i1 }* %"4_1", align 4 - store i64 %"4_06", i64* %"0", align 4 - store { i1, i64, i1 } %"4_17", { i1, i64, i1 }* %"1", align 4 - %"08" = load i64, i64* %"0", align 4 - %"19" = load { i1, i64, i1 }, { i1, i64, i1 }* %"1", align 4 - %mrv = insertvalue { i64, { i1, i64, i1 } } undef, i64 %"08", 0 + store { i1, i64, i1 } %1, ptr %"9_0", align 4 + %"8_04" = load i64, ptr %"8_0", align 4 + %"9_05" = load { i1, i64, i1 }, ptr %"9_0", align 4 + store i64 %"8_04", ptr %"4_0", align 4 + store { i1, i64, i1 } %"9_05", ptr %"4_1", align 4 + %"4_06" = load i64, ptr %"4_0", align 4 + %"4_17" = load { i1, i64, i1 }, ptr %"4_1", align 4 + store i64 %"4_06", ptr %"0", align 4 + store { i1, i64, i1 } %"4_17", ptr %"1", align 4 + %"08" = load i64, ptr %"0", align 4 + %"19" = load { i1, i64, i1 }, ptr %"1", align 4 + %mrv = insertvalue { i64, { i1, i64, i1 } } poison, i64 %"08", 0 %mrv10 = insertvalue { i64, { i1, i64, i1 } } %mrv, { i1, i64, i1 } %"19", 1 ret { i64, { i1, i64, i1 } } %mrv10 } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm14.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21.snap similarity index 100% rename from tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm14.snap rename to tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21.snap diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm14_1.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_1.snap similarity index 89% rename from tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm14_1.snap rename to tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_1.snap index c948e80e6..47ce83c99 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm14_1.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_1.snap @@ -11,7 +11,7 @@ alloca_block: entry_block: ; preds = %alloca_block %rint = call i32 @random_int() - %mrv = insertvalue { i32, {} } undef, i32 %rint, 0 + %mrv = insertvalue { i32, {} } poison, i32 %rint, 0 %mrv6 = insertvalue { i32, {} } %mrv, {} zeroinitializer, 1 ret { i32, {} } %mrv6 } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm14_2.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_2.snap similarity index 88% rename from tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm14_2.snap rename to tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_2.snap index e49057f26..7c3ba88cd 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm14_2.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_2.snap @@ -11,7 +11,7 @@ alloca_block: entry_block: ; preds = %alloca_block %rfloat = call double @random_float() - %mrv = insertvalue { double, {} } undef, double %rfloat, 0 + %mrv = insertvalue { double, {} } poison, double %rfloat, 0 %mrv6 = insertvalue { double, {} } %mrv, {} zeroinitializer, 1 ret { double, {} } %mrv6 } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm14_3.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_3.snap similarity index 89% rename from tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm14_3.snap rename to tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_3.snap index 9eb97e012..6ed689050 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm14_3.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_3.snap @@ -11,7 +11,7 @@ alloca_block: entry_block: ; preds = %alloca_block %rintb = call i32 @random_rng(i32 %1) - %mrv = insertvalue { i32, {} } undef, i32 %rintb, 0 + %mrv = insertvalue { i32, {} } poison, i32 %rintb, 0 %mrv7 = insertvalue { i32, {} } %mrv, {} zeroinitializer, 1 ret { i32, {} } %mrv7 } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm14_4.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_4.snap similarity index 100% rename from tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm14_4.snap rename to tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_4.snap diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm14_5.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_5.snap similarity index 100% rename from tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm14_5.snap rename to tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_5.snap diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm14.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21.snap similarity index 61% rename from tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm14.snap rename to tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21.snap index f4eab931c..25f161efb 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm14.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21.snap @@ -14,15 +14,15 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - store {} %0, {}* %"2_0", align 1 - store i64 %1, i64* %"2_1", align 4 - %"2_01" = load {}, {}* %"2_0", align 1 - %"2_12" = load i64, i64* %"2_1", align 4 + store {} %0, ptr %"2_0", align 1 + store i64 %1, ptr %"2_1", align 4 + %"2_01" = load {}, ptr %"2_0", align 1 + %"2_12" = load i64, ptr %"2_1", align 4 call void @random_advance(i64 %"2_12") - store {} %"2_01", {}* %"4_0", align 1 - %"4_03" = load {}, {}* %"4_0", align 1 - store {} %"4_03", {}* %"0", align 1 - %"04" = load {}, {}* %"0", align 1 + store {} %"2_01", ptr %"4_0", align 1 + %"4_03" = load {}, ptr %"4_0", align 1 + store {} %"4_03", ptr %"0", align 1 + %"04" = load {}, ptr %"0", align 1 ret {} %"04" } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm14_1.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_1.snap similarity index 55% rename from tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm14_1.snap rename to tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_1.snap index 1f5d4b39b..288daaedf 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm14_1.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_1.snap @@ -15,18 +15,18 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - store {} %0, {}* %"2_0", align 1 - %"2_01" = load {}, {}* %"2_0", align 1 + store {} %0, ptr %"2_0", align 1 + %"2_01" = load {}, ptr %"2_0", align 1 %rint = call i32 @random_int() - store i32 %rint, i32* %"4_0", align 4 - store {} zeroinitializer, {}* %"4_1", align 1 - %"4_02" = load i32, i32* %"4_0", align 4 - %"4_13" = load {}, {}* %"4_1", align 1 - store i32 %"4_02", i32* %"0", align 4 - store {} %"4_13", {}* %"1", align 1 - %"04" = load i32, i32* %"0", align 4 - %"15" = load {}, {}* %"1", align 1 - %mrv = insertvalue { i32, {} } undef, i32 %"04", 0 + store i32 %rint, ptr %"4_0", align 4 + store {} zeroinitializer, ptr %"4_1", align 1 + %"4_02" = load i32, ptr %"4_0", align 4 + %"4_13" = load {}, ptr %"4_1", align 1 + store i32 %"4_02", ptr %"0", align 4 + store {} %"4_13", ptr %"1", align 1 + %"04" = load i32, ptr %"0", align 4 + %"15" = load {}, ptr %"1", align 1 + %mrv = insertvalue { i32, {} } poison, i32 %"04", 0 %mrv6 = insertvalue { i32, {} } %mrv, {} %"15", 1 ret { i32, {} } %mrv6 } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm14_2.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_2.snap similarity index 55% rename from tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm14_2.snap rename to tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_2.snap index ce928d0f3..44b25125e 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm14_2.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_2.snap @@ -15,18 +15,18 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - store {} %0, {}* %"2_0", align 1 - %"2_01" = load {}, {}* %"2_0", align 1 + store {} %0, ptr %"2_0", align 1 + %"2_01" = load {}, ptr %"2_0", align 1 %rfloat = call double @random_float() - store double %rfloat, double* %"4_0", align 8 - store {} zeroinitializer, {}* %"4_1", align 1 - %"4_02" = load double, double* %"4_0", align 8 - %"4_13" = load {}, {}* %"4_1", align 1 - store double %"4_02", double* %"0", align 8 - store {} %"4_13", {}* %"1", align 1 - %"04" = load double, double* %"0", align 8 - %"15" = load {}, {}* %"1", align 1 - %mrv = insertvalue { double, {} } undef, double %"04", 0 + store double %rfloat, ptr %"4_0", align 8 + store {} zeroinitializer, ptr %"4_1", align 1 + %"4_02" = load double, ptr %"4_0", align 8 + %"4_13" = load {}, ptr %"4_1", align 1 + store double %"4_02", ptr %"0", align 8 + store {} %"4_13", ptr %"1", align 1 + %"04" = load double, ptr %"0", align 8 + %"15" = load {}, ptr %"1", align 1 + %mrv = insertvalue { double, {} } poison, double %"04", 0 %mrv6 = insertvalue { double, {} } %mrv, {} %"15", 1 ret { double, {} } %mrv6 } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm14_3.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_3.snap similarity index 54% rename from tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm14_3.snap rename to tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_3.snap index eb8f56334..1827a213f 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm14_3.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_3.snap @@ -16,20 +16,20 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - store {} %0, {}* %"2_0", align 1 - store i32 %1, i32* %"2_1", align 4 - %"2_01" = load {}, {}* %"2_0", align 1 - %"2_12" = load i32, i32* %"2_1", align 4 + store {} %0, ptr %"2_0", align 1 + store i32 %1, ptr %"2_1", align 4 + %"2_01" = load {}, ptr %"2_0", align 1 + %"2_12" = load i32, ptr %"2_1", align 4 %rintb = call i32 @random_rng(i32 %"2_12") - store i32 %rintb, i32* %"4_0", align 4 - store {} zeroinitializer, {}* %"4_1", align 1 - %"4_03" = load i32, i32* %"4_0", align 4 - %"4_14" = load {}, {}* %"4_1", align 1 - store i32 %"4_03", i32* %"0", align 4 - store {} %"4_14", {}* %"1", align 1 - %"05" = load i32, i32* %"0", align 4 - %"16" = load {}, {}* %"1", align 1 - %mrv = insertvalue { i32, {} } undef, i32 %"05", 0 + store i32 %rintb, ptr %"4_0", align 4 + store {} zeroinitializer, ptr %"4_1", align 1 + %"4_03" = load i32, ptr %"4_0", align 4 + %"4_14" = load {}, ptr %"4_1", align 1 + store i32 %"4_03", ptr %"0", align 4 + store {} %"4_14", ptr %"1", align 1 + %"05" = load i32, ptr %"0", align 4 + %"16" = load {}, ptr %"1", align 1 + %mrv = insertvalue { i32, {} } poison, i32 %"05", 0 %mrv7 = insertvalue { i32, {} } %mrv, {} %"16", 1 ret { i32, {} } %mrv7 } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm14_4.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_4.snap similarity index 66% rename from tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm14_4.snap rename to tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_4.snap index 50849c55a..acf5844d8 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm14_4.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_4.snap @@ -13,13 +13,13 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - store i64 %0, i64* %"2_0", align 4 - %"2_01" = load i64, i64* %"2_0", align 4 + store i64 %0, ptr %"2_0", align 4 + %"2_01" = load i64, ptr %"2_0", align 4 call void @random_seed(i64 %"2_01") - store i1 true, i1* %"4_0", align 1 - %"4_02" = load i1, i1* %"4_0", align 1 - store i1 %"4_02", i1* %"0", align 1 - %"03" = load i1, i1* %"0", align 1 + store i1 true, ptr %"4_0", align 1 + %"4_02" = load i1, ptr %"4_0", align 1 + store i1 %"4_02", ptr %"0", align 1 + %"03" = load i1, ptr %"0", align 1 ret i1 %"03" } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm14_5.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_5.snap similarity index 81% rename from tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm14_5.snap rename to tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_5.snap index 720310723..6fc59ac28 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm14_5.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_5.snap @@ -11,7 +11,7 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - store {} %0, {}* %"2_0", align 1 - %"2_01" = load {}, {}* %"2_0", align 1 + store {} %0, ptr %"2_0", align 1 + %"2_01" = load {}, ptr %"2_0", align 1 ret void } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm14_10.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm14_10.snap deleted file mode 100644 index e78833680..000000000 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm14_10.snap +++ /dev/null @@ -1,37 +0,0 @@ ---- -source: tket-qsystem/src/llvm/result.rs -expression: mod_str ---- -; ModuleID = 'test_context' -source_filename = "test_context" - -@res_test_arr_i.DFD30452.0 = private constant [25 x i8] c"\18USER:INTARR:test_arr_int" - -define private void @_hl.main.1([10 x i64] %0) { -alloca_block: - br label %entry_block - -entry_block: ; preds = %alloca_block - %tag_len = load i8, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @res_test_arr_i.DFD30452.0, i32 0, i32 0), align 1 - %tag_len2 = zext i8 %tag_len to i64 - %1 = alloca i64, i32 10, align 8 - %2 = bitcast i64* %1 to [10 x i64]* - store [10 x i64] %0, [10 x i64]* %2, align 4 - %out_arr_alloca = alloca <{ i32, i32, i64*, i1* }>, align 8 - %x_ptr = getelementptr inbounds <{ i32, i32, i64*, i1* }>, <{ i32, i32, i64*, i1* }>* %out_arr_alloca, i32 0, i32 0 - %y_ptr = getelementptr inbounds <{ i32, i32, i64*, i1* }>, <{ i32, i32, i64*, i1* }>* %out_arr_alloca, i32 0, i32 1 - %arr_ptr = getelementptr inbounds <{ i32, i32, i64*, i1* }>, <{ i32, i32, i64*, i1* }>* %out_arr_alloca, i32 0, i32 2 - %mask_ptr = getelementptr inbounds <{ i32, i32, i64*, i1* }>, <{ i32, i32, i64*, i1* }>* %out_arr_alloca, i32 0, i32 3 - %3 = alloca i1, i32 10, align 1 - %4 = bitcast i1* %3 to [10 x i1]* - store [10 x i1] zeroinitializer, [10 x i1]* %4, align 1 - store i32 10, i32* %x_ptr, align 4 - store i32 1, i32* %y_ptr, align 4 - store i64* %1, i64** %arr_ptr, align 8 - store i1* %3, i1** %mask_ptr, align 8 - %5 = load <{ i32, i32, i64*, i1* }>, <{ i32, i32, i64*, i1* }>* %out_arr_alloca, align 1 - call void @print_int_arr(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @res_test_arr_i.DFD30452.0, i32 0, i32 0), i64 %tag_len2, <{ i32, i32, i64*, i1* }>* %out_arr_alloca) - ret void -} - -declare void @print_int_arr(i8*, i64, <{ i32, i32, i64*, i1* }>*) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm14_11.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm14_11.snap deleted file mode 100644 index c24f1db8f..000000000 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm14_11.snap +++ /dev/null @@ -1,37 +0,0 @@ ---- -source: tket-qsystem/src/llvm/result.rs -expression: mod_str ---- -; ModuleID = 'test_context' -source_filename = "test_context" - -@res_test_arr_f.038B27BE.0 = private constant [27 x i8] c"\1AUSER:FLOATARR:test_arr_f64" - -define private void @_hl.main.1({ double*, i64 } %0) { -alloca_block: - br label %entry_block - -entry_block: ; preds = %alloca_block - %tag_len = load i8, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @res_test_arr_f.038B27BE.0, i32 0, i32 0), align 1 - %tag_len2 = zext i8 %tag_len to i64 - %array_ptr = extractvalue { double*, i64 } %0, 0 - %array_offset = extractvalue { double*, i64 } %0, 1 - %1 = getelementptr inbounds double, double* %array_ptr, i64 %array_offset - %out_arr_alloca = alloca <{ i32, i32, double*, i1* }>, align 8 - %x_ptr = getelementptr inbounds <{ i32, i32, double*, i1* }>, <{ i32, i32, double*, i1* }>* %out_arr_alloca, i32 0, i32 0 - %y_ptr = getelementptr inbounds <{ i32, i32, double*, i1* }>, <{ i32, i32, double*, i1* }>* %out_arr_alloca, i32 0, i32 1 - %arr_ptr = getelementptr inbounds <{ i32, i32, double*, i1* }>, <{ i32, i32, double*, i1* }>* %out_arr_alloca, i32 0, i32 2 - %mask_ptr = getelementptr inbounds <{ i32, i32, double*, i1* }>, <{ i32, i32, double*, i1* }>* %out_arr_alloca, i32 0, i32 3 - %2 = alloca i1, i32 10, align 1 - %3 = bitcast i1* %2 to [10 x i1]* - store [10 x i1] zeroinitializer, [10 x i1]* %3, align 1 - store i32 10, i32* %x_ptr, align 4 - store i32 1, i32* %y_ptr, align 4 - store double* %1, double** %arr_ptr, align 8 - store i1* %2, i1** %mask_ptr, align 8 - %4 = load <{ i32, i32, double*, i1* }>, <{ i32, i32, double*, i1* }>* %out_arr_alloca, align 1 - call void @print_float_arr(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @res_test_arr_f.038B27BE.0, i32 0, i32 0), i64 %tag_len2, <{ i32, i32, double*, i1* }>* %out_arr_alloca) - ret void -} - -declare void @print_float_arr(i8*, i64, <{ i32, i32, double*, i1* }>*) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm14_5.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm14_5.snap deleted file mode 100644 index c10a9e045..000000000 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm14_5.snap +++ /dev/null @@ -1,37 +0,0 @@ ---- -source: tket-qsystem/src/llvm/result.rs -expression: mod_str ---- -; ModuleID = 'test_context' -source_filename = "test_context" - -@res_test_arr_b.866EEC87.0 = private constant [27 x i8] c"\1AUSER:BOOLARR:test_arr_bool" - -define private void @_hl.main.1({ i1*, i64 } %0) { -alloca_block: - br label %entry_block - -entry_block: ; preds = %alloca_block - %tag_len = load i8, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @res_test_arr_b.866EEC87.0, i32 0, i32 0), align 1 - %tag_len2 = zext i8 %tag_len to i64 - %array_ptr = extractvalue { i1*, i64 } %0, 0 - %array_offset = extractvalue { i1*, i64 } %0, 1 - %1 = getelementptr inbounds i1, i1* %array_ptr, i64 %array_offset - %out_arr_alloca = alloca <{ i32, i32, i1*, i1* }>, align 8 - %x_ptr = getelementptr inbounds <{ i32, i32, i1*, i1* }>, <{ i32, i32, i1*, i1* }>* %out_arr_alloca, i32 0, i32 0 - %y_ptr = getelementptr inbounds <{ i32, i32, i1*, i1* }>, <{ i32, i32, i1*, i1* }>* %out_arr_alloca, i32 0, i32 1 - %arr_ptr = getelementptr inbounds <{ i32, i32, i1*, i1* }>, <{ i32, i32, i1*, i1* }>* %out_arr_alloca, i32 0, i32 2 - %mask_ptr = getelementptr inbounds <{ i32, i32, i1*, i1* }>, <{ i32, i32, i1*, i1* }>* %out_arr_alloca, i32 0, i32 3 - %2 = alloca i1, i32 10, align 1 - %3 = bitcast i1* %2 to [10 x i1]* - store [10 x i1] zeroinitializer, [10 x i1]* %3, align 1 - store i32 10, i32* %x_ptr, align 4 - store i32 1, i32* %y_ptr, align 4 - store i1* %1, i1** %arr_ptr, align 8 - store i1* %2, i1** %mask_ptr, align 8 - %4 = load <{ i32, i32, i1*, i1* }>, <{ i32, i32, i1*, i1* }>* %out_arr_alloca, align 1 - call void @print_bool_arr(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @res_test_arr_b.866EEC87.0, i32 0, i32 0), i64 %tag_len2, <{ i32, i32, i1*, i1* }>* %out_arr_alloca) - ret void -} - -declare void @print_bool_arr(i8*, i64, <{ i32, i32, i1*, i1* }>*) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm14_6.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm14_6.snap deleted file mode 100644 index c290f33d0..000000000 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm14_6.snap +++ /dev/null @@ -1,37 +0,0 @@ ---- -source: tket-qsystem/src/llvm/result.rs -expression: mod_str ---- -; ModuleID = 'test_context' -source_filename = "test_context" - -@res_test_arr_b.866EEC87.0 = private constant [27 x i8] c"\1AUSER:BOOLARR:test_arr_bool" - -define private void @_hl.main.1([10 x i1] %0) { -alloca_block: - br label %entry_block - -entry_block: ; preds = %alloca_block - %tag_len = load i8, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @res_test_arr_b.866EEC87.0, i32 0, i32 0), align 1 - %tag_len2 = zext i8 %tag_len to i64 - %1 = alloca i1, i32 10, align 1 - %2 = bitcast i1* %1 to [10 x i1]* - store [10 x i1] %0, [10 x i1]* %2, align 1 - %out_arr_alloca = alloca <{ i32, i32, i1*, i1* }>, align 8 - %x_ptr = getelementptr inbounds <{ i32, i32, i1*, i1* }>, <{ i32, i32, i1*, i1* }>* %out_arr_alloca, i32 0, i32 0 - %y_ptr = getelementptr inbounds <{ i32, i32, i1*, i1* }>, <{ i32, i32, i1*, i1* }>* %out_arr_alloca, i32 0, i32 1 - %arr_ptr = getelementptr inbounds <{ i32, i32, i1*, i1* }>, <{ i32, i32, i1*, i1* }>* %out_arr_alloca, i32 0, i32 2 - %mask_ptr = getelementptr inbounds <{ i32, i32, i1*, i1* }>, <{ i32, i32, i1*, i1* }>* %out_arr_alloca, i32 0, i32 3 - %3 = alloca i1, i32 10, align 1 - %4 = bitcast i1* %3 to [10 x i1]* - store [10 x i1] zeroinitializer, [10 x i1]* %4, align 1 - store i32 10, i32* %x_ptr, align 4 - store i32 1, i32* %y_ptr, align 4 - store i1* %1, i1** %arr_ptr, align 8 - store i1* %3, i1** %mask_ptr, align 8 - %5 = load <{ i32, i32, i1*, i1* }>, <{ i32, i32, i1*, i1* }>* %out_arr_alloca, align 1 - call void @print_bool_arr(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @res_test_arr_b.866EEC87.0, i32 0, i32 0), i64 %tag_len2, <{ i32, i32, i1*, i1* }>* %out_arr_alloca) - ret void -} - -declare void @print_bool_arr(i8*, i64, <{ i32, i32, i1*, i1* }>*) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm14_7.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm14_7.snap deleted file mode 100644 index 2674ed27b..000000000 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm14_7.snap +++ /dev/null @@ -1,37 +0,0 @@ ---- -source: tket-qsystem/src/llvm/result.rs -expression: mod_str ---- -; ModuleID = 'test_context' -source_filename = "test_context" - -@res_test_arr_i.DFD30452.0 = private constant [25 x i8] c"\18USER:INTARR:test_arr_int" - -define private void @_hl.main.1({ i64*, i64 } %0) { -alloca_block: - br label %entry_block - -entry_block: ; preds = %alloca_block - %tag_len = load i8, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @res_test_arr_i.DFD30452.0, i32 0, i32 0), align 1 - %tag_len2 = zext i8 %tag_len to i64 - %array_ptr = extractvalue { i64*, i64 } %0, 0 - %array_offset = extractvalue { i64*, i64 } %0, 1 - %1 = getelementptr inbounds i64, i64* %array_ptr, i64 %array_offset - %out_arr_alloca = alloca <{ i32, i32, i64*, i1* }>, align 8 - %x_ptr = getelementptr inbounds <{ i32, i32, i64*, i1* }>, <{ i32, i32, i64*, i1* }>* %out_arr_alloca, i32 0, i32 0 - %y_ptr = getelementptr inbounds <{ i32, i32, i64*, i1* }>, <{ i32, i32, i64*, i1* }>* %out_arr_alloca, i32 0, i32 1 - %arr_ptr = getelementptr inbounds <{ i32, i32, i64*, i1* }>, <{ i32, i32, i64*, i1* }>* %out_arr_alloca, i32 0, i32 2 - %mask_ptr = getelementptr inbounds <{ i32, i32, i64*, i1* }>, <{ i32, i32, i64*, i1* }>* %out_arr_alloca, i32 0, i32 3 - %2 = alloca i1, i32 10, align 1 - %3 = bitcast i1* %2 to [10 x i1]* - store [10 x i1] zeroinitializer, [10 x i1]* %3, align 1 - store i32 10, i32* %x_ptr, align 4 - store i32 1, i32* %y_ptr, align 4 - store i64* %1, i64** %arr_ptr, align 8 - store i1* %2, i1** %mask_ptr, align 8 - %4 = load <{ i32, i32, i64*, i1* }>, <{ i32, i32, i64*, i1* }>* %out_arr_alloca, align 1 - call void @print_int_arr(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @res_test_arr_i.DFD30452.0, i32 0, i32 0), i64 %tag_len2, <{ i32, i32, i64*, i1* }>* %out_arr_alloca) - ret void -} - -declare void @print_int_arr(i8*, i64, <{ i32, i32, i64*, i1* }>*) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm14_8.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm14_8.snap deleted file mode 100644 index e78833680..000000000 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm14_8.snap +++ /dev/null @@ -1,37 +0,0 @@ ---- -source: tket-qsystem/src/llvm/result.rs -expression: mod_str ---- -; ModuleID = 'test_context' -source_filename = "test_context" - -@res_test_arr_i.DFD30452.0 = private constant [25 x i8] c"\18USER:INTARR:test_arr_int" - -define private void @_hl.main.1([10 x i64] %0) { -alloca_block: - br label %entry_block - -entry_block: ; preds = %alloca_block - %tag_len = load i8, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @res_test_arr_i.DFD30452.0, i32 0, i32 0), align 1 - %tag_len2 = zext i8 %tag_len to i64 - %1 = alloca i64, i32 10, align 8 - %2 = bitcast i64* %1 to [10 x i64]* - store [10 x i64] %0, [10 x i64]* %2, align 4 - %out_arr_alloca = alloca <{ i32, i32, i64*, i1* }>, align 8 - %x_ptr = getelementptr inbounds <{ i32, i32, i64*, i1* }>, <{ i32, i32, i64*, i1* }>* %out_arr_alloca, i32 0, i32 0 - %y_ptr = getelementptr inbounds <{ i32, i32, i64*, i1* }>, <{ i32, i32, i64*, i1* }>* %out_arr_alloca, i32 0, i32 1 - %arr_ptr = getelementptr inbounds <{ i32, i32, i64*, i1* }>, <{ i32, i32, i64*, i1* }>* %out_arr_alloca, i32 0, i32 2 - %mask_ptr = getelementptr inbounds <{ i32, i32, i64*, i1* }>, <{ i32, i32, i64*, i1* }>* %out_arr_alloca, i32 0, i32 3 - %3 = alloca i1, i32 10, align 1 - %4 = bitcast i1* %3 to [10 x i1]* - store [10 x i1] zeroinitializer, [10 x i1]* %4, align 1 - store i32 10, i32* %x_ptr, align 4 - store i32 1, i32* %y_ptr, align 4 - store i64* %1, i64** %arr_ptr, align 8 - store i1* %3, i1** %mask_ptr, align 8 - %5 = load <{ i32, i32, i64*, i1* }>, <{ i32, i32, i64*, i1* }>* %out_arr_alloca, align 1 - call void @print_int_arr(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @res_test_arr_i.DFD30452.0, i32 0, i32 0), i64 %tag_len2, <{ i32, i32, i64*, i1* }>* %out_arr_alloca) - ret void -} - -declare void @print_int_arr(i8*, i64, <{ i32, i32, i64*, i1* }>*) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm14_9.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm14_9.snap deleted file mode 100644 index 4469ce657..000000000 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm14_9.snap +++ /dev/null @@ -1,37 +0,0 @@ ---- -source: tket-qsystem/src/llvm/result.rs -expression: mod_str ---- -; ModuleID = 'test_context' -source_filename = "test_context" - -@res_test_arr_u.3D1C515C.0 = private constant [26 x i8] c"\19USER:INTARR:test_arr_uint" - -define private void @_hl.main.1({ i64*, i64 } %0) { -alloca_block: - br label %entry_block - -entry_block: ; preds = %alloca_block - %tag_len = load i8, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @res_test_arr_u.3D1C515C.0, i32 0, i32 0), align 1 - %tag_len2 = zext i8 %tag_len to i64 - %array_ptr = extractvalue { i64*, i64 } %0, 0 - %array_offset = extractvalue { i64*, i64 } %0, 1 - %1 = getelementptr inbounds i64, i64* %array_ptr, i64 %array_offset - %out_arr_alloca = alloca <{ i32, i32, i64*, i1* }>, align 8 - %x_ptr = getelementptr inbounds <{ i32, i32, i64*, i1* }>, <{ i32, i32, i64*, i1* }>* %out_arr_alloca, i32 0, i32 0 - %y_ptr = getelementptr inbounds <{ i32, i32, i64*, i1* }>, <{ i32, i32, i64*, i1* }>* %out_arr_alloca, i32 0, i32 1 - %arr_ptr = getelementptr inbounds <{ i32, i32, i64*, i1* }>, <{ i32, i32, i64*, i1* }>* %out_arr_alloca, i32 0, i32 2 - %mask_ptr = getelementptr inbounds <{ i32, i32, i64*, i1* }>, <{ i32, i32, i64*, i1* }>* %out_arr_alloca, i32 0, i32 3 - %2 = alloca i1, i32 10, align 1 - %3 = bitcast i1* %2 to [10 x i1]* - store [10 x i1] zeroinitializer, [10 x i1]* %3, align 1 - store i32 10, i32* %x_ptr, align 4 - store i32 1, i32* %y_ptr, align 4 - store i64* %1, i64** %arr_ptr, align 8 - store i1* %2, i1** %mask_ptr, align 8 - %4 = load <{ i32, i32, i64*, i1* }>, <{ i32, i32, i64*, i1* }>* %out_arr_alloca, align 1 - call void @print_uint_arr(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @res_test_arr_u.3D1C515C.0, i32 0, i32 0), i64 %tag_len2, <{ i32, i32, i64*, i1* }>* %out_arr_alloca) - ret void -} - -declare void @print_uint_arr(i8*, i64, <{ i32, i32, i64*, i1* }>*) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm14_1.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_1.snap similarity index 58% rename from tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm14_1.snap rename to tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_1.snap index ebab729e6..455f0731c 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm14_1.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_1.snap @@ -12,10 +12,10 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %tag_len = load i8, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @res_test_bool.427F8271.0, i32 0, i32 0), align 1 + %tag_len = load i8, ptr @res_test_bool.427F8271.0, align 1 %tag_len2 = zext i8 %tag_len to i64 - call void @print_bool(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @res_test_bool.427F8271.0, i32 0, i32 0), i64 %tag_len2, i1 %0) + call void @print_bool(ptr @res_test_bool.427F8271.0, i64 %tag_len2, i1 %0) ret void } -declare void @print_bool(i8*, i64, i1) +declare void @print_bool(ptr, i64, i1) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_10.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_10.snap new file mode 100644 index 000000000..38ff5b53a --- /dev/null +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_10.snap @@ -0,0 +1,35 @@ +--- +source: tket-qsystem/src/llvm/result.rs +expression: mod_str +--- +; ModuleID = 'test_context' +source_filename = "test_context" + +@res_test_arr_i.DFD30452.0 = private constant [25 x i8] c"\18USER:INTARR:test_arr_int" + +define private void @_hl.main.1([10 x i64] %0) { +alloca_block: + br label %entry_block + +entry_block: ; preds = %alloca_block + %tag_len = load i8, ptr @res_test_arr_i.DFD30452.0, align 1 + %tag_len2 = zext i8 %tag_len to i64 + %1 = alloca i64, i32 10, align 8 + store [10 x i64] %0, ptr %1, align 4 + %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 + %x_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 0 + %y_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 1 + %arr_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 2 + %mask_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 3 + %2 = alloca i1, i32 10, align 1 + store [10 x i1] zeroinitializer, ptr %2, align 1 + store i32 10, ptr %x_ptr, align 4 + store i32 1, ptr %y_ptr, align 4 + store ptr %1, ptr %arr_ptr, align 8 + store ptr %2, ptr %mask_ptr, align 8 + %3 = load <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, align 1 + call void @print_int_arr(ptr @res_test_arr_i.DFD30452.0, i64 %tag_len2, ptr %out_arr_alloca) + ret void +} + +declare void @print_int_arr(ptr, i64, ptr) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_11.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_11.snap new file mode 100644 index 000000000..323333c1d --- /dev/null +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_11.snap @@ -0,0 +1,36 @@ +--- +source: tket-qsystem/src/llvm/result.rs +expression: mod_str +--- +; ModuleID = 'test_context' +source_filename = "test_context" + +@res_test_arr_f.038B27BE.0 = private constant [27 x i8] c"\1AUSER:FLOATARR:test_arr_f64" + +define private void @_hl.main.1({ ptr, i64 } %0) { +alloca_block: + br label %entry_block + +entry_block: ; preds = %alloca_block + %tag_len = load i8, ptr @res_test_arr_f.038B27BE.0, align 1 + %tag_len2 = zext i8 %tag_len to i64 + %array_ptr = extractvalue { ptr, i64 } %0, 0 + %array_offset = extractvalue { ptr, i64 } %0, 1 + %1 = getelementptr inbounds [10 x double], ptr %array_ptr, i64 %array_offset + %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 + %x_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 0 + %y_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 1 + %arr_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 2 + %mask_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 3 + %2 = alloca i1, i32 10, align 1 + store [10 x i1] zeroinitializer, ptr %2, align 1 + store i32 10, ptr %x_ptr, align 4 + store i32 1, ptr %y_ptr, align 4 + store ptr %1, ptr %arr_ptr, align 8 + store ptr %2, ptr %mask_ptr, align 8 + %3 = load <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, align 1 + call void @print_float_arr(ptr @res_test_arr_f.038B27BE.0, i64 %tag_len2, ptr %out_arr_alloca) + ret void +} + +declare void @print_float_arr(ptr, i64, ptr) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm14_12.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_12.snap similarity index 56% rename from tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm14_12.snap rename to tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_12.snap index 4d06e8f74..33e3d3654 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm14_12.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_12.snap @@ -12,10 +12,10 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %tag_len = load i8, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @"res_\E6\B5\8B\E8\AF\95\E5\AD\97\E7\AC\A6\E4\B8\B2.935D2D1A.0", i32 0, i32 0), align 1 + %tag_len = load i8, ptr @"res_\E6\B5\8B\E8\AF\95\E5\AD\97\E7\AC\A6\E4\B8\B2.935D2D1A.0", align 1 %tag_len2 = zext i8 %tag_len to i64 - call void @print_int(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @"res_\E6\B5\8B\E8\AF\95\E5\AD\97\E7\AC\A6\E4\B8\B2.935D2D1A.0", i32 0, i32 0), i64 %tag_len2, i64 %0) + call void @print_int(ptr @"res_\E6\B5\8B\E8\AF\95\E5\AD\97\E7\AC\A6\E4\B8\B2.935D2D1A.0", i64 %tag_len2, i64 %0) ret void } -declare void @print_int(i8*, i64, i64) +declare void @print_int(ptr, i64, i64) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm14_13.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_13.snap similarity index 58% rename from tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm14_13.snap rename to tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_13.snap index 817731f6c..95403f6d2 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm14_13.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_13.snap @@ -12,10 +12,10 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %tag_len = load i8, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @"res_test!@#$%^.2547CEEA.0", i32 0, i32 0), align 1 + %tag_len = load i8, ptr @"res_test!@#$%^.2547CEEA.0", align 1 %tag_len2 = zext i8 %tag_len to i64 - call void @print_uint(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @"res_test!@#$%^.2547CEEA.0", i32 0, i32 0), i64 %tag_len2, i64 %0) + call void @print_uint(ptr @"res_test!@#$%^.2547CEEA.0", i64 %tag_len2, i64 %0) ret void } -declare void @print_uint(i8*, i64, i64) +declare void @print_uint(ptr, i64, i64) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm14_15.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_15.snap similarity index 59% rename from tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm14_15.snap rename to tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_15.snap index c289f6d65..cb2271eb3 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm14_15.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_15.snap @@ -12,10 +12,10 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %tag_len = load i8, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @"res_ spaces .F46B5D1D.0", i32 0, i32 0), align 1 + %tag_len = load i8, ptr @"res_ spaces .F46B5D1D.0", align 1 %tag_len2 = zext i8 %tag_len to i64 - call void @print_bool(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @"res_ spaces .F46B5D1D.0", i32 0, i32 0), i64 %tag_len2, i1 %0) + call void @print_bool(ptr @"res_ spaces .F46B5D1D.0", i64 %tag_len2, i1 %0) ret void } -declare void @print_bool(i8*, i64, i1) +declare void @print_bool(ptr, i64, i1) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm14_16.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_16.snap similarity index 55% rename from tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm14_16.snap rename to tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_16.snap index bf212c0a2..c1c33b13d 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm14_16.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_16.snap @@ -12,10 +12,10 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %tag_len = load i8, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @"res_\F0\9F\9A\80\F0\9F\91\A8\E2\80\8D\F0\9F\91\A9\E2\80\8D\F0\9F\91\A7\E2\80\8D\F0\9F\91\A6\F0\9F\8C\8D.F7EE3FAA.0", i32 0, i32 0), align 1 + %tag_len = load i8, ptr @"res_\F0\9F\9A\80\F0\9F\91\A8\E2\80\8D\F0\9F\91\A9\E2\80\8D\F0\9F\91\A7\E2\80\8D\F0\9F\91\A6\F0\9F\8C\8D.F7EE3FAA.0", align 1 %tag_len2 = zext i8 %tag_len to i64 - call void @print_bool(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @"res_\F0\9F\9A\80\F0\9F\91\A8\E2\80\8D\F0\9F\91\A9\E2\80\8D\F0\9F\91\A7\E2\80\8D\F0\9F\91\A6\F0\9F\8C\8D.F7EE3FAA.0", i32 0, i32 0), i64 %tag_len2, i1 %0) + call void @print_bool(ptr @"res_\F0\9F\9A\80\F0\9F\91\A8\E2\80\8D\F0\9F\91\A9\E2\80\8D\F0\9F\91\A7\E2\80\8D\F0\9F\91\A6\F0\9F\8C\8D.F7EE3FAA.0", i64 %tag_len2, i1 %0) ret void } -declare void @print_bool(i8*, i64, i1) +declare void @print_bool(ptr, i64, i1) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm14_2.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_2.snap similarity index 58% rename from tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm14_2.snap rename to tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_2.snap index fb5a8f724..bb5167f00 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm14_2.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_2.snap @@ -12,10 +12,10 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %tag_len = load i8, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @res_test_int.258C85C2.0, i32 0, i32 0), align 1 + %tag_len = load i8, ptr @res_test_int.258C85C2.0, align 1 %tag_len2 = zext i8 %tag_len to i64 - call void @print_int(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @res_test_int.258C85C2.0, i32 0, i32 0), i64 %tag_len2, i64 %0) + call void @print_int(ptr @res_test_int.258C85C2.0, i64 %tag_len2, i64 %0) ret void } -declare void @print_int(i8*, i64, i64) +declare void @print_int(ptr, i64, i64) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm14_3.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_3.snap similarity index 58% rename from tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm14_3.snap rename to tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_3.snap index 9607cb99b..62aa2b0fe 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm14_3.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_3.snap @@ -12,10 +12,10 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %tag_len = load i8, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @res_test_uint.DE04EADD.0, i32 0, i32 0), align 1 + %tag_len = load i8, ptr @res_test_uint.DE04EADD.0, align 1 %tag_len2 = zext i8 %tag_len to i64 - call void @print_uint(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @res_test_uint.DE04EADD.0, i32 0, i32 0), i64 %tag_len2, i64 %0) + call void @print_uint(ptr @res_test_uint.DE04EADD.0, i64 %tag_len2, i64 %0) ret void } -declare void @print_uint(i8*, i64, i64) +declare void @print_uint(ptr, i64, i64) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm14_4.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_4.snap similarity index 57% rename from tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm14_4.snap rename to tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_4.snap index f09b1a1de..f10d808a6 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm14_4.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_4.snap @@ -12,10 +12,10 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %tag_len = load i8, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @res_test_f64.A24BDAE1.0, i32 0, i32 0), align 1 + %tag_len = load i8, ptr @res_test_f64.A24BDAE1.0, align 1 %tag_len2 = zext i8 %tag_len to i64 - call void @print_float(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @res_test_f64.A24BDAE1.0, i32 0, i32 0), i64 %tag_len2, double %0) + call void @print_float(ptr @res_test_f64.A24BDAE1.0, i64 %tag_len2, double %0) ret void } -declare void @print_float(i8*, i64, double) +declare void @print_float(ptr, i64, double) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_5.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_5.snap new file mode 100644 index 000000000..4accc6945 --- /dev/null +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_5.snap @@ -0,0 +1,36 @@ +--- +source: tket-qsystem/src/llvm/result.rs +expression: mod_str +--- +; ModuleID = 'test_context' +source_filename = "test_context" + +@res_test_arr_b.866EEC87.0 = private constant [27 x i8] c"\1AUSER:BOOLARR:test_arr_bool" + +define private void @_hl.main.1({ ptr, i64 } %0) { +alloca_block: + br label %entry_block + +entry_block: ; preds = %alloca_block + %tag_len = load i8, ptr @res_test_arr_b.866EEC87.0, align 1 + %tag_len2 = zext i8 %tag_len to i64 + %array_ptr = extractvalue { ptr, i64 } %0, 0 + %array_offset = extractvalue { ptr, i64 } %0, 1 + %1 = getelementptr inbounds [10 x i1], ptr %array_ptr, i64 %array_offset + %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 + %x_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 0 + %y_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 1 + %arr_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 2 + %mask_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 3 + %2 = alloca i1, i32 10, align 1 + store [10 x i1] zeroinitializer, ptr %2, align 1 + store i32 10, ptr %x_ptr, align 4 + store i32 1, ptr %y_ptr, align 4 + store ptr %1, ptr %arr_ptr, align 8 + store ptr %2, ptr %mask_ptr, align 8 + %3 = load <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, align 1 + call void @print_bool_arr(ptr @res_test_arr_b.866EEC87.0, i64 %tag_len2, ptr %out_arr_alloca) + ret void +} + +declare void @print_bool_arr(ptr, i64, ptr) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_6.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_6.snap new file mode 100644 index 000000000..46ec3a632 --- /dev/null +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_6.snap @@ -0,0 +1,35 @@ +--- +source: tket-qsystem/src/llvm/result.rs +expression: mod_str +--- +; ModuleID = 'test_context' +source_filename = "test_context" + +@res_test_arr_b.866EEC87.0 = private constant [27 x i8] c"\1AUSER:BOOLARR:test_arr_bool" + +define private void @_hl.main.1([10 x i1] %0) { +alloca_block: + br label %entry_block + +entry_block: ; preds = %alloca_block + %tag_len = load i8, ptr @res_test_arr_b.866EEC87.0, align 1 + %tag_len2 = zext i8 %tag_len to i64 + %1 = alloca i1, i32 10, align 1 + store [10 x i1] %0, ptr %1, align 1 + %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 + %x_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 0 + %y_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 1 + %arr_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 2 + %mask_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 3 + %2 = alloca i1, i32 10, align 1 + store [10 x i1] zeroinitializer, ptr %2, align 1 + store i32 10, ptr %x_ptr, align 4 + store i32 1, ptr %y_ptr, align 4 + store ptr %1, ptr %arr_ptr, align 8 + store ptr %2, ptr %mask_ptr, align 8 + %3 = load <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, align 1 + call void @print_bool_arr(ptr @res_test_arr_b.866EEC87.0, i64 %tag_len2, ptr %out_arr_alloca) + ret void +} + +declare void @print_bool_arr(ptr, i64, ptr) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_7.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_7.snap new file mode 100644 index 000000000..c4660ea17 --- /dev/null +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_7.snap @@ -0,0 +1,36 @@ +--- +source: tket-qsystem/src/llvm/result.rs +expression: mod_str +--- +; ModuleID = 'test_context' +source_filename = "test_context" + +@res_test_arr_i.DFD30452.0 = private constant [25 x i8] c"\18USER:INTARR:test_arr_int" + +define private void @_hl.main.1({ ptr, i64 } %0) { +alloca_block: + br label %entry_block + +entry_block: ; preds = %alloca_block + %tag_len = load i8, ptr @res_test_arr_i.DFD30452.0, align 1 + %tag_len2 = zext i8 %tag_len to i64 + %array_ptr = extractvalue { ptr, i64 } %0, 0 + %array_offset = extractvalue { ptr, i64 } %0, 1 + %1 = getelementptr inbounds [10 x i64], ptr %array_ptr, i64 %array_offset + %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 + %x_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 0 + %y_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 1 + %arr_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 2 + %mask_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 3 + %2 = alloca i1, i32 10, align 1 + store [10 x i1] zeroinitializer, ptr %2, align 1 + store i32 10, ptr %x_ptr, align 4 + store i32 1, ptr %y_ptr, align 4 + store ptr %1, ptr %arr_ptr, align 8 + store ptr %2, ptr %mask_ptr, align 8 + %3 = load <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, align 1 + call void @print_int_arr(ptr @res_test_arr_i.DFD30452.0, i64 %tag_len2, ptr %out_arr_alloca) + ret void +} + +declare void @print_int_arr(ptr, i64, ptr) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_8.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_8.snap new file mode 100644 index 000000000..38ff5b53a --- /dev/null +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_8.snap @@ -0,0 +1,35 @@ +--- +source: tket-qsystem/src/llvm/result.rs +expression: mod_str +--- +; ModuleID = 'test_context' +source_filename = "test_context" + +@res_test_arr_i.DFD30452.0 = private constant [25 x i8] c"\18USER:INTARR:test_arr_int" + +define private void @_hl.main.1([10 x i64] %0) { +alloca_block: + br label %entry_block + +entry_block: ; preds = %alloca_block + %tag_len = load i8, ptr @res_test_arr_i.DFD30452.0, align 1 + %tag_len2 = zext i8 %tag_len to i64 + %1 = alloca i64, i32 10, align 8 + store [10 x i64] %0, ptr %1, align 4 + %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 + %x_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 0 + %y_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 1 + %arr_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 2 + %mask_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 3 + %2 = alloca i1, i32 10, align 1 + store [10 x i1] zeroinitializer, ptr %2, align 1 + store i32 10, ptr %x_ptr, align 4 + store i32 1, ptr %y_ptr, align 4 + store ptr %1, ptr %arr_ptr, align 8 + store ptr %2, ptr %mask_ptr, align 8 + %3 = load <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, align 1 + call void @print_int_arr(ptr @res_test_arr_i.DFD30452.0, i64 %tag_len2, ptr %out_arr_alloca) + ret void +} + +declare void @print_int_arr(ptr, i64, ptr) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_9.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_9.snap new file mode 100644 index 000000000..2f501b94e --- /dev/null +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_9.snap @@ -0,0 +1,36 @@ +--- +source: tket-qsystem/src/llvm/result.rs +expression: mod_str +--- +; ModuleID = 'test_context' +source_filename = "test_context" + +@res_test_arr_u.3D1C515C.0 = private constant [26 x i8] c"\19USER:INTARR:test_arr_uint" + +define private void @_hl.main.1({ ptr, i64 } %0) { +alloca_block: + br label %entry_block + +entry_block: ; preds = %alloca_block + %tag_len = load i8, ptr @res_test_arr_u.3D1C515C.0, align 1 + %tag_len2 = zext i8 %tag_len to i64 + %array_ptr = extractvalue { ptr, i64 } %0, 0 + %array_offset = extractvalue { ptr, i64 } %0, 1 + %1 = getelementptr inbounds [10 x i64], ptr %array_ptr, i64 %array_offset + %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 + %x_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 0 + %y_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 1 + %arr_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 2 + %mask_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 3 + %2 = alloca i1, i32 10, align 1 + store [10 x i1] zeroinitializer, ptr %2, align 1 + store i32 10, ptr %x_ptr, align 4 + store i32 1, ptr %y_ptr, align 4 + store ptr %1, ptr %arr_ptr, align 8 + store ptr %2, ptr %mask_ptr, align 8 + %3 = load <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, align 1 + call void @print_uint_arr(ptr @res_test_arr_u.3D1C515C.0, i64 %tag_len2, ptr %out_arr_alloca) + ret void +} + +declare void @print_uint_arr(ptr, i64, ptr) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm14_10.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm14_10.snap deleted file mode 100644 index aba89c04d..000000000 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm14_10.snap +++ /dev/null @@ -1,40 +0,0 @@ ---- -source: tket-qsystem/src/llvm/result.rs -expression: mod_str ---- -; ModuleID = 'test_context' -source_filename = "test_context" - -@res_test_arr_i.DFD30452.0 = private constant [25 x i8] c"\18USER:INTARR:test_arr_int" - -define private void @_hl.main.1([10 x i64] %0) { -alloca_block: - %"2_0" = alloca [10 x i64], align 8 - br label %entry_block - -entry_block: ; preds = %alloca_block - store [10 x i64] %0, [10 x i64]* %"2_0", align 4 - %"2_01" = load [10 x i64], [10 x i64]* %"2_0", align 4 - %tag_len = load i8, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @res_test_arr_i.DFD30452.0, i32 0, i32 0), align 1 - %tag_len2 = zext i8 %tag_len to i64 - %1 = alloca i64, i32 10, align 8 - %2 = bitcast i64* %1 to [10 x i64]* - store [10 x i64] %"2_01", [10 x i64]* %2, align 4 - %out_arr_alloca = alloca <{ i32, i32, i64*, i1* }>, align 8 - %x_ptr = getelementptr inbounds <{ i32, i32, i64*, i1* }>, <{ i32, i32, i64*, i1* }>* %out_arr_alloca, i32 0, i32 0 - %y_ptr = getelementptr inbounds <{ i32, i32, i64*, i1* }>, <{ i32, i32, i64*, i1* }>* %out_arr_alloca, i32 0, i32 1 - %arr_ptr = getelementptr inbounds <{ i32, i32, i64*, i1* }>, <{ i32, i32, i64*, i1* }>* %out_arr_alloca, i32 0, i32 2 - %mask_ptr = getelementptr inbounds <{ i32, i32, i64*, i1* }>, <{ i32, i32, i64*, i1* }>* %out_arr_alloca, i32 0, i32 3 - %3 = alloca i1, i32 10, align 1 - %4 = bitcast i1* %3 to [10 x i1]* - store [10 x i1] zeroinitializer, [10 x i1]* %4, align 1 - store i32 10, i32* %x_ptr, align 4 - store i32 1, i32* %y_ptr, align 4 - store i64* %1, i64** %arr_ptr, align 8 - store i1* %3, i1** %mask_ptr, align 8 - %5 = load <{ i32, i32, i64*, i1* }>, <{ i32, i32, i64*, i1* }>* %out_arr_alloca, align 1 - call void @print_int_arr(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @res_test_arr_i.DFD30452.0, i32 0, i32 0), i64 %tag_len2, <{ i32, i32, i64*, i1* }>* %out_arr_alloca) - ret void -} - -declare void @print_int_arr(i8*, i64, <{ i32, i32, i64*, i1* }>*) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm14_11.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm14_11.snap deleted file mode 100644 index 41bf9b67e..000000000 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm14_11.snap +++ /dev/null @@ -1,40 +0,0 @@ ---- -source: tket-qsystem/src/llvm/result.rs -expression: mod_str ---- -; ModuleID = 'test_context' -source_filename = "test_context" - -@res_test_arr_f.038B27BE.0 = private constant [27 x i8] c"\1AUSER:FLOATARR:test_arr_f64" - -define private void @_hl.main.1({ double*, i64 } %0) { -alloca_block: - %"2_0" = alloca { double*, i64 }, align 8 - br label %entry_block - -entry_block: ; preds = %alloca_block - store { double*, i64 } %0, { double*, i64 }* %"2_0", align 8 - %"2_01" = load { double*, i64 }, { double*, i64 }* %"2_0", align 8 - %tag_len = load i8, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @res_test_arr_f.038B27BE.0, i32 0, i32 0), align 1 - %tag_len2 = zext i8 %tag_len to i64 - %array_ptr = extractvalue { double*, i64 } %"2_01", 0 - %array_offset = extractvalue { double*, i64 } %"2_01", 1 - %1 = getelementptr inbounds double, double* %array_ptr, i64 %array_offset - %out_arr_alloca = alloca <{ i32, i32, double*, i1* }>, align 8 - %x_ptr = getelementptr inbounds <{ i32, i32, double*, i1* }>, <{ i32, i32, double*, i1* }>* %out_arr_alloca, i32 0, i32 0 - %y_ptr = getelementptr inbounds <{ i32, i32, double*, i1* }>, <{ i32, i32, double*, i1* }>* %out_arr_alloca, i32 0, i32 1 - %arr_ptr = getelementptr inbounds <{ i32, i32, double*, i1* }>, <{ i32, i32, double*, i1* }>* %out_arr_alloca, i32 0, i32 2 - %mask_ptr = getelementptr inbounds <{ i32, i32, double*, i1* }>, <{ i32, i32, double*, i1* }>* %out_arr_alloca, i32 0, i32 3 - %2 = alloca i1, i32 10, align 1 - %3 = bitcast i1* %2 to [10 x i1]* - store [10 x i1] zeroinitializer, [10 x i1]* %3, align 1 - store i32 10, i32* %x_ptr, align 4 - store i32 1, i32* %y_ptr, align 4 - store double* %1, double** %arr_ptr, align 8 - store i1* %2, i1** %mask_ptr, align 8 - %4 = load <{ i32, i32, double*, i1* }>, <{ i32, i32, double*, i1* }>* %out_arr_alloca, align 1 - call void @print_float_arr(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @res_test_arr_f.038B27BE.0, i32 0, i32 0), i64 %tag_len2, <{ i32, i32, double*, i1* }>* %out_arr_alloca) - ret void -} - -declare void @print_float_arr(i8*, i64, <{ i32, i32, double*, i1* }>*) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm14_5.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm14_5.snap deleted file mode 100644 index 0c7ae16d8..000000000 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm14_5.snap +++ /dev/null @@ -1,40 +0,0 @@ ---- -source: tket-qsystem/src/llvm/result.rs -expression: mod_str ---- -; ModuleID = 'test_context' -source_filename = "test_context" - -@res_test_arr_b.866EEC87.0 = private constant [27 x i8] c"\1AUSER:BOOLARR:test_arr_bool" - -define private void @_hl.main.1({ i1*, i64 } %0) { -alloca_block: - %"2_0" = alloca { i1*, i64 }, align 8 - br label %entry_block - -entry_block: ; preds = %alloca_block - store { i1*, i64 } %0, { i1*, i64 }* %"2_0", align 8 - %"2_01" = load { i1*, i64 }, { i1*, i64 }* %"2_0", align 8 - %tag_len = load i8, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @res_test_arr_b.866EEC87.0, i32 0, i32 0), align 1 - %tag_len2 = zext i8 %tag_len to i64 - %array_ptr = extractvalue { i1*, i64 } %"2_01", 0 - %array_offset = extractvalue { i1*, i64 } %"2_01", 1 - %1 = getelementptr inbounds i1, i1* %array_ptr, i64 %array_offset - %out_arr_alloca = alloca <{ i32, i32, i1*, i1* }>, align 8 - %x_ptr = getelementptr inbounds <{ i32, i32, i1*, i1* }>, <{ i32, i32, i1*, i1* }>* %out_arr_alloca, i32 0, i32 0 - %y_ptr = getelementptr inbounds <{ i32, i32, i1*, i1* }>, <{ i32, i32, i1*, i1* }>* %out_arr_alloca, i32 0, i32 1 - %arr_ptr = getelementptr inbounds <{ i32, i32, i1*, i1* }>, <{ i32, i32, i1*, i1* }>* %out_arr_alloca, i32 0, i32 2 - %mask_ptr = getelementptr inbounds <{ i32, i32, i1*, i1* }>, <{ i32, i32, i1*, i1* }>* %out_arr_alloca, i32 0, i32 3 - %2 = alloca i1, i32 10, align 1 - %3 = bitcast i1* %2 to [10 x i1]* - store [10 x i1] zeroinitializer, [10 x i1]* %3, align 1 - store i32 10, i32* %x_ptr, align 4 - store i32 1, i32* %y_ptr, align 4 - store i1* %1, i1** %arr_ptr, align 8 - store i1* %2, i1** %mask_ptr, align 8 - %4 = load <{ i32, i32, i1*, i1* }>, <{ i32, i32, i1*, i1* }>* %out_arr_alloca, align 1 - call void @print_bool_arr(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @res_test_arr_b.866EEC87.0, i32 0, i32 0), i64 %tag_len2, <{ i32, i32, i1*, i1* }>* %out_arr_alloca) - ret void -} - -declare void @print_bool_arr(i8*, i64, <{ i32, i32, i1*, i1* }>*) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm14_6.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm14_6.snap deleted file mode 100644 index f13fb8ba3..000000000 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm14_6.snap +++ /dev/null @@ -1,40 +0,0 @@ ---- -source: tket-qsystem/src/llvm/result.rs -expression: mod_str ---- -; ModuleID = 'test_context' -source_filename = "test_context" - -@res_test_arr_b.866EEC87.0 = private constant [27 x i8] c"\1AUSER:BOOLARR:test_arr_bool" - -define private void @_hl.main.1([10 x i1] %0) { -alloca_block: - %"2_0" = alloca [10 x i1], align 1 - br label %entry_block - -entry_block: ; preds = %alloca_block - store [10 x i1] %0, [10 x i1]* %"2_0", align 1 - %"2_01" = load [10 x i1], [10 x i1]* %"2_0", align 1 - %tag_len = load i8, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @res_test_arr_b.866EEC87.0, i32 0, i32 0), align 1 - %tag_len2 = zext i8 %tag_len to i64 - %1 = alloca i1, i32 10, align 1 - %2 = bitcast i1* %1 to [10 x i1]* - store [10 x i1] %"2_01", [10 x i1]* %2, align 1 - %out_arr_alloca = alloca <{ i32, i32, i1*, i1* }>, align 8 - %x_ptr = getelementptr inbounds <{ i32, i32, i1*, i1* }>, <{ i32, i32, i1*, i1* }>* %out_arr_alloca, i32 0, i32 0 - %y_ptr = getelementptr inbounds <{ i32, i32, i1*, i1* }>, <{ i32, i32, i1*, i1* }>* %out_arr_alloca, i32 0, i32 1 - %arr_ptr = getelementptr inbounds <{ i32, i32, i1*, i1* }>, <{ i32, i32, i1*, i1* }>* %out_arr_alloca, i32 0, i32 2 - %mask_ptr = getelementptr inbounds <{ i32, i32, i1*, i1* }>, <{ i32, i32, i1*, i1* }>* %out_arr_alloca, i32 0, i32 3 - %3 = alloca i1, i32 10, align 1 - %4 = bitcast i1* %3 to [10 x i1]* - store [10 x i1] zeroinitializer, [10 x i1]* %4, align 1 - store i32 10, i32* %x_ptr, align 4 - store i32 1, i32* %y_ptr, align 4 - store i1* %1, i1** %arr_ptr, align 8 - store i1* %3, i1** %mask_ptr, align 8 - %5 = load <{ i32, i32, i1*, i1* }>, <{ i32, i32, i1*, i1* }>* %out_arr_alloca, align 1 - call void @print_bool_arr(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @res_test_arr_b.866EEC87.0, i32 0, i32 0), i64 %tag_len2, <{ i32, i32, i1*, i1* }>* %out_arr_alloca) - ret void -} - -declare void @print_bool_arr(i8*, i64, <{ i32, i32, i1*, i1* }>*) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm14_7.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm14_7.snap deleted file mode 100644 index b42be4fcb..000000000 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm14_7.snap +++ /dev/null @@ -1,40 +0,0 @@ ---- -source: tket-qsystem/src/llvm/result.rs -expression: mod_str ---- -; ModuleID = 'test_context' -source_filename = "test_context" - -@res_test_arr_i.DFD30452.0 = private constant [25 x i8] c"\18USER:INTARR:test_arr_int" - -define private void @_hl.main.1({ i64*, i64 } %0) { -alloca_block: - %"2_0" = alloca { i64*, i64 }, align 8 - br label %entry_block - -entry_block: ; preds = %alloca_block - store { i64*, i64 } %0, { i64*, i64 }* %"2_0", align 8 - %"2_01" = load { i64*, i64 }, { i64*, i64 }* %"2_0", align 8 - %tag_len = load i8, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @res_test_arr_i.DFD30452.0, i32 0, i32 0), align 1 - %tag_len2 = zext i8 %tag_len to i64 - %array_ptr = extractvalue { i64*, i64 } %"2_01", 0 - %array_offset = extractvalue { i64*, i64 } %"2_01", 1 - %1 = getelementptr inbounds i64, i64* %array_ptr, i64 %array_offset - %out_arr_alloca = alloca <{ i32, i32, i64*, i1* }>, align 8 - %x_ptr = getelementptr inbounds <{ i32, i32, i64*, i1* }>, <{ i32, i32, i64*, i1* }>* %out_arr_alloca, i32 0, i32 0 - %y_ptr = getelementptr inbounds <{ i32, i32, i64*, i1* }>, <{ i32, i32, i64*, i1* }>* %out_arr_alloca, i32 0, i32 1 - %arr_ptr = getelementptr inbounds <{ i32, i32, i64*, i1* }>, <{ i32, i32, i64*, i1* }>* %out_arr_alloca, i32 0, i32 2 - %mask_ptr = getelementptr inbounds <{ i32, i32, i64*, i1* }>, <{ i32, i32, i64*, i1* }>* %out_arr_alloca, i32 0, i32 3 - %2 = alloca i1, i32 10, align 1 - %3 = bitcast i1* %2 to [10 x i1]* - store [10 x i1] zeroinitializer, [10 x i1]* %3, align 1 - store i32 10, i32* %x_ptr, align 4 - store i32 1, i32* %y_ptr, align 4 - store i64* %1, i64** %arr_ptr, align 8 - store i1* %2, i1** %mask_ptr, align 8 - %4 = load <{ i32, i32, i64*, i1* }>, <{ i32, i32, i64*, i1* }>* %out_arr_alloca, align 1 - call void @print_int_arr(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @res_test_arr_i.DFD30452.0, i32 0, i32 0), i64 %tag_len2, <{ i32, i32, i64*, i1* }>* %out_arr_alloca) - ret void -} - -declare void @print_int_arr(i8*, i64, <{ i32, i32, i64*, i1* }>*) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm14_8.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm14_8.snap deleted file mode 100644 index aba89c04d..000000000 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm14_8.snap +++ /dev/null @@ -1,40 +0,0 @@ ---- -source: tket-qsystem/src/llvm/result.rs -expression: mod_str ---- -; ModuleID = 'test_context' -source_filename = "test_context" - -@res_test_arr_i.DFD30452.0 = private constant [25 x i8] c"\18USER:INTARR:test_arr_int" - -define private void @_hl.main.1([10 x i64] %0) { -alloca_block: - %"2_0" = alloca [10 x i64], align 8 - br label %entry_block - -entry_block: ; preds = %alloca_block - store [10 x i64] %0, [10 x i64]* %"2_0", align 4 - %"2_01" = load [10 x i64], [10 x i64]* %"2_0", align 4 - %tag_len = load i8, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @res_test_arr_i.DFD30452.0, i32 0, i32 0), align 1 - %tag_len2 = zext i8 %tag_len to i64 - %1 = alloca i64, i32 10, align 8 - %2 = bitcast i64* %1 to [10 x i64]* - store [10 x i64] %"2_01", [10 x i64]* %2, align 4 - %out_arr_alloca = alloca <{ i32, i32, i64*, i1* }>, align 8 - %x_ptr = getelementptr inbounds <{ i32, i32, i64*, i1* }>, <{ i32, i32, i64*, i1* }>* %out_arr_alloca, i32 0, i32 0 - %y_ptr = getelementptr inbounds <{ i32, i32, i64*, i1* }>, <{ i32, i32, i64*, i1* }>* %out_arr_alloca, i32 0, i32 1 - %arr_ptr = getelementptr inbounds <{ i32, i32, i64*, i1* }>, <{ i32, i32, i64*, i1* }>* %out_arr_alloca, i32 0, i32 2 - %mask_ptr = getelementptr inbounds <{ i32, i32, i64*, i1* }>, <{ i32, i32, i64*, i1* }>* %out_arr_alloca, i32 0, i32 3 - %3 = alloca i1, i32 10, align 1 - %4 = bitcast i1* %3 to [10 x i1]* - store [10 x i1] zeroinitializer, [10 x i1]* %4, align 1 - store i32 10, i32* %x_ptr, align 4 - store i32 1, i32* %y_ptr, align 4 - store i64* %1, i64** %arr_ptr, align 8 - store i1* %3, i1** %mask_ptr, align 8 - %5 = load <{ i32, i32, i64*, i1* }>, <{ i32, i32, i64*, i1* }>* %out_arr_alloca, align 1 - call void @print_int_arr(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @res_test_arr_i.DFD30452.0, i32 0, i32 0), i64 %tag_len2, <{ i32, i32, i64*, i1* }>* %out_arr_alloca) - ret void -} - -declare void @print_int_arr(i8*, i64, <{ i32, i32, i64*, i1* }>*) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm14_9.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm14_9.snap deleted file mode 100644 index bd9efd731..000000000 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm14_9.snap +++ /dev/null @@ -1,40 +0,0 @@ ---- -source: tket-qsystem/src/llvm/result.rs -expression: mod_str ---- -; ModuleID = 'test_context' -source_filename = "test_context" - -@res_test_arr_u.3D1C515C.0 = private constant [26 x i8] c"\19USER:INTARR:test_arr_uint" - -define private void @_hl.main.1({ i64*, i64 } %0) { -alloca_block: - %"2_0" = alloca { i64*, i64 }, align 8 - br label %entry_block - -entry_block: ; preds = %alloca_block - store { i64*, i64 } %0, { i64*, i64 }* %"2_0", align 8 - %"2_01" = load { i64*, i64 }, { i64*, i64 }* %"2_0", align 8 - %tag_len = load i8, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @res_test_arr_u.3D1C515C.0, i32 0, i32 0), align 1 - %tag_len2 = zext i8 %tag_len to i64 - %array_ptr = extractvalue { i64*, i64 } %"2_01", 0 - %array_offset = extractvalue { i64*, i64 } %"2_01", 1 - %1 = getelementptr inbounds i64, i64* %array_ptr, i64 %array_offset - %out_arr_alloca = alloca <{ i32, i32, i64*, i1* }>, align 8 - %x_ptr = getelementptr inbounds <{ i32, i32, i64*, i1* }>, <{ i32, i32, i64*, i1* }>* %out_arr_alloca, i32 0, i32 0 - %y_ptr = getelementptr inbounds <{ i32, i32, i64*, i1* }>, <{ i32, i32, i64*, i1* }>* %out_arr_alloca, i32 0, i32 1 - %arr_ptr = getelementptr inbounds <{ i32, i32, i64*, i1* }>, <{ i32, i32, i64*, i1* }>* %out_arr_alloca, i32 0, i32 2 - %mask_ptr = getelementptr inbounds <{ i32, i32, i64*, i1* }>, <{ i32, i32, i64*, i1* }>* %out_arr_alloca, i32 0, i32 3 - %2 = alloca i1, i32 10, align 1 - %3 = bitcast i1* %2 to [10 x i1]* - store [10 x i1] zeroinitializer, [10 x i1]* %3, align 1 - store i32 10, i32* %x_ptr, align 4 - store i32 1, i32* %y_ptr, align 4 - store i64* %1, i64** %arr_ptr, align 8 - store i1* %2, i1** %mask_ptr, align 8 - %4 = load <{ i32, i32, i64*, i1* }>, <{ i32, i32, i64*, i1* }>* %out_arr_alloca, align 1 - call void @print_uint_arr(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @res_test_arr_u.3D1C515C.0, i32 0, i32 0), i64 %tag_len2, <{ i32, i32, i64*, i1* }>* %out_arr_alloca) - ret void -} - -declare void @print_uint_arr(i8*, i64, <{ i32, i32, i64*, i1* }>*) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm14_1.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_1.snap similarity index 54% rename from tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm14_1.snap rename to tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_1.snap index f098f8c73..0e158fd10 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm14_1.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_1.snap @@ -13,12 +13,12 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - store i1 %0, i1* %"2_0", align 1 - %"2_01" = load i1, i1* %"2_0", align 1 - %tag_len = load i8, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @res_test_bool.427F8271.0, i32 0, i32 0), align 1 + store i1 %0, ptr %"2_0", align 1 + %"2_01" = load i1, ptr %"2_0", align 1 + %tag_len = load i8, ptr @res_test_bool.427F8271.0, align 1 %tag_len2 = zext i8 %tag_len to i64 - call void @print_bool(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @res_test_bool.427F8271.0, i32 0, i32 0), i64 %tag_len2, i1 %"2_01") + call void @print_bool(ptr @res_test_bool.427F8271.0, i64 %tag_len2, i1 %"2_01") ret void } -declare void @print_bool(i8*, i64, i1) +declare void @print_bool(ptr, i64, i1) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_10.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_10.snap new file mode 100644 index 000000000..4d2298606 --- /dev/null +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_10.snap @@ -0,0 +1,38 @@ +--- +source: tket-qsystem/src/llvm/result.rs +expression: mod_str +--- +; ModuleID = 'test_context' +source_filename = "test_context" + +@res_test_arr_i.DFD30452.0 = private constant [25 x i8] c"\18USER:INTARR:test_arr_int" + +define private void @_hl.main.1([10 x i64] %0) { +alloca_block: + %"2_0" = alloca [10 x i64], align 8 + br label %entry_block + +entry_block: ; preds = %alloca_block + store [10 x i64] %0, ptr %"2_0", align 4 + %"2_01" = load [10 x i64], ptr %"2_0", align 4 + %tag_len = load i8, ptr @res_test_arr_i.DFD30452.0, align 1 + %tag_len2 = zext i8 %tag_len to i64 + %1 = alloca i64, i32 10, align 8 + store [10 x i64] %"2_01", ptr %1, align 4 + %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 + %x_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 0 + %y_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 1 + %arr_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 2 + %mask_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 3 + %2 = alloca i1, i32 10, align 1 + store [10 x i1] zeroinitializer, ptr %2, align 1 + store i32 10, ptr %x_ptr, align 4 + store i32 1, ptr %y_ptr, align 4 + store ptr %1, ptr %arr_ptr, align 8 + store ptr %2, ptr %mask_ptr, align 8 + %3 = load <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, align 1 + call void @print_int_arr(ptr @res_test_arr_i.DFD30452.0, i64 %tag_len2, ptr %out_arr_alloca) + ret void +} + +declare void @print_int_arr(ptr, i64, ptr) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_11.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_11.snap new file mode 100644 index 000000000..54442c8aa --- /dev/null +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_11.snap @@ -0,0 +1,39 @@ +--- +source: tket-qsystem/src/llvm/result.rs +expression: mod_str +--- +; ModuleID = 'test_context' +source_filename = "test_context" + +@res_test_arr_f.038B27BE.0 = private constant [27 x i8] c"\1AUSER:FLOATARR:test_arr_f64" + +define private void @_hl.main.1({ ptr, i64 } %0) { +alloca_block: + %"2_0" = alloca { ptr, i64 }, align 8 + br label %entry_block + +entry_block: ; preds = %alloca_block + store { ptr, i64 } %0, ptr %"2_0", align 8 + %"2_01" = load { ptr, i64 }, ptr %"2_0", align 8 + %tag_len = load i8, ptr @res_test_arr_f.038B27BE.0, align 1 + %tag_len2 = zext i8 %tag_len to i64 + %array_ptr = extractvalue { ptr, i64 } %"2_01", 0 + %array_offset = extractvalue { ptr, i64 } %"2_01", 1 + %1 = getelementptr inbounds [10 x double], ptr %array_ptr, i64 %array_offset + %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 + %x_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 0 + %y_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 1 + %arr_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 2 + %mask_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 3 + %2 = alloca i1, i32 10, align 1 + store [10 x i1] zeroinitializer, ptr %2, align 1 + store i32 10, ptr %x_ptr, align 4 + store i32 1, ptr %y_ptr, align 4 + store ptr %1, ptr %arr_ptr, align 8 + store ptr %2, ptr %mask_ptr, align 8 + %3 = load <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, align 1 + call void @print_float_arr(ptr @res_test_arr_f.038B27BE.0, i64 %tag_len2, ptr %out_arr_alloca) + ret void +} + +declare void @print_float_arr(ptr, i64, ptr) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm14_12.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_12.snap similarity index 53% rename from tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm14_12.snap rename to tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_12.snap index 9c45642d9..ef3b236d4 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm14_12.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_12.snap @@ -13,12 +13,12 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - store i64 %0, i64* %"2_0", align 4 - %"2_01" = load i64, i64* %"2_0", align 4 - %tag_len = load i8, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @"res_\E6\B5\8B\E8\AF\95\E5\AD\97\E7\AC\A6\E4\B8\B2.935D2D1A.0", i32 0, i32 0), align 1 + store i64 %0, ptr %"2_0", align 4 + %"2_01" = load i64, ptr %"2_0", align 4 + %tag_len = load i8, ptr @"res_\E6\B5\8B\E8\AF\95\E5\AD\97\E7\AC\A6\E4\B8\B2.935D2D1A.0", align 1 %tag_len2 = zext i8 %tag_len to i64 - call void @print_int(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @"res_\E6\B5\8B\E8\AF\95\E5\AD\97\E7\AC\A6\E4\B8\B2.935D2D1A.0", i32 0, i32 0), i64 %tag_len2, i64 %"2_01") + call void @print_int(ptr @"res_\E6\B5\8B\E8\AF\95\E5\AD\97\E7\AC\A6\E4\B8\B2.935D2D1A.0", i64 %tag_len2, i64 %"2_01") ret void } -declare void @print_int(i8*, i64, i64) +declare void @print_int(ptr, i64, i64) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm14_13.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_13.snap similarity index 53% rename from tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm14_13.snap rename to tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_13.snap index c42464d2b..c4bfa7529 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm14_13.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_13.snap @@ -13,12 +13,12 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - store i64 %0, i64* %"2_0", align 4 - %"2_01" = load i64, i64* %"2_0", align 4 - %tag_len = load i8, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @"res_test!@#$%^.2547CEEA.0", i32 0, i32 0), align 1 + store i64 %0, ptr %"2_0", align 4 + %"2_01" = load i64, ptr %"2_0", align 4 + %tag_len = load i8, ptr @"res_test!@#$%^.2547CEEA.0", align 1 %tag_len2 = zext i8 %tag_len to i64 - call void @print_uint(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @"res_test!@#$%^.2547CEEA.0", i32 0, i32 0), i64 %tag_len2, i64 %"2_01") + call void @print_uint(ptr @"res_test!@#$%^.2547CEEA.0", i64 %tag_len2, i64 %"2_01") ret void } -declare void @print_uint(i8*, i64, i64) +declare void @print_uint(ptr, i64, i64) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm14_15.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_15.snap similarity index 55% rename from tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm14_15.snap rename to tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_15.snap index b0bdad46b..105f26847 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm14_15.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_15.snap @@ -13,12 +13,12 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - store i1 %0, i1* %"2_0", align 1 - %"2_01" = load i1, i1* %"2_0", align 1 - %tag_len = load i8, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @"res_ spaces .F46B5D1D.0", i32 0, i32 0), align 1 + store i1 %0, ptr %"2_0", align 1 + %"2_01" = load i1, ptr %"2_0", align 1 + %tag_len = load i8, ptr @"res_ spaces .F46B5D1D.0", align 1 %tag_len2 = zext i8 %tag_len to i64 - call void @print_bool(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @"res_ spaces .F46B5D1D.0", i32 0, i32 0), i64 %tag_len2, i1 %"2_01") + call void @print_bool(ptr @"res_ spaces .F46B5D1D.0", i64 %tag_len2, i1 %"2_01") ret void } -declare void @print_bool(i8*, i64, i1) +declare void @print_bool(ptr, i64, i1) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm14_16.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_16.snap similarity index 52% rename from tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm14_16.snap rename to tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_16.snap index 312214cc7..679f1bbd1 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm14_16.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_16.snap @@ -13,12 +13,12 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - store i1 %0, i1* %"2_0", align 1 - %"2_01" = load i1, i1* %"2_0", align 1 - %tag_len = load i8, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @"res_\F0\9F\9A\80\F0\9F\91\A8\E2\80\8D\F0\9F\91\A9\E2\80\8D\F0\9F\91\A7\E2\80\8D\F0\9F\91\A6\F0\9F\8C\8D.F7EE3FAA.0", i32 0, i32 0), align 1 + store i1 %0, ptr %"2_0", align 1 + %"2_01" = load i1, ptr %"2_0", align 1 + %tag_len = load i8, ptr @"res_\F0\9F\9A\80\F0\9F\91\A8\E2\80\8D\F0\9F\91\A9\E2\80\8D\F0\9F\91\A7\E2\80\8D\F0\9F\91\A6\F0\9F\8C\8D.F7EE3FAA.0", align 1 %tag_len2 = zext i8 %tag_len to i64 - call void @print_bool(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @"res_\F0\9F\9A\80\F0\9F\91\A8\E2\80\8D\F0\9F\91\A9\E2\80\8D\F0\9F\91\A7\E2\80\8D\F0\9F\91\A6\F0\9F\8C\8D.F7EE3FAA.0", i32 0, i32 0), i64 %tag_len2, i1 %"2_01") + call void @print_bool(ptr @"res_\F0\9F\9A\80\F0\9F\91\A8\E2\80\8D\F0\9F\91\A9\E2\80\8D\F0\9F\91\A7\E2\80\8D\F0\9F\91\A6\F0\9F\8C\8D.F7EE3FAA.0", i64 %tag_len2, i1 %"2_01") ret void } -declare void @print_bool(i8*, i64, i1) +declare void @print_bool(ptr, i64, i1) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm14_2.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_2.snap similarity index 53% rename from tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm14_2.snap rename to tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_2.snap index f045733c9..2aef16fd9 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm14_2.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_2.snap @@ -13,12 +13,12 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - store i64 %0, i64* %"2_0", align 4 - %"2_01" = load i64, i64* %"2_0", align 4 - %tag_len = load i8, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @res_test_int.258C85C2.0, i32 0, i32 0), align 1 + store i64 %0, ptr %"2_0", align 4 + %"2_01" = load i64, ptr %"2_0", align 4 + %tag_len = load i8, ptr @res_test_int.258C85C2.0, align 1 %tag_len2 = zext i8 %tag_len to i64 - call void @print_int(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @res_test_int.258C85C2.0, i32 0, i32 0), i64 %tag_len2, i64 %"2_01") + call void @print_int(ptr @res_test_int.258C85C2.0, i64 %tag_len2, i64 %"2_01") ret void } -declare void @print_int(i8*, i64, i64) +declare void @print_int(ptr, i64, i64) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm14_3.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_3.snap similarity index 53% rename from tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm14_3.snap rename to tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_3.snap index cbdd43094..e4c172351 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm14_3.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_3.snap @@ -13,12 +13,12 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - store i64 %0, i64* %"2_0", align 4 - %"2_01" = load i64, i64* %"2_0", align 4 - %tag_len = load i8, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @res_test_uint.DE04EADD.0, i32 0, i32 0), align 1 + store i64 %0, ptr %"2_0", align 4 + %"2_01" = load i64, ptr %"2_0", align 4 + %tag_len = load i8, ptr @res_test_uint.DE04EADD.0, align 1 %tag_len2 = zext i8 %tag_len to i64 - call void @print_uint(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @res_test_uint.DE04EADD.0, i32 0, i32 0), i64 %tag_len2, i64 %"2_01") + call void @print_uint(ptr @res_test_uint.DE04EADD.0, i64 %tag_len2, i64 %"2_01") ret void } -declare void @print_uint(i8*, i64, i64) +declare void @print_uint(ptr, i64, i64) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm14_4.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_4.snap similarity index 52% rename from tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm14_4.snap rename to tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_4.snap index 9e38de759..8b22990b9 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm14_4.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_4.snap @@ -13,12 +13,12 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - store double %0, double* %"2_0", align 8 - %"2_01" = load double, double* %"2_0", align 8 - %tag_len = load i8, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @res_test_f64.A24BDAE1.0, i32 0, i32 0), align 1 + store double %0, ptr %"2_0", align 8 + %"2_01" = load double, ptr %"2_0", align 8 + %tag_len = load i8, ptr @res_test_f64.A24BDAE1.0, align 1 %tag_len2 = zext i8 %tag_len to i64 - call void @print_float(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @res_test_f64.A24BDAE1.0, i32 0, i32 0), i64 %tag_len2, double %"2_01") + call void @print_float(ptr @res_test_f64.A24BDAE1.0, i64 %tag_len2, double %"2_01") ret void } -declare void @print_float(i8*, i64, double) +declare void @print_float(ptr, i64, double) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_5.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_5.snap new file mode 100644 index 000000000..b5ca549a8 --- /dev/null +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_5.snap @@ -0,0 +1,39 @@ +--- +source: tket-qsystem/src/llvm/result.rs +expression: mod_str +--- +; ModuleID = 'test_context' +source_filename = "test_context" + +@res_test_arr_b.866EEC87.0 = private constant [27 x i8] c"\1AUSER:BOOLARR:test_arr_bool" + +define private void @_hl.main.1({ ptr, i64 } %0) { +alloca_block: + %"2_0" = alloca { ptr, i64 }, align 8 + br label %entry_block + +entry_block: ; preds = %alloca_block + store { ptr, i64 } %0, ptr %"2_0", align 8 + %"2_01" = load { ptr, i64 }, ptr %"2_0", align 8 + %tag_len = load i8, ptr @res_test_arr_b.866EEC87.0, align 1 + %tag_len2 = zext i8 %tag_len to i64 + %array_ptr = extractvalue { ptr, i64 } %"2_01", 0 + %array_offset = extractvalue { ptr, i64 } %"2_01", 1 + %1 = getelementptr inbounds [10 x i1], ptr %array_ptr, i64 %array_offset + %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 + %x_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 0 + %y_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 1 + %arr_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 2 + %mask_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 3 + %2 = alloca i1, i32 10, align 1 + store [10 x i1] zeroinitializer, ptr %2, align 1 + store i32 10, ptr %x_ptr, align 4 + store i32 1, ptr %y_ptr, align 4 + store ptr %1, ptr %arr_ptr, align 8 + store ptr %2, ptr %mask_ptr, align 8 + %3 = load <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, align 1 + call void @print_bool_arr(ptr @res_test_arr_b.866EEC87.0, i64 %tag_len2, ptr %out_arr_alloca) + ret void +} + +declare void @print_bool_arr(ptr, i64, ptr) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_6.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_6.snap new file mode 100644 index 000000000..8f40a37cb --- /dev/null +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_6.snap @@ -0,0 +1,38 @@ +--- +source: tket-qsystem/src/llvm/result.rs +expression: mod_str +--- +; ModuleID = 'test_context' +source_filename = "test_context" + +@res_test_arr_b.866EEC87.0 = private constant [27 x i8] c"\1AUSER:BOOLARR:test_arr_bool" + +define private void @_hl.main.1([10 x i1] %0) { +alloca_block: + %"2_0" = alloca [10 x i1], align 1 + br label %entry_block + +entry_block: ; preds = %alloca_block + store [10 x i1] %0, ptr %"2_0", align 1 + %"2_01" = load [10 x i1], ptr %"2_0", align 1 + %tag_len = load i8, ptr @res_test_arr_b.866EEC87.0, align 1 + %tag_len2 = zext i8 %tag_len to i64 + %1 = alloca i1, i32 10, align 1 + store [10 x i1] %"2_01", ptr %1, align 1 + %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 + %x_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 0 + %y_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 1 + %arr_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 2 + %mask_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 3 + %2 = alloca i1, i32 10, align 1 + store [10 x i1] zeroinitializer, ptr %2, align 1 + store i32 10, ptr %x_ptr, align 4 + store i32 1, ptr %y_ptr, align 4 + store ptr %1, ptr %arr_ptr, align 8 + store ptr %2, ptr %mask_ptr, align 8 + %3 = load <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, align 1 + call void @print_bool_arr(ptr @res_test_arr_b.866EEC87.0, i64 %tag_len2, ptr %out_arr_alloca) + ret void +} + +declare void @print_bool_arr(ptr, i64, ptr) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_7.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_7.snap new file mode 100644 index 000000000..0de1b44b8 --- /dev/null +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_7.snap @@ -0,0 +1,39 @@ +--- +source: tket-qsystem/src/llvm/result.rs +expression: mod_str +--- +; ModuleID = 'test_context' +source_filename = "test_context" + +@res_test_arr_i.DFD30452.0 = private constant [25 x i8] c"\18USER:INTARR:test_arr_int" + +define private void @_hl.main.1({ ptr, i64 } %0) { +alloca_block: + %"2_0" = alloca { ptr, i64 }, align 8 + br label %entry_block + +entry_block: ; preds = %alloca_block + store { ptr, i64 } %0, ptr %"2_0", align 8 + %"2_01" = load { ptr, i64 }, ptr %"2_0", align 8 + %tag_len = load i8, ptr @res_test_arr_i.DFD30452.0, align 1 + %tag_len2 = zext i8 %tag_len to i64 + %array_ptr = extractvalue { ptr, i64 } %"2_01", 0 + %array_offset = extractvalue { ptr, i64 } %"2_01", 1 + %1 = getelementptr inbounds [10 x i64], ptr %array_ptr, i64 %array_offset + %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 + %x_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 0 + %y_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 1 + %arr_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 2 + %mask_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 3 + %2 = alloca i1, i32 10, align 1 + store [10 x i1] zeroinitializer, ptr %2, align 1 + store i32 10, ptr %x_ptr, align 4 + store i32 1, ptr %y_ptr, align 4 + store ptr %1, ptr %arr_ptr, align 8 + store ptr %2, ptr %mask_ptr, align 8 + %3 = load <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, align 1 + call void @print_int_arr(ptr @res_test_arr_i.DFD30452.0, i64 %tag_len2, ptr %out_arr_alloca) + ret void +} + +declare void @print_int_arr(ptr, i64, ptr) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_8.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_8.snap new file mode 100644 index 000000000..4d2298606 --- /dev/null +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_8.snap @@ -0,0 +1,38 @@ +--- +source: tket-qsystem/src/llvm/result.rs +expression: mod_str +--- +; ModuleID = 'test_context' +source_filename = "test_context" + +@res_test_arr_i.DFD30452.0 = private constant [25 x i8] c"\18USER:INTARR:test_arr_int" + +define private void @_hl.main.1([10 x i64] %0) { +alloca_block: + %"2_0" = alloca [10 x i64], align 8 + br label %entry_block + +entry_block: ; preds = %alloca_block + store [10 x i64] %0, ptr %"2_0", align 4 + %"2_01" = load [10 x i64], ptr %"2_0", align 4 + %tag_len = load i8, ptr @res_test_arr_i.DFD30452.0, align 1 + %tag_len2 = zext i8 %tag_len to i64 + %1 = alloca i64, i32 10, align 8 + store [10 x i64] %"2_01", ptr %1, align 4 + %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 + %x_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 0 + %y_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 1 + %arr_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 2 + %mask_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 3 + %2 = alloca i1, i32 10, align 1 + store [10 x i1] zeroinitializer, ptr %2, align 1 + store i32 10, ptr %x_ptr, align 4 + store i32 1, ptr %y_ptr, align 4 + store ptr %1, ptr %arr_ptr, align 8 + store ptr %2, ptr %mask_ptr, align 8 + %3 = load <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, align 1 + call void @print_int_arr(ptr @res_test_arr_i.DFD30452.0, i64 %tag_len2, ptr %out_arr_alloca) + ret void +} + +declare void @print_int_arr(ptr, i64, ptr) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_9.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_9.snap new file mode 100644 index 000000000..272dd6291 --- /dev/null +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_9.snap @@ -0,0 +1,39 @@ +--- +source: tket-qsystem/src/llvm/result.rs +expression: mod_str +--- +; ModuleID = 'test_context' +source_filename = "test_context" + +@res_test_arr_u.3D1C515C.0 = private constant [26 x i8] c"\19USER:INTARR:test_arr_uint" + +define private void @_hl.main.1({ ptr, i64 } %0) { +alloca_block: + %"2_0" = alloca { ptr, i64 }, align 8 + br label %entry_block + +entry_block: ; preds = %alloca_block + store { ptr, i64 } %0, ptr %"2_0", align 8 + %"2_01" = load { ptr, i64 }, ptr %"2_0", align 8 + %tag_len = load i8, ptr @res_test_arr_u.3D1C515C.0, align 1 + %tag_len2 = zext i8 %tag_len to i64 + %array_ptr = extractvalue { ptr, i64 } %"2_01", 0 + %array_offset = extractvalue { ptr, i64 } %"2_01", 1 + %1 = getelementptr inbounds [10 x i64], ptr %array_ptr, i64 %array_offset + %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 + %x_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 0 + %y_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 1 + %arr_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 2 + %mask_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 3 + %2 = alloca i1, i32 10, align 1 + store [10 x i1] zeroinitializer, ptr %2, align 1 + store i32 10, ptr %x_ptr, align 4 + store i32 1, ptr %y_ptr, align 4 + store ptr %1, ptr %arr_ptr, align 8 + store ptr %2, ptr %mask_ptr, align 8 + %3 = load <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, align 1 + call void @print_uint_arr(ptr @res_test_arr_u.3D1C515C.0, i64 %tag_len2, ptr %out_arr_alloca) + ret void +} + +declare void @print_uint_arr(ptr, i64, ptr) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__utils__test__emit_utils_codegen@llvm14_1.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__utils__test__emit_utils_codegen@llvm21_1.snap similarity index 100% rename from tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__utils__test__emit_utils_codegen@llvm14_1.snap rename to tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__utils__test__emit_utils_codegen@llvm21_1.snap diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__utils__test__emit_utils_codegen@pre-mem2reg@llvm14_1.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__utils__test__emit_utils_codegen@pre-mem2reg@llvm21_1.snap similarity index 72% rename from tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__utils__test__emit_utils_codegen@pre-mem2reg@llvm14_1.snap rename to tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__utils__test__emit_utils_codegen@pre-mem2reg@llvm21_1.snap index 70392c734..eee0fb022 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__utils__test__emit_utils_codegen@pre-mem2reg@llvm14_1.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__utils__test__emit_utils_codegen@pre-mem2reg@llvm21_1.snap @@ -13,10 +13,10 @@ alloca_block: entry_block: ; preds = %alloca_block %shot = call i64 @get_current_shot() - store i64 %shot, i64* %"4_0", align 4 - %"4_01" = load i64, i64* %"4_0", align 4 - store i64 %"4_01", i64* %"0", align 4 - %"02" = load i64, i64* %"0", align 4 + store i64 %shot, ptr %"4_0", align 4 + %"4_01" = load i64, ptr %"4_0", align 4 + store i64 %"4_01", ptr %"0", align 4 + %"02" = load i64, ptr %"0", align 4 ret i64 %"02" } diff --git a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm14_1.snap b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_1.snap similarity index 100% rename from tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm14_1.snap rename to tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_1.snap diff --git a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm14_2.snap b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_2.snap similarity index 100% rename from tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm14_2.snap rename to tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_2.snap diff --git a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm14_3.snap b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_3.snap similarity index 100% rename from tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm14_3.snap rename to tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_3.snap diff --git a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm14_4.snap b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_4.snap similarity index 100% rename from tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm14_4.snap rename to tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_4.snap diff --git a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm14_5.snap b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_5.snap similarity index 100% rename from tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm14_5.snap rename to tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_5.snap diff --git a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm14_6.snap b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_6.snap similarity index 100% rename from tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm14_6.snap rename to tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_6.snap diff --git a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm14_7.snap b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_7.snap similarity index 100% rename from tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm14_7.snap rename to tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_7.snap diff --git a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm14_1.snap b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_1.snap similarity index 64% rename from tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm14_1.snap rename to tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_1.snap index 433cb54fe..ca36ef313 100644 --- a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm14_1.snap +++ b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_1.snap @@ -13,12 +13,12 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - store i1 %0, i1* %"2_0", align 1 - %"2_01" = load i1, i1* %"2_0", align 1 + store i1 %0, ptr %"2_0", align 1 + %"2_01" = load i1, ptr %"2_0", align 1 %1 = select i1 %"2_01", i1 true, i1 false - store i1 %1, i1* %"4_0", align 1 - %"4_02" = load i1, i1* %"4_0", align 1 - store i1 %"4_02", i1* %"0", align 1 - %"03" = load i1, i1* %"0", align 1 + store i1 %1, ptr %"4_0", align 1 + %"4_02" = load i1, ptr %"4_0", align 1 + store i1 %"4_02", ptr %"0", align 1 + %"03" = load i1, ptr %"0", align 1 ret i1 %"03" } diff --git a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm14_2.snap b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_2.snap similarity index 61% rename from tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm14_2.snap rename to tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_2.snap index 45576b4c5..f193e75e1 100644 --- a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm14_2.snap +++ b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_2.snap @@ -13,11 +13,11 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - store i1 %0, i1* %"2_0", align 1 - %"2_01" = load i1, i1* %"2_0", align 1 - store i1 %"2_01", i1* %"4_0", align 1 - %"4_02" = load i1, i1* %"4_0", align 1 - store i1 %"4_02", i1* %"0", align 1 - %"03" = load i1, i1* %"0", align 1 + store i1 %0, ptr %"2_0", align 1 + %"2_01" = load i1, ptr %"2_0", align 1 + store i1 %"2_01", ptr %"4_0", align 1 + %"4_02" = load i1, ptr %"4_0", align 1 + store i1 %"4_02", ptr %"0", align 1 + %"03" = load i1, ptr %"0", align 1 ret i1 %"03" } diff --git a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm14_3.snap b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_3.snap similarity index 64% rename from tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm14_3.snap rename to tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_3.snap index 695c2e714..89faa30e5 100644 --- a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm14_3.snap +++ b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_3.snap @@ -13,12 +13,12 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - store i1 %0, i1* %"2_0", align 1 - %"2_01" = load i1, i1* %"2_0", align 1 + store i1 %0, ptr %"2_0", align 1 + %"2_01" = load i1, ptr %"2_0", align 1 %1 = xor i1 %"2_01", true - store i1 %1, i1* %"4_0", align 1 - %"4_02" = load i1, i1* %"4_0", align 1 - store i1 %"4_02", i1* %"0", align 1 - %"03" = load i1, i1* %"0", align 1 + store i1 %1, ptr %"4_0", align 1 + %"4_02" = load i1, ptr %"4_0", align 1 + store i1 %"4_02", ptr %"0", align 1 + %"03" = load i1, ptr %"0", align 1 ret i1 %"03" } diff --git a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm14_4.snap b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_4.snap similarity index 59% rename from tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm14_4.snap rename to tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_4.snap index e39424faa..115fb1fbf 100644 --- a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm14_4.snap +++ b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_4.snap @@ -14,14 +14,14 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - store i1 %0, i1* %"2_0", align 1 - store i1 %1, i1* %"2_1", align 1 - %"2_01" = load i1, i1* %"2_0", align 1 - %"2_12" = load i1, i1* %"2_1", align 1 + store i1 %0, ptr %"2_0", align 1 + store i1 %1, ptr %"2_1", align 1 + %"2_01" = load i1, ptr %"2_0", align 1 + %"2_12" = load i1, ptr %"2_1", align 1 %2 = and i1 %"2_01", %"2_12" - store i1 %2, i1* %"4_0", align 1 - %"4_03" = load i1, i1* %"4_0", align 1 - store i1 %"4_03", i1* %"0", align 1 - %"04" = load i1, i1* %"0", align 1 + store i1 %2, ptr %"4_0", align 1 + %"4_03" = load i1, ptr %"4_0", align 1 + store i1 %"4_03", ptr %"0", align 1 + %"04" = load i1, ptr %"0", align 1 ret i1 %"04" } diff --git a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm14_5.snap b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_5.snap similarity index 59% rename from tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm14_5.snap rename to tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_5.snap index 15d2e00ce..1d9e4ef28 100644 --- a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm14_5.snap +++ b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_5.snap @@ -14,14 +14,14 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - store i1 %0, i1* %"2_0", align 1 - store i1 %1, i1* %"2_1", align 1 - %"2_01" = load i1, i1* %"2_0", align 1 - %"2_12" = load i1, i1* %"2_1", align 1 + store i1 %0, ptr %"2_0", align 1 + store i1 %1, ptr %"2_1", align 1 + %"2_01" = load i1, ptr %"2_0", align 1 + %"2_12" = load i1, ptr %"2_1", align 1 %2 = or i1 %"2_01", %"2_12" - store i1 %2, i1* %"4_0", align 1 - %"4_03" = load i1, i1* %"4_0", align 1 - store i1 %"4_03", i1* %"0", align 1 - %"04" = load i1, i1* %"0", align 1 + store i1 %2, ptr %"4_0", align 1 + %"4_03" = load i1, ptr %"4_0", align 1 + store i1 %"4_03", ptr %"0", align 1 + %"04" = load i1, ptr %"0", align 1 ret i1 %"04" } diff --git a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm14_6.snap b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_6.snap similarity index 59% rename from tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm14_6.snap rename to tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_6.snap index 55508dcd9..42ae2c6e7 100644 --- a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm14_6.snap +++ b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_6.snap @@ -14,14 +14,14 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - store i1 %0, i1* %"2_0", align 1 - store i1 %1, i1* %"2_1", align 1 - %"2_01" = load i1, i1* %"2_0", align 1 - %"2_12" = load i1, i1* %"2_1", align 1 + store i1 %0, ptr %"2_0", align 1 + store i1 %1, ptr %"2_1", align 1 + %"2_01" = load i1, ptr %"2_0", align 1 + %"2_12" = load i1, ptr %"2_1", align 1 %2 = xor i1 %"2_01", %"2_12" - store i1 %2, i1* %"4_0", align 1 - %"4_03" = load i1, i1* %"4_0", align 1 - store i1 %"4_03", i1* %"0", align 1 - %"04" = load i1, i1* %"0", align 1 + store i1 %2, ptr %"4_0", align 1 + %"4_03" = load i1, ptr %"4_0", align 1 + store i1 %"4_03", ptr %"0", align 1 + %"04" = load i1, ptr %"0", align 1 ret i1 %"04" } diff --git a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm14_7.snap b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_7.snap similarity index 59% rename from tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm14_7.snap rename to tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_7.snap index d35f142bc..59a100c88 100644 --- a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm14_7.snap +++ b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_7.snap @@ -14,14 +14,14 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - store i1 %0, i1* %"2_0", align 1 - store i1 %1, i1* %"2_1", align 1 - %"2_01" = load i1, i1* %"2_0", align 1 - %"2_12" = load i1, i1* %"2_1", align 1 + store i1 %0, ptr %"2_0", align 1 + store i1 %1, ptr %"2_1", align 1 + %"2_01" = load i1, ptr %"2_0", align 1 + %"2_12" = load i1, ptr %"2_1", align 1 %2 = icmp eq i1 %"2_01", %"2_12" - store i1 %2, i1* %"4_0", align 1 - %"4_03" = load i1, i1* %"4_0", align 1 - store i1 %"4_03", i1* %"0", align 1 - %"04" = load i1, i1* %"0", align 1 + store i1 %2, ptr %"4_0", align 1 + %"4_03" = load i1, ptr %"4_0", align 1 + store i1 %"4_03", ptr %"0", align 1 + %"04" = load i1, ptr %"0", align 1 ret i1 %"04" } diff --git a/tket/src/llvm/snapshots/tket__llvm__rotation__test__emit_all_ops@llvm14_0.snap b/tket/src/llvm/snapshots/tket__llvm__rotation__test__emit_all_ops@llvm21_0.snap similarity index 78% rename from tket/src/llvm/snapshots/tket__llvm__rotation__test__emit_all_ops@llvm14_0.snap rename to tket/src/llvm/snapshots/tket__llvm__rotation__test__emit_all_ops@llvm21_0.snap index db9966b73..8d9c9489d 100644 --- a/tket/src/llvm/snapshots/tket__llvm__rotation__test__emit_all_ops@llvm14_0.snap +++ b/tket/src/llvm/snapshots/tket__llvm__rotation__test__emit_all_ops@llvm21_0.snap @@ -24,7 +24,7 @@ entry_block: ; preds = %alloca_block br i1 %6, label %9, label %7 7: ; preds = %entry_block - %8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @prelude.panic_template, i32 0, i32 0), i32 1, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @0, i32 0, i32 0)) + %8 = call i32 (ptr, ...) @printf(ptr @prelude.panic_template, i32 1, ptr @0) call void @abort() unreachable @@ -50,9 +50,9 @@ entry_block: ; preds = %alloca_block br label %cond_7_case_1 cond_7_case_0: ; preds = %19 - %22 = extractvalue { i32, i8* } { i32 1, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @1, i32 0, i32 0) }, 0 - %23 = extractvalue { i32, i8* } { i32 1, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @1, i32 0, i32 0) }, 1 - %24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @prelude.panic_template.1, i32 0, i32 0), i32 %22, i8* %23) + %22 = extractvalue { i32, ptr } { i32 1, ptr @1 }, 0 + %23 = extractvalue { i32, ptr } { i32 1, ptr @1 }, 1 + %24 = call i32 (ptr, ...) @printf(ptr @prelude.panic_template.1, i32 %22, ptr %23) call void @abort() br label %cond_exit_7 @@ -65,6 +65,6 @@ cond_exit_7: ; preds = %cond_7_case_1, %con ret void } -declare i32 @printf(i8*, ...) +declare i32 @printf(ptr, ...) declare void @abort() diff --git a/tket/src/llvm/snapshots/tket__llvm__rotation__test__emit_all_ops@pre-mem2reg@llvm14_0.snap b/tket/src/llvm/snapshots/tket__llvm__rotation__test__emit_all_ops@pre-mem2reg@llvm21_0.snap similarity index 59% rename from tket/src/llvm/snapshots/tket__llvm__rotation__test__emit_all_ops@pre-mem2reg@llvm14_0.snap rename to tket/src/llvm/snapshots/tket__llvm__rotation__test__emit_all_ops@pre-mem2reg@llvm21_0.snap index 91f3a294f..7b0e4601f 100644 --- a/tket/src/llvm/snapshots/tket__llvm__rotation__test__emit_all_ops@pre-mem2reg@llvm14_0.snap +++ b/tket/src/llvm/snapshots/tket__llvm__rotation__test__emit_all_ops@pre-mem2reg@llvm21_0.snap @@ -18,7 +18,7 @@ alloca_block: %"6_0" = alloca { i1, double }, align 8 %"7_0" = alloca double, align 8 %"0" = alloca double, align 8 - %"12_0" = alloca { i32, i8* }, align 8 + %"12_0" = alloca { i32, ptr }, align 8 %"13_0" = alloca double, align 8 %"08" = alloca double, align 8 %"15_0" = alloca double, align 8 @@ -26,8 +26,8 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - store double %0, double* %"2_0", align 8 - %"2_01" = load double, double* %"2_0", align 8 + store double %0, ptr %"2_0", align 8 + %"2_01" = load double, ptr %"2_0", align 8 %1 = fcmp oeq double %"2_01", 0x7FF0000000000000 %2 = fcmp oeq double %"2_01", 0xFFF0000000000000 %3 = fcmp uno double %"2_01", 0.000000e+00 @@ -37,15 +37,15 @@ entry_block: ; preds = %alloca_block br i1 %6, label %9, label %7 7: ; preds = %entry_block - %8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @prelude.panic_template, i32 0, i32 0), i32 1, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @0, i32 0, i32 0)) + %8 = call i32 (ptr, ...) @printf(ptr @prelude.panic_template, i32 1, ptr @0) call void @abort() unreachable 9: ; preds = %entry_block - store double %"2_01", double* %"4_0", align 8 - %"4_02" = load double, double* %"4_0", align 8 - store double %"4_02", double* %"5_0", align 8 - %"5_03" = load double, double* %"5_0", align 8 + store double %"2_01", ptr %"4_0", align 8 + %"4_02" = load double, ptr %"4_0", align 8 + store double %"4_02", ptr %"5_0", align 8 + %"5_03" = load double, ptr %"5_0", align 8 %10 = fcmp oeq double %"5_03", 0x7FF0000000000000 %11 = fcmp oeq double %"5_03", 0xFFF0000000000000 %12 = fcmp uno double %"5_03", 0.000000e+00 @@ -54,8 +54,8 @@ entry_block: ; preds = %alloca_block %15 = xor i1 %14, true %16 = insertvalue { i1, double } { i1 true, double poison }, double %"5_03", 1 %17 = select i1 %15, { i1, double } %16, { i1, double } { i1 false, double poison } - store { i1, double } %17, { i1, double }* %"6_0", align 8 - %"6_04" = load { i1, double }, { i1, double }* %"6_0", align 8 + store { i1, double } %17, ptr %"6_0", align 8 + %"6_04" = load { i1, double }, ptr %"6_0", align 8 %18 = extractvalue { i1, double } %"6_04", 0 switch i1 %18, label %19 [ i1 true, label %20 @@ -66,38 +66,38 @@ entry_block: ; preds = %alloca_block 20: ; preds = %9 %21 = extractvalue { i1, double } %"6_04", 1 - store double %21, double* %"08", align 8 + store double %21, ptr %"08", align 8 br label %cond_7_case_1 cond_7_case_0: ; preds = %19 - store { i32, i8* } { i32 1, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @1, i32 0, i32 0) }, { i32, i8* }* %"12_0", align 8 - %"12_06" = load { i32, i8* }, { i32, i8* }* %"12_0", align 8 - %22 = extractvalue { i32, i8* } %"12_06", 0 - %23 = extractvalue { i32, i8* } %"12_06", 1 - %24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @prelude.panic_template.1, i32 0, i32 0), i32 %22, i8* %23) + store { i32, ptr } { i32 1, ptr @1 }, ptr %"12_0", align 8 + %"12_06" = load { i32, ptr }, ptr %"12_0", align 8 + %22 = extractvalue { i32, ptr } %"12_06", 0 + %23 = extractvalue { i32, ptr } %"12_06", 1 + %24 = call i32 (ptr, ...) @printf(ptr @prelude.panic_template.1, i32 %22, ptr %23) call void @abort() - store double 0.000000e+00, double* %"13_0", align 8 - %"13_07" = load double, double* %"13_0", align 8 - store double %"13_07", double* %"0", align 8 + store double 0.000000e+00, ptr %"13_0", align 8 + %"13_07" = load double, ptr %"13_0", align 8 + store double %"13_07", ptr %"0", align 8 br label %cond_exit_7 cond_7_case_1: ; preds = %20 - %"09" = load double, double* %"08", align 8 - store double %"09", double* %"15_0", align 8 - %"15_010" = load double, double* %"15_0", align 8 - store double %"15_010", double* %"0", align 8 + %"09" = load double, ptr %"08", align 8 + store double %"09", ptr %"15_0", align 8 + %"15_010" = load double, ptr %"15_0", align 8 + store double %"15_010", ptr %"0", align 8 br label %cond_exit_7 cond_exit_7: ; preds = %cond_7_case_1, %cond_7_case_0 - %"05" = load double, double* %"0", align 8 - store double %"05", double* %"7_0", align 8 - %"4_011" = load double, double* %"4_0", align 8 - %"7_012" = load double, double* %"7_0", align 8 + %"05" = load double, ptr %"0", align 8 + store double %"05", ptr %"7_0", align 8 + %"4_011" = load double, ptr %"4_0", align 8 + %"7_012" = load double, ptr %"7_0", align 8 %25 = fadd double %"4_011", %"7_012" - store double %25, double* %"17_0", align 8 + store double %25, ptr %"17_0", align 8 ret void } -declare i32 @printf(i8*, ...) +declare i32 @printf(ptr, ...) declare void @abort() From f7a83b52cbfdd125dac26972fe5a2e03e48bafdb Mon Sep 17 00:00:00 2001 From: George Hodgkins Date: Wed, 25 Feb 2026 17:26:30 -0700 Subject: [PATCH 07/24] Apply lints, update LLVM version in CI --- .github/workflows/ci.yml | 4 ++-- .github/workflows/python-wheels.yml | 4 ++-- .github/workflows/unsoundness.yml | 4 ++-- qis-compiler/rust/gpu.rs | 25 +++++++++---------------- tket-qsystem/src/llvm/array_utils.rs | 18 ++++++++++-------- tket-qsystem/src/llvm/debug.rs | 17 +++++------------ tket-qsystem/src/llvm/result.rs | 17 +++++++++-------- 7 files changed, 39 insertions(+), 50 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 383636863..0f86bd8aa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,8 +26,8 @@ env: # different strings for install action and feature name # adapted from https://github.com/TheDan64/inkwell/blob/master/.github/workflows/test.yml - LLVM_VERSION: "14.0" - LLVM_FEATURE_NAME: "14-0" + LLVM_VERSION: "21.1" + LLVM_FEATURE_NAME: "21-1" # Path to the cached tket-c-api library # When this envvar is set, the `./.github/actions/tket-c-api` action **must** be run to fetch the artifacts diff --git a/.github/workflows/python-wheels.yml b/.github/workflows/python-wheels.yml index 09f5885e5..7a45e2fe2 100644 --- a/.github/workflows/python-wheels.yml +++ b/.github/workflows/python-wheels.yml @@ -33,8 +33,8 @@ env: RUSTC_WRAPPER: "sccache" # different strings for install action and feature name # adapted from https://github.com/TheDan64/inkwell/blob/master/.github/workflows/test.yml - LLVM_VERSION: "14.0" - LLVM_FEATURE_NAME: "14-0" + LLVM_VERSION: "21.1" + LLVM_FEATURE_NAME: "21-1" jobs: # Check if the tag matches the package name, diff --git a/.github/workflows/unsoundness.yml b/.github/workflows/unsoundness.yml index 6822b31ab..2879dac7b 100644 --- a/.github/workflows/unsoundness.yml +++ b/.github/workflows/unsoundness.yml @@ -23,8 +23,8 @@ env: # different strings for install action and feature name # adapted from https://github.com/TheDan64/inkwell/blob/master/.github/workflows/test.yml - LLVM_VERSION: "14.0" - LLVM_FEATURE_NAME: "14-0" + LLVM_VERSION: "21.1" + LLVM_FEATURE_NAME: "21-1" # Path to the cached tket-c-api library # When this envvar is set, the `./.github/actions/tket-c-api` action **must** be run to fetch the artifacts diff --git a/qis-compiler/rust/gpu.rs b/qis-compiler/rust/gpu.rs index 17709d3ef..d91c33d37 100644 --- a/qis-compiler/rust/gpu.rs +++ b/qis-compiler/rust/gpu.rs @@ -88,7 +88,7 @@ //! to other result types in future. use crate::selene_specific; -use anyhow::{Result, ensure, bail}; +use anyhow::{Result, bail, ensure}; use hugr::extension::prelude::option_type; use hugr::llvm::{CodegenExtension, CodegenExtsBuilder, inkwell}; use hugr::std_extensions::arithmetic::int_types::int_type; @@ -396,8 +396,6 @@ impl GpuCodegen { let gpu_ref = gpu_ref.into_int_value(); let func = fn_id.into_int_value(); - let builder = ctx.builder(); - let gpu_call = ctx.get_extern_func( "gpu_call", iwc.i8_type().fn_type( @@ -405,10 +403,8 @@ impl GpuCodegen { gpu_ref.get_type().into(), func.get_type().into(), iwc.i64_type().into(), - iwc.ptr_type(inkwell::AddressSpace::default()) - .into(), - iwc.ptr_type(inkwell::AddressSpace::default()) - .into(), + iwc.ptr_type(inkwell::AddressSpace::default()).into(), + iwc.ptr_type(inkwell::AddressSpace::default()).into(), ], false, ), @@ -503,18 +499,16 @@ impl GpuCodegen { // load the result from the result pointer let result_ty = ctx.llvm_type(single_result)?; - ensure!(result_ty == i64_t || result_ty == f64_t, - "ReadResult operation with a single output expects either \ + ensure!( + result_ty == i64_t || result_ty == f64_t, + "ReadResult operation with a single output expects either \ i64 or f64, got: {result_ty:?}" ); - + let result = ctx.builder().build_load(result_ty, result_ptr, "result")?; op.outputs.finish( ctx.builder(), - [ - gpu_ref.as_basic_value_enum(), - result.as_basic_value_enum(), - ], + [gpu_ref.as_basic_value_enum(), result.as_basic_value_enum()], )?; } other => { @@ -705,8 +699,7 @@ fn emit_panic_with_gpu_error<'c, H: HugrView>( // Try to get the error message from the GPU library. let gpu_get_error = ctx.get_extern_func( "gpu_get_error", - iwc.ptr_type(AddressSpace::default()) - .fn_type(&[], false), + iwc.ptr_type(AddressSpace::default()).fn_type(&[], false), )?; let error_message = ctx diff --git a/tket-qsystem/src/llvm/array_utils.rs b/tket-qsystem/src/llvm/array_utils.rs index 4726d107a..2f0a8aed1 100644 --- a/tket-qsystem/src/llvm/array_utils.rs +++ b/tket-qsystem/src/llvm/array_utils.rs @@ -2,7 +2,7 @@ // TODO move to hugr-llvm crate // https://github.com/quantinuum/tket2/issues/899 -use anyhow::{anyhow, Result}; +use anyhow::{Result, anyhow}; use hugr::extension::prelude::usize_t; use hugr::llvm::emit::EmitFuncContext; use hugr::llvm::extension::collections::array::{ @@ -152,7 +152,7 @@ impl ArrayLowering for HeapArrayLowering /// Helper function to allocate an array on the stack. /// -/// Returns a pointer to the newly allocated array. +/// Returns a pointer to the newly allocated array. pub fn build_array_alloca<'c>( builder: &Builder<'c>, array: ArrayValue<'c>, @@ -174,9 +174,10 @@ pub fn build_int_array_load<'c>( elem_type: IntType<'c>, length: u32, ) -> Result, BuilderError> { - let array_ty = elem_type.array_type(length); - let array = builder.build_load(array_ty, array_ptr, "")?.into_array_value(); + let array = builder + .build_load(array_ty, array_ptr, "")? + .into_array_value(); Result::Ok(array) } @@ -203,7 +204,6 @@ impl ElemType { } } - /// Helper function to create a dense array struct type. /// /// The struct contains four fields: @@ -222,8 +222,8 @@ pub fn struct_1d_arr_t<'a>(ctx: &'a Context) -> StructType<'a> { &[ ctx.i32_type().into(), // x ctx.i32_type().into(), // y - ptr_t.into(), // pointer to first element - ptr_t.into(), // pointer to first mask element + ptr_t.into(), // pointer to first element + ptr_t.into(), // pointer to first mask element ], true, ) @@ -261,7 +261,9 @@ pub fn struct_1d_arr_alloc<'a>( builder.build_store(arr_field, array_ptr)?; builder.build_store(mask_field, mask_ptr)?; - let out_arr = builder.build_load(out_arr_type, out_arr_ptr, "")?.into_struct_value(); + let out_arr = builder + .build_load(out_arr_type, out_arr_ptr, "")? + .into_struct_value(); Result::Ok((out_arr_ptr, out_arr)) } diff --git a/tket-qsystem/src/llvm/debug.rs b/tket-qsystem/src/llvm/debug.rs index f2133b032..2001d8091 100644 --- a/tket-qsystem/src/llvm/debug.rs +++ b/tket-qsystem/src/llvm/debug.rs @@ -82,25 +82,18 @@ impl DebugCodegenExtension { .try_into() .map_err(|_| anyhow!(format!("StateResult expects a qubit array argument")))?; let qubits_array = self.array_lowering.array_to_ptr( - builder, qubits, i64_t.as_basic_type_enum(), array_len.try_into()?)?; - let (qubits_ptr, _) = struct_1d_arr_alloc( - iw_ctx, builder, + qubits, + i64_t.as_basic_type_enum(), array_len.try_into()?, - qubits_array, )?; + let (qubits_ptr, _) = + struct_1d_arr_alloc(iw_ctx, builder, array_len.try_into()?, qubits_array)?; // Build the function call. let fn_state_result = ctx.get_extern_func( "print_state_result", - void_t.fn_type( - &[ - ptr_t.into(), - i64_t.into(), - ptr_t.into(), - ], - false, - ), + void_t.fn_type(&[ptr_t.into(), i64_t.into(), ptr_t.into()], false), )?; builder.build_call( diff --git a/tket-qsystem/src/llvm/result.rs b/tket-qsystem/src/llvm/result.rs index 2b0c05ca3..09ca4888b 100644 --- a/tket-qsystem/src/llvm/result.rs +++ b/tket-qsystem/src/llvm/result.rs @@ -12,7 +12,7 @@ use hugr::llvm::types::HugrSumType; use inkwell::AddressSpace; use inkwell::builder::Builder; use inkwell::context::Context; -use inkwell::types::{FloatType, IntType, PointerType, VoidType, BasicMetadataTypeEnum}; +use inkwell::types::{BasicMetadataTypeEnum, FloatType, IntType, PointerType, VoidType}; use inkwell::values::{BasicValueEnum, FunctionValue, IntValue}; use tket::hugr::extension::simple_op::MakeExtensionOp; use tket::hugr::ops::ExtensionOp; @@ -90,7 +90,7 @@ impl<'c, H: HugrView, AL: ArrayLowering + Clone> ResultEmitter<'c, fn get_func_print(&self, op: &ResultOp) -> Result> { // The first two parameters are the same for all print function variants - let mut params : Vec = vec![self.ptr_t().into(), self.i64_t().into()]; + let mut params: Vec = vec![self.ptr_t().into(), self.i64_t().into()]; let symbol = match op.result_op { ResultOpDef::Bool => { params.push(self.bool_t().into()); @@ -150,7 +150,8 @@ impl<'c, H: HugrView, AL: ArrayLowering + Clone> ResultEmitter<'c, .builder() .build_load(self.i8_t(), tag_ptr.into_pointer_value(), "tag_len")? .into_int_value(); - self.builder().build_int_z_extend(l, self.i64_t(), "tag_len")? + self.builder() + .build_int_z_extend(l, self.i64_t(), "tag_len")? }; Ok((tag_ptr, tag_len)) @@ -170,14 +171,14 @@ impl<'c, H: HugrView, AL: ArrayLowering + Clone> ResultEmitter<'c, }; let print_fn = self.get_func_print(op)?; - let array = self.1.array_to_ptr(self.builder(), val, - data_type.llvm_type(self.iw_context()), length.try_into()?)?; - let (array_ptr, _) = struct_1d_arr_alloc( - self.iw_context(), + let array = self.1.array_to_ptr( self.builder(), + val, + data_type.llvm_type(self.iw_context()), length.try_into()?, - array, )?; + let (array_ptr, _) = + struct_1d_arr_alloc(self.iw_context(), self.builder(), length.try_into()?, array)?; self.builder().build_call( print_fn, &[tag_ptr.into(), tag_len.into(), array_ptr.into()], From 9baa4cfe250c63fa15131e121a8127f39619489e Mon Sep 17 00:00:00 2001 From: Jake Arkinstall <65358059+jake-arkinstall@users.noreply.github.com> Date: Mon, 2 Mar 2026 16:43:55 +0000 Subject: [PATCH 08/24] Update devenv to use updated LLVM package + env vars --- devenv.lock | 16 ---------------- devenv.nix | 10 ++++++---- devenv.yaml | 2 -- 3 files changed, 6 insertions(+), 22 deletions(-) diff --git a/devenv.lock b/devenv.lock index c88779258..6cb62ab88 100644 --- a/devenv.lock +++ b/devenv.lock @@ -87,27 +87,11 @@ "type": "github" } }, - "nixpkgs-2505": { - "locked": { - "lastModified": 1762498405, - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "6faeb062ee4cf4f105989d490831713cc5a43ee1", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-25.05", - "repo": "nixpkgs", - "type": "github" - } - }, "root": { "inputs": { "devenv": "devenv", "git-hooks": "git-hooks", "nixpkgs": "nixpkgs", - "nixpkgs-2505": "nixpkgs-2505", "pre-commit-hooks": [ "git-hooks" ], diff --git a/devenv.nix b/devenv.nix index 4118f8972..d929bc912 100644 --- a/devenv.nix +++ b/devenv.nix @@ -1,8 +1,10 @@ { pkgs, lib, inputs, ... }: let - pkgs-stable = import inputs.nixpkgs-2505 { system = pkgs.stdenv.system; }; - llvmVersion = "14"; - llvmPackages = pkgs-stable."llvmPackages_${llvmVersion}"; + llvmVersion = "21"; + llvmPackages = pkgs."llvmPackages_${llvmVersion}"; + versionInfo = builtins.splitVersion llvmPackages.release_version; + llvmVersionMajor = builtins.elemAt versionInfo 0; + llvmVersionMinor = builtins.elemAt versionInfo 1; in { # https://devenv.sh/packages/ @@ -40,7 +42,7 @@ in ''; env = { - "LLVM_SYS_${llvmVersion}0_PREFIX" = "${llvmPackages.libllvm.dev}"; + "LLVM_SYS_${llvmVersionMajor}${llvmVersionMinor}_PREFIX" = "${llvmPackages.libllvm.dev}"; "LIBCLANG_PATH" = "${pkgs.libclang.lib}/lib"; # hardening removed due its impact on tikv-jemalloc-sys build, # as depended upon by tikv-jemalloc-sys diff --git a/devenv.yaml b/devenv.yaml index cc9514dad..666f27ded 100644 --- a/devenv.yaml +++ b/devenv.yaml @@ -1,8 +1,6 @@ inputs: nixpkgs: url: github:NixOS/nixpkgs/nixpkgs-unstable - nixpkgs-2505: - url: github:NixOS/nixpkgs/nixos-25.05 rust-overlay: url: github:oxalica/rust-overlay inputs: From 0c579a7bd61dd22ebf7db9944bad20d5cfe08970 Mon Sep 17 00:00:00 2001 From: George Hodgkins Date: Mon, 16 Mar 2026 11:18:08 -0600 Subject: [PATCH 09/24] Update lockfile --- Cargo.lock | 163 ++++++++++++++++++++++++----------------------------- 1 file changed, 75 insertions(+), 88 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 44108958d..1d013ec3f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -105,9 +105,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.101" +version = "1.0.102" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f0e0fee31ef5ed1ba1316088939cea399010ed7731dba877ed44aeb407a75ea" +checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c" [[package]] name = "approx" @@ -324,9 +324,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.56" +version = "1.2.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aebf35691d1bfb0ac386a69bac2fde4dd276fb618cf8bf4f5318fe285e821bb2" +checksum = "7a0dd1ca384932ff3641c8718a02769f1698e7563dc6974ffd03346116310423" dependencies = [ "find-msvc-tools", "jobserver", @@ -671,9 +671,9 @@ dependencies = [ [[package]] name = "darling" -version = "0.21.3" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cdf337090841a411e2a7f3deb9187445851f91b309c0c0a29e05f74a00a48c0" +checksum = "25ae13da2f202d56bd7f91c25fba009e7717a1e4a1cc98a76d844b65ae912e9d" dependencies = [ "darling_core", "darling_macro", @@ -681,11 +681,10 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.21.3" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1247195ecd7e3c85f83c8d2a366e4210d588e802133e1e355180a9870b517ea4" +checksum = "9865a50f7c335f53564bb694ef660825eb8610e0a53d3e11bf1b0d3df31e03b0" dependencies = [ - "fnv", "ident_case", "proc-macro2", "quote", @@ -695,9 +694,9 @@ dependencies = [ [[package]] name = "darling_macro" -version = "0.21.3" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d38308df82d1080de0afee5d069fa14b0326a88c14f15c5ccda35b4a6c414c81" +checksum = "ac3984ec7bd6cfa798e62b4a642426a5be0e68f9401cfc2a01e3fa9ea2fcdb8d" dependencies = [ "darling_core", "quote", @@ -1146,7 +1145,7 @@ dependencies = [ "smallvec", "smol_str", "static_assertions", - "strum", + "strum 0.27.2", "thiserror 2.0.18", "tracing", "typetag", @@ -1169,7 +1168,7 @@ dependencies = [ "petgraph 0.8.3", "portgraph 0.15.3", "rstest", - "strum", + "strum 0.27.2", ] [[package]] @@ -1207,7 +1206,7 @@ dependencies = [ "petgraph 0.8.3", "portgraph 0.15.3", "serde_json", - "strum", + "strum 0.27.2", "thiserror 2.0.18", ] @@ -1270,15 +1269,6 @@ dependencies = [ "serde_core", ] -[[package]] -name = "indoc" -version = "2.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79cf5c93f93228cf8efb3ba362535fb11199ac548a09ce117c9b1adc3030d706" -dependencies = [ - "rustversion", -] - [[package]] name = "inkwell" version = "0.8.0" @@ -1411,9 +1401,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.181" +version = "0.2.183" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "459427e2af2b9c839b132acb702a1c654d95e10f8c326bfc2ad11310e458b1c5" +checksum = "b5b646652bf6661599e1da8901b3b9522896f01e736bad5f723fe7a3a27f899d" [[package]] name = "libloading" @@ -1466,15 +1456,6 @@ version = "2.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" -[[package]] -name = "memoffset" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" -dependencies = [ - "autocfg", -] - [[package]] name = "minimal-lexical" version = "0.2.1" @@ -1880,55 +1861,43 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.27.2" +version = "0.28.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab53c047fcd1a1d2a8820fe84f05d6be69e9526be40cb03b73f86b6b03e6d87d" +checksum = "cf85e27e86080aafd5a22eae58a162e133a589551542b3e5cee4beb27e54f8e1" dependencies = [ "anyhow", - "indoc", "libc", - "memoffset", "once_cell", "portable-atomic", - "pyo3-build-config 0.27.2", + "pyo3-build-config", "pyo3-ffi", "pyo3-macros", - "unindent", -] - -[[package]] -name = "pyo3-build-config" -version = "0.27.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b455933107de8642b4487ed26d912c2d899dec6114884214a0b3bb3be9261ea6" -dependencies = [ - "target-lexicon", ] [[package]] name = "pyo3-build-config" -version = "0.28.0" +version = "0.28.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "972720a441c91fd9c49f212a1d2d74c6e3803b231ebc8d66c51efbd7ccab11c8" +checksum = "8bf94ee265674bf76c09fa430b0e99c26e319c945d96ca0d5a8215f31bf81cf7" dependencies = [ "target-lexicon", ] [[package]] name = "pyo3-ffi" -version = "0.27.2" +version = "0.28.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c85c9cbfaddf651b1221594209aed57e9e5cff63c4d11d1feead529b872a089" +checksum = "491aa5fc66d8059dd44a75f4580a2962c1862a1c2945359db36f6c2818b748dc" dependencies = [ "libc", - "pyo3-build-config 0.27.2", + "pyo3-build-config", ] [[package]] name = "pyo3-macros" -version = "0.27.2" +version = "0.28.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a5b10c9bf9888125d917fb4d2ca2d25c8df94c7ab5a52e13313a07e050a3b02" +checksum = "f5d671734e9d7a43449f8480f8b38115df67bef8d21f76837fa75ee7aaa5e52e" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -1938,22 +1907,22 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.27.2" +version = "0.28.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03b51720d314836e53327f5871d4c0cfb4fb37cc2c4a11cc71907a86342c40f9" +checksum = "22faaa1ce6c430a1f71658760497291065e6450d7b5dc2bcf254d49f66ee700a" dependencies = [ "heck", "proc-macro2", - "pyo3-build-config 0.27.2", + "pyo3-build-config", "quote", "syn 2.0.114", ] [[package]] name = "pythonize" -version = "0.27.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3a8f29db331e28c332c63496cfcbb822aca3d7320bc08b655d7fd0c29c50ede" +checksum = "0b79f670c9626c8b651c0581011b57b6ba6970bb69faf01a7c4c0cfc81c43f95" dependencies = [ "pyo3", "serde", @@ -2260,11 +2229,11 @@ dependencies = [ "insta", "itertools 0.14.0", "pyo3", - "pyo3-build-config 0.28.0", + "pyo3-build-config", "rstest", "serde", "serde_json", - "strum", + "strum 0.28.0", "tket", "tket-qsystem", "tracing", @@ -2346,9 +2315,9 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.16.1" +version = "3.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fa237f2807440d238e0364a218270b98f767a00d3dada77b1c53ae88940e2e7" +checksum = "dd5414fad8e6907dbdd5bc441a50ae8d6e26151a03b1de04d89a5576de61d01f" dependencies = [ "base64", "chrono", @@ -2365,9 +2334,9 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.16.1" +version = "3.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52a8e3ca0ca629121f70ab50f95249e5a6f925cc0f6ffe8256c45b728875706c" +checksum = "d3db8978e608f1fe7357e211969fd9abdcae80bac1ba7a3369bb7eb6b404eb65" dependencies = [ "darling", "proc-macro2", @@ -2434,9 +2403,9 @@ dependencies = [ [[package]] name = "smol_str" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f7a918bd2a9951d18ee6e48f076843e8e73a9a5d22cf05bcd4b7a81bdd04e17" +checksum = "4aaa7368fcf4852a4c2dd92df0cace6a71f2091ca0a23391ce7f3a31833f1523" dependencies = [ "borsh", "serde_core", @@ -2460,7 +2429,16 @@ version = "0.27.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af23d6f6c1a224baef9d3f61e287d2761385a5b88fdab4eb4c6f11aeb54c4bcf" dependencies = [ - "strum_macros", + "strum_macros 0.27.2", +] + +[[package]] +name = "strum" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9628de9b8791db39ceda2b119bbe13134770b56c138ec1d3af810d045c04f9bd" +dependencies = [ + "strum_macros 0.28.0", ] [[package]] @@ -2475,6 +2453,18 @@ dependencies = [ "syn 2.0.114", ] +[[package]] +name = "strum_macros" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab85eea0270ee17587ed4156089e10b9e6880ee688791d45a905f5b1ca36f664" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn 2.0.114", +] + [[package]] name = "syn" version = "1.0.109" @@ -2626,9 +2616,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.46" +version = "0.3.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9da98b7d9b7dad93488a84b8248efc35352b0b2657397d4167e7ad67e5d535e5" +checksum = "743bd48c283afc0388f9b8827b976905fb217ad9e647fae3a379a9283c4def2c" dependencies = [ "deranged", "itoa", @@ -2647,9 +2637,9 @@ checksum = "7694e1cfe791f8d31026952abf09c69ca6f6fa4e1a1229e18988f06a04a12dca" [[package]] name = "time-macros" -version = "0.2.26" +version = "0.2.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78cc610bac2dcee56805c99642447d4c5dbde4d01f752ffea0199aee1f601dc4" +checksum = "2e70e4c5a0e0a8a4823ad65dfe1a6930e4f4d756dcd9dd7939022b5e8c501215" dependencies = [ "num-conv", "time-core", @@ -2682,6 +2672,7 @@ dependencies = [ "fxhash", "hugr", "hugr-core", + "hugr-passes", "indexmap 2.13.0", "insta", "itertools 0.14.0", @@ -2700,7 +2691,7 @@ dependencies = [ "serde_json", "serde_with", "smol_str", - "strum", + "strum 0.28.0", "tket-json-rs", "tracing", "typetag", @@ -2709,16 +2700,16 @@ dependencies = [ [[package]] name = "tket-json-rs" -version = "0.8.0" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aea5374e5ef784cd4825cfcd7cfaf4c8a6a39a2da6129b12181aa0c9234f9678" +checksum = "f94cdded1cb82aaf9e0c2508762753f72c60ce8c068853b8ecc6c1bcd21644b9" dependencies = [ "derive_more 2.1.1", "pyo3", "pythonize", "serde", "serde_json", - "strum", + "strum 0.27.2", "uuid", ] @@ -2726,6 +2717,7 @@ dependencies = [ name = "tket-py" version = "0.0.0" dependencies = [ + "anyhow", "cool_asserts", "derive_more 2.1.1", "hugr", @@ -2737,7 +2729,7 @@ dependencies = [ "rstest", "serde", "serde_json", - "strum", + "strum 0.28.0", "tket", "tket-json-rs", "tket-qsystem", @@ -2756,6 +2748,7 @@ dependencies = [ "hugr", "hugr-cli", "hugr-core", + "hugr-passes", "indexmap 2.13.0", "itertools 0.14.0", "lazy_static", @@ -2765,7 +2758,7 @@ dependencies = [ "serde", "serde_json", "smol_str", - "strum", + "strum 0.28.0", "tket", "tket-json-rs", "tket1-passes", @@ -2899,9 +2892,9 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.22" +version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f30143827ddab0d256fd843b7a66d164e9f271cfa0dde49142c5ca0ca291f1e" +checksum = "cb7f578e5945fb242538965c2d0b04418d38ec25c79d160cd279bf0731c8d319" dependencies = [ "nu-ansi-term", "sharded-slab", @@ -2983,12 +2976,6 @@ version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" -[[package]] -name = "unindent" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7264e107f553ccae879d21fbea1d6724ac785e8c3bfc762137959b5802826ef3" - [[package]] name = "utf8-width" version = "0.1.8" From 88c1f462a077f076de294586056d869cd43004bc Mon Sep 17 00:00:00 2001 From: George Hodgkins Date: Mon, 16 Mar 2026 11:30:25 -0600 Subject: [PATCH 10/24] Fix mismerge in Cargo.toml --- Cargo.lock | 70 +++++++++++++++++++++--------------------------------- Cargo.toml | 13 ++++------ 2 files changed, 31 insertions(+), 52 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1d013ec3f..1a65cd00f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1086,19 +1086,20 @@ dependencies = [ [[package]] name = "hugr" -version = "0.25.6" -source = "git+https://github.com/quantinuum/hugr?branch=george%2Fllvmup#7d8587c64086ea5a2a4486b23ef7b73ab2c44040" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60bd5eca20bf3e7045b68668c7b29e80e05e1c36072e9adf1b7565ecaec906e3" dependencies = [ "hugr-core", "hugr-llvm", "hugr-model", - "hugr-passes", ] [[package]] name = "hugr-cli" -version = "0.25.6" -source = "git+https://github.com/quantinuum/hugr?branch=george%2Fllvmup#7d8587c64086ea5a2a4486b23ef7b73ab2c44040" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2e99f82b15e5a9f8a41c96f4fe8647ba93315b2c84a533a34f0e916b5b4eb" dependencies = [ "anyhow", "clap", @@ -1117,8 +1118,9 @@ dependencies = [ [[package]] name = "hugr-core" -version = "0.25.6" -source = "git+https://github.com/quantinuum/hugr?branch=george%2Fllvmup#7d8587c64086ea5a2a4486b23ef7b73ab2c44040" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3aaf6aa2670a90068eafb9606418fd0d24c0b34064c70590e24e0db8c6d43cd9" dependencies = [ "base64", "cgmath", @@ -1145,7 +1147,7 @@ dependencies = [ "smallvec", "smol_str", "static_assertions", - "strum 0.27.2", + "strum", "thiserror 2.0.18", "tracing", "typetag", @@ -1154,8 +1156,9 @@ dependencies = [ [[package]] name = "hugr-llvm" -version = "0.25.6" -source = "git+https://github.com/quantinuum/hugr?branch=george%2Fllvmup#7d8587c64086ea5a2a4486b23ef7b73ab2c44040" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "efcbab7e40ab80cc1de863b998a17a01e9c58b1e2c1f339da33fe2fed9bbc124" dependencies = [ "anyhow", "cc", @@ -1168,13 +1171,14 @@ dependencies = [ "petgraph 0.8.3", "portgraph 0.15.3", "rstest", - "strum 0.27.2", + "strum", ] [[package]] name = "hugr-model" -version = "0.25.6" -source = "git+https://github.com/quantinuum/hugr?branch=george%2Fllvmup#7d8587c64086ea5a2a4486b23ef7b73ab2c44040" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a2403a481855ba1dd61c1354c3173c03a53546558a8373e4dee3beaa0001796" dependencies = [ "base64", "bumpalo", @@ -1194,8 +1198,9 @@ dependencies = [ [[package]] name = "hugr-passes" -version = "0.25.6" -source = "git+https://github.com/quantinuum/hugr?branch=george%2Fllvmup#7d8587c64086ea5a2a4486b23ef7b73ab2c44040" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3022a594f5c428c2ee12e6cf7c8f690eff71972231d9b40f29a52e299f8e91f" dependencies = [ "ascent", "derive_more 2.1.1", @@ -1206,7 +1211,7 @@ dependencies = [ "petgraph 0.8.3", "portgraph 0.15.3", "serde_json", - "strum 0.27.2", + "strum", "thiserror 2.0.18", ] @@ -2233,7 +2238,7 @@ dependencies = [ "rstest", "serde", "serde_json", - "strum 0.28.0", + "strum", "tket", "tket-qsystem", "tracing", @@ -2423,34 +2428,13 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" -[[package]] -name = "strum" -version = "0.27.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af23d6f6c1a224baef9d3f61e287d2761385a5b88fdab4eb4c6f11aeb54c4bcf" -dependencies = [ - "strum_macros 0.27.2", -] - [[package]] name = "strum" version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9628de9b8791db39ceda2b119bbe13134770b56c138ec1d3af810d045c04f9bd" dependencies = [ - "strum_macros 0.28.0", -] - -[[package]] -name = "strum_macros" -version = "0.27.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7695ce3845ea4b33927c055a39dc438a45b059f7c1b3d91d38d10355fb8cbca7" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "syn 2.0.114", + "strum_macros", ] [[package]] @@ -2691,7 +2675,7 @@ dependencies = [ "serde_json", "serde_with", "smol_str", - "strum 0.28.0", + "strum", "tket-json-rs", "tracing", "typetag", @@ -2709,7 +2693,7 @@ dependencies = [ "pythonize", "serde", "serde_json", - "strum 0.27.2", + "strum", "uuid", ] @@ -2729,7 +2713,7 @@ dependencies = [ "rstest", "serde", "serde_json", - "strum 0.28.0", + "strum", "tket", "tket-json-rs", "tket-qsystem", @@ -2758,7 +2742,7 @@ dependencies = [ "serde", "serde_json", "smol_str", - "strum 0.28.0", + "strum", "tket", "tket-json-rs", "tket1-passes", diff --git a/Cargo.toml b/Cargo.toml index 6e5e8725c..78ac8d8b3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -51,16 +51,11 @@ large_enum_variant = "allow" # portgraph = { git = "https://github.com/quantinuum/portgraph", rev = "68b96ac737e0c285d8c543b2d74a7aa80a18202c" } [workspace.dependencies] -hugr = { git = "https://github.com/quantinuum/hugr", "branch" = "george/llvmup" } -hugr-core = { git = "https://github.com/quantinuum/hugr", "branch" = "george/llvmup" } -hugr-cli = { git = "https://github.com/quantinuum/hugr", "branch" = "george/llvmup" } -hugr-passes = { git = "https://github.com/quantinuum/hugr", "branch" = "george/llvmup" } -hugr-llvm = { git = "https://github.com/quantinuum/hugr", "branch" = "george/llvmup" } - # Make sure to run `just recompile-eccs` if the hugr serialisation format changes. -#hugr = "0.25.6" -#hugr-core = "0.25.6" -#hugr-cli = "0.25.6" +hugr = "0.26.0" +hugr-core = "0.26.0" +hugr-cli = "0.26.0" +hugr-passes = "0.26.0" portgraph = "0.15.3" # There can only be one `pyo3` version in the whole workspace, so we use a # loose version constraint to prevent breaking changes in dependent crates where possible. From 894ea836b4fb533581902c3d7adb5b0d424683ca Mon Sep 17 00:00:00 2001 From: George Hodgkins Date: Mon, 16 Mar 2026 14:49:31 -0600 Subject: [PATCH 11/24] Remove stack array remnants, plus unused+deprecated import --- tket-qsystem/src/llvm/array_utils.rs | 56 +--------------------------- tket-qsystem/src/llvm/debug.rs | 2 - tket-qsystem/src/llvm/result.rs | 24 +++++------- tket-qsystem/src/replace_bools.rs | 2 +- 4 files changed, 12 insertions(+), 72 deletions(-) diff --git a/tket-qsystem/src/llvm/array_utils.rs b/tket-qsystem/src/llvm/array_utils.rs index 2f0a8aed1..c13c7512a 100644 --- a/tket-qsystem/src/llvm/array_utils.rs +++ b/tket-qsystem/src/llvm/array_utils.rs @@ -8,7 +8,7 @@ use hugr::llvm::emit::EmitFuncContext; use hugr::llvm::extension::collections::array::{ build_array_fat_pointer, decompose_array_fat_pointer, }; -use hugr::llvm::extension::collections::{array, stack_array}; +use hugr::llvm::extension::collections::array; use hugr::llvm::inkwell::types::{BasicType, BasicTypeEnum}; use hugr::llvm::inkwell::values::BasicValueEnum; use hugr::llvm::{CodegenExtension, inkwell}; @@ -46,59 +46,6 @@ pub trait ArrayLowering { ) -> Result>; } -/// Array lowering via the stack as implemented in [stack_array]. -#[derive(Clone)] -#[allow( - deprecated, - clippy::allow_attributes, - reason = "Waiting for switch to new array lowering" -)] -pub struct StackArrayLowering(ACG); - -/// The default stack array lowering strategy using [stack_array::DefaultArrayCodegen]. -#[expect(deprecated)] -pub const DEFAULT_STACK_ARRAY_LOWERING: StackArrayLowering = - StackArrayLowering(stack_array::DefaultArrayCodegen); - -#[expect(deprecated)] -impl StackArrayLowering { - /// Creates a new [StackArrayLowering]. - pub const fn new(array_codegen: ACG) -> Self { - Self(array_codegen) - } -} - -#[expect(deprecated)] -impl ArrayLowering for StackArrayLowering { - fn codegen_extension(&self) -> impl CodegenExtension { - stack_array::ArrayCodegenExtension::new(self.0.clone()) - } - - fn array_to_ptr<'c>( - &self, - builder: &Builder<'c>, - val: BasicValueEnum<'c>, - _elem_type: BasicTypeEnum<'c>, - _length: u32, - ) -> Result> { - build_array_alloca(builder, val.into_array_value()) - .map_err(|e| anyhow!("Could not build array alloca: {e}")) - } - - fn array_from_ptr<'c, H: HugrView>( - &self, - ctx: &mut EmitFuncContext<'c, '_, H>, - ptr: PointerValue<'c>, - elem_type: BasicTypeEnum<'c>, - length: u32, - ) -> Result> { - let builder = ctx.builder(); - let array_ty = elem_type.array_type(length); - let array = builder.build_load(array_ty, ptr, "")?.into_array_value(); - Ok(array.into()) - } -} - /// Array lowering via a heap as implemented in [mod@array]. #[derive(Clone)] pub struct HeapArrayLowering(ACG); @@ -380,7 +327,6 @@ mod tests { /// Tests that [ArrayLowering::array_to_ptr] and [ArrayLowering::array_from_ptr] are inverses. #[rstest] #[case(DEFAULT_HEAP_ARRAY_LOWERING)] - #[case(DEFAULT_STACK_ARRAY_LOWERING)] fn test_array_ptr_conversion(#[case] array_lowering: impl ArrayLowering) { let mut llvm_ctx = llvm_ctx(-1); llvm_ctx.add_extensions(|cge| cge.add_default_prelude_extensions()); diff --git a/tket-qsystem/src/llvm/debug.rs b/tket-qsystem/src/llvm/debug.rs index 2001d8091..ac4823ec3 100644 --- a/tket-qsystem/src/llvm/debug.rs +++ b/tket-qsystem/src/llvm/debug.rs @@ -116,7 +116,6 @@ mod test { use hugr::llvm::test::single_op_hugr; use crate::llvm::array_utils::DEFAULT_HEAP_ARRAY_LOWERING; - use crate::llvm::array_utils::DEFAULT_STACK_ARRAY_LOWERING; use crate::llvm::prelude::QISPreludeCodegen; use rstest::rstest; @@ -124,7 +123,6 @@ mod test { use super::*; #[rstest] - #[case::state_result(1, StateResult::new("test_state_result".to_string(), 2), &DEFAULT_STACK_ARRAY_LOWERING)] #[case::state_result(2, StateResult::new("test_state_result".to_string(), 2), &DEFAULT_HEAP_ARRAY_LOWERING)] fn emit_debug_codegen( #[case] _i: i32, diff --git a/tket-qsystem/src/llvm/result.rs b/tket-qsystem/src/llvm/result.rs index 09ca4888b..3d85323ee 100644 --- a/tket-qsystem/src/llvm/result.rs +++ b/tket-qsystem/src/llvm/result.rs @@ -286,7 +286,6 @@ impl<'c, H: HugrView, AL: ArrayLowering + Clone> ResultEmitter<'c, mod test { use crate::extension::result::ResultOp; use crate::llvm::array_utils::DEFAULT_HEAP_ARRAY_LOWERING; - use crate::llvm::array_utils::DEFAULT_STACK_ARRAY_LOWERING; use hugr::extension::simple_op::MakeRegisteredOp; use hugr::llvm::check_emission; @@ -301,26 +300,23 @@ mod test { use super::*; #[rstest] - #[case::bool(1, ResultOp::new_bool("test_bool"), &DEFAULT_STACK_ARRAY_LOWERING)] - #[case::int(2, ResultOp::new_int("test_int", 6), &DEFAULT_STACK_ARRAY_LOWERING)] - #[case::uint(3, ResultOp::new_uint("test_uint", 6), &DEFAULT_STACK_ARRAY_LOWERING)] - #[case::f64(4, ResultOp::new_f64("test_f64"), &DEFAULT_STACK_ARRAY_LOWERING)] + #[case::bool(1, ResultOp::new_bool("test_bool"), &DEFAULT_HEAP_ARRAY_LOWERING)] + #[case::int(2, ResultOp::new_int("test_int", 6), &DEFAULT_HEAP_ARRAY_LOWERING)] + #[case::uint(3, ResultOp::new_uint("test_uint", 6), &DEFAULT_HEAP_ARRAY_LOWERING)] + #[case::f64(4, ResultOp::new_f64("test_f64"), &DEFAULT_HEAP_ARRAY_LOWERING)] #[case::arr_bool(5, ResultOp::new_bool("test_arr_bool").array_op(10), &DEFAULT_HEAP_ARRAY_LOWERING)] - #[case::arr_bool(6, ResultOp::new_bool("test_arr_bool").array_op(10), &DEFAULT_STACK_ARRAY_LOWERING)] #[case::arr_int(7, ResultOp::new_int("test_arr_int", 6).array_op(10), &DEFAULT_HEAP_ARRAY_LOWERING)] - #[case::arr_int(8, ResultOp::new_int("test_arr_int", 6).array_op(10), &DEFAULT_STACK_ARRAY_LOWERING)] #[case::arr_uint(9, ResultOp::new_uint("test_arr_uint", 6).array_op(10), &DEFAULT_HEAP_ARRAY_LOWERING)] - #[case::arr_int(10, ResultOp::new_int("test_arr_int", 6).array_op(10), &DEFAULT_STACK_ARRAY_LOWERING)] #[case::arr_f64(11, ResultOp::new_f64("test_arr_f64").array_op(10), &DEFAULT_HEAP_ARRAY_LOWERING)] // test cases for various tags - #[case::unicode_tag(12, ResultOp::new_int("测试字符串", 6), &DEFAULT_STACK_ARRAY_LOWERING)] - #[case::special_chars(13, ResultOp::new_uint("test!@#$%^&*()", 6), &DEFAULT_STACK_ARRAY_LOWERING)] + #[case::unicode_tag(12, ResultOp::new_int("测试字符串", 6), &DEFAULT_HEAP_ARRAY_LOWERING)] + #[case::special_chars(13, ResultOp::new_uint("test!@#$%^&*()", 6), &DEFAULT_HEAP_ARRAY_LOWERING)] #[should_panic(expected = "Constant string too long")] - #[case::very_long_tag(14, ResultOp::new_f64("x".repeat(256)), &DEFAULT_STACK_ARRAY_LOWERING)] - #[case::whitespace(15, ResultOp::new_bool(" spaces tabs\t\t\tnewlines\n\n\n"), &DEFAULT_STACK_ARRAY_LOWERING)] - #[case::emoji(16, ResultOp::new_bool("🚀👨‍👩‍👧‍👦🌍"), &DEFAULT_STACK_ARRAY_LOWERING)] + #[case::very_long_tag(14, ResultOp::new_f64("x".repeat(256)), &DEFAULT_HEAP_ARRAY_LOWERING)] + #[case::whitespace(15, ResultOp::new_bool(" spaces tabs\t\t\tnewlines\n\n\n"), &DEFAULT_HEAP_ARRAY_LOWERING)] + #[case::emoji(16, ResultOp::new_bool("🚀👨‍👩‍👧‍👦🌍"), &DEFAULT_HEAP_ARRAY_LOWERING)] #[should_panic(expected = "Empty result tag received")] - #[case::actually_empty(17, ResultOp::new_bool(""), &DEFAULT_STACK_ARRAY_LOWERING)] + #[case::actually_empty(17, ResultOp::new_bool(""), &DEFAULT_HEAP_ARRAY_LOWERING)] fn emit_result_codegen( #[case] _i: i32, #[with(_i)] mut llvm_ctx: TestContext, diff --git a/tket-qsystem/src/replace_bools.rs b/tket-qsystem/src/replace_bools.rs index 42a597176..90dc0cf75 100644 --- a/tket-qsystem/src/replace_bools.rs +++ b/tket-qsystem/src/replace_bools.rs @@ -24,7 +24,7 @@ use hugr_passes::composable::WithScope; use hugr_passes::non_local::LocalizeEdges; use hugr_passes::replace_types::{Linearizer, NodeTemplate, ReplaceTypesError}; use hugr_passes::{ - ComposablePass, ReplaceTypes, ensure_no_nonlocal_edges, non_local::FindNonLocalEdgesError, + ComposablePass, ReplaceTypes, non_local::FindNonLocalEdgesError, }; use static_array::{ReplaceStaticArrayBoolPass, ReplaceStaticArrayBoolPassError}; use tket::TketOp; From 596f36d132dab90a24d7748595bd5de5ef97d310 Mon Sep 17 00:00:00 2001 From: George Hodgkins Date: Mon, 16 Mar 2026 15:00:01 -0600 Subject: [PATCH 12/24] Wrap single TypeBase in vec! to satisfy Into>... and update the path for ComposablePass imports. --- Cargo.lock | 1 + qis-compiler/rust/gpu.rs | 10 ++-- tket-py/Cargo.toml | 1 + tket-py/src/circuit/tk2circuit.rs | 2 +- tket-py/src/passes.rs | 2 +- .../src/extension/classical_compute.rs | 28 ++++++----- .../src/extension/classical_compute/gpu.rs | 2 +- .../src/extension/classical_compute/wasm.rs | 2 +- tket-qsystem/src/extension/futures.rs | 15 ++++-- tket-qsystem/src/extension/qsystem.rs | 45 ++++++++++------- tket-qsystem/src/extension/qsystem/barrier.rs | 4 +- .../qsystem/barrier/wrapped_barrier.rs | 5 +- tket-qsystem/src/extension/qsystem/lower.rs | 10 ++-- tket-qsystem/src/extension/random.rs | 8 ++- tket-qsystem/src/extension/result.rs | 2 +- tket-qsystem/src/extension/utils.rs | 2 +- tket-qsystem/src/lib.rs | 4 +- tket-qsystem/src/llvm/array_utils.rs | 4 +- tket-qsystem/src/lower_drops.rs | 2 +- tket-qsystem/src/replace_bools.rs | 50 +++++++++++++------ .../src/replace_bools/static_array.rs | 8 +-- 21 files changed, 130 insertions(+), 77 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1a65cd00f..f7bc8abe2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2705,6 +2705,7 @@ dependencies = [ "cool_asserts", "derive_more 2.1.1", "hugr", + "hugr-passes", "itertools 0.14.0", "num_cpus", "portmatching", diff --git a/qis-compiler/rust/gpu.rs b/qis-compiler/rust/gpu.rs index d91c33d37..1c5bdc716 100644 --- a/qis-compiler/rust/gpu.rs +++ b/qis-compiler/rust/gpu.rs @@ -188,7 +188,7 @@ impl GpuCodegen { verify_gpu_call(ctx, success, "gpu_init")?; let gpu_ref = builder.build_load(iwc.i64_type(), gpu_ref_ptr, "gpu_ref")?; - let result_t = ts.llvm_sum_type(option_type(int_type(6)))?; + let result_t = ts.llvm_sum_type(option_type(vec![int_type(6)]))?; // Although the result is an option type, we always return true // in this lowering: failure is already handled. let pair = result_t.build_tag(builder, 1, vec![gpu_ref])?; @@ -980,17 +980,17 @@ mod test { })] #[case::call_ret_int(GpuOp::Call { inputs: type_row![], - outputs: TypeRow::from(usize_t()), + outputs: TypeRow::from(vec![usize_t()]), })] #[case::call_ret_float(GpuOp::Call { inputs: type_row![], - outputs: TypeRow::from(float64_type()), + outputs: TypeRow::from(vec![float64_type()]), })] #[case::read_result_int(GpuOp::ReadResult { - outputs: TypeRow::from(usize_t()), + outputs: TypeRow::from(vec![usize_t()]), })] #[case::read_result_float(GpuOp::ReadResult { - outputs: TypeRow::from(float64_type()), + outputs: TypeRow::from(vec![float64_type()]), })] fn gpu_codegen(#[context] ctx: Context, mut llvm_ctx: TestContext, #[case] op: GpuOp) { let _g = { diff --git a/tket-py/Cargo.toml b/tket-py/Cargo.toml index 832701822..4ee2ac2fc 100644 --- a/tket-py/Cargo.toml +++ b/tket-py/Cargo.toml @@ -29,6 +29,7 @@ tket1-passes = { path = "../tket1-passes", version = "0.0.0" } derive_more = { workspace = true, features = ["into", "from"] } hugr = { workspace = true } +hugr-passes = { workspace = true } itertools = { workspace = true } num_cpus = { workspace = true } portmatching = { workspace = true } diff --git a/tket-py/src/circuit/tk2circuit.rs b/tket-py/src/circuit/tk2circuit.rs index 03e0ee911..537eb698a 100644 --- a/tket-py/src/circuit/tk2circuit.rs +++ b/tket-py/src/circuit/tk2circuit.rs @@ -16,7 +16,7 @@ use hugr::ops::handle::NodeHandle; use hugr::ops::{ExtensionOp, OpType}; use hugr::package::Package; use hugr::types::Type; -use hugr_passes::ComposablePass; +use hugr_passes::composable::ComposablePass; use itertools::Itertools; use pyo3::exceptions::{PyAttributeError, PyValueError}; use pyo3::types::{PyAnyMethods, PyModule, PyString, PyTypeMethods}; diff --git a/tket-py/src/passes.rs b/tket-py/src/passes.rs index 4afffc807..9b2679830 100644 --- a/tket-py/src/passes.rs +++ b/tket-py/src/passes.rs @@ -5,7 +5,7 @@ pub mod tket1; use std::{cmp::min, convert::TryInto, fs, num::NonZeroUsize, path::PathBuf}; -use hugr_passes::ComposablePass; +use hugr_passes::composable::ComposablePass; use pyo3::{prelude::*, types::IntoPyDict}; use tket::optimiser::badger::BadgerOptions; use tket::passes; diff --git a/tket-qsystem/src/extension/classical_compute.rs b/tket-qsystem/src/extension/classical_compute.rs index e077c78fc..f1281ad17 100644 --- a/tket-qsystem/src/extension/classical_compute.rs +++ b/tket-qsystem/src/extension/classical_compute.rs @@ -298,23 +298,23 @@ macro_rules! compute_opdef { match self { // [usize] -> [Context] Self::get_context => Signature::new( - usize_t(), - Type::from(ComputeOp::<$ext>::get_context_return_type( + vec![usize_t()], + vec![Type::from(ComputeOp::<$ext>::get_context_return_type( self.extension(), extension_ref, - )), + ))], ) .into(), // [Context] -> [] - Self::dispose_context => Signature::new(context_type, type_row![]).into(), + Self::dispose_context => Signature::new(vec![context_type], type_row![]).into(), // [Module] -> [ComputeType::Func { inputs, outputs }] Self::lookup_by_id => { let inputs = TypeRV::new_row_var_use(1, TypeBound::Copyable); let outputs = TypeRV::new_row_var_use(2, TypeBound::Copyable); let func_type = ComputeType::<$ext>::func_custom_type( - inputs, - outputs, + vec![inputs], + vec![outputs], self.extension(), extension_ref, ) @@ -335,8 +335,8 @@ macro_rules! compute_opdef { let outputs = TypeRV::new_row_var_use(2, TypeBound::Copyable); let func_type = ComputeType::<$ext>::func_custom_type( - inputs, - outputs, + vec![inputs], + vec![outputs], self.extension(), extension_ref, ) @@ -357,14 +357,14 @@ macro_rules! compute_opdef { let inputs = TypeRV::new_row_var_use(0, TypeBound::Copyable); let outputs = TypeRV::new_row_var_use(1, TypeBound::Copyable); let func_type = Type::new_extension(ComputeType::<$ext>::func_custom_type( - inputs.clone(), - outputs.clone(), + vec![inputs.clone()], + vec![outputs.clone()], self.extension(), extension_ref, )); let result_type = TypeRV::new_extension(ComputeType::<$ext>::result_custom_type( - outputs, + vec![outputs], self.extension(), extension_ref, )); @@ -383,7 +383,7 @@ macro_rules! compute_opdef { let outputs = TypeRV::new_row_var_use(0, TypeBound::Copyable); let result_type = TypeRV::new_extension(ComputeType::<$ext>::result_custom_type( - outputs.clone(), + vec![outputs.clone()], self.extension(), extension_ref, )); @@ -590,7 +590,9 @@ macro_rules! compute_opdef { extension_id: ExtensionId, extension_ref: &Weak, ) -> SumType { - option_type(ComputeType::<$ext>::Context.get_type(extension_id, extension_ref)) + option_type(vec![ + ComputeType::<$ext>::Context.get_type(extension_id, extension_ref), + ]) } } diff --git a/tket-qsystem/src/extension/classical_compute/gpu.rs b/tket-qsystem/src/extension/classical_compute/gpu.rs index 7fb02e0ce..8ee936c48 100644 --- a/tket-qsystem/src/extension/classical_compute/gpu.rs +++ b/tket-qsystem/src/extension/classical_compute/gpu.rs @@ -338,7 +338,7 @@ mod test { )); assert_eq!( op.to_extension_op().unwrap().signature(), - Signature::new(module_ty, func_ty) + Signature::new(vec![module_ty], vec![func_ty]) ); } diff --git a/tket-qsystem/src/extension/classical_compute/wasm.rs b/tket-qsystem/src/extension/classical_compute/wasm.rs index 91b5e22bf..ed5869e77 100644 --- a/tket-qsystem/src/extension/classical_compute/wasm.rs +++ b/tket-qsystem/src/extension/classical_compute/wasm.rs @@ -319,7 +319,7 @@ mod test { )); assert_eq!( op.to_extension_op().unwrap().signature(), - Signature::new(module_ty, func_ty) + Signature::new(vec![module_ty], vec![func_ty]) ); } diff --git a/tket-qsystem/src/extension/futures.rs b/tket-qsystem/src/extension/futures.rs index 67e386e8c..17ce320a4 100644 --- a/tket-qsystem/src/extension/futures.rs +++ b/tket-qsystem/src/extension/futures.rs @@ -108,15 +108,19 @@ impl MakeOpDef for FutureOpDef { let future_type = Type::new_extension(future_custom_type(t_type.clone(), extension_ref)); match self { FutureOpDef::Read => { - PolyFuncType::new([t_param], Signature::new(future_type, t_type)).into() + PolyFuncType::new([t_param], Signature::new(vec![future_type], vec![t_type])).into() } FutureOpDef::Dup => PolyFuncType::new( [t_param], - Signature::new(future_type.clone(), vec![future_type.clone(), future_type]), + Signature::new( + vec![future_type.clone()], + vec![future_type.clone(), future_type], + ), ) .into(), FutureOpDef::Free => { - PolyFuncType::new([t_param], Signature::new(future_type.clone(), vec![])).into() + PolyFuncType::new([t_param], Signature::new(vec![future_type.clone()], vec![])) + .into() } } } @@ -307,7 +311,10 @@ pub(crate) mod test { let hugr = { let mut func_builder = FunctionBuilder::new( "circuit", - PolyFuncType::new(vec![t_param], Signature::new(future_type, t.clone())), + PolyFuncType::new( + vec![t_param], + Signature::new(vec![future_type], vec![t.clone()]), + ), ) .unwrap(); let [future_w] = func_builder.input_wires_arr(); diff --git a/tket-qsystem/src/extension/qsystem.rs b/tket-qsystem/src/extension/qsystem.rs index 40d29719a..8a19498dc 100644 --- a/tket-qsystem/src/extension/qsystem.rs +++ b/tket-qsystem/src/extension/qsystem.rs @@ -120,17 +120,25 @@ impl MakeOpDef for QSystemOp { let one_qb_row = TypeRow::from(vec![qb_t()]); let two_qb_row = TypeRow::from(vec![qb_t(), qb_t()]); match self { - LazyMeasure => Signature::new(qb_t(), future_type(bool_t())), - LazyMeasureLeaked => Signature::new(qb_t(), future_type(int_type(6))), - LazyMeasureReset => Signature::new(qb_t(), vec![qb_t(), future_type(bool_t())]), - Reset => Signature::new(one_qb_row.clone(), one_qb_row), + LazyMeasure => Signature::new(one_qb_row.clone(), vec![future_type(bool_t())]), + LazyMeasureLeaked => Signature::new(one_qb_row.clone(), vec![future_type(int_type(6))]), + LazyMeasureReset => { + Signature::new(one_qb_row.clone(), vec![qb_t(), future_type(bool_t())]) + } + Reset => Signature::new(one_qb_row.clone(), one_qb_row.clone()), ZZPhase => Signature::new(vec![qb_t(), qb_t(), float64_type()], two_qb_row), - Measure => Signature::new(one_qb_row, bool_type()), - Rz => Signature::new(vec![qb_t(), float64_type()], one_qb_row), - PhasedX => Signature::new(vec![qb_t(), float64_type(), float64_type()], one_qb_row), - TryQAlloc => Signature::new(type_row![], Type::from(option_type(one_qb_row))), - QFree => Signature::new(one_qb_row, type_row![]), - MeasureReset => Signature::new(one_qb_row.clone(), vec![qb_t(), bool_type()]), + Measure => Signature::new(one_qb_row.clone(), vec![bool_type()]), + Rz => Signature::new(vec![qb_t(), float64_type()], one_qb_row.clone()), + PhasedX => Signature::new( + vec![qb_t(), float64_type(), float64_type()], + one_qb_row.clone(), + ), + TryQAlloc => Signature::new( + type_row![], + vec![Type::from(option_type(one_qb_row.clone()))], + ), + QFree => Signature::new(one_qb_row.clone(), type_row![]), + MeasureReset => Signature::new(one_qb_row, vec![qb_t(), bool_type()]), } .into() } @@ -217,10 +225,10 @@ impl MakeOpDef for RuntimeBarrierDef { fn init_signature(&self, _extension_ref: &Weak) -> SignatureFunc { PolyFuncType::new( [TypeParam::max_nat_type()], - Signature::new_endo( + Signature::new_endo(vec![ array_type_parametric(TypeArg::new_var_use(0, TypeParam::max_nat_type()), qb_t()) .unwrap(), - ), + ]), ) .into() } @@ -514,7 +522,7 @@ pub trait QSystemOpBuilder: Dataflow + UnwrapBuilder + ArrayOpBuilder { /// Build a qalloc operation that panics on failure. fn build_qalloc(&mut self) -> Result { let maybe_qb = self.add_try_alloc()?; - let [qb] = self.build_expect_sum(1, option_type(qb_t()), maybe_qb, |_| { + let [qb] = self.build_expect_sum(1, option_type(vec![qb_t()]), maybe_qb, |_| { "No more qubits available to allocate.".to_string() })?; Ok(qb) @@ -579,9 +587,11 @@ mod test { #[test] fn lazy_circuit() { let hugr = { - let mut func_builder = - FunctionBuilder::new("circuit", Signature::new(qb_t(), vec![qb_t(), bool_t()])) - .unwrap(); + let mut func_builder = FunctionBuilder::new( + "circuit", + Signature::new(vec![qb_t()], vec![qb_t(), bool_t()]), + ) + .unwrap(); let [qb] = func_builder.input_wires_arr(); let [qb, lazy_b] = func_builder.add_lazy_measure_reset(qb).unwrap(); let [b] = func_builder.add_read(lazy_b, bool_t()).unwrap(); @@ -594,7 +604,8 @@ mod test { fn leaked() { let hugr = { let mut func_builder = - FunctionBuilder::new("leaked", Signature::new(qb_t(), vec![int_type(6)])).unwrap(); + FunctionBuilder::new("leaked", Signature::new(vec![qb_t()], vec![int_type(6)])) + .unwrap(); let [qb] = func_builder.input_wires_arr(); let lazy_i = func_builder.add_lazy_measure_leaked(qb).unwrap(); let [i] = func_builder.add_read(lazy_i, int_type(6)).unwrap(); diff --git a/tket-qsystem/src/extension/qsystem/barrier.rs b/tket-qsystem/src/extension/qsystem/barrier.rs index 13990b906..408a46ea0 100644 --- a/tket-qsystem/src/extension/qsystem/barrier.rs +++ b/tket-qsystem/src/extension/qsystem/barrier.rs @@ -20,7 +20,7 @@ mod test { use rstest::rstest; fn opt_q_arr(size: u64) -> hugr::types::Type { - array_type(size, option_type(qb_t()).into()) + array_type(size, option_type(vec![qb_t()]).into()) } #[rstest] @@ -29,7 +29,7 @@ mod test { // special case, array of option qubit is unwrapped and unpacked #[case(vec![qb_t(), opt_q_arr(2)], 3, false)] // bare option of qubit is ignored - #[case(vec![qb_t(), option_type(qb_t()).into()], 1, false)] + #[case(vec![qb_t(), option_type(vec![qb_t()]).into()], 1, false)] #[case(vec![array_type(2, bool_t())], 0, false)] #[case(vec![borrow_array_type(2, qb_t())], 2, false)] // special case, single array of qubits is passed directly to op without unpacking diff --git a/tket-qsystem/src/extension/qsystem/barrier/wrapped_barrier.rs b/tket-qsystem/src/extension/qsystem/barrier/wrapped_barrier.rs index 460dc22e8..5523dd91c 100644 --- a/tket-qsystem/src/extension/qsystem/barrier/wrapped_barrier.rs +++ b/tket-qsystem/src/extension/qsystem/barrier/wrapped_barrier.rs @@ -35,7 +35,7 @@ static TEMP_BARRIER_EXT: LazyLock> = LazyLock::new(|| { Default::default(), PolyFuncTypeRV::new( vec![TypeParam::new_list_type(TypeBound::Linear)], - FuncValueType::new_endo(TypeRV::new_row_var_use(0, TypeBound::Linear)), + FuncValueType::new_endo(vec![TypeRV::new_row_var_use(0, TypeBound::Linear)]), ), ext_ref, ) @@ -100,7 +100,8 @@ impl Default for WrappedBarrierBuilder { /// Build a runtime barrier operation for an array of qubits pub(super) fn build_runtime_barrier_op(array_size: u64) -> Result { - let mut barr_builder = DFGBuilder::new(Signature::new_endo(array_type(array_size, qb_t())))?; + let mut barr_builder = + DFGBuilder::new(Signature::new_endo(vec![array_type(array_size, qb_t())]))?; let array_wire = barr_builder.input().out_wire(0); let out = barr_builder.add_runtime_barrier(array_wire, array_size)?; barr_builder.finish_hugr_with_outputs([out]) diff --git a/tket-qsystem/src/extension/qsystem/lower.rs b/tket-qsystem/src/extension/qsystem/lower.rs index 967c92e5b..9aa5e2fc4 100644 --- a/tket-qsystem/src/extension/qsystem/lower.rs +++ b/tket-qsystem/src/extension/qsystem/lower.rs @@ -316,14 +316,18 @@ mod test { .add_dataflow_op(TketOp::TryQAlloc, []) .unwrap() .outputs_arr(); - let [q] = b.build_unwrap_sum(1, option_type(qb_t()), maybe_q).unwrap(); + let [q] = b + .build_unwrap_sum(1, option_type(vec![qb_t()]), maybe_q) + .unwrap(); let [q] = b.add_dataflow_op(TketOp::Reset, [q]).unwrap().outputs_arr(); b.add_dataflow_op(TketOp::QFree, [q]).unwrap(); let [maybe_q] = b .add_dataflow_op(TketOp::TryQAlloc, []) .unwrap() .outputs_arr(); - let [q] = b.build_unwrap_sum(1, option_type(qb_t()), maybe_q).unwrap(); + let [q] = b + .build_unwrap_sum(1, option_type(vec![qb_t()]), maybe_q) + .unwrap(); let [_] = b .add_dataflow_op(TketOp::MeasureFree, [q]) @@ -394,7 +398,7 @@ mod test { #[test] fn test_mixed() { - let mut b = DFGBuilder::new(Signature::new(rotation_type(), bool_t())).unwrap(); + let mut b = DFGBuilder::new(Signature::new(vec![rotation_type()], vec![bool_t()])).unwrap(); let [angle] = b.input_wires_arr(); let qalloc = b.add_dataflow_op(TketOp::QAlloc, []).unwrap(); let [q] = qalloc.outputs_arr(); diff --git a/tket-qsystem/src/extension/random.rs b/tket-qsystem/src/extension/random.rs index a2c251c89..121495313 100644 --- a/tket-qsystem/src/extension/random.rs +++ b/tket-qsystem/src/extension/random.rs @@ -141,7 +141,9 @@ impl MakeOpDef for RandomOp { ), RandomOp::NewRNGContext => Signature::new( vec![int_type(6)], - Type::from(option_type(RandomType::RNGContext.get_type(extension_ref))), + vec![Type::from(option_type(vec![ + RandomType::RNGContext.get_type(extension_ref), + ]))], ), RandomOp::DeleteRNGContext => { Signature::new(vec![RandomType::RNGContext.get_type(extension_ref)], vec![]) @@ -273,7 +275,9 @@ mod test { let [ctx] = func_builder .build_unwrap_sum( 1, - option_type(RandomType::RNGContext.get_type(&Arc::downgrade(&EXTENSION))), + option_type(vec![ + RandomType::RNGContext.get_type(&Arc::downgrade(&EXTENSION)), + ]), maybe_ctx, ) .unwrap(); diff --git a/tket-qsystem/src/extension/result.rs b/tket-qsystem/src/extension/result.rs index bd3f1378f..40615d819 100644 --- a/tket-qsystem/src/extension/result.rs +++ b/tket-qsystem/src/extension/result.rs @@ -170,7 +170,7 @@ impl ResultOpDef { fn result_signature(&self) -> SignatureFunc { PolyFuncType::new( [vec![TypeParam::StringType], self.type_params()].concat(), - Signature::new(self.arg_type(), type_row![]), + Signature::new(vec![self.arg_type()], type_row![]), ) .into() } diff --git a/tket-qsystem/src/extension/utils.rs b/tket-qsystem/src/extension/utils.rs index 41ae1cfb9..3e2cebe56 100644 --- a/tket-qsystem/src/extension/utils.rs +++ b/tket-qsystem/src/extension/utils.rs @@ -71,7 +71,7 @@ impl MakeOpDef for UtilsOp { fn init_signature(&self, _extension_ref: &std::sync::Weak) -> SignatureFunc { match self { - UtilsOp::GetCurrentShot => Signature::new(type_row![], int_type(6)), + UtilsOp::GetCurrentShot => Signature::new(type_row![], vec![int_type(6)]), } .into() } diff --git a/tket-qsystem/src/lib.rs b/tket-qsystem/src/lib.rs index de85e0871..05ac4c50d 100644 --- a/tket-qsystem/src/lib.rs +++ b/tket-qsystem/src/lib.rs @@ -302,7 +302,7 @@ mod test { let mut builder = mb .define_function( "main", - Signature::new(qb_t(), vec![bool_type(), bool_type()]), + Signature::new(vec![qb_t()], vec![bool_type(), bool_type()]), ) .unwrap(); let [qb] = builder.input_wires_arr(); @@ -372,7 +372,7 @@ mod test { fn hide_funcs() { let orig = { let arr_t = || array_type(4, bool_type()); - let mut dfb = FunctionBuilder::new("main", Signature::new_endo(arr_t())).unwrap(); + let mut dfb = FunctionBuilder::new("main", Signature::new_endo(vec![arr_t()])).unwrap(); let [arr] = dfb.input_wires_arr(); let (arr1, arr2) = dfb.add_array_clone(bool_type(), 4, arr).unwrap(); let dop = GUPPY_EXTENSION.get_op(&DROP_OP_NAME).unwrap(); diff --git a/tket-qsystem/src/llvm/array_utils.rs b/tket-qsystem/src/llvm/array_utils.rs index c13c7512a..dda38e4b1 100644 --- a/tket-qsystem/src/llvm/array_utils.rs +++ b/tket-qsystem/src/llvm/array_utils.rs @@ -2,13 +2,13 @@ // TODO move to hugr-llvm crate // https://github.com/quantinuum/tket2/issues/899 -use anyhow::{Result, anyhow}; +use anyhow::Result; use hugr::extension::prelude::usize_t; use hugr::llvm::emit::EmitFuncContext; +use hugr::llvm::extension::collections::array; use hugr::llvm::extension::collections::array::{ build_array_fat_pointer, decompose_array_fat_pointer, }; -use hugr::llvm::extension::collections::array; use hugr::llvm::inkwell::types::{BasicType, BasicTypeEnum}; use hugr::llvm::inkwell::values::BasicValueEnum; use hugr::llvm::{CodegenExtension, inkwell}; diff --git a/tket-qsystem/src/lower_drops.rs b/tket-qsystem/src/lower_drops.rs index eccef4951..36889c1b6 100644 --- a/tket-qsystem/src/lower_drops.rs +++ b/tket-qsystem/src/lower_drops.rs @@ -83,7 +83,7 @@ mod test { let arr_type = array_type(2, usize_t()); let drop_op = GUPPY_EXTENSION.get_op(DROP_OP_NAME.as_str()).unwrap(); let drop_node = ExtensionOp::new(drop_op.clone(), [arr_type.clone().into()]).unwrap(); - let mut b = DFGBuilder::new(inout_sig(arr_type, vec![])).unwrap(); + let mut b = DFGBuilder::new(inout_sig(vec![arr_type], vec![])).unwrap(); let inp = b.input_wires(); b.add_dataflow_op(drop_node, inp).unwrap(); let mut h = b.finish_hugr_with_outputs([]).unwrap(); diff --git a/tket-qsystem/src/replace_bools.rs b/tket-qsystem/src/replace_bools.rs index 90dc0cf75..ff138cc90 100644 --- a/tket-qsystem/src/replace_bools.rs +++ b/tket-qsystem/src/replace_bools.rs @@ -23,9 +23,7 @@ use hugr::{Hugr, Node, Wire, hugr::hugrmut::HugrMut, type_row}; use hugr_passes::composable::WithScope; use hugr_passes::non_local::LocalizeEdges; use hugr_passes::replace_types::{Linearizer, NodeTemplate, ReplaceTypesError}; -use hugr_passes::{ - ComposablePass, ReplaceTypes, non_local::FindNonLocalEdgesError, -}; +use hugr_passes::{ComposablePass, ReplaceTypes, non_local::FindNonLocalEdgesError}; use static_array::{ReplaceStaticArrayBoolPass, ReplaceStaticArrayBoolPassError}; use tket::TketOp; use tket::extension::{ @@ -93,13 +91,16 @@ impl> ComposablePass for ReplaceBoolPass { /// The type each tket.bool is replaced with. fn bool_dest() -> Type { - SumType::new([bool_t(), future_type(bool_t())]).into() + SumType::new([vec![bool_t()], vec![future_type(bool_t())]]).into() } fn read_builder(dfb: &mut DFGBuilder, sum_wire: Wire) -> BuildHandle { let mut cb = dfb .conditional_builder( - ([bool_t().into(), future_type(bool_t()).into()], sum_wire), + ( + [vec![bool_t()].into(), vec![future_type(bool_t())].into()], + sum_wire, + ), [], vec![bool_t()].into(), ) @@ -131,7 +132,10 @@ fn make_opaque_op_dest() -> NodeTemplate { let [inp] = dfb.input_wires_arr(); let out = dfb .add_dataflow_op( - Tag::new(0, vec![bool_t().into(), future_type(bool_t()).into()]), + Tag::new( + 0, + vec![vec![bool_t()].into(), vec![future_type(bool_t())].into()], + ), vec![inp], ) .unwrap(); @@ -162,7 +166,10 @@ fn binary_logic_op_dest(op: &BoolOp) -> NodeTemplate { }; let out = dfb .add_dataflow_op( - Tag::new(0, vec![bool_t().into(), future_type(bool_t()).into()]), + Tag::new( + 0, + vec![vec![bool_t()].into(), vec![future_type(bool_t())].into()], + ), vec![result.out_wire(0)], ) .unwrap(); @@ -180,7 +187,10 @@ fn not_op_dest() -> NodeTemplate { .unwrap(); let out = dfb .add_dataflow_op( - Tag::new(0, vec![bool_t().into(), future_type(bool_t()).into()]), + Tag::new( + 0, + vec![vec![bool_t()].into(), vec![future_type(bool_t())].into()], + ), vec![result.out_wire(0)], ) .unwrap(); @@ -196,7 +206,10 @@ fn measure_dest() -> NodeTemplate { let measure = dfb.add_dataflow_op(lazy_measure, vec![q]).unwrap(); let tagged_output = dfb .add_dataflow_op( - Tag::new(1, vec![bool_t().into(), future_type(bool_t()).into()]), + Tag::new( + 1, + vec![vec![bool_t()].into(), vec![future_type(bool_t())].into()], + ), vec![measure.out_wire(0)], ) .unwrap(); @@ -214,7 +227,10 @@ fn measure_reset_dest() -> NodeTemplate { let measure = dfb.add_dataflow_op(lazy_measure_reset, vec![q]).unwrap(); let tagged_output = dfb .add_dataflow_op( - Tag::new(1, vec![bool_t().into(), future_type(bool_t()).into()]), + Tag::new( + 1, + vec![vec![bool_t()].into(), vec![future_type(bool_t())].into()], + ), vec![measure.out_wire(1)], ) .unwrap(); @@ -226,7 +242,7 @@ fn measure_reset_dest() -> NodeTemplate { fn barray_get_dest(rt: &ReplaceTypes, size: u64, elem_ty: Type) -> NodeTemplate { let array_ty = borrow_array_type(size, elem_ty.clone()); - let opt_el = option_type(elem_ty.clone()); + let opt_el = option_type(vec![elem_ty.clone()]); let mut dfb = DFGBuilder::new(inout_sig( vec![array_ty.clone(), usize_t()], vec![opt_el.clone().into(), array_ty.clone()], @@ -253,7 +269,10 @@ fn barray_get_dest(rt: &ReplaceTypes, size: u64, elem_ty: Type) -> NodeTemplate let mut out_of_range = cb.case_builder(0).unwrap(); let [arr_in, _] = out_of_range.input_wires_arr(); let [none] = out_of_range - .add_dataflow_op(Tag::new(0, vec![type_row![], elem_ty.clone().into()]), []) + .add_dataflow_op( + Tag::new(0, vec![type_row![], vec![elem_ty.clone()].into()]), + [], + ) .unwrap() .outputs_arr(); out_of_range.finish_with_outputs([none, arr_in]).unwrap(); @@ -284,7 +303,10 @@ fn barray_get_dest(rt: &ReplaceTypes, size: u64, elem_ty: Type) -> NodeTemplate .unwrap() .outputs_arr(); let [some] = in_range - .add_dataflow_op(Tag::new(1, vec![type_row![], elem_ty.into()]), [elem2]) + .add_dataflow_op( + Tag::new(1, vec![type_row![], vec![elem_ty].into()]), + [elem2], + ) .unwrap() .outputs_arr(); in_range.finish_with_outputs([some, arr]).unwrap(); @@ -663,7 +685,7 @@ mod test { .add_borrow_array_get(src_ty.clone(), 4, arr_in, idx) .unwrap(); let [elem] = dfb - .build_unwrap_sum(1, option_type(src_ty.clone()), opt_elem) + .build_unwrap_sum(1, option_type(vec![src_ty.clone()]), opt_elem) .unwrap(); let mut h = dfb.finish_hugr_with_outputs([arr, elem]).unwrap(); diff --git a/tket-qsystem/src/replace_bools/static_array.rs b/tket-qsystem/src/replace_bools/static_array.rs index 753f77205..28d7a66db 100644 --- a/tket-qsystem/src/replace_bools/static_array.rs +++ b/tket-qsystem/src/replace_bools/static_array.rs @@ -271,7 +271,7 @@ fn get_op_dest(rt: &ReplaceTypes, old_elem_ty: Type) -> Option { let mut hugr1 = { let mut dfb = DFGBuilder::new(inout_sig( vec![static_array_type(old_elem_ty.clone()), usize_t()], - Type::from(option_type(old_elem_ty.clone())), + vec![Type::from(option_type(vec![old_elem_ty.clone()]))], )) .unwrap(); let [arr, index] = dfb.input_wires_arr(); @@ -295,9 +295,9 @@ fn get_op_dest(rt: &ReplaceTypes, old_elem_ty: Type) -> Option { .input()[0] .clone(); - let res_ty = Type::from(option_type(old_elem_ty.clone())); + let res_ty = Type::from(option_type(vec![old_elem_ty.clone()])); let mut dfb = - DFGBuilder::new(inout_sig(vec![new_arr_ty, usize_t()], res_ty.clone())).unwrap(); + DFGBuilder::new(inout_sig(vec![new_arr_ty, usize_t()], vec![res_ty.clone()])).unwrap(); let [arr, index] = dfb.input_wires_arr(); let [val] = dfb .add_hugr_with_wires(hugr1, [arr, index]) @@ -362,7 +362,7 @@ mod test { let element_ty = x.get_element_type().clone(); let mut builder = DFGBuilder::new(Signature::new( type_row![], - vec![option_type(element_ty.clone()).into(), usize_t()], + vec![option_type(vec![element_ty.clone()]).into(), usize_t()], )) .unwrap(); From 2ac589cdf23a312b6df94c2a8e8c4326e7e6010b Mon Sep 17 00:00:00 2001 From: George Hodgkins Date: Mon, 16 Mar 2026 15:42:57 -0600 Subject: [PATCH 13/24] Fix BoolOp::not signature --- tket/src/extension/bool.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tket/src/extension/bool.rs b/tket/src/extension/bool.rs index d06fb9809..3f0314c29 100644 --- a/tket/src/extension/bool.rs +++ b/tket/src/extension/bool.rs @@ -144,7 +144,7 @@ impl MakeOpDef for BoolOp { BoolOp::read => Signature::new([bool_type], [sum_type]).into(), BoolOp::make_opaque => Signature::new([sum_type], [bool_type]).into(), BoolOp::not => { - Signature::new([bool_type.clone(), bool_type.clone()], [bool_type.clone()]).into() + Signature::new([bool_type.clone()], [bool_type.clone()]).into() } BoolOp::eq | BoolOp::and | BoolOp::or | BoolOp::xor => { Signature::new([bool_type.clone(), bool_type.clone()], [bool_type.clone()]).into() From e31b4f2c9523c959f7216e41154ed7cd3a390a3a Mon Sep 17 00:00:00 2001 From: George Hodgkins Date: Mon, 16 Mar 2026 15:43:43 -0600 Subject: [PATCH 14/24] Update snaps --- ...r_qis_compiler__gpu__test__gpu_codegen@llvm21_call_args.snap | 2 +- ..._compiler__gpu__test__gpu_codegen@llvm21_call_ret_float.snap | 2 +- ...is_compiler__gpu__test__gpu_codegen@llvm21_call_ret_int.snap | 2 +- ...compiler__gpu__test__gpu_codegen@llvm21_dispose_context.snap | 2 +- ...qis_compiler__gpu__test__gpu_codegen@llvm21_get_context.snap | 2 +- ...is_compiler__gpu__test__gpu_codegen@llvm21_lookup_by_id.snap | 2 +- ..._compiler__gpu__test__gpu_codegen@llvm21_lookup_by_name.snap | 2 +- ...mpiler__gpu__test__gpu_codegen@llvm21_read_result_float.snap | 2 +- ...compiler__gpu__test__gpu_codegen@llvm21_read_result_int.snap | 2 +- ...er__gpu__test__gpu_codegen@pre-mem2reg@llvm21_call_args.snap | 2 +- ...pu__test__gpu_codegen@pre-mem2reg@llvm21_call_ret_float.snap | 2 +- ..._gpu__test__gpu_codegen@pre-mem2reg@llvm21_call_ret_int.snap | 2 +- ...u__test__gpu_codegen@pre-mem2reg@llvm21_dispose_context.snap | 2 +- ...__gpu__test__gpu_codegen@pre-mem2reg@llvm21_get_context.snap | 2 +- ..._gpu__test__gpu_codegen@pre-mem2reg@llvm21_lookup_by_id.snap | 2 +- ...pu__test__gpu_codegen@pre-mem2reg@llvm21_lookup_by_name.snap | 2 +- ..._test__gpu_codegen@pre-mem2reg@llvm21_read_result_float.snap | 2 +- ...u__test__gpu_codegen@pre-mem2reg@llvm21_read_result_int.snap | 2 +- ...qsystem__llvm__debug__test__emit_debug_codegen@llvm21_2.snap | 2 +- ...m__debug__test__emit_debug_codegen@pre-mem2reg@llvm21_2.snap | 2 +- ...tem__llvm__futures__test__emit_futures_codegen@llvm21_1.snap | 2 +- ...tem__llvm__futures__test__emit_futures_codegen@llvm21_2.snap | 2 +- ...tem__llvm__futures__test__emit_futures_codegen@llvm21_3.snap | 2 +- ...tem__llvm__futures__test__emit_futures_codegen@llvm21_4.snap | 2 +- ...tem__llvm__futures__test__emit_futures_codegen@llvm21_5.snap | 2 +- ...tem__llvm__futures__test__emit_futures_codegen@llvm21_6.snap | 2 +- ...utures__test__emit_futures_codegen@pre-mem2reg@llvm21_1.snap | 2 +- ...utures__test__emit_futures_codegen@pre-mem2reg@llvm21_2.snap | 2 +- ...utures__test__emit_futures_codegen@pre-mem2reg@llvm21_3.snap | 2 +- ...utures__test__emit_futures_codegen@pre-mem2reg@llvm21_4.snap | 2 +- ...utures__test__emit_futures_codegen@pre-mem2reg@llvm21_5.snap | 2 +- ...utures__test__emit_futures_codegen@pre-mem2reg@llvm21_6.snap | 2 +- .../tket_qsystem__llvm__prelude__test__exit_emit@llvm21_0.snap | 2 +- ...em__llvm__prelude__test__exit_emit@pre-mem2reg@llvm21_0.snap | 2 +- .../tket_qsystem__llvm__prelude__test__panic_emit@llvm21_0.snap | 2 +- ...m__llvm__prelude__test__panic_emit@pre-mem2reg@llvm21_0.snap | 2 +- ...tem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_1.snap | 2 +- ...em__llvm__qsystem__test__emit_qsystem_codegen@llvm21_10.snap | 2 +- ...tem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_2.snap | 2 +- ...tem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_3.snap | 2 +- ...tem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_4.snap | 2 +- ...tem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_5.snap | 2 +- ...tem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_6.snap | 2 +- ...tem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_7.snap | 2 +- ...tem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_8.snap | 2 +- ...tem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_9.snap | 2 +- ...system__test__emit_qsystem_codegen@pre-mem2reg@llvm21_1.snap | 2 +- ...ystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_10.snap | 2 +- ...system__test__emit_qsystem_codegen@pre-mem2reg@llvm21_2.snap | 2 +- ...system__test__emit_qsystem_codegen@pre-mem2reg@llvm21_3.snap | 2 +- ...system__test__emit_qsystem_codegen@pre-mem2reg@llvm21_4.snap | 2 +- ...system__test__emit_qsystem_codegen@pre-mem2reg@llvm21_5.snap | 2 +- ...system__test__emit_qsystem_codegen@pre-mem2reg@llvm21_6.snap | 2 +- ...system__test__emit_qsystem_codegen@pre-mem2reg@llvm21_7.snap | 2 +- ...system__test__emit_qsystem_codegen@pre-mem2reg@llvm21_8.snap | 2 +- ...system__test__emit_qsystem_codegen@pre-mem2reg@llvm21_9.snap | 2 +- ...qsystem__llvm__random__test__emit_random_codegen@llvm21.snap | 2 +- ...ystem__llvm__random__test__emit_random_codegen@llvm21_1.snap | 2 +- ...ystem__llvm__random__test__emit_random_codegen@llvm21_2.snap | 2 +- ...ystem__llvm__random__test__emit_random_codegen@llvm21_3.snap | 2 +- ...ystem__llvm__random__test__emit_random_codegen@llvm21_4.snap | 2 +- ...ystem__llvm__random__test__emit_random_codegen@llvm21_5.snap | 2 +- ...m__random__test__emit_random_codegen@pre-mem2reg@llvm21.snap | 2 +- ..._random__test__emit_random_codegen@pre-mem2reg@llvm21_1.snap | 2 +- ..._random__test__emit_random_codegen@pre-mem2reg@llvm21_2.snap | 2 +- ..._random__test__emit_random_codegen@pre-mem2reg@llvm21_3.snap | 2 +- ..._random__test__emit_random_codegen@pre-mem2reg@llvm21_4.snap | 2 +- ..._random__test__emit_random_codegen@pre-mem2reg@llvm21_5.snap | 2 +- ...ystem__llvm__result__test__emit_result_codegen@llvm21_1.snap | 2 +- ...stem__llvm__result__test__emit_result_codegen@llvm21_11.snap | 2 +- ...stem__llvm__result__test__emit_result_codegen@llvm21_12.snap | 2 +- ...stem__llvm__result__test__emit_result_codegen@llvm21_13.snap | 2 +- ...stem__llvm__result__test__emit_result_codegen@llvm21_15.snap | 2 +- ...stem__llvm__result__test__emit_result_codegen@llvm21_16.snap | 2 +- ...ystem__llvm__result__test__emit_result_codegen@llvm21_2.snap | 2 +- ...ystem__llvm__result__test__emit_result_codegen@llvm21_3.snap | 2 +- ...ystem__llvm__result__test__emit_result_codegen@llvm21_4.snap | 2 +- ...ystem__llvm__result__test__emit_result_codegen@llvm21_5.snap | 2 +- ...ystem__llvm__result__test__emit_result_codegen@llvm21_7.snap | 2 +- ...ystem__llvm__result__test__emit_result_codegen@llvm21_9.snap | 2 +- ..._result__test__emit_result_codegen@pre-mem2reg@llvm21_1.snap | 2 +- ...result__test__emit_result_codegen@pre-mem2reg@llvm21_11.snap | 2 +- ...result__test__emit_result_codegen@pre-mem2reg@llvm21_12.snap | 2 +- ...result__test__emit_result_codegen@pre-mem2reg@llvm21_13.snap | 2 +- ...result__test__emit_result_codegen@pre-mem2reg@llvm21_15.snap | 2 +- ...result__test__emit_result_codegen@pre-mem2reg@llvm21_16.snap | 2 +- ..._result__test__emit_result_codegen@pre-mem2reg@llvm21_2.snap | 2 +- ..._result__test__emit_result_codegen@pre-mem2reg@llvm21_3.snap | 2 +- ..._result__test__emit_result_codegen@pre-mem2reg@llvm21_4.snap | 2 +- ..._result__test__emit_result_codegen@pre-mem2reg@llvm21_5.snap | 2 +- ..._result__test__emit_result_codegen@pre-mem2reg@llvm21_7.snap | 2 +- ..._result__test__emit_result_codegen@pre-mem2reg@llvm21_9.snap | 2 +- ...qsystem__llvm__utils__test__emit_utils_codegen@llvm21_1.snap | 2 +- ...m__utils__test__emit_utils_codegen@pre-mem2reg@llvm21_1.snap | 2 +- .../tket__llvm__bool__test__emit_all_ops@llvm21_1.snap | 2 +- .../tket__llvm__bool__test__emit_all_ops@llvm21_2.snap | 2 +- .../tket__llvm__bool__test__emit_all_ops@llvm21_3.snap | 2 +- .../tket__llvm__bool__test__emit_all_ops@llvm21_4.snap | 2 +- .../tket__llvm__bool__test__emit_all_ops@llvm21_5.snap | 2 +- .../tket__llvm__bool__test__emit_all_ops@llvm21_6.snap | 2 +- .../tket__llvm__bool__test__emit_all_ops@llvm21_7.snap | 2 +- ...et__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_1.snap | 2 +- ...et__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_2.snap | 2 +- ...et__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_3.snap | 2 +- ...et__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_4.snap | 2 +- ...et__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_5.snap | 2 +- ...et__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_6.snap | 2 +- ...et__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_7.snap | 2 +- .../tket__llvm__rotation__test__emit_all_ops@llvm21_0.snap | 2 +- ...llvm__rotation__test__emit_all_ops@pre-mem2reg@llvm21_0.snap | 2 +- 110 files changed, 110 insertions(+), 110 deletions(-) diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_call_args.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_call_args.snap index a3f31f8a9..0ff4f43aa 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_call_args.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_call_args.snap @@ -8,7 +8,7 @@ source_filename = "test_context" @arg_types = private unnamed_addr constant [7 x i8] c"iifb:v\00", align 1 @no_gpu_error = private unnamed_addr constant [27 x i8] c"No error message available\00", align 1 -define private i64 @_hl.main.1(i64 %0, i64 %1, i64 %2, i64 %3, double %4, i1 %5) { +define internal i64 @_hl.main.1(i64 %0, i64 %1, i64 %2, i64 %3, double %4, i1 %5) { alloca_block: br label %entry_block diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_call_ret_float.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_call_ret_float.snap index 183d203da..fd16e5f37 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_call_ret_float.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_call_ret_float.snap @@ -8,7 +8,7 @@ source_filename = "test_context" @arg_types = private unnamed_addr constant [3 x i8] c":f\00", align 1 @no_gpu_error = private unnamed_addr constant [27 x i8] c"No error message available\00", align 1 -define private i64 @_hl.main.1(i64 %0, i64 %1) { +define internal i64 @_hl.main.1(i64 %0, i64 %1) { alloca_block: br label %entry_block diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_call_ret_int.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_call_ret_int.snap index ff7b54d2c..7ce1e98ad 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_call_ret_int.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_call_ret_int.snap @@ -8,7 +8,7 @@ source_filename = "test_context" @arg_types = private unnamed_addr constant [3 x i8] c":i\00", align 1 @no_gpu_error = private unnamed_addr constant [27 x i8] c"No error message available\00", align 1 -define private i64 @_hl.main.1(i64 %0, i64 %1) { +define internal i64 @_hl.main.1(i64 %0, i64 %1) { alloca_block: br label %entry_block diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_dispose_context.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_dispose_context.snap index 4526a3284..25efa7d01 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_dispose_context.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_dispose_context.snap @@ -7,7 +7,7 @@ source_filename = "test_context" @no_gpu_error = private unnamed_addr constant [27 x i8] c"No error message available\00", align 1 -define private void @_hl.main.1(i64 %0) { +define internal void @_hl.main.1(i64 %0) { alloca_block: br label %entry_block diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_get_context.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_get_context.snap index b70f099a7..7398e3bdf 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_get_context.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_get_context.snap @@ -8,7 +8,7 @@ source_filename = "test_context" @gpu_validated = thread_local global i8 0 @no_gpu_error = private unnamed_addr constant [27 x i8] c"No error message available\00", align 1 -define private { i1, i64 } @_hl.main.1(i64 %0) { +define internal { i1, i64 } @_hl.main.1(i64 %0) { alloca_block: br label %entry_block diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_lookup_by_id.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_lookup_by_id.snap index 6468af749..16374dfb8 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_lookup_by_id.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_lookup_by_id.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define private i64 @_hl.main.1({} %0) { +define internal i64 @_hl.main.1({} %0) { alloca_block: br label %entry_block diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_lookup_by_name.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_lookup_by_name.snap index 16f6b9474..0f69bb55d 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_lookup_by_name.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_lookup_by_name.snap @@ -11,7 +11,7 @@ source_filename = "test_context" @no_gpu_error = private unnamed_addr constant [27 x i8] c"No error message available\00", align 1 @function_name = private unnamed_addr constant [17 x i8] c"example_function\00", align 1 -define private i64 @_hl.main.1({} %0) { +define internal i64 @_hl.main.1({} %0) { alloca_block: br label %entry_block diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_read_result_float.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_read_result_float.snap index 51b59263f..48745fbc6 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_read_result_float.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_read_result_float.snap @@ -7,7 +7,7 @@ source_filename = "test_context" @no_gpu_error = private unnamed_addr constant [27 x i8] c"No error message available\00", align 1 -define private { i64, double } @_hl.main.1(i64 %0) { +define internal { i64, double } @_hl.main.1(i64 %0) { alloca_block: br label %entry_block diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_read_result_int.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_read_result_int.snap index be1f010ca..6d22a6ce3 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_read_result_int.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_read_result_int.snap @@ -7,7 +7,7 @@ source_filename = "test_context" @no_gpu_error = private unnamed_addr constant [27 x i8] c"No error message available\00", align 1 -define private { i64, i64 } @_hl.main.1(i64 %0) { +define internal { i64, i64 } @_hl.main.1(i64 %0) { alloca_block: br label %entry_block diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_call_args.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_call_args.snap index 390081dcd..468dcebaf 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_call_args.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_call_args.snap @@ -8,7 +8,7 @@ source_filename = "test_context" @arg_types = private unnamed_addr constant [7 x i8] c"iifb:v\00", align 1 @no_gpu_error = private unnamed_addr constant [27 x i8] c"No error message available\00", align 1 -define private i64 @_hl.main.1(i64 %0, i64 %1, i64 %2, i64 %3, double %4, i1 %5) { +define internal i64 @_hl.main.1(i64 %0, i64 %1, i64 %2, i64 %3, double %4, i1 %5) { alloca_block: %"0" = alloca i64, align 8 %"2_0" = alloca i64, align 8 diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_call_ret_float.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_call_ret_float.snap index 1caeca966..b7607bcd1 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_call_ret_float.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_call_ret_float.snap @@ -8,7 +8,7 @@ source_filename = "test_context" @arg_types = private unnamed_addr constant [3 x i8] c":f\00", align 1 @no_gpu_error = private unnamed_addr constant [27 x i8] c"No error message available\00", align 1 -define private i64 @_hl.main.1(i64 %0, i64 %1) { +define internal i64 @_hl.main.1(i64 %0, i64 %1) { alloca_block: %"0" = alloca i64, align 8 %"2_0" = alloca i64, align 8 diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_call_ret_int.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_call_ret_int.snap index 45adc2e10..887dcc397 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_call_ret_int.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_call_ret_int.snap @@ -8,7 +8,7 @@ source_filename = "test_context" @arg_types = private unnamed_addr constant [3 x i8] c":i\00", align 1 @no_gpu_error = private unnamed_addr constant [27 x i8] c"No error message available\00", align 1 -define private i64 @_hl.main.1(i64 %0, i64 %1) { +define internal i64 @_hl.main.1(i64 %0, i64 %1) { alloca_block: %"0" = alloca i64, align 8 %"2_0" = alloca i64, align 8 diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_dispose_context.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_dispose_context.snap index 8c124c2e5..493e89095 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_dispose_context.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_dispose_context.snap @@ -7,7 +7,7 @@ source_filename = "test_context" @no_gpu_error = private unnamed_addr constant [27 x i8] c"No error message available\00", align 1 -define private void @_hl.main.1(i64 %0) { +define internal void @_hl.main.1(i64 %0) { alloca_block: %"2_0" = alloca i64, align 8 br label %entry_block diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_get_context.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_get_context.snap index c42daa1d7..246127c30 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_get_context.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_get_context.snap @@ -8,7 +8,7 @@ source_filename = "test_context" @gpu_validated = thread_local global i8 0 @no_gpu_error = private unnamed_addr constant [27 x i8] c"No error message available\00", align 1 -define private { i1, i64 } @_hl.main.1(i64 %0) { +define internal { i1, i64 } @_hl.main.1(i64 %0) { alloca_block: %"0" = alloca { i1, i64 }, align 8 %"2_0" = alloca i64, align 8 diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_lookup_by_id.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_lookup_by_id.snap index a8991cc12..6404ffa44 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_lookup_by_id.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_lookup_by_id.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define private i64 @_hl.main.1({} %0) { +define internal i64 @_hl.main.1({} %0) { alloca_block: %"0" = alloca i64, align 8 %"2_0" = alloca {}, align 8 diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_lookup_by_name.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_lookup_by_name.snap index 949bc7fd3..4eeaf454f 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_lookup_by_name.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_lookup_by_name.snap @@ -11,7 +11,7 @@ source_filename = "test_context" @no_gpu_error = private unnamed_addr constant [27 x i8] c"No error message available\00", align 1 @function_name = private unnamed_addr constant [17 x i8] c"example_function\00", align 1 -define private i64 @_hl.main.1({} %0) { +define internal i64 @_hl.main.1({} %0) { alloca_block: %"0" = alloca i64, align 8 %"2_0" = alloca {}, align 8 diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_read_result_float.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_read_result_float.snap index 60f12af23..54c895b5a 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_read_result_float.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_read_result_float.snap @@ -7,7 +7,7 @@ source_filename = "test_context" @no_gpu_error = private unnamed_addr constant [27 x i8] c"No error message available\00", align 1 -define private { i64, double } @_hl.main.1(i64 %0) { +define internal { i64, double } @_hl.main.1(i64 %0) { alloca_block: %"0" = alloca i64, align 8 %"1" = alloca double, align 8 diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_read_result_int.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_read_result_int.snap index 71033e667..1583dfee4 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_read_result_int.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_read_result_int.snap @@ -7,7 +7,7 @@ source_filename = "test_context" @no_gpu_error = private unnamed_addr constant [27 x i8] c"No error message available\00", align 1 -define private { i64, i64 } @_hl.main.1(i64 %0) { +define internal { i64, i64 } @_hl.main.1(i64 %0) { alloca_block: %"0" = alloca i64, align 8 %"1" = alloca i64, align 8 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@llvm21_2.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@llvm21_2.snap index 9ffb6c0ef..94ba83daa 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@llvm21_2.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@llvm21_2.snap @@ -7,7 +7,7 @@ source_filename = "test_context" @res_test_state.900F7606.0 = private constant [29 x i8] c"\1CUSER:STATE:test_state_result" -define private { ptr, i64 } @_hl.main.1({ ptr, i64 } %0) { +define internal { ptr, i64 } @_hl.main.1({ ptr, i64 } %0) { alloca_block: br label %entry_block diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@pre-mem2reg@llvm21_2.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@pre-mem2reg@llvm21_2.snap index 19f0e9938..ad0c265b3 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@pre-mem2reg@llvm21_2.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@pre-mem2reg@llvm21_2.snap @@ -7,7 +7,7 @@ source_filename = "test_context" @res_test_state.900F7606.0 = private constant [29 x i8] c"\1CUSER:STATE:test_state_result" -define private { ptr, i64 } @_hl.main.1({ ptr, i64 } %0) { +define internal { ptr, i64 } @_hl.main.1({ ptr, i64 } %0) { alloca_block: %"0" = alloca { ptr, i64 }, align 8 %"2_0" = alloca { ptr, i64 }, align 8 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_1.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_1.snap index fa7ffb5f1..03ded3943 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_1.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_1.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define private i1 @_hl.main.1(i64 %0) { +define internal i1 @_hl.main.1(i64 %0) { alloca_block: br label %entry_block diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_2.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_2.snap index 949d6c932..9437cd92a 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_2.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_2.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define private { i64, i64 } @_hl.main.1(i64 %0) { +define internal { i64, i64 } @_hl.main.1(i64 %0) { alloca_block: br label %entry_block diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_3.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_3.snap index 20e883f75..1dc8154d9 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_3.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_3.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define private void @_hl.main.1(i64 %0) { +define internal void @_hl.main.1(i64 %0) { alloca_block: br label %entry_block diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_4.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_4.snap index 2bcc688d8..3dd7fa44c 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_4.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_4.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define private i64 @_hl.main.1(i64 %0) { +define internal i64 @_hl.main.1(i64 %0) { alloca_block: br label %entry_block diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_5.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_5.snap index 949d6c932..9437cd92a 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_5.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_5.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define private { i64, i64 } @_hl.main.1(i64 %0) { +define internal { i64, i64 } @_hl.main.1(i64 %0) { alloca_block: br label %entry_block diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_6.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_6.snap index 20e883f75..1dc8154d9 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_6.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_6.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define private void @_hl.main.1(i64 %0) { +define internal void @_hl.main.1(i64 %0) { alloca_block: br label %entry_block diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_1.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_1.snap index ce5462b4f..36db9fe95 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_1.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_1.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define private i1 @_hl.main.1(i64 %0) { +define internal i1 @_hl.main.1(i64 %0) { alloca_block: %"0" = alloca i1, align 1 %"2_0" = alloca i64, align 8 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_2.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_2.snap index f04141d33..4e69ebda0 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_2.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_2.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define private { i64, i64 } @_hl.main.1(i64 %0) { +define internal { i64, i64 } @_hl.main.1(i64 %0) { alloca_block: %"0" = alloca i64, align 8 %"1" = alloca i64, align 8 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_3.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_3.snap index 8e92eedc4..ffc5672d6 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_3.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_3.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define private void @_hl.main.1(i64 %0) { +define internal void @_hl.main.1(i64 %0) { alloca_block: %"2_0" = alloca i64, align 8 br label %entry_block diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_4.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_4.snap index e669065ce..bf61f0507 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_4.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_4.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define private i64 @_hl.main.1(i64 %0) { +define internal i64 @_hl.main.1(i64 %0) { alloca_block: %"0" = alloca i64, align 8 %"2_0" = alloca i64, align 8 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_5.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_5.snap index f04141d33..4e69ebda0 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_5.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_5.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define private { i64, i64 } @_hl.main.1(i64 %0) { +define internal { i64, i64 } @_hl.main.1(i64 %0) { alloca_block: %"0" = alloca i64, align 8 %"1" = alloca i64, align 8 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_6.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_6.snap index 8e92eedc4..ffc5672d6 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_6.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_6.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define private void @_hl.main.1(i64 %0) { +define internal void @_hl.main.1(i64 %0) { alloca_block: %"2_0" = alloca i64, align 8 br label %entry_block diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__exit_emit@llvm21_0.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__exit_emit@llvm21_0.snap index 88fc5a496..5e06ce453 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__exit_emit@llvm21_0.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__exit_emit@llvm21_0.snap @@ -7,7 +7,7 @@ source_filename = "test_context" @e_EXIT.2B78BC40.0 = private constant [14 x i8] c"\0DEXIT:INT:EXIT" -define private { i64, i64 } @_hl.main.1(i64 %0, i64 %1) { +define internal { i64, i64 } @_hl.main.1(i64 %0, i64 %1) { alloca_block: br label %entry_block diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__exit_emit@pre-mem2reg@llvm21_0.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__exit_emit@pre-mem2reg@llvm21_0.snap index ae8288017..331738b28 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__exit_emit@pre-mem2reg@llvm21_0.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__exit_emit@pre-mem2reg@llvm21_0.snap @@ -7,7 +7,7 @@ source_filename = "test_context" @e_EXIT.2B78BC40.0 = private constant [14 x i8] c"\0DEXIT:INT:EXIT" -define private { i64, i64 } @_hl.main.1(i64 %0, i64 %1) { +define internal { i64, i64 } @_hl.main.1(i64 %0, i64 %1) { alloca_block: %"0" = alloca i64, align 8 %"1" = alloca i64, align 8 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__panic_emit@llvm21_0.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__panic_emit@llvm21_0.snap index b376096b2..4c5fd6ab0 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__panic_emit@llvm21_0.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__panic_emit@llvm21_0.snap @@ -7,7 +7,7 @@ source_filename = "test_context" @e_PANIC.DF25FD88.0 = private constant [15 x i8] c"\0EEXIT:INT:PANIC" -define private { i64, i64 } @_hl.main.1(i64 %0, i64 %1) { +define internal { i64, i64 } @_hl.main.1(i64 %0, i64 %1) { alloca_block: br label %entry_block diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__panic_emit@pre-mem2reg@llvm21_0.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__panic_emit@pre-mem2reg@llvm21_0.snap index d748ec514..698d37033 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__panic_emit@pre-mem2reg@llvm21_0.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__panic_emit@pre-mem2reg@llvm21_0.snap @@ -7,7 +7,7 @@ source_filename = "test_context" @e_PANIC.DF25FD88.0 = private constant [15 x i8] c"\0EEXIT:INT:PANIC" -define private { i64, i64 } @_hl.main.1(i64 %0, i64 %1) { +define internal { i64, i64 } @_hl.main.1(i64 %0, i64 %1) { alloca_block: %"0" = alloca i64, align 8 %"1" = alloca i64, align 8 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_1.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_1.snap index e6a334eb2..e9ff3cb50 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_1.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_1.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define private i64 @_hl.main.1(i64 %0, double %1) { +define internal i64 @_hl.main.1(i64 %0, double %1) { alloca_block: br label %entry_block diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_10.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_10.snap index 6695a2c82..d134bfc1c 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_10.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_10.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define private i64 @_hl.main.1(i64 %0) { +define internal i64 @_hl.main.1(i64 %0) { alloca_block: br label %entry_block diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_2.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_2.snap index 26f8a1abf..a685d8d2e 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_2.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_2.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define private { i64, i64 } @_hl.main.1(i64 %0, i64 %1, double %2) { +define internal { i64, i64 } @_hl.main.1(i64 %0, i64 %1, double %2) { alloca_block: br label %entry_block diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_3.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_3.snap index 81e72eff7..a35d56a21 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_3.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_3.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define private i64 @_hl.main.1(i64 %0, double %1, double %2) { +define internal i64 @_hl.main.1(i64 %0, double %1, double %2) { alloca_block: br label %entry_block diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_4.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_4.snap index 198413f5a..56e998b93 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_4.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_4.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define private { i1, i64, i1 } @_hl.main.1(i64 %0) { +define internal { i1, i64, i1 } @_hl.main.1(i64 %0) { alloca_block: br label %entry_block diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_5.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_5.snap index 56a0d7d7c..6790e71b0 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_5.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_5.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define private i64 @_hl.main.1(i64 %0) { +define internal i64 @_hl.main.1(i64 %0) { alloca_block: br label %entry_block diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_6.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_6.snap index 0d5764d73..d3e065184 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_6.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_6.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define private { i1, i64 } @_hl.main.1() { +define internal { i1, i64 } @_hl.main.1() { alloca_block: br label %entry_block diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_7.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_7.snap index 8811e9a8c..46476c4c3 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_7.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_7.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define private void @_hl.main.1(i64 %0) { +define internal void @_hl.main.1(i64 %0) { alloca_block: br label %entry_block diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_8.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_8.snap index c58047475..3b781f3b2 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_8.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_8.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define private i64 @_hl.main.1(i64 %0) { +define internal i64 @_hl.main.1(i64 %0) { alloca_block: br label %entry_block diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_9.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_9.snap index d8cfed095..342767d90 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_9.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_9.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define private { i64, { i1, i64, i1 } } @_hl.main.1(i64 %0) { +define internal { i64, { i1, i64, i1 } } @_hl.main.1(i64 %0) { alloca_block: br label %entry_block diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_1.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_1.snap index 95db98663..463842459 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_1.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_1.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define private i64 @_hl.main.1(i64 %0, double %1) { +define internal i64 @_hl.main.1(i64 %0, double %1) { alloca_block: %"0" = alloca i64, align 8 %"2_0" = alloca i64, align 8 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_10.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_10.snap index a58dee6d7..1cdeb521d 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_10.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_10.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define private i64 @_hl.main.1(i64 %0) { +define internal i64 @_hl.main.1(i64 %0) { alloca_block: %"0" = alloca i64, align 8 %"2_0" = alloca i64, align 8 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_2.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_2.snap index 4fa279e21..ad630f9b4 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_2.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_2.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define private { i64, i64 } @_hl.main.1(i64 %0, i64 %1, double %2) { +define internal { i64, i64 } @_hl.main.1(i64 %0, i64 %1, double %2) { alloca_block: %"0" = alloca i64, align 8 %"1" = alloca i64, align 8 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_3.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_3.snap index a665df84b..b62712490 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_3.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_3.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define private i64 @_hl.main.1(i64 %0, double %1, double %2) { +define internal i64 @_hl.main.1(i64 %0, double %1, double %2) { alloca_block: %"0" = alloca i64, align 8 %"2_0" = alloca i64, align 8 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_4.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_4.snap index e6a423e70..7b72c61b4 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_4.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_4.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define private { i1, i64, i1 } @_hl.main.1(i64 %0) { +define internal { i1, i64, i1 } @_hl.main.1(i64 %0) { alloca_block: %"0" = alloca { i1, i64, i1 }, align 8 %"2_0" = alloca i64, align 8 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_5.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_5.snap index 14bf496bb..0b5aa81be 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_5.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_5.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define private i64 @_hl.main.1(i64 %0) { +define internal i64 @_hl.main.1(i64 %0) { alloca_block: %"0" = alloca i64, align 8 %"2_0" = alloca i64, align 8 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_6.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_6.snap index 94a4707fe..a6894518e 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_6.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_6.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define private { i1, i64 } @_hl.main.1() { +define internal { i1, i64 } @_hl.main.1() { alloca_block: %"0" = alloca { i1, i64 }, align 8 %"4_0" = alloca { i1, i64 }, align 8 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_7.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_7.snap index 57ab67f89..3d88cb892 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_7.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_7.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define private void @_hl.main.1(i64 %0) { +define internal void @_hl.main.1(i64 %0) { alloca_block: %"2_0" = alloca i64, align 8 br label %entry_block diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_8.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_8.snap index 174e32169..0f3c13390 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_8.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_8.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define private i64 @_hl.main.1(i64 %0) { +define internal i64 @_hl.main.1(i64 %0) { alloca_block: %"0" = alloca i64, align 8 %"2_0" = alloca i64, align 8 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_9.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_9.snap index 433458455..f711ce8ac 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_9.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_9.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define private { i64, { i1, i64, i1 } } @_hl.main.1(i64 %0) { +define internal { i64, { i1, i64, i1 } } @_hl.main.1(i64 %0) { alloca_block: %"0" = alloca i64, align 8 %"1" = alloca { i1, i64, i1 }, align 8 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21.snap index 0a035fa56..799a38083 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define private {} @_hl.main.1({} %0, i64 %1) { +define internal {} @_hl.main.1({} %0, i64 %1) { alloca_block: br label %entry_block diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_1.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_1.snap index 47ce83c99..c69b7f8cd 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_1.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_1.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define private { i32, {} } @_hl.main.1({} %0) { +define internal { i32, {} } @_hl.main.1({} %0) { alloca_block: br label %entry_block diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_2.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_2.snap index 7c3ba88cd..22381198e 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_2.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_2.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define private { double, {} } @_hl.main.1({} %0) { +define internal { double, {} } @_hl.main.1({} %0) { alloca_block: br label %entry_block diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_3.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_3.snap index 6ed689050..d0bf6b489 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_3.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_3.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define private { i32, {} } @_hl.main.1({} %0, i32 %1) { +define internal { i32, {} } @_hl.main.1({} %0, i32 %1) { alloca_block: br label %entry_block diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_4.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_4.snap index bcc98e15c..2f1d5c317 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_4.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_4.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define private i1 @_hl.main.1(i64 %0) { +define internal i1 @_hl.main.1(i64 %0) { alloca_block: br label %entry_block diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_5.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_5.snap index 964c0773d..eb392ab80 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_5.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_5.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define private void @_hl.main.1({} %0) { +define internal void @_hl.main.1({} %0) { alloca_block: br label %entry_block diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21.snap index 25f161efb..d48da2bc1 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define private {} @_hl.main.1({} %0, i64 %1) { +define internal {} @_hl.main.1({} %0, i64 %1) { alloca_block: %"0" = alloca {}, align 8 %"2_0" = alloca {}, align 8 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_1.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_1.snap index 288daaedf..e901642f4 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_1.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_1.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define private { i32, {} } @_hl.main.1({} %0) { +define internal { i32, {} } @_hl.main.1({} %0) { alloca_block: %"0" = alloca i32, align 4 %"1" = alloca {}, align 8 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_2.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_2.snap index 44b25125e..ea5809cf5 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_2.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_2.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define private { double, {} } @_hl.main.1({} %0) { +define internal { double, {} } @_hl.main.1({} %0) { alloca_block: %"0" = alloca double, align 8 %"1" = alloca {}, align 8 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_3.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_3.snap index 1827a213f..23085e6bd 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_3.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_3.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define private { i32, {} } @_hl.main.1({} %0, i32 %1) { +define internal { i32, {} } @_hl.main.1({} %0, i32 %1) { alloca_block: %"0" = alloca i32, align 4 %"1" = alloca {}, align 8 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_4.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_4.snap index acf5844d8..6a3e511b8 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_4.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_4.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define private i1 @_hl.main.1(i64 %0) { +define internal i1 @_hl.main.1(i64 %0) { alloca_block: %"0" = alloca i1, align 1 %"2_0" = alloca i64, align 8 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_5.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_5.snap index 6fc59ac28..6c5937da7 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_5.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_5.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define private void @_hl.main.1({} %0) { +define internal void @_hl.main.1({} %0) { alloca_block: %"2_0" = alloca {}, align 8 br label %entry_block diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_1.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_1.snap index 455f0731c..423005c5e 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_1.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_1.snap @@ -7,7 +7,7 @@ source_filename = "test_context" @res_test_bool.427F8271.0 = private constant [20 x i8] c"\13USER:BOOL:test_bool" -define private void @_hl.main.1(i1 %0) { +define internal void @_hl.main.1(i1 %0) { alloca_block: br label %entry_block diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_11.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_11.snap index 323333c1d..82c88b50c 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_11.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_11.snap @@ -7,7 +7,7 @@ source_filename = "test_context" @res_test_arr_f.038B27BE.0 = private constant [27 x i8] c"\1AUSER:FLOATARR:test_arr_f64" -define private void @_hl.main.1({ ptr, i64 } %0) { +define internal void @_hl.main.1({ ptr, i64 } %0) { alloca_block: br label %entry_block diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_12.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_12.snap index 33e3d3654..0aba173da 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_12.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_12.snap @@ -7,7 +7,7 @@ source_filename = "test_context" @"res_\E6\B5\8B\E8\AF\95\E5\AD\97\E7\AC\A6\E4\B8\B2.935D2D1A.0" = private constant [25 x i8] c"\18USER:INT:\E6\B5\8B\E8\AF\95\E5\AD\97\E7\AC\A6\E4\B8\B2" -define private void @_hl.main.1(i64 %0) { +define internal void @_hl.main.1(i64 %0) { alloca_block: br label %entry_block diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_13.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_13.snap index 95403f6d2..887f8aae5 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_13.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_13.snap @@ -7,7 +7,7 @@ source_filename = "test_context" @"res_test!@#$%^.2547CEEA.0" = private constant [24 x i8] c"\17USER:INT:test!@#$%^&*()" -define private void @_hl.main.1(i64 %0) { +define internal void @_hl.main.1(i64 %0) { alloca_block: br label %entry_block diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_15.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_15.snap index cb2271eb3..c5499233a 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_15.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_15.snap @@ -7,7 +7,7 @@ source_filename = "test_context" @"res_ spaces .F46B5D1D.0" = private constant [41 x i8] c"(USER:BOOL: spaces tabs\09\09\09newlines\0A\0A\0A" -define private void @_hl.main.1(i1 %0) { +define internal void @_hl.main.1(i1 %0) { alloca_block: br label %entry_block diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_16.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_16.snap index c1c33b13d..62cff092b 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_16.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_16.snap @@ -7,7 +7,7 @@ source_filename = "test_context" @"res_\F0\9F\9A\80\F0\9F\91\A8\E2\80\8D\F0\9F\91\A9\E2\80\8D\F0\9F\91\A7\E2\80\8D\F0\9F\91\A6\F0\9F\8C\8D.F7EE3FAA.0" = private constant [44 x i8] c"+USER:BOOL:\F0\9F\9A\80\F0\9F\91\A8\E2\80\8D\F0\9F\91\A9\E2\80\8D\F0\9F\91\A7\E2\80\8D\F0\9F\91\A6\F0\9F\8C\8D" -define private void @_hl.main.1(i1 %0) { +define internal void @_hl.main.1(i1 %0) { alloca_block: br label %entry_block diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_2.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_2.snap index bb5167f00..d851efee9 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_2.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_2.snap @@ -7,7 +7,7 @@ source_filename = "test_context" @res_test_int.258C85C2.0 = private constant [18 x i8] c"\11USER:INT:test_int" -define private void @_hl.main.1(i64 %0) { +define internal void @_hl.main.1(i64 %0) { alloca_block: br label %entry_block diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_3.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_3.snap index 62aa2b0fe..aeb0eff62 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_3.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_3.snap @@ -7,7 +7,7 @@ source_filename = "test_context" @res_test_uint.DE04EADD.0 = private constant [19 x i8] c"\12USER:INT:test_uint" -define private void @_hl.main.1(i64 %0) { +define internal void @_hl.main.1(i64 %0) { alloca_block: br label %entry_block diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_4.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_4.snap index f10d808a6..079dfa470 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_4.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_4.snap @@ -7,7 +7,7 @@ source_filename = "test_context" @res_test_f64.A24BDAE1.0 = private constant [20 x i8] c"\13USER:FLOAT:test_f64" -define private void @_hl.main.1(double %0) { +define internal void @_hl.main.1(double %0) { alloca_block: br label %entry_block diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_5.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_5.snap index 4accc6945..d74b84386 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_5.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_5.snap @@ -7,7 +7,7 @@ source_filename = "test_context" @res_test_arr_b.866EEC87.0 = private constant [27 x i8] c"\1AUSER:BOOLARR:test_arr_bool" -define private void @_hl.main.1({ ptr, i64 } %0) { +define internal void @_hl.main.1({ ptr, i64 } %0) { alloca_block: br label %entry_block diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_7.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_7.snap index c4660ea17..0719cb4bc 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_7.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_7.snap @@ -7,7 +7,7 @@ source_filename = "test_context" @res_test_arr_i.DFD30452.0 = private constant [25 x i8] c"\18USER:INTARR:test_arr_int" -define private void @_hl.main.1({ ptr, i64 } %0) { +define internal void @_hl.main.1({ ptr, i64 } %0) { alloca_block: br label %entry_block diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_9.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_9.snap index 2f501b94e..28b01c227 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_9.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_9.snap @@ -7,7 +7,7 @@ source_filename = "test_context" @res_test_arr_u.3D1C515C.0 = private constant [26 x i8] c"\19USER:INTARR:test_arr_uint" -define private void @_hl.main.1({ ptr, i64 } %0) { +define internal void @_hl.main.1({ ptr, i64 } %0) { alloca_block: br label %entry_block diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_1.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_1.snap index 0e158fd10..492d3658d 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_1.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_1.snap @@ -7,7 +7,7 @@ source_filename = "test_context" @res_test_bool.427F8271.0 = private constant [20 x i8] c"\13USER:BOOL:test_bool" -define private void @_hl.main.1(i1 %0) { +define internal void @_hl.main.1(i1 %0) { alloca_block: %"2_0" = alloca i1, align 1 br label %entry_block diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_11.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_11.snap index 54442c8aa..ba95a66ed 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_11.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_11.snap @@ -7,7 +7,7 @@ source_filename = "test_context" @res_test_arr_f.038B27BE.0 = private constant [27 x i8] c"\1AUSER:FLOATARR:test_arr_f64" -define private void @_hl.main.1({ ptr, i64 } %0) { +define internal void @_hl.main.1({ ptr, i64 } %0) { alloca_block: %"2_0" = alloca { ptr, i64 }, align 8 br label %entry_block diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_12.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_12.snap index ef3b236d4..a35ff2db4 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_12.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_12.snap @@ -7,7 +7,7 @@ source_filename = "test_context" @"res_\E6\B5\8B\E8\AF\95\E5\AD\97\E7\AC\A6\E4\B8\B2.935D2D1A.0" = private constant [25 x i8] c"\18USER:INT:\E6\B5\8B\E8\AF\95\E5\AD\97\E7\AC\A6\E4\B8\B2" -define private void @_hl.main.1(i64 %0) { +define internal void @_hl.main.1(i64 %0) { alloca_block: %"2_0" = alloca i64, align 8 br label %entry_block diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_13.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_13.snap index c4bfa7529..5680b3487 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_13.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_13.snap @@ -7,7 +7,7 @@ source_filename = "test_context" @"res_test!@#$%^.2547CEEA.0" = private constant [24 x i8] c"\17USER:INT:test!@#$%^&*()" -define private void @_hl.main.1(i64 %0) { +define internal void @_hl.main.1(i64 %0) { alloca_block: %"2_0" = alloca i64, align 8 br label %entry_block diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_15.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_15.snap index 105f26847..43feb3284 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_15.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_15.snap @@ -7,7 +7,7 @@ source_filename = "test_context" @"res_ spaces .F46B5D1D.0" = private constant [41 x i8] c"(USER:BOOL: spaces tabs\09\09\09newlines\0A\0A\0A" -define private void @_hl.main.1(i1 %0) { +define internal void @_hl.main.1(i1 %0) { alloca_block: %"2_0" = alloca i1, align 1 br label %entry_block diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_16.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_16.snap index 679f1bbd1..9913d7df3 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_16.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_16.snap @@ -7,7 +7,7 @@ source_filename = "test_context" @"res_\F0\9F\9A\80\F0\9F\91\A8\E2\80\8D\F0\9F\91\A9\E2\80\8D\F0\9F\91\A7\E2\80\8D\F0\9F\91\A6\F0\9F\8C\8D.F7EE3FAA.0" = private constant [44 x i8] c"+USER:BOOL:\F0\9F\9A\80\F0\9F\91\A8\E2\80\8D\F0\9F\91\A9\E2\80\8D\F0\9F\91\A7\E2\80\8D\F0\9F\91\A6\F0\9F\8C\8D" -define private void @_hl.main.1(i1 %0) { +define internal void @_hl.main.1(i1 %0) { alloca_block: %"2_0" = alloca i1, align 1 br label %entry_block diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_2.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_2.snap index 2aef16fd9..637e6c305 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_2.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_2.snap @@ -7,7 +7,7 @@ source_filename = "test_context" @res_test_int.258C85C2.0 = private constant [18 x i8] c"\11USER:INT:test_int" -define private void @_hl.main.1(i64 %0) { +define internal void @_hl.main.1(i64 %0) { alloca_block: %"2_0" = alloca i64, align 8 br label %entry_block diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_3.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_3.snap index e4c172351..b6edcf627 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_3.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_3.snap @@ -7,7 +7,7 @@ source_filename = "test_context" @res_test_uint.DE04EADD.0 = private constant [19 x i8] c"\12USER:INT:test_uint" -define private void @_hl.main.1(i64 %0) { +define internal void @_hl.main.1(i64 %0) { alloca_block: %"2_0" = alloca i64, align 8 br label %entry_block diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_4.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_4.snap index 8b22990b9..0a631f536 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_4.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_4.snap @@ -7,7 +7,7 @@ source_filename = "test_context" @res_test_f64.A24BDAE1.0 = private constant [20 x i8] c"\13USER:FLOAT:test_f64" -define private void @_hl.main.1(double %0) { +define internal void @_hl.main.1(double %0) { alloca_block: %"2_0" = alloca double, align 8 br label %entry_block diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_5.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_5.snap index b5ca549a8..2095e59c2 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_5.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_5.snap @@ -7,7 +7,7 @@ source_filename = "test_context" @res_test_arr_b.866EEC87.0 = private constant [27 x i8] c"\1AUSER:BOOLARR:test_arr_bool" -define private void @_hl.main.1({ ptr, i64 } %0) { +define internal void @_hl.main.1({ ptr, i64 } %0) { alloca_block: %"2_0" = alloca { ptr, i64 }, align 8 br label %entry_block diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_7.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_7.snap index 0de1b44b8..809855c5c 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_7.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_7.snap @@ -7,7 +7,7 @@ source_filename = "test_context" @res_test_arr_i.DFD30452.0 = private constant [25 x i8] c"\18USER:INTARR:test_arr_int" -define private void @_hl.main.1({ ptr, i64 } %0) { +define internal void @_hl.main.1({ ptr, i64 } %0) { alloca_block: %"2_0" = alloca { ptr, i64 }, align 8 br label %entry_block diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_9.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_9.snap index 272dd6291..8777c792b 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_9.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_9.snap @@ -7,7 +7,7 @@ source_filename = "test_context" @res_test_arr_u.3D1C515C.0 = private constant [26 x i8] c"\19USER:INTARR:test_arr_uint" -define private void @_hl.main.1({ ptr, i64 } %0) { +define internal void @_hl.main.1({ ptr, i64 } %0) { alloca_block: %"2_0" = alloca { ptr, i64 }, align 8 br label %entry_block diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__utils__test__emit_utils_codegen@llvm21_1.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__utils__test__emit_utils_codegen@llvm21_1.snap index 27fd66452..1f7077f82 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__utils__test__emit_utils_codegen@llvm21_1.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__utils__test__emit_utils_codegen@llvm21_1.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define private i64 @_hl.main.1() { +define internal i64 @_hl.main.1() { alloca_block: br label %entry_block diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__utils__test__emit_utils_codegen@pre-mem2reg@llvm21_1.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__utils__test__emit_utils_codegen@pre-mem2reg@llvm21_1.snap index eee0fb022..565aa96c4 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__utils__test__emit_utils_codegen@pre-mem2reg@llvm21_1.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__utils__test__emit_utils_codegen@pre-mem2reg@llvm21_1.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define private i64 @_hl.main.1() { +define internal i64 @_hl.main.1() { alloca_block: %"0" = alloca i64, align 8 %"4_0" = alloca i64, align 8 diff --git a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_1.snap b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_1.snap index c912ce85f..d3fd9c9e7 100644 --- a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_1.snap +++ b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_1.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define private i1 @_hl.main.1(i1 %0) { +define internal i1 @_hl.main.1(i1 %0) { alloca_block: br label %entry_block diff --git a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_2.snap b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_2.snap index fa15af65a..2e5dcc2ec 100644 --- a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_2.snap +++ b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_2.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define private i1 @_hl.main.1(i1 %0) { +define internal i1 @_hl.main.1(i1 %0) { alloca_block: br label %entry_block diff --git a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_3.snap b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_3.snap index c2deefcc5..270a70277 100644 --- a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_3.snap +++ b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_3.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define private i1 @_hl.main.1(i1 %0) { +define internal i1 @_hl.main.1(i1 %0) { alloca_block: br label %entry_block diff --git a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_4.snap b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_4.snap index 453322e35..241f4932b 100644 --- a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_4.snap +++ b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_4.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define private i1 @_hl.main.1(i1 %0, i1 %1) { +define internal i1 @_hl.main.1(i1 %0, i1 %1) { alloca_block: br label %entry_block diff --git a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_5.snap b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_5.snap index 770cfbeba..a2e47e3e1 100644 --- a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_5.snap +++ b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_5.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define private i1 @_hl.main.1(i1 %0, i1 %1) { +define internal i1 @_hl.main.1(i1 %0, i1 %1) { alloca_block: br label %entry_block diff --git a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_6.snap b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_6.snap index c3c4a25de..d5801c415 100644 --- a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_6.snap +++ b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_6.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define private i1 @_hl.main.1(i1 %0, i1 %1) { +define internal i1 @_hl.main.1(i1 %0, i1 %1) { alloca_block: br label %entry_block diff --git a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_7.snap b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_7.snap index d84fd3203..a2ff1fc65 100644 --- a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_7.snap +++ b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_7.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define private i1 @_hl.main.1(i1 %0, i1 %1) { +define internal i1 @_hl.main.1(i1 %0, i1 %1) { alloca_block: br label %entry_block diff --git a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_1.snap b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_1.snap index ca36ef313..98441114b 100644 --- a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_1.snap +++ b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_1.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define private i1 @_hl.main.1(i1 %0) { +define internal i1 @_hl.main.1(i1 %0) { alloca_block: %"0" = alloca i1, align 1 %"2_0" = alloca i1, align 1 diff --git a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_2.snap b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_2.snap index f193e75e1..3537ec577 100644 --- a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_2.snap +++ b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_2.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define private i1 @_hl.main.1(i1 %0) { +define internal i1 @_hl.main.1(i1 %0) { alloca_block: %"0" = alloca i1, align 1 %"2_0" = alloca i1, align 1 diff --git a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_3.snap b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_3.snap index 89faa30e5..df4c08751 100644 --- a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_3.snap +++ b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_3.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define private i1 @_hl.main.1(i1 %0) { +define internal i1 @_hl.main.1(i1 %0) { alloca_block: %"0" = alloca i1, align 1 %"2_0" = alloca i1, align 1 diff --git a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_4.snap b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_4.snap index 115fb1fbf..11c16eb29 100644 --- a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_4.snap +++ b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_4.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define private i1 @_hl.main.1(i1 %0, i1 %1) { +define internal i1 @_hl.main.1(i1 %0, i1 %1) { alloca_block: %"0" = alloca i1, align 1 %"2_0" = alloca i1, align 1 diff --git a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_5.snap b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_5.snap index 1d9e4ef28..848c4bca9 100644 --- a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_5.snap +++ b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_5.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define private i1 @_hl.main.1(i1 %0, i1 %1) { +define internal i1 @_hl.main.1(i1 %0, i1 %1) { alloca_block: %"0" = alloca i1, align 1 %"2_0" = alloca i1, align 1 diff --git a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_6.snap b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_6.snap index 42ae2c6e7..6bcb19853 100644 --- a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_6.snap +++ b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_6.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define private i1 @_hl.main.1(i1 %0, i1 %1) { +define internal i1 @_hl.main.1(i1 %0, i1 %1) { alloca_block: %"0" = alloca i1, align 1 %"2_0" = alloca i1, align 1 diff --git a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_7.snap b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_7.snap index 59a100c88..ae9b27724 100644 --- a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_7.snap +++ b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_7.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define private i1 @_hl.main.1(i1 %0, i1 %1) { +define internal i1 @_hl.main.1(i1 %0, i1 %1) { alloca_block: %"0" = alloca i1, align 1 %"2_0" = alloca i1, align 1 diff --git a/tket/src/llvm/snapshots/tket__llvm__rotation__test__emit_all_ops@llvm21_0.snap b/tket/src/llvm/snapshots/tket__llvm__rotation__test__emit_all_ops@llvm21_0.snap index 8d9c9489d..5de56cca4 100644 --- a/tket/src/llvm/snapshots/tket__llvm__rotation__test__emit_all_ops@llvm21_0.snap +++ b/tket/src/llvm/snapshots/tket__llvm__rotation__test__emit_all_ops@llvm21_0.snap @@ -10,7 +10,7 @@ source_filename = "test_context" @1 = private unnamed_addr constant [37 x i8] c"Expected variant 1 but got variant 0\00", align 1 @prelude.panic_template.1 = private unnamed_addr constant [34 x i8] c"Program panicked (signal %i): %s\0A\00", align 1 -define private void @_hl.main.1(double %0) { +define internal void @_hl.main.1(double %0) { alloca_block: br label %entry_block diff --git a/tket/src/llvm/snapshots/tket__llvm__rotation__test__emit_all_ops@pre-mem2reg@llvm21_0.snap b/tket/src/llvm/snapshots/tket__llvm__rotation__test__emit_all_ops@pre-mem2reg@llvm21_0.snap index 7b0e4601f..7814e640f 100644 --- a/tket/src/llvm/snapshots/tket__llvm__rotation__test__emit_all_ops@pre-mem2reg@llvm21_0.snap +++ b/tket/src/llvm/snapshots/tket__llvm__rotation__test__emit_all_ops@pre-mem2reg@llvm21_0.snap @@ -10,7 +10,7 @@ source_filename = "test_context" @1 = private unnamed_addr constant [37 x i8] c"Expected variant 1 but got variant 0\00", align 1 @prelude.panic_template.1 = private unnamed_addr constant [34 x i8] c"Program panicked (signal %i): %s\0A\00", align 1 -define private void @_hl.main.1(double %0) { +define internal void @_hl.main.1(double %0) { alloca_block: %"2_0" = alloca double, align 8 %"4_0" = alloca double, align 8 From fecdbc779a01e3e511e06d8b3312f805247148f3 Mon Sep 17 00:00:00 2001 From: George Hodgkins Date: Mon, 16 Mar 2026 15:50:23 -0600 Subject: [PATCH 15/24] Apply some lints --- tket-qsystem/src/lib.rs | 1 - tket/src/extension/bool.rs | 4 +--- tket/src/serialize/pytket/config/encoder_config.rs | 1 - 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/tket-qsystem/src/lib.rs b/tket-qsystem/src/lib.rs index 05ac4c50d..4fd55bfe1 100644 --- a/tket-qsystem/src/lib.rs +++ b/tket-qsystem/src/lib.rs @@ -108,7 +108,6 @@ impl QSystemPass { if self.monomorphize { self.monomorphization().run(hugr).unwrap(); - #[expect(deprecated)] // Will move to pass scopes in let rdfp = RemoveDeadFuncsPass::default_with_scope(PassScope::Global(Preserve::All)); rdfp.run(hugr)? diff --git a/tket/src/extension/bool.rs b/tket/src/extension/bool.rs index 3f0314c29..7f9d43844 100644 --- a/tket/src/extension/bool.rs +++ b/tket/src/extension/bool.rs @@ -143,9 +143,7 @@ impl MakeOpDef for BoolOp { match self { BoolOp::read => Signature::new([bool_type], [sum_type]).into(), BoolOp::make_opaque => Signature::new([sum_type], [bool_type]).into(), - BoolOp::not => { - Signature::new([bool_type.clone()], [bool_type.clone()]).into() - } + BoolOp::not => Signature::new([bool_type.clone()], [bool_type.clone()]).into(), BoolOp::eq | BoolOp::and | BoolOp::or | BoolOp::xor => { Signature::new([bool_type.clone(), bool_type.clone()], [bool_type.clone()]).into() } diff --git a/tket/src/serialize/pytket/config/encoder_config.rs b/tket/src/serialize/pytket/config/encoder_config.rs index 04e54bb16..6d5fa45ac 100644 --- a/tket/src/serialize/pytket/config/encoder_config.rs +++ b/tket/src/serialize/pytket/config/encoder_config.rs @@ -153,7 +153,6 @@ impl PytketEncoderConfig { return Ok(None); } } - _ => return Ok(None), } } Ok(Some(values)) From bde82c0979bad157034c685091ed4982fc88727f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Agust=C3=ADn=20Borgna?= Date: Tue, 17 Mar 2026 11:04:21 +0000 Subject: [PATCH 16/24] Replace llvm-install-action with apt install in workflows --- .github/workflows/ci.yml | 58 ++++++++++++++++++----------- .github/workflows/python-wheels.yml | 9 +++-- .github/workflows/unsoundness.yml | 9 +++-- 3 files changed, 48 insertions(+), 28 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0f86bd8aa..32efa9425 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,6 +26,7 @@ env: # different strings for install action and feature name # adapted from https://github.com/TheDan64/inkwell/blob/master/.github/workflows/test.yml + LLVM_MAIN_VERSION: "21" LLVM_VERSION: "21.1" LLVM_FEATURE_NAME: "21-1" @@ -76,9 +77,11 @@ jobs: - name: Check formatting run: cargo fmt -- --check - name: Install LLVM and Clang - uses: KyleMayes/install-llvm-action@v2 - with: - version: ${{ env.LLVM_VERSION }} + run: | + wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - + sudo add-apt-repository 'deb http://apt.llvm.org/noble/ llvm-toolchain-noble-${{ env.LLVM_MAIN_VERSION }} main' + sudo apt update + sudo apt install llvm-${{ env.LLVM_MAIN_VERSION }} libpolly-${{ env.LLVM_MAIN_VERSION }}-dev - name: Run clippy run: cargo clippy --all-targets --all-features --workspace -- -D warnings - name: Build docs @@ -102,10 +105,11 @@ jobs: version: ${{ env.UV_VERSION }} enable-cache: true - name: Install LLVM and Clang - uses: KyleMayes/install-llvm-action@v2 - with: - version: ${{ env.LLVM_VERSION }} - directory: ${{ runner.temp }}/llvm + run: | + wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - + sudo add-apt-repository 'deb http://apt.llvm.org/noble/ llvm-toolchain-noble-${{ env.LLVM_MAIN_VERSION }} main' + sudo apt update + sudo apt install llvm-${{ env.LLVM_MAIN_VERSION }} libpolly-${{ env.LLVM_MAIN_VERSION }}-dev - name: Install tket-c-api library uses: ./.github/actions/tket-c-api with: @@ -193,9 +197,11 @@ jobs: - name: Configure default rust toolchain run: rustup override set ${{steps.toolchain.outputs.name}} - name: Install LLVM and Clang - uses: KyleMayes/install-llvm-action@v2 - with: - version: ${{ env.LLVM_VERSION }} + run: | + wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - + sudo add-apt-repository 'deb http://apt.llvm.org/noble/ llvm-toolchain-noble-${{ env.LLVM_MAIN_VERSION }} main' + sudo apt update + sudo apt install llvm-${{ env.LLVM_MAIN_VERSION }} libpolly-${{ env.LLVM_MAIN_VERSION }}-dev - name: Install tket-c-api library uses: ./.github/actions/tket-c-api with: @@ -227,9 +233,11 @@ jobs: with: toolchain: ${{ matrix.rust }} - name: Install LLVM and Clang - uses: KyleMayes/install-llvm-action@v2 - with: - version: ${{ env.LLVM_VERSION }} + run: | + wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - + sudo add-apt-repository 'deb http://apt.llvm.org/noble/ llvm-toolchain-noble-${{ env.LLVM_MAIN_VERSION }} main' + sudo apt update + sudo apt install llvm-${{ env.LLVM_MAIN_VERSION }} libpolly-${{ env.LLVM_MAIN_VERSION }}-dev - name: Install tket-c-api library uses: ./.github/actions/tket-c-api with: @@ -261,9 +269,11 @@ jobs: toolchain: "nightly" components: llvm-tools-preview - name: Install LLVM and Clang - uses: KyleMayes/install-llvm-action@v2 - with: - version: ${{ env.LLVM_VERSION }} + run: | + wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - + sudo add-apt-repository 'deb http://apt.llvm.org/noble/ llvm-toolchain-noble-${{ env.LLVM_MAIN_VERSION }} main' + sudo apt update + sudo apt install llvm-${{ env.LLVM_MAIN_VERSION }} libpolly-${{ env.LLVM_MAIN_VERSION }}-dev - name: Install tket-c-api library uses: ./.github/actions/tket-c-api with: @@ -308,9 +318,11 @@ jobs: - name: Configure default rust toolchain run: rustup override set ${{steps.toolchain.outputs.name}} - name: Install LLVM and Clang - uses: KyleMayes/install-llvm-action@v2 - with: - version: ${{ env.LLVM_VERSION }} + run: | + wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - + sudo add-apt-repository 'deb http://apt.llvm.org/noble/ llvm-toolchain-noble-${{ env.LLVM_MAIN_VERSION }} main' + sudo apt update + sudo apt install llvm-${{ env.LLVM_MAIN_VERSION }} libpolly-${{ env.LLVM_MAIN_VERSION }}-dev - name: Install tket-c-api library uses: ./.github/actions/tket-c-api with: @@ -391,9 +403,11 @@ jobs: version: ${{ env.UV_VERSION }} enable-cache: true - name: Install LLVM and Clang - uses: KyleMayes/install-llvm-action@v2 - with: - version: ${{ env.LLVM_VERSION }} + run: | + wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - + sudo add-apt-repository 'deb http://apt.llvm.org/noble/ llvm-toolchain-noble-${{ env.LLVM_MAIN_VERSION }} main' + sudo apt update + sudo apt install llvm-${{ env.LLVM_MAIN_VERSION }} libpolly-${{ env.LLVM_MAIN_VERSION }}-dev - name: Install Python ${{ env.PYTHON_LOWEST }} run: uv python install ${{ env.PYTHON_LOWEST }} - name: Run qis-compiler tests diff --git a/.github/workflows/python-wheels.yml b/.github/workflows/python-wheels.yml index 7a45e2fe2..42e630e99 100644 --- a/.github/workflows/python-wheels.yml +++ b/.github/workflows/python-wheels.yml @@ -33,6 +33,7 @@ env: RUSTC_WRAPPER: "sccache" # different strings for install action and feature name # adapted from https://github.com/TheDan64/inkwell/blob/master/.github/workflows/test.yml + LLVM_MAIN_VERSION: "21" LLVM_VERSION: "21.1" LLVM_FEATURE_NAME: "21-1" @@ -123,9 +124,11 @@ jobs: version: ${{ env.UV_VERSION }} enable-cache: true - name: Install LLVM and Clang - uses: KyleMayes/install-llvm-action@v2 - with: - version: ${{ env.LLVM_VERSION }} + run: | + wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - + sudo add-apt-repository 'deb http://apt.llvm.org/noble/ llvm-toolchain-noble-${{ env.LLVM_MAIN_VERSION }} main' + sudo apt update + sudo apt install llvm-${{ env.LLVM_MAIN_VERSION }} libpolly-${{ env.LLVM_MAIN_VERSION }}-dev # Set the path to the cached tket-c-api library # When this envvar is set, the `./.github/actions/tket-c-api` action **must** be run to fetch the artifacts diff --git a/.github/workflows/unsoundness.yml b/.github/workflows/unsoundness.yml index 2879dac7b..0e428a31b 100644 --- a/.github/workflows/unsoundness.yml +++ b/.github/workflows/unsoundness.yml @@ -23,6 +23,7 @@ env: # different strings for install action and feature name # adapted from https://github.com/TheDan64/inkwell/blob/master/.github/workflows/test.yml + LLVM_MAIN_VERSION: "21" LLVM_VERSION: "21.1" LLVM_FEATURE_NAME: "21-1" @@ -46,9 +47,11 @@ jobs: rustup override set nightly cargo miri setup - name: Install LLVM and Clang - uses: KyleMayes/install-llvm-action@v2 - with: - version: ${{ env.LLVM_VERSION }} + run: | + wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - + sudo add-apt-repository 'deb http://apt.llvm.org/noble/ llvm-toolchain-noble-${{ env.LLVM_MAIN_VERSION }} main' + sudo apt update + sudo apt install llvm-${{ env.LLVM_MAIN_VERSION }} libpolly-${{ env.LLVM_MAIN_VERSION }}-dev - name: Install tket-c-api library uses: ./.github/actions/tket-c-api with: From c3a885d9148697c826c97f4071a620e97e93f5b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Agust=C3=ADn=20Borgna?= Date: Tue, 17 Mar 2026 11:05:56 +0000 Subject: [PATCH 17/24] Update DEVELOPMENT.md with llvm21 instructions --- DEVELOPMENT.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index dc2514437..ade27a2bd 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -33,9 +33,9 @@ To setup the environment manually you will need: - cargo-nextest: - uv `>=0.3`: docs.astral.sh/uv/getting-started/installation - conan `>=2.0.0,<3`: This gets installed by `just setup` / `uv tool install conan` -- Optional: llvm `== 14.0`. The "llvm" feature (backed by the sub-crate `hugr-llvm`) - requires LLVM installed. We use the rust bindings - [llvm-sys](https://crates.io/crates/llvm-sys) to [llvm](https://llvm.org/). +- Optional: [llvm](https://llvm.org/) `== 21.1`. The "llvm" feature (backed by the sub-crate `hugr-llvm`) + requires LLVM 21.1 installed. We use the rust bindings from + [llvm-sys](https://crates.io/crates/llvm-sys). Once you have these installed, install the required python dependencies and setup pre-commit hooks with: @@ -45,11 +45,11 @@ just setup #### Note on LLVM -You will need llvm 14.0 installed in order for `just check` to run all its +You will need llvm 21.1 installed in order for `just check` to run all its checks successfully. On Debian-based systems you can install it as the -`llvm-14` package; you will also need to install `libpolly14-dev`. You should -set the environment variable `LLVM_SYS_140_PREFIX` to point to its location -(e.g. `/usr/lib/llvm-14`) when running `just check`. +`llvm-21` package; you may also need to install `libpolly21-dev`. You should +set the environment variable `LLVM_SYS_211_PREFIX` to point to its location +(e.g. `/usr/lib/llvm-21`) when running `just check`. ## 🚀 Local development using the tket python library From 014d79fd00eb800d05e6254129bb544f50e41dac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Agust=C3=ADn=20Borgna?= Date: Tue, 17 Mar 2026 11:09:09 +0000 Subject: [PATCH 18/24] Update qis-compiler pyproject config --- qis-compiler/pyproject.toml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/qis-compiler/pyproject.toml b/qis-compiler/pyproject.toml index e42de2d4d..fe55948f2 100644 --- a/qis-compiler/pyproject.toml +++ b/qis-compiler/pyproject.toml @@ -92,7 +92,7 @@ test-command = "pytest -vv {package}" [tool.cibuildwheel.linux.environment] PATH = '$HOME/.cargo/bin:/tmp/llvm/bin:$PATH' -LLVM_SYS_140_PREFIX = '/tmp/llvm' +LLVM_SYS_211_PREFIX = '/tmp/llvm' environment-pass = ["CACHE_CARGO"] [tool.cibuildwheel.linux] before-all = ''' @@ -112,12 +112,12 @@ before-all = ''' mkdir -p /tmp/llvm; if [ "$(uname -m)" = "x86_64" ]; then - curl -LO https://github.com/llvm/llvm-project/releases/download/llvmorg-14.0.6/clang+llvm-14.0.6-x86_64-linux-gnu-rhel-8.4.tar.xz; - tar xf clang+llvm-14.0.6-x86_64-linux-gnu-rhel-8.4.tar.xz -C /tmp/llvm --strip-components=1; + curl -LO https://github.com/llvm/llvm-project/releases/download/llvmorg-21.1.8/clang+llvm-21.1.8-x86_64-linux-gnu-rhel-8.4.tar.xz; + tar xf clang+llvm-21.1.8-x86_64-linux-gnu-rhel-8.4.tar.xz -C /tmp/llvm --strip-components=1; else dnf install ncurses-compat-libs ncurses-devel -y; - curl -LO https://github.com/llvm/llvm-project/releases/download/llvmorg-14.0.6/clang+llvm-14.0.6-aarch64-linux-gnu.tar.xz - tar xf clang+llvm-14.0.6-aarch64-linux-gnu.tar.xz -C /tmp/llvm --strip-components=1; + curl -LO https://github.com/llvm/llvm-project/releases/download/llvmorg-21.1.8/clang+llvm-21.1.8-aarch64-linux-gnu.tar.xz + tar xf clang+llvm-21.1.8-aarch64-linux-gnu.tar.xz -C /tmp/llvm --strip-components=1; fi; ''' before-test = ''' @@ -151,15 +151,15 @@ repair-wheel-command = [ [tool.cibuildwheel.macos.environment] PATH = '/tmp/llvm:$PATH' -LLVM_SYS_140_PREFIX = '/tmp/llvm' +LLVM_SYS_211_PREFIX = '/tmp/llvm' MACOSX_DEPLOYMENT_TARGET = "15.0" [tool.cibuildwheel.macos] before-all = [ 'curl -sSf https://sh.rustup.rs | sh -s -- -y', 'if [ "$(uname -m)" = "arm64" ]; then ARCH_PREFIX=arm64-apple-darwin22.3.0; else ARCH_PREFIX=x86_64-apple-darwin; fi', - 'curl -LO https://github.com/llvm/llvm-project/releases/download/llvmorg-14.0.6/clang+llvm-14.0.6-$ARCH_PREFIX.tar.xz', + 'curl -LO https://github.com/llvm/llvm-project/releases/download/llvmorg-21.1.8/clang+llvm-21.1.8-$ARCH_PREFIX.tar.xz', 'mkdir -p /tmp/llvm', - 'tar xf clang+llvm-14.0.6-$ARCH_PREFIX.tar.xz -C /tmp/llvm --strip-components=1', + 'tar xf clang+llvm-21.1.8-$ARCH_PREFIX.tar.xz -C /tmp/llvm --strip-components=1', ] repair-wheel-command = [ 'DYLD_FALLBACK_LIBRARY_PATH=/tmp/llvm/lib delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}', @@ -168,12 +168,12 @@ repair-wheel-command = [ [tool.cibuildwheel.windows.environment] PATH = 'C:\\LLVM\\bin;$PATH' -LLVM_SYS_140_PREFIX = 'C:\\LLVM' +LLVM_SYS_211_PREFIX = 'C:\\LLVM' [tool.cibuildwheel.windows] before-all = [ 'rustup update', - 'curl -LO https://github.com/PLC-lang/llvm-package-windows/releases/download/v14.0.6/LLVM-14.0.6-win64.7z', - '7z x LLVM-14.0.6-win64.7z "-oC:\LLVM" -y', + 'curl -LO https://github.com/PLC-lang/llvm-package-windows/releases/download/v21.1.8/LLVM-21.1.8-win64.7z', + '7z x LLVM-21.1.8-win64.7z "-oC:\LLVM" -y', ] repair-wheel-command = [ 'uvx delvewheel repair -w {dest_dir} {wheel}', From 18d5b1038d4d6b43637b4a2be8c93b0946680d96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Agust=C3=ADn=20Borgna?= Date: Tue, 17 Mar 2026 11:19:51 +0000 Subject: [PATCH 19/24] Update TODO in llvm/rotation.rs --- tket/src/llvm/rotation.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tket/src/llvm/rotation.rs b/tket/src/llvm/rotation.rs index 91ec38fe8..6ae0311de 100644 --- a/tket/src/llvm/rotation.rs +++ b/tket/src/llvm/rotation.rs @@ -79,10 +79,11 @@ impl RotationCodegenExtension { let builder = context.builder(); // We must distinguish {NaNs, infinities} from finite - // values. The `llvm.is.fpclass` intrinsic was introduced in llvm 15 - // and is the best way to do so. For now we are using llvm - // 14, and so we use 3 `feq`s. - // Below is commented code that we can use once we support llvm 15. + // values. The `llvm.is.fpclass` intrinsic was introduced in LLVM15 + // and is the best way to do so. + // This was written when using LLVM14, so we used 3 `feq`s. + // + // TODO: We now use LLVM21. Update this accordingly. let half_turns_ok = { let is_pos_inf = builder.build_float_compare( FloatPredicate::OEQ, From 4667e80b5af30b2c58413aeb7f83be520c100de6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Agust=C3=ADn=20Borgna?= Date: Tue, 17 Mar 2026 11:36:23 +0000 Subject: [PATCH 20/24] Updated LLVM asset names in qis-compiler pyproject config --- qis-compiler/pyproject.toml | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/qis-compiler/pyproject.toml b/qis-compiler/pyproject.toml index fe55948f2..db5e567cc 100644 --- a/qis-compiler/pyproject.toml +++ b/qis-compiler/pyproject.toml @@ -112,12 +112,12 @@ before-all = ''' mkdir -p /tmp/llvm; if [ "$(uname -m)" = "x86_64" ]; then - curl -LO https://github.com/llvm/llvm-project/releases/download/llvmorg-21.1.8/clang+llvm-21.1.8-x86_64-linux-gnu-rhel-8.4.tar.xz; - tar xf clang+llvm-21.1.8-x86_64-linux-gnu-rhel-8.4.tar.xz -C /tmp/llvm --strip-components=1; + curl -LO https://github.com/llvm/llvm-project/releases/download/llvmorg-21.1.8/LLVM-21.1.8-Linux-X64.tar.xz; + tar xf LLVM-21.1.8-Linux-X64.tar.xz -C /tmp/llvm --strip-components=1; else dnf install ncurses-compat-libs ncurses-devel -y; - curl -LO https://github.com/llvm/llvm-project/releases/download/llvmorg-21.1.8/clang+llvm-21.1.8-aarch64-linux-gnu.tar.xz - tar xf clang+llvm-21.1.8-aarch64-linux-gnu.tar.xz -C /tmp/llvm --strip-components=1; + curl -LO https://github.com/llvm/llvm-project/releases/download/llvmorg-21.1.8/LLVM-21.1.8-Linux-ARM64.tar.xz + tar xf LLVM-21.1.8-Linux-ARM64.tar.xz -C /tmp/llvm --strip-components=1; fi; ''' before-test = ''' @@ -156,10 +156,7 @@ MACOSX_DEPLOYMENT_TARGET = "15.0" [tool.cibuildwheel.macos] before-all = [ 'curl -sSf https://sh.rustup.rs | sh -s -- -y', - 'if [ "$(uname -m)" = "arm64" ]; then ARCH_PREFIX=arm64-apple-darwin22.3.0; else ARCH_PREFIX=x86_64-apple-darwin; fi', - 'curl -LO https://github.com/llvm/llvm-project/releases/download/llvmorg-21.1.8/clang+llvm-21.1.8-$ARCH_PREFIX.tar.xz', - 'mkdir -p /tmp/llvm', - 'tar xf clang+llvm-21.1.8-$ARCH_PREFIX.tar.xz -C /tmp/llvm --strip-components=1', + 'if [ "$(uname -m)" = "arm64" ]; then ARCH_SUFFIX=macOS-ARM64; else ARCH_SUFFIX=macOS-X64; fi && curl -LO https://github.com/llvm/llvm-project/releases/download/llvmorg-21.1.8/LLVM-21.1.8-$ARCH_SUFFIX.tar.xz && mkdir -p /tmp/llvm && tar xf LLVM-21.1.8-$ARCH_SUFFIX.tar.xz -C /tmp/llvm --strip-components=1', ] repair-wheel-command = [ 'DYLD_FALLBACK_LIBRARY_PATH=/tmp/llvm/lib delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}', From 8f3c09e4b1c2334d878dc26b794899abe5ef88c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Agust=C3=ADn=20Borgna?= Date: Tue, 17 Mar 2026 14:33:58 +0000 Subject: [PATCH 21/24] Fix the llvm assets name --- qis-compiler/pyproject.toml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/qis-compiler/pyproject.toml b/qis-compiler/pyproject.toml index db5e567cc..adc86393e 100644 --- a/qis-compiler/pyproject.toml +++ b/qis-compiler/pyproject.toml @@ -108,14 +108,14 @@ before-all = ''' cp -r /host/tmp/ci-cache/hugr-qis/target {package} fi; fi; - dnf install libffi-devel -y + dnf install libffi-devel ncurses-devel -y mkdir -p /tmp/llvm; if [ "$(uname -m)" = "x86_64" ]; then curl -LO https://github.com/llvm/llvm-project/releases/download/llvmorg-21.1.8/LLVM-21.1.8-Linux-X64.tar.xz; tar xf LLVM-21.1.8-Linux-X64.tar.xz -C /tmp/llvm --strip-components=1; else - dnf install ncurses-compat-libs ncurses-devel -y; + dnf install ncurses-compat-libs -y; curl -LO https://github.com/llvm/llvm-project/releases/download/llvmorg-21.1.8/LLVM-21.1.8-Linux-ARM64.tar.xz tar xf LLVM-21.1.8-Linux-ARM64.tar.xz -C /tmp/llvm --strip-components=1; fi; @@ -150,13 +150,14 @@ repair-wheel-command = [ ] [tool.cibuildwheel.macos.environment] -PATH = '/tmp/llvm:$PATH' +PATH = '/tmp/llvm/bin:$PATH' LLVM_SYS_211_PREFIX = '/tmp/llvm' MACOSX_DEPLOYMENT_TARGET = "15.0" [tool.cibuildwheel.macos] before-all = [ 'curl -sSf https://sh.rustup.rs | sh -s -- -y', - 'if [ "$(uname -m)" = "arm64" ]; then ARCH_SUFFIX=macOS-ARM64; else ARCH_SUFFIX=macOS-X64; fi && curl -LO https://github.com/llvm/llvm-project/releases/download/llvmorg-21.1.8/LLVM-21.1.8-$ARCH_SUFFIX.tar.xz && mkdir -p /tmp/llvm && tar xf LLVM-21.1.8-$ARCH_SUFFIX.tar.xz -C /tmp/llvm --strip-components=1', + 'brew install llvm@21', + 'ln -sf $(brew --prefix llvm@21) /tmp/llvm', ] repair-wheel-command = [ 'DYLD_FALLBACK_LIBRARY_PATH=/tmp/llvm/lib delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}', @@ -169,8 +170,8 @@ LLVM_SYS_211_PREFIX = 'C:\\LLVM' [tool.cibuildwheel.windows] before-all = [ 'rustup update', - 'curl -LO https://github.com/PLC-lang/llvm-package-windows/releases/download/v21.1.8/LLVM-21.1.8-win64.7z', - '7z x LLVM-21.1.8-win64.7z "-oC:\LLVM" -y', + 'curl -LO https://github.com/PLC-lang/llvm-package-windows/releases/download/v21.1.7/LLVM-21.1.7-win64.7z', + '7z x LLVM-21.1.7-win64.7z "-oC:\LLVM" -y', ] repair-wheel-command = [ 'uvx delvewheel repair -w {dest_dir} {wheel}', From 54e91f5855691c4d69ab8db5ce856f8e7ef39465 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Agust=C3=ADn=20Borgna?= Date: Tue, 17 Mar 2026 14:56:15 +0000 Subject: [PATCH 22/24] Try temp workaround for llvm-config running in the manylinux_2_28 container --- qis-compiler/pyproject.toml | 6 ++ qis-compiler/scripts/llvm-config-wrapper.sh | 97 +++++++++++++++++++++ 2 files changed, 103 insertions(+) create mode 100755 qis-compiler/scripts/llvm-config-wrapper.sh diff --git a/qis-compiler/pyproject.toml b/qis-compiler/pyproject.toml index adc86393e..5992bda05 100644 --- a/qis-compiler/pyproject.toml +++ b/qis-compiler/pyproject.toml @@ -119,6 +119,12 @@ before-all = ''' curl -LO https://github.com/llvm/llvm-project/releases/download/llvmorg-21.1.8/LLVM-21.1.8-Linux-ARM64.tar.xz tar xf LLVM-21.1.8-Linux-ARM64.tar.xz -C /tmp/llvm --strip-components=1; fi; + # The official LLVM binaries are built on Ubuntu 22.04 (glibc 2.35), + # which is too new for manylinux_2_28 (glibc 2.28). The static + # libraries and headers work fine, but llvm-config can't execute. + # Replace it with a shell script wrapper. + cp {package}/scripts/llvm-config-wrapper.sh /tmp/llvm/bin/llvm-config; + chmod +x /tmp/llvm/bin/llvm-config; ''' before-test = ''' if ${CACHE_CARGO}; diff --git a/qis-compiler/scripts/llvm-config-wrapper.sh b/qis-compiler/scripts/llvm-config-wrapper.sh new file mode 100755 index 000000000..ff14c5b13 --- /dev/null +++ b/qis-compiler/scripts/llvm-config-wrapper.sh @@ -0,0 +1,97 @@ +#!/bin/sh +# A drop-in replacement for llvm-config, used in manylinux_2_28 containers +# where the real llvm-config binary cannot execute due to glibc version +# mismatch (the official LLVM binaries are built on glibc 2.35, but +# manylinux_2_28 has glibc 2.28). +# +# The static libraries (.a) and headers from the LLVM tarball work fine +# regardless of glibc version -- only the llvm-config binary itself needs +# to run, so we replace it with this script. +# +# This script is designed to satisfy llvm-sys's build.rs queries. +# See https://gitlab.com/taricorp/llvm-sys.rs + +PREFIX=/tmp/llvm +VERSION=21.1.8 + +for arg in "$@"; do + case "$arg" in + --version) + echo "$VERSION" + ;; + --prefix) + echo "$PREFIX" + ;; + --includedir) + echo "$PREFIX/include" + ;; + --libdir) + echo "$PREFIX/lib" + ;; + --cflags) + echo "-I$PREFIX/include -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS" + ;; + --cxxflags) + echo "-I$PREFIX/include -std=c++17 -fno-exceptions -fno-rtti -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS" + ;; + --ldflags) + echo "-L$PREFIX/lib" + ;; + --system-libs) + echo "-lrt -ldl -lpthread -lm -lz -ltinfo" + ;; + --libs) + # Output -l flags for all LLVM static libraries + result="" + for f in "$PREFIX"/lib/libLLVM*.a; do + name=$(basename "$f" .a) + name=${name#lib} + result="$result -l$name" + done + echo "$result" + ;; + --libnames) + # Output library filenames + result="" + for f in "$PREFIX"/lib/libLLVM*.a; do + result="$result $(basename "$f")" + done + echo "$result" + ;; + --libfiles) + # Output full paths to library files + result="" + for f in "$PREFIX"/lib/libLLVM*.a; do + result="$result $f" + done + echo "$result" + ;; + --components) + result="" + for f in "$PREFIX"/lib/libLLVM*.a; do + name=$(basename "$f" .a) + name=${name#libLLVM} + result="$result $(echo "$name" | tr '[:upper:]' '[:lower:]')" + done + echo "$result" + ;; + --shared-mode) + echo "static" + ;; + --build-mode) + echo "Release" + ;; + --has-rtti) + echo "NO" + ;; + --link-static|--link-shared) + # Modifier flags, no output + ;; + -*) + # Unknown flag, ignore + ;; + *) + # Component names or other positional args, ignore + ;; + esac +done From 1a67a6ebdbc62b3522cecd620fdecd327c59ae34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Agust=C3=ADn=20Borgna?= Date: Tue, 17 Mar 2026 15:10:05 +0000 Subject: [PATCH 23/24] Regenerate qis-compiler tests with latest guppy --- qis-compiler/python/tests/generate_hugrs.py | 2 +- .../python/tests/resources/check.hugr | Bin 5414 -> 2594 bytes .../tests/resources/discard_qb_array.hugr | Bin 12026 -> 9138 bytes .../python/tests/resources/entry_args.hugr | Bin 5294 -> 1681 bytes .../python/tests/resources/flip_some.hugr | Bin 6250 -> 3764 bytes .../tests/resources/measure_qb_array.hugr | Bin 12141 -> 9324 bytes .../python/tests/resources/no_results.hugr | Bin 5503 -> 2669 bytes .../tests/resources/postselect_exit.hugr | Bin 6255 -> 4240 bytes .../tests/resources/postselect_panic.hugr | Bin 6253 -> 4194 bytes .../tests/resources/print_current_shot.hugr | Bin 5350 -> 1821 bytes qis-compiler/python/tests/resources/rng.hugr | Bin 8041 -> 4796 bytes qis-compiler/python/tests/resources/rus.hugr | Bin 7481 -> 5000 bytes .../resources/unsupported_pytket_ops.hugr | Bin 6223 -> 3373 bytes 13 files changed, 1 insertion(+), 1 deletion(-) diff --git a/qis-compiler/python/tests/generate_hugrs.py b/qis-compiler/python/tests/generate_hugrs.py index 6b87b16af..81b91bcb1 100644 --- a/qis-compiler/python/tests/generate_hugrs.py +++ b/qis-compiler/python/tests/generate_hugrs.py @@ -1,7 +1,7 @@ # /// script # requires-python = ">=3.10" # dependencies = [ -# "guppylang ==0.21.7", +# "guppylang ==0.21.9", # "tket", # ] # /// diff --git a/qis-compiler/python/tests/resources/check.hugr b/qis-compiler/python/tests/resources/check.hugr index 3331da2ce40940b78fe690cf420995eeea019d44..9fc09aae3a62657c1f70c535ac4d0abb9920c84a 100644 GIT binary patch literal 2594 zcmV+-3f=WcRYy{3NJ@4BK`6B^{Qy{fPyotwtQSYHTulcY#&;OsVO*c%In%abJ05}{ z1>w8lAKae?hI8L?`Wv8=iRyPhEsdgT$Z0YU5IC)X7ERT z>U6iqOtC%Mve(+#TZ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gr^);J&Dn(F61Y9P*OC>Q@FMkV~6 z{hv+yI`|X3hjx~v1UU?X>qw(G%7t`&6I-i81&iP+1fo_i{k*4M!vD8}{AOoo1=Mf$ zP0mfU05-4#?Y%JwpSzE>2E|svmLKqx_xq?%E<2cgNjxJ4GJ?N;U}5!%43Skurdd)Y zwYQ}6+{tC+Qv7sseYwWL3z7+DZA!;*z%s0~dc^1%YTXKSue?C)%QfXd6 zld9)r7ce2DCd#;MJOpkn9rfvSeX)$jbbsq4@Q#TDBA^zpRZDHa!?rc(>)FO}m6{u! z3?yuQOU>ZNW$179kjE-7A@++E0wknC8Ncaynvd(k86P*g2B{(bzXTrZ8sNuPBvI>1 z6|G^=|FQ#JMKFhmyrG08xpo#)2c%j!RWHQx)X2vYPzvN2{`C2YC6`75){7Eh6VN=ki7$eLCPd`Ahd!QpR7dW2>viE zX{h`+YI=bPIE)1PW88#SLy2h;-pt)v<;`e$IigKp3SA6pp@4;A*k>w`zTxK!O03H7 zAB$&)rwkACp?_ssYrf_7IR-?_SiA^kbS=HGKzT`1I_BXg>0)AqAN1d)+lVjbFchki zYT-_8`-K>_m_YH`w3D67eivlbS&@oi#S|L{)dsECtYtvcp*BJX0yg^(n651(xy@c} zO>u@Y?;1I0ZXmR-gaRT9jW(;@(+^wmsU}KVTzZkHiwl1ZSpzhGQIc1DcWp A4gdfE diff --git a/qis-compiler/python/tests/resources/flip_some.hugr b/qis-compiler/python/tests/resources/flip_some.hugr index c6068458f31a22bc990d420980ad57907e41793a..7527103e48c2b6260a0d49c6212b11be9b21d847 100644 GIT binary patch literal 3764 zcmV;l4omS!RYy{3NJ@4BK`6B^{Qy`EbpTqYC?Zvm6mmKs^sHZo82O|#2Nu6>7Qmuy zh^Dvi8lkJ4kzudW!HA3>Sln_KwJrCc#YRF6(Gd;2;3tLxc8>BJ>oK{}K@jB5S*G+p z7fV(dBi5tlQIb2!0s;*J4+7g~>kf>`Lf<-XvB2qwlTw4C1S`C=f2NINAK2QGfzuJE zU#1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$4L*cWF*svXWNhDymzHTu|S!B#lhO>yDlE;Qxsg`Q8pQ-q1jM%r?}N<8^3CA%ql};da8)A*SDeo?mpE2__6CM)jnIu4$GaN z4ZEVcN9rEGkHs68R-Y|!&E)N8qimpNCAz2IiM9TCZcEhgKiOO^sT6bL)#2Z|LZXuv z75f)ZbR~*G9g+S#t+C0~atNCnVm~HKV<*xM*aFx`7G?A0t(7co336%T#LXOGL1D!r UW<^fk$xRiA0i(wF2f8q$8&moQo&W#< diff --git a/qis-compiler/python/tests/resources/measure_qb_array.hugr b/qis-compiler/python/tests/resources/measure_qb_array.hugr index 52937f9ff6259f4c6d890e67ee3e12aa5e8740bd..f4ab82eb5c858503e8e467d745a40b2859e056b7 100644 GIT binary patch literal 9324 zcmV-yB$L}nRYy{3NJ@4BK`6B^{Qy|aA^{2lCTCY5RAo&%!93WAa9FX?9v=9nh@L$7 zrYJ8S?P1_s2j67!sONr#(aSGKlTD}EE$bwt@O_q5QlvEO7DxW^v@a)b$l61zZgqX#?n7`KxE;| zSsDadS_E5qnM*Hs>18h{=+Z`b=@xwH8HiH;3BfFILk(H}PKj4T<`GtX}%LR@@7II^K$2`t7LT>HT_|em%V(4H!PXUr^I8sQ1eO zw4?Xy(e&%l`wh83)cX}R{fhea5xr2x;4gDZTWYG6a=g`c)yqN-y|b z>HpJ!_`~HWB%K#YCAF1??Zrk|JI?+XmT^nPKQeqnk)G2xd? z(~nHQkPxN5ADLeIl>vg8UizKs|0{y%iDwy)i+Ih2n(luLz~sxuKs%^;`lcA>h$)C*lF|hc26kA_%@B+ z_UY}Q-p(<@hjvi^9TUHA=jiPnjiX0z59tu4q`jl*P;V32e7mS$C~6=^y^Yi~B=xpZ z6ItpaqLkaR-X42<*4t1{V^gT!UgAQJrbNA6)PIAblwj*L-RW(fCek#0Z{PI)EkTqL z{LnP5>iwAL|2smI^7Vmf`i<%R#Poh+`u~g&rM&qJ#U2Gb=%>LKo`DP=11}7N7qAPu za0^(lg7?33Ip4bqQovhKz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sk%ZsRwi0 z0GSZEj?w5fgFcAzs1&X8g@Vn`Fs1sxP#l|_Zt@B*NuCEY%#;O@>tZf*zN(|)ueRqn Xp*6*!Yp0}n{l!TQX9S+lbs84|;p!d) diff --git a/qis-compiler/python/tests/resources/print_current_shot.hugr b/qis-compiler/python/tests/resources/print_current_shot.hugr index 003969079939d73e8b4569d12eec90a6d5e1038b..31778e94595224862497a782e5db307b9d29b1ac 100644 GIT binary patch literal 1821 zcmV+&2jcihRYy{3NJ@4BK`6B^{Qy{1H~@NIG!sU^-lhXQ3wA$S6jyu*K_6LN+kM%) zie&#!aU?cMw|qrg*;`p_FWua|?pYoAgo{~;+kV<7lO>^T3BM%~>sfl*#+O^B6dnN> z0UZIkh_%O<_PDJ*B378CD+H;0Ez$gGzP-(2YY&Xc!rwX{)%aSX?iv(bu)3We#_cW! z16xNpzLuyS;&KSKXmt2mqW?8dGwZ*J6ib_=T0^P_NcF#JZ(`EOPzpUKnkD2oA|A$$*Z!gAf zW$gSj@~3=D=IxuIu~U-l3}C0McFVDJo|7)ZL>n`cbB|ilS)ErwWP8ATK$}j!DJBg+W2vAF;YV+b|q0?f}(Ihq_PG*C(nwxo){muTEH%^kY>AR&D&$2~_8bDxc=*&vtdJ ztiX#pSomLTM3IZS5zl4U_~kHmq(ghG{b?A*9CG^`U(8{Wtvyc6G1=y}_PCZOcZLyd zFYJz@d@a%aAkk{;9EPKZoj-8m=k1Y$S1&q_V8-5tLZImS~t=A*kSsd@WJg2U&yb z{E`r%2F-9yPX~TODOneW9Vcqg+pYY4U@PUbzcGcc>Y`@2hoivt;H$zK^u#d3z!!z_ zRqfym>ohiMaU^Qc!x44fGBV5cSsWiYsF-xcp3>_6v)=r6Q@6jdsWuPbwb#LLG+BFI7IxdyBMtYb zr+*Gp5kPk(yS_SJxO zw;$mbJOmyK*4^~;Iav4lrw@ViBY>>?_NNcZHL{x=0CrgSo5%Sc+Y7Poq(8lp?Uh*f zny06qV%-6}`|M)fY2ID_q}!LV?g2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q>$A++}apCIeq#ugmzdI^Bv!m#nK#rylv??~djOFXFc1SEK zOj6ErQtC~IwuU5x{F3FR^f)gz6>C==<*^R?=DdVI+| zxue8L$@qEc`j(D^Zzd=BRVj7%fCXE7^_}Yd8oD9TUinm`FUxPIF~Q-1d>El`TGfbu zu9Sgwd2B796JD@7;0E+D%TG%sN`jb073qyBaFr%=ilO+K1d?;aP!Vam9ra8`6@Gxp zA2H8z)iy9DO5;ryr&I^QAns1wZ{LT#wZ&(mNR62J5RSeZ4t~A|(kgpVoXab$QB7#< zXfzR0bx&L@9D+ehS010XjS6q*CBspEY5Sw!6h|3R%rVbvVKOvx=cjkI5-wV!ftATjhml8K$Dkim+X*I;S+nWC?Q9db;AqM=B4SIosub z?fGg8aZ`BRBWex9iN2MRl9;2MiVxb4*3Qm^NSpTWbum%F1Ex2c5Lr!cc%3-0D?2T3 zrgFaAtL&r+xd5GvDu6TBXM)?U7>YXoALxXgqBKAamn)YL)S%t>SwggK)nB!V*i7C& z&gym~uQ5%mk*G%c9ILsT;YG9N=Z^VD%TW EZsCbJF#rGn diff --git a/qis-compiler/python/tests/resources/rng.hugr b/qis-compiler/python/tests/resources/rng.hugr index c235be37e3fe7269415ddc6b15b5b5973291863a..0cd61b653a62826a134d12b19323e0a7e11b5d88 100644 GIT binary patch literal 4796 zcmV;t5<~4sRYy{3NJ@4BK`6B^{Qy`^l>qt&bv0i=QeAC2JR|?_E}U@7O=I6MmVDz; z5QLU2)no}#+ ztWQ@fh#oQOa4NuGU9$cBnl&)W6*Ulf7CWU2Rcwwy3K$ z>fg2ii@n;gs}&o_*fXWBmPpfVz0}mz-r5L^(rRJoYLzr+m2|Z-#4tlwyQDe0q^o5z z0VdTpY0fsmfDK*kljiJ`t`>(IaHtkaa~4YfwgfPySF1x;8>KlLrK{zkf4c)L=bYuC z+8>&;KlE>VfR(Qnh^|&jb5=@M8$|y$2e6!1D@0d2L{~edIXk6)%LAB@S4%`!&KA+X z1p>^*t2Lslmvqh=(VnHk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La;uY>SAtnVigyDk$2gM;uSVl zB}<5{+%ZrQtLVfAz1eZju2kF+Hl^c88C!08S6bFo*`fs}4kN$z>QYIzS?vZj190GI zm$#alyf-vX!GvVB+^pIXBu@&mbhWh)aMvapT}kIakG^OSFw+L^a1QT;oz9eiThW^2 zHdJEBNDtSTY;=FB1G<2N@5_hbcADNDP5OlYc_N1MgEek&Z|T~@pV7ooQSUKG^Rbcl zdA=;Y;T_UoxQ%REU_lC7u-%%TR^mz3CdD9B@uBru5RM>d3qmW{5ep#0YfJg4TJ3lZ`7=z7do>`!*fm=F@mfg zJ$NhQF@e3Pnr&t0gu-oS;o~-#u3S4v6b*+Bp!llpl12&p{seVn4)^S+urm zb=p893Mh-#hOCE)^1(L$a1_FM{OZ59dTJDLe*8c_4+?NOewAONc*YZr67b~{)JF0a zk6S%<({&gT{*d*rS`z`sMZwLakO0l^ZA)0_h!)lk>!KV4~87+5xeE5)eSoxcWg4y4K$IWJqW(opE{* D@arEV diff --git a/qis-compiler/python/tests/resources/unsupported_pytket_ops.hugr b/qis-compiler/python/tests/resources/unsupported_pytket_ops.hugr index 8d7fff03065e449eaa882538cb9ae7a658aafb3c..02ca2dd8de634949e327e85080d17fc07c5d446b 100644 GIT binary patch literal 3373 zcmV+|4bt*RRYy{3NJ@4BK`6B^{Qy|iXaK69{2*44mXSILVAHxD?}i+>LjI0lz~;G| z%wHdEtoQV;omcT~~ zJt~I`bzA%sMJZ)U0rUa#0s8@Sh_|6`)Ui=~c^KY?I@{|V*Dh<}N7~`1;~Mphjp7e) zL!Abx?{BYm_=z>!_&d};9lQ;7?x9Fx;PSS98fkkqnh5*(;BBZ2Wh6a{Fby1d8|qMA zg8#2MpgsgVtOE?#|C$+-3zS#v-}nbTO11wrCKs(M7PMkttk{1`zovHFeBstPgJ{O! z!VI@g8myA^4nABSnA|#rxOFzUbvgl}$qmBECBleX zCla>^CGHU__d1{4I-9uMY~t4G#QmR4sAhbfPuxoXa`bPdDEFV*%y^EXREpwq6orb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sNcQva$ZmFmR8)SZ|U zKWXRs#`VEhj0tXpl;${K2dqc^srL$-Zadm5W!31?@(O88;qd-Gj6pN4z12Vai-^3u zOMxDrBJbrBXa$)e4xqoaleA=4DGRfN5_-i79I8q0ia{WmboAO8s3KD9ezc2>HuwNE ze*ZAohdGHH;AQjIqin@874XSm7 z9UdGZbtvP~cle1~I!>t5@rz{~r$b&_06(TApb};Anzhu{E!jpKdcD$EF{wREte%Li zAJ*K@xPYh?#TjECodc2$a1)yD_hIAgKk{$aoB$IR z0L=JzS^xqTT^&OAjWm|z>r_1Kq!wc93m(H53T74IBnTd%ypMk>onfEY(tFh%1D z3blaiuhIX4Of)K8y?2WOSok*4F^mYf{SVP= z!@HM8dWCL(9lju&b7FL8O(3t0+ZyxU3F`yXImybyfHQQ8=}?ULYY1f-cTIW;)Y%HZJh4vik0+fM4zXH zSHyRI-@kl;bK&}VRG08A;Qt9UYMRYa=gAR&h`Cq-?I~0rVf8q5F}L|0T+&O1z`J&t zg?{u8$i)0=;^1OxP`tv4DDlu82g^RLp%XfgK@zVio9`~_osSfb@uf!@TF;vukP(G9 zbx96zOcb(SY$c&|}m;m3qN Date: Tue, 17 Mar 2026 15:11:56 +0000 Subject: [PATCH 24/24] Disable arm wheel builds for now --- .github/workflows/python-qis-wheels.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-qis-wheels.yml b/.github/workflows/python-qis-wheels.yml index 566d53cd1..38e95656e 100644 --- a/.github/workflows/python-qis-wheels.yml +++ b/.github/workflows/python-qis-wheels.yml @@ -46,7 +46,8 @@ jobs: matrix: os: - ubuntu-latest - - ubuntu-24.04-arm + # TODO: Temporarily disabled until we create a manylinux_2_28 compatible docker image for ARM with LLVM 21. + #- ubuntu-24.04-arm - macos-15 - macos-15-intel - windows-2022