diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index e56617da..5a7e1527 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -104,11 +104,12 @@ jobs: with: toolchain: ${{ steps.rust_toolchain.outputs.channel }} - - name: Prepare cache dir (linux) - if: ${{ matrix.os == 'ubuntu-latest' }} - run: | - mkdir /tmp/ci-cache - chmod 755 /tmp/ci-cache + #TODO: re-enable + #- name: Prepare cache dir (linux) + # if: ${{ matrix.os == 'ubuntu-latest' }} + # run: | + # mkdir /tmp/ci-cache + # chmod 755 /tmp/ci-cache - uses: quantinuum/hugrverse-env/install-hugrenv-action@main with: @@ -132,6 +133,8 @@ jobs: # Cache the rust build intermediates - uses: actions/cache@v5 + # TODO: re-enable ubuntu-latest caching + if: ${{ matrix.os != 'ubuntu-latest' }} with: path: | /tmp/ci-cache/selene diff --git a/selene-ext/interfaces/sol_qis/c/include/sol_qis/sol_ops.h b/selene-ext/interfaces/sol_qis/c/include/sol_qis/sol_ops.h index c0ae5a61..187965d4 100644 --- a/selene-ext/interfaces/sol_qis/c/include/sol_qis/sol_ops.h +++ b/selene-ext/interfaces/sol_qis/c/include/sol_qis/sol_ops.h @@ -15,12 +15,9 @@ EXPORT void ___rz(uint64_t q, double theta); EXPORT void ___rp(uint64_t q, double theta, double phi); EXPORT void ___rz(uint64_t q, double theta); EXPORT void ___rpp(uint64_t q1, uint64_t q2, double theta, double phi); -// TODO: check if this is included -//EXPORT void ___rxxyyzz(uint64_t q1, uint64_t q2, double alpha, double beta, double gamma); EXPORT void ___reset(uint64_t q); EXPORT bool ___measure(uint64_t q); -EXPORT uint64_t ___lazy_measure(uint64_t q); -EXPORT uint64_t ___lazy_measure_leaked(uint64_t q); +EXPORT uint64_t ___future_measure(uint64_t q, uint64_t flags); EXPORT void ___dec_future_refcount(uint64_t r); EXPORT void ___inc_future_refcount(uint64_t r); EXPORT bool ___read_future_bool(uint64_t r); @@ -32,4 +29,8 @@ EXPORT uint64_t get_tc(void); EXPORT void setup(uint64_t time_cursor); EXPORT uint64_t teardown(void); +// DEPRECATED +EXPORT uint64_t ___lazy_measure(uint64_t q); +EXPORT uint64_t ___lazy_measure_leaked(uint64_t q); + #endif diff --git a/selene-ext/interfaces/sol_qis/c/src/sol_ops.c b/selene-ext/interfaces/sol_qis/c/src/sol_ops.c index c6cbe622..ecf1484a 100644 --- a/selene-ext/interfaces/sol_qis/c/src/sol_ops.c +++ b/selene-ext/interfaces/sol_qis/c/src/sol_ops.c @@ -3,6 +3,7 @@ #include // selene_ functions #include // selene_instance #include // unwrap +#include // panic_str #include "logging.h" // DIAGNOSTIC @@ -44,17 +45,22 @@ bool ___measure(uint64_t q) { DIAGNOSTIC(" returned %s\n", result ? "true" : "false"); return result; } -uint64_t ___lazy_measure(uint64_t q) { - DIAGNOSTIC("___lazy_measure(%" PRIu64 ")\n", q); - uint64_t reference = unwrap(selene_qubit_lazy_measure(selene_instance, q)); - DIAGNOSTIC(" reference: %" PRIu64 "\n", reference); - return reference; -} -uint64_t ___lazy_measure_leaked(uint64_t q) { - DIAGNOSTIC("___lazy_measure_leaked(%" PRIu64 ")\n", q); - uint64_t reference = unwrap(selene_qubit_lazy_measure_leaked(selene_instance, q)); +uint64_t ___future_measure(uint64_t q, uint64_t flags) { + DIAGNOSTIC("___future_measure(%" PRIu64 ", %" PRIu64 ")\n", q, flags); + uint64_t reference = 0; + switch(flags){ + case 0: + reference = unwrap(selene_qubit_lazy_measure(selene_instance, q)); + break; + case 1: + reference = unwrap(selene_qubit_lazy_measure_leaked(selene_instance, q)); + break; + default: + panic_str(20000, "___future_measure: invalid flags value (expect 0 or 1)"); + } DIAGNOSTIC(" reference: %" PRIu64 "\n", reference); return reference; + } void ___dec_future_refcount(uint64_t r) { DIAGNOSTIC("___dec_future_refcount(%" PRIu64 ")\n", r); @@ -114,3 +120,18 @@ void ___sleep(uint64_t* qubits, uint64_t qubits_len, uint64_t sleep_time) { unwrap(selene_local_barrier(selene_instance, qubits, qubits_len, sleep_time)); DIAGNOSTIC(" [done]\n"); } + +// DEPRECATED: use ___future_measure instead +uint64_t ___lazy_measure(uint64_t q) { + DIAGNOSTIC("___lazy_measure(%" PRIu64 ")\n", q); + uint64_t reference = unwrap(selene_qubit_lazy_measure(selene_instance, q)); + DIAGNOSTIC(" reference: %" PRIu64 "\n", reference); + return reference; +} + +uint64_t ___lazy_measure_leaked(uint64_t q) { + DIAGNOSTIC("___lazy_measure_leaked(%" PRIu64 ")\n", q); + uint64_t reference = unwrap(selene_qubit_lazy_measure_leaked(selene_instance, q)); + DIAGNOSTIC(" reference: %" PRIu64 "\n", reference); + return reference; +} diff --git a/selene-ext/runtimes/soft_rz/python/tests/resources/from_guppy/test_batching/test_batching_behaviour/qft_8qb-helios-aarch64-apple-darwin.ll b/selene-ext/runtimes/soft_rz/python/tests/resources/from_guppy/test_batching/test_batching_behaviour/qft_8qb-helios-aarch64-apple-darwin.ll index 94c894bb..2b39f715 100644 --- a/selene-ext/runtimes/soft_rz/python/tests/resources/from_guppy/test_batching/test_batching_behaviour/qft_8qb-helios-aarch64-apple-darwin.ll +++ b/selene-ext/runtimes/soft_rz/python/tests/resources/from_guppy/test_batching/test_batching_behaviour/qft_8qb-helios-aarch64-apple-darwin.ll @@ -291,7 +291,7 @@ panic.i1618: ; preds = %__barray_check_boun %78 = getelementptr inbounds nuw i64, ptr %4, i64 %"406_0.sroa.15.01683" %79 = load i64, ptr %78, align 4 %80 = add i64 %"406_2.01682", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %79) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %79) tail call void @___qfree(i64 %79) %81 = icmp ult i64 %"406_2.01682", 8 br i1 %81, label %__barray_check_bounds.exit1613, label %out_of_bounds.i1612 @@ -301,7 +301,7 @@ cond_exit_410: ; preds = %__barray_check_boun %83 = xor i64 %66, %82 store i64 %83, ptr %3, align 4 %84 = getelementptr inbounds nuw i64, ptr %2, i64 %"406_2.01682" - store i64 %lazy_measure, ptr %84, align 4 + store i64 %___lazy_measure, ptr %84, align 4 %85 = icmp samesign ugt i64 %"406_0.sroa.15.01683", 6 br i1 %85, label %mask_block_ok.i, label %__barray_check_bounds.exit1617 diff --git a/selene-ext/runtimes/soft_rz/python/tests/resources/from_guppy/test_batching/test_batching_behaviour/qft_8qb-helios-aarch64-unknown-linux-gnu.ll b/selene-ext/runtimes/soft_rz/python/tests/resources/from_guppy/test_batching/test_batching_behaviour/qft_8qb-helios-aarch64-unknown-linux-gnu.ll index cdb09e57..586389b7 100644 --- a/selene-ext/runtimes/soft_rz/python/tests/resources/from_guppy/test_batching/test_batching_behaviour/qft_8qb-helios-aarch64-unknown-linux-gnu.ll +++ b/selene-ext/runtimes/soft_rz/python/tests/resources/from_guppy/test_batching/test_batching_behaviour/qft_8qb-helios-aarch64-unknown-linux-gnu.ll @@ -291,7 +291,7 @@ panic.i1618: ; preds = %__barray_check_boun %78 = getelementptr inbounds nuw i64, ptr %4, i64 %"406_0.sroa.15.01683" %79 = load i64, ptr %78, align 4 %80 = add i64 %"406_2.01682", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %79) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %79) tail call void @___qfree(i64 %79) %81 = icmp ult i64 %"406_2.01682", 8 br i1 %81, label %__barray_check_bounds.exit1613, label %out_of_bounds.i1612 @@ -301,7 +301,7 @@ cond_exit_410: ; preds = %__barray_check_boun %83 = xor i64 %66, %82 store i64 %83, ptr %3, align 4 %84 = getelementptr inbounds nuw i64, ptr %2, i64 %"406_2.01682" - store i64 %lazy_measure, ptr %84, align 4 + store i64 %___lazy_measure, ptr %84, align 4 %85 = icmp samesign ugt i64 %"406_0.sroa.15.01683", 6 br i1 %85, label %mask_block_ok.i, label %__barray_check_bounds.exit1617 diff --git a/selene-ext/runtimes/soft_rz/python/tests/resources/from_guppy/test_batching/test_batching_behaviour/qft_8qb-helios-x86_64-apple-darwin.ll b/selene-ext/runtimes/soft_rz/python/tests/resources/from_guppy/test_batching/test_batching_behaviour/qft_8qb-helios-x86_64-apple-darwin.ll index fba5606d..f4b60478 100644 --- a/selene-ext/runtimes/soft_rz/python/tests/resources/from_guppy/test_batching/test_batching_behaviour/qft_8qb-helios-x86_64-apple-darwin.ll +++ b/selene-ext/runtimes/soft_rz/python/tests/resources/from_guppy/test_batching/test_batching_behaviour/qft_8qb-helios-x86_64-apple-darwin.ll @@ -291,7 +291,7 @@ panic.i1618: ; preds = %__barray_check_boun %78 = getelementptr inbounds nuw i64, ptr %4, i64 %"406_0.sroa.15.01683" %79 = load i64, ptr %78, align 4 %80 = add i64 %"406_2.01682", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %79) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %79) tail call void @___qfree(i64 %79) %81 = icmp ult i64 %"406_2.01682", 8 br i1 %81, label %__barray_check_bounds.exit1613, label %out_of_bounds.i1612 @@ -301,7 +301,7 @@ cond_exit_410: ; preds = %__barray_check_boun %83 = xor i64 %66, %82 store i64 %83, ptr %3, align 4 %84 = getelementptr inbounds nuw i64, ptr %2, i64 %"406_2.01682" - store i64 %lazy_measure, ptr %84, align 4 + store i64 %___lazy_measure, ptr %84, align 4 %85 = icmp samesign ugt i64 %"406_0.sroa.15.01683", 6 br i1 %85, label %mask_block_ok.i, label %__barray_check_bounds.exit1617 diff --git a/selene-ext/runtimes/soft_rz/python/tests/resources/from_guppy/test_batching/test_batching_behaviour/qft_8qb-helios-x86_64-unknown-linux-gnu.ll b/selene-ext/runtimes/soft_rz/python/tests/resources/from_guppy/test_batching/test_batching_behaviour/qft_8qb-helios-x86_64-unknown-linux-gnu.ll index 8b8f499a..e2028769 100644 --- a/selene-ext/runtimes/soft_rz/python/tests/resources/from_guppy/test_batching/test_batching_behaviour/qft_8qb-helios-x86_64-unknown-linux-gnu.ll +++ b/selene-ext/runtimes/soft_rz/python/tests/resources/from_guppy/test_batching/test_batching_behaviour/qft_8qb-helios-x86_64-unknown-linux-gnu.ll @@ -291,7 +291,7 @@ panic.i1618: ; preds = %__barray_check_boun %78 = getelementptr inbounds nuw i64, ptr %4, i64 %"406_0.sroa.15.01683" %79 = load i64, ptr %78, align 4 %80 = add i64 %"406_2.01682", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %79) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %79) tail call void @___qfree(i64 %79) %81 = icmp ult i64 %"406_2.01682", 8 br i1 %81, label %__barray_check_bounds.exit1613, label %out_of_bounds.i1612 @@ -301,7 +301,7 @@ cond_exit_410: ; preds = %__barray_check_boun %83 = xor i64 %66, %82 store i64 %83, ptr %3, align 4 %84 = getelementptr inbounds nuw i64, ptr %2, i64 %"406_2.01682" - store i64 %lazy_measure, ptr %84, align 4 + store i64 %___lazy_measure, ptr %84, align 4 %85 = icmp samesign ugt i64 %"406_0.sroa.15.01683", 6 br i1 %85, label %mask_block_ok.i, label %__barray_check_bounds.exit1617 diff --git a/selene-ext/runtimes/soft_rz/python/tests/resources/from_guppy/test_batching/test_batching_behaviour/qft_8qb-helios-x86_64-windows-gnu.ll b/selene-ext/runtimes/soft_rz/python/tests/resources/from_guppy/test_batching/test_batching_behaviour/qft_8qb-helios-x86_64-windows-gnu.ll index accf270e..8fbc1e33 100644 --- a/selene-ext/runtimes/soft_rz/python/tests/resources/from_guppy/test_batching/test_batching_behaviour/qft_8qb-helios-x86_64-windows-gnu.ll +++ b/selene-ext/runtimes/soft_rz/python/tests/resources/from_guppy/test_batching/test_batching_behaviour/qft_8qb-helios-x86_64-windows-gnu.ll @@ -291,7 +291,7 @@ panic.i1618: ; preds = %__barray_check_boun %78 = getelementptr inbounds nuw i64, ptr %4, i64 %"406_0.sroa.15.01683" %79 = load i64, ptr %78, align 4 %80 = add i64 %"406_2.01682", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %79) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %79) tail call void @___qfree(i64 %79) %81 = icmp ult i64 %"406_2.01682", 8 br i1 %81, label %__barray_check_bounds.exit1613, label %out_of_bounds.i1612 @@ -301,7 +301,7 @@ cond_exit_410: ; preds = %__barray_check_boun %83 = xor i64 %66, %82 store i64 %83, ptr %3, align 4 %84 = getelementptr inbounds nuw i64, ptr %2, i64 %"406_2.01682" - store i64 %lazy_measure, ptr %84, align 4 + store i64 %___lazy_measure, ptr %84, align 4 %85 = icmp samesign ugt i64 %"406_0.sroa.15.01683", 6 br i1 %85, label %mask_block_ok.i, label %__barray_check_bounds.exit1617 diff --git a/selene-ext/runtimes/soft_rz/python/tests/resources/from_guppy/test_batching/test_batching_behaviour/qft_8qb-sol-aarch64-apple-darwin.ll b/selene-ext/runtimes/soft_rz/python/tests/resources/from_guppy/test_batching/test_batching_behaviour/qft_8qb-sol-aarch64-apple-darwin.ll index 3fec80ad..2a355aaa 100644 --- a/selene-ext/runtimes/soft_rz/python/tests/resources/from_guppy/test_batching/test_batching_behaviour/qft_8qb-sol-aarch64-apple-darwin.ll +++ b/selene-ext/runtimes/soft_rz/python/tests/resources/from_guppy/test_batching/test_batching_behaviour/qft_8qb-sol-aarch64-apple-darwin.ll @@ -295,7 +295,7 @@ panic.i1618: ; preds = %__barray_check_boun %78 = getelementptr inbounds nuw i64, ptr %4, i64 %"406_0.sroa.15.01683" %79 = load i64, ptr %78, align 4 %80 = add i64 %"406_2.01682", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %79) + %___future_measure = tail call i64 @___future_measure(i64 %79, i64 0) tail call void @___qfree(i64 %79) %81 = icmp ult i64 %"406_2.01682", 8 br i1 %81, label %__barray_check_bounds.exit1613, label %out_of_bounds.i1612 @@ -305,7 +305,7 @@ cond_exit_410: ; preds = %__barray_check_boun %83 = xor i64 %66, %82 store i64 %83, ptr %3, align 4 %84 = getelementptr inbounds nuw i64, ptr %2, i64 %"406_2.01682" - store i64 %lazy_measure, ptr %84, align 4 + store i64 %___future_measure, ptr %84, align 4 %85 = icmp samesign ugt i64 %"406_0.sroa.15.01683", 6 br i1 %85, label %mask_block_ok.i, label %__barray_check_bounds.exit1617 @@ -538,7 +538,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-ext/runtimes/soft_rz/python/tests/resources/from_guppy/test_batching/test_batching_behaviour/qft_8qb-sol-aarch64-unknown-linux-gnu.ll b/selene-ext/runtimes/soft_rz/python/tests/resources/from_guppy/test_batching/test_batching_behaviour/qft_8qb-sol-aarch64-unknown-linux-gnu.ll index 9610ca6e..29b15a9d 100644 --- a/selene-ext/runtimes/soft_rz/python/tests/resources/from_guppy/test_batching/test_batching_behaviour/qft_8qb-sol-aarch64-unknown-linux-gnu.ll +++ b/selene-ext/runtimes/soft_rz/python/tests/resources/from_guppy/test_batching/test_batching_behaviour/qft_8qb-sol-aarch64-unknown-linux-gnu.ll @@ -295,7 +295,7 @@ panic.i1618: ; preds = %__barray_check_boun %78 = getelementptr inbounds nuw i64, ptr %4, i64 %"406_0.sroa.15.01683" %79 = load i64, ptr %78, align 4 %80 = add i64 %"406_2.01682", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %79) + %___future_measure = tail call i64 @___future_measure(i64 %79, i64 0) tail call void @___qfree(i64 %79) %81 = icmp ult i64 %"406_2.01682", 8 br i1 %81, label %__barray_check_bounds.exit1613, label %out_of_bounds.i1612 @@ -305,7 +305,7 @@ cond_exit_410: ; preds = %__barray_check_boun %83 = xor i64 %66, %82 store i64 %83, ptr %3, align 4 %84 = getelementptr inbounds nuw i64, ptr %2, i64 %"406_2.01682" - store i64 %lazy_measure, ptr %84, align 4 + store i64 %___future_measure, ptr %84, align 4 %85 = icmp samesign ugt i64 %"406_0.sroa.15.01683", 6 br i1 %85, label %mask_block_ok.i, label %__barray_check_bounds.exit1617 @@ -538,7 +538,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-ext/runtimes/soft_rz/python/tests/resources/from_guppy/test_batching/test_batching_behaviour/qft_8qb-sol-x86_64-apple-darwin.ll b/selene-ext/runtimes/soft_rz/python/tests/resources/from_guppy/test_batching/test_batching_behaviour/qft_8qb-sol-x86_64-apple-darwin.ll index c88aaf4d..dea2c759 100644 --- a/selene-ext/runtimes/soft_rz/python/tests/resources/from_guppy/test_batching/test_batching_behaviour/qft_8qb-sol-x86_64-apple-darwin.ll +++ b/selene-ext/runtimes/soft_rz/python/tests/resources/from_guppy/test_batching/test_batching_behaviour/qft_8qb-sol-x86_64-apple-darwin.ll @@ -295,7 +295,7 @@ panic.i1618: ; preds = %__barray_check_boun %78 = getelementptr inbounds nuw i64, ptr %4, i64 %"406_0.sroa.15.01683" %79 = load i64, ptr %78, align 4 %80 = add i64 %"406_2.01682", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %79) + %___future_measure = tail call i64 @___future_measure(i64 %79, i64 0) tail call void @___qfree(i64 %79) %81 = icmp ult i64 %"406_2.01682", 8 br i1 %81, label %__barray_check_bounds.exit1613, label %out_of_bounds.i1612 @@ -305,7 +305,7 @@ cond_exit_410: ; preds = %__barray_check_boun %83 = xor i64 %66, %82 store i64 %83, ptr %3, align 4 %84 = getelementptr inbounds nuw i64, ptr %2, i64 %"406_2.01682" - store i64 %lazy_measure, ptr %84, align 4 + store i64 %___future_measure, ptr %84, align 4 %85 = icmp samesign ugt i64 %"406_0.sroa.15.01683", 6 br i1 %85, label %mask_block_ok.i, label %__barray_check_bounds.exit1617 @@ -538,7 +538,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-ext/runtimes/soft_rz/python/tests/resources/from_guppy/test_batching/test_batching_behaviour/qft_8qb-sol-x86_64-unknown-linux-gnu.ll b/selene-ext/runtimes/soft_rz/python/tests/resources/from_guppy/test_batching/test_batching_behaviour/qft_8qb-sol-x86_64-unknown-linux-gnu.ll index 92817015..d979e7f3 100644 --- a/selene-ext/runtimes/soft_rz/python/tests/resources/from_guppy/test_batching/test_batching_behaviour/qft_8qb-sol-x86_64-unknown-linux-gnu.ll +++ b/selene-ext/runtimes/soft_rz/python/tests/resources/from_guppy/test_batching/test_batching_behaviour/qft_8qb-sol-x86_64-unknown-linux-gnu.ll @@ -295,7 +295,7 @@ panic.i1618: ; preds = %__barray_check_boun %78 = getelementptr inbounds nuw i64, ptr %4, i64 %"406_0.sroa.15.01683" %79 = load i64, ptr %78, align 4 %80 = add i64 %"406_2.01682", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %79) + %___future_measure = tail call i64 @___future_measure(i64 %79, i64 0) tail call void @___qfree(i64 %79) %81 = icmp ult i64 %"406_2.01682", 8 br i1 %81, label %__barray_check_bounds.exit1613, label %out_of_bounds.i1612 @@ -305,7 +305,7 @@ cond_exit_410: ; preds = %__barray_check_boun %83 = xor i64 %66, %82 store i64 %83, ptr %3, align 4 %84 = getelementptr inbounds nuw i64, ptr %2, i64 %"406_2.01682" - store i64 %lazy_measure, ptr %84, align 4 + store i64 %___future_measure, ptr %84, align 4 %85 = icmp samesign ugt i64 %"406_0.sroa.15.01683", 6 br i1 %85, label %mask_block_ok.i, label %__barray_check_bounds.exit1617 @@ -538,7 +538,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-ext/runtimes/soft_rz/python/tests/resources/from_guppy/test_batching/test_batching_behaviour/qft_8qb-sol-x86_64-windows-gnu.ll b/selene-ext/runtimes/soft_rz/python/tests/resources/from_guppy/test_batching/test_batching_behaviour/qft_8qb-sol-x86_64-windows-gnu.ll index 2b3f993c..517b9baa 100644 --- a/selene-ext/runtimes/soft_rz/python/tests/resources/from_guppy/test_batching/test_batching_behaviour/qft_8qb-sol-x86_64-windows-gnu.ll +++ b/selene-ext/runtimes/soft_rz/python/tests/resources/from_guppy/test_batching/test_batching_behaviour/qft_8qb-sol-x86_64-windows-gnu.ll @@ -295,7 +295,7 @@ panic.i1618: ; preds = %__barray_check_boun %78 = getelementptr inbounds nuw i64, ptr %4, i64 %"406_0.sroa.15.01683" %79 = load i64, ptr %78, align 4 %80 = add i64 %"406_2.01682", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %79) + %___future_measure = tail call i64 @___future_measure(i64 %79, i64 0) tail call void @___qfree(i64 %79) %81 = icmp ult i64 %"406_2.01682", 8 br i1 %81, label %__barray_check_bounds.exit1613, label %out_of_bounds.i1612 @@ -305,7 +305,7 @@ cond_exit_410: ; preds = %__barray_check_boun %83 = xor i64 %66, %82 store i64 %83, ptr %3, align 4 %84 = getelementptr inbounds nuw i64, ptr %2, i64 %"406_2.01682" - store i64 %lazy_measure, ptr %84, align 4 + store i64 %___future_measure, ptr %84, align 4 %85 = icmp samesign ugt i64 %"406_0.sroa.15.01683", 6 br i1 %85, label %mask_block_ok.i, label %__barray_check_bounds.exit1617 @@ -538,7 +538,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_always_panic/panic-helios-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_always_panic/panic-helios-aarch64-apple-darwin.ll index dba6880a..85201a9f 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_always_panic/panic-helios-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_always_panic/panic-helios-aarch64-apple-darwin.ll @@ -32,7 +32,7 @@ attributes #0 = { noreturn } !name = !{!3} !0 = !{i32 2, !"Debug Info Version", i32 3} -!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v1.0.2)-v1.0.2", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v1.0.1)-v1.0.1", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) !2 = !DIFile(filename: "/sanitized/path/program.py", directory: "/sanitized/path") !3 = !{!"mainlib"} !4 = distinct !DISubprogram(name: "main", linkageName: "__hugr__.__main__.main.1", scope: null, file: !5, line: 11, type: !6, scopeLine: 12, spFlags: DISPFlagDefinition, unit: !1) diff --git a/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_always_panic/panic-helios-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_always_panic/panic-helios-aarch64-unknown-linux-gnu.ll index 96850a7f..8ebe675c 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_always_panic/panic-helios-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_always_panic/panic-helios-aarch64-unknown-linux-gnu.ll @@ -32,7 +32,7 @@ attributes #0 = { noreturn } !name = !{!3} !0 = !{i32 2, !"Debug Info Version", i32 3} -!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v1.0.2)-v1.0.2", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v1.0.1)-v1.0.1", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) !2 = !DIFile(filename: "/sanitized/path/program.py", directory: "/sanitized/path") !3 = !{!"mainlib"} !4 = distinct !DISubprogram(name: "main", linkageName: "__hugr__.__main__.main.1", scope: null, file: !5, line: 11, type: !6, scopeLine: 12, spFlags: DISPFlagDefinition, unit: !1) diff --git a/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_always_panic/panic-helios-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_always_panic/panic-helios-x86_64-apple-darwin.ll index bbebbf8c..a939c56e 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_always_panic/panic-helios-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_always_panic/panic-helios-x86_64-apple-darwin.ll @@ -32,7 +32,7 @@ attributes #0 = { noreturn } !name = !{!3} !0 = !{i32 2, !"Debug Info Version", i32 3} -!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v1.0.2)-v1.0.2", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v1.0.1)-v1.0.1", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) !2 = !DIFile(filename: "/sanitized/path/program.py", directory: "/sanitized/path") !3 = !{!"mainlib"} !4 = distinct !DISubprogram(name: "main", linkageName: "__hugr__.__main__.main.1", scope: null, file: !5, line: 11, type: !6, scopeLine: 12, spFlags: DISPFlagDefinition, unit: !1) diff --git a/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_always_panic/panic-helios-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_always_panic/panic-helios-x86_64-unknown-linux-gnu.ll index 26701661..ddb07634 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_always_panic/panic-helios-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_always_panic/panic-helios-x86_64-unknown-linux-gnu.ll @@ -32,7 +32,7 @@ attributes #0 = { noreturn } !name = !{!3} !0 = !{i32 2, !"Debug Info Version", i32 3} -!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v1.0.2)-v1.0.2", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v1.0.1)-v1.0.1", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) !2 = !DIFile(filename: "/sanitized/path/program.py", directory: "/sanitized/path") !3 = !{!"mainlib"} !4 = distinct !DISubprogram(name: "main", linkageName: "__hugr__.__main__.main.1", scope: null, file: !5, line: 11, type: !6, scopeLine: 12, spFlags: DISPFlagDefinition, unit: !1) diff --git a/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_always_panic/panic-helios-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_always_panic/panic-helios-x86_64-windows-gnu.ll index 22155cfd..4b80b1ef 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_always_panic/panic-helios-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_always_panic/panic-helios-x86_64-windows-gnu.ll @@ -32,7 +32,7 @@ attributes #0 = { noreturn } !name = !{!3} !0 = !{i32 2, !"Debug Info Version", i32 3} -!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v1.0.2)-v1.0.2", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v1.0.1)-v1.0.1", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) !2 = !DIFile(filename: "/sanitized/path/program.py", directory: "/sanitized/path") !3 = !{!"mainlib"} !4 = distinct !DISubprogram(name: "main", linkageName: "__hugr__.__main__.main.1", scope: null, file: !5, line: 11, type: !6, scopeLine: 12, spFlags: DISPFlagDefinition, unit: !1) diff --git a/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_always_panic/panic-sol-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_always_panic/panic-sol-aarch64-apple-darwin.ll index dba6880a..85201a9f 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_always_panic/panic-sol-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_always_panic/panic-sol-aarch64-apple-darwin.ll @@ -32,7 +32,7 @@ attributes #0 = { noreturn } !name = !{!3} !0 = !{i32 2, !"Debug Info Version", i32 3} -!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v1.0.2)-v1.0.2", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v1.0.1)-v1.0.1", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) !2 = !DIFile(filename: "/sanitized/path/program.py", directory: "/sanitized/path") !3 = !{!"mainlib"} !4 = distinct !DISubprogram(name: "main", linkageName: "__hugr__.__main__.main.1", scope: null, file: !5, line: 11, type: !6, scopeLine: 12, spFlags: DISPFlagDefinition, unit: !1) diff --git a/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_always_panic/panic-sol-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_always_panic/panic-sol-aarch64-unknown-linux-gnu.ll index 96850a7f..8ebe675c 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_always_panic/panic-sol-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_always_panic/panic-sol-aarch64-unknown-linux-gnu.ll @@ -32,7 +32,7 @@ attributes #0 = { noreturn } !name = !{!3} !0 = !{i32 2, !"Debug Info Version", i32 3} -!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v1.0.2)-v1.0.2", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v1.0.1)-v1.0.1", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) !2 = !DIFile(filename: "/sanitized/path/program.py", directory: "/sanitized/path") !3 = !{!"mainlib"} !4 = distinct !DISubprogram(name: "main", linkageName: "__hugr__.__main__.main.1", scope: null, file: !5, line: 11, type: !6, scopeLine: 12, spFlags: DISPFlagDefinition, unit: !1) diff --git a/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_always_panic/panic-sol-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_always_panic/panic-sol-x86_64-apple-darwin.ll index bbebbf8c..a939c56e 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_always_panic/panic-sol-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_always_panic/panic-sol-x86_64-apple-darwin.ll @@ -32,7 +32,7 @@ attributes #0 = { noreturn } !name = !{!3} !0 = !{i32 2, !"Debug Info Version", i32 3} -!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v1.0.2)-v1.0.2", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v1.0.1)-v1.0.1", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) !2 = !DIFile(filename: "/sanitized/path/program.py", directory: "/sanitized/path") !3 = !{!"mainlib"} !4 = distinct !DISubprogram(name: "main", linkageName: "__hugr__.__main__.main.1", scope: null, file: !5, line: 11, type: !6, scopeLine: 12, spFlags: DISPFlagDefinition, unit: !1) diff --git a/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_always_panic/panic-sol-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_always_panic/panic-sol-x86_64-unknown-linux-gnu.ll index 26701661..ddb07634 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_always_panic/panic-sol-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_always_panic/panic-sol-x86_64-unknown-linux-gnu.ll @@ -32,7 +32,7 @@ attributes #0 = { noreturn } !name = !{!3} !0 = !{i32 2, !"Debug Info Version", i32 3} -!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v1.0.2)-v1.0.2", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v1.0.1)-v1.0.1", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) !2 = !DIFile(filename: "/sanitized/path/program.py", directory: "/sanitized/path") !3 = !{!"mainlib"} !4 = distinct !DISubprogram(name: "main", linkageName: "__hugr__.__main__.main.1", scope: null, file: !5, line: 11, type: !6, scopeLine: 12, spFlags: DISPFlagDefinition, unit: !1) diff --git a/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_always_panic/panic-sol-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_always_panic/panic-sol-x86_64-windows-gnu.ll index 22155cfd..4b80b1ef 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_always_panic/panic-sol-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_always_panic/panic-sol-x86_64-windows-gnu.ll @@ -32,7 +32,7 @@ attributes #0 = { noreturn } !name = !{!3} !0 = !{i32 2, !"Debug Info Version", i32 3} -!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v1.0.2)-v1.0.2", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v1.0.1)-v1.0.1", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) !2 = !DIFile(filename: "/sanitized/path/program.py", directory: "/sanitized/path") !3 = !{!"mainlib"} !4 = distinct !DISubprogram(name: "main", linkageName: "__hugr__.__main__.main.1", scope: null, file: !5, line: 11, type: !6, scopeLine: 12, spFlags: DISPFlagDefinition, unit: !1) diff --git a/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_qalloc/panic-helios-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_qalloc/panic-helios-aarch64-apple-darwin.ll index e1bfee8c..623291e4 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_qalloc/panic-helios-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_qalloc/panic-helios-aarch64-apple-darwin.ll @@ -21,10 +21,10 @@ __hugr__.__tk2_helios_qalloc.55.exit: ; preds = %alloca_block tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) %0 = tail call fastcc i64 @__hugr__.__main__.recursive_cx.12(i64 %qalloc.i, i64 1000), !dbg !9 - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i), !dbg !10 + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i), !dbg !10 tail call void @___qfree(i64 %qalloc.i), !dbg !10 - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure), !dbg !10 - tail call void @___dec_future_refcount(i64 %lazy_measure), !dbg !10 + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure), !dbg !10 + tail call void @___dec_future_refcount(i64 %___lazy_measure), !dbg !10 tail call void @print_bool(ptr nonnull @res_q.B83B1738.0, i64 11, i1 %read_bool), !dbg !11 ret void } @@ -50,10 +50,10 @@ __hugr__.__tk2_helios_qalloc.55.exit: ; preds = %alloca_block br i1 %2, label %4, label %3 3: ; preds = %__hugr__.__tk2_helios_qalloc.55.exit, %4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i), !dbg !18 + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i), !dbg !18 tail call void @___qfree(i64 %qalloc.i), !dbg !18 - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure), !dbg !18 - tail call void @___dec_future_refcount(i64 %lazy_measure), !dbg !18 + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure), !dbg !18 + tail call void @___dec_future_refcount(i64 %___lazy_measure), !dbg !18 tail call void @print_bool(ptr nonnull @res_q.B83B1738.0, i64 11, i1 %read_bool), !dbg !19 ret i64 %0 @@ -105,7 +105,7 @@ attributes #0 = { noreturn } !name = !{!3} !0 = !{i32 2, !"Debug Info Version", i32 3} -!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v1.0.2)-v1.0.2", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v1.0.1)-v1.0.1", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) !2 = !DIFile(filename: "/sanitized/path/program.py", directory: "/sanitized/path") !3 = !{!"mainlib"} !4 = distinct !DISubprogram(name: "main", linkageName: "__hugr__.__main__.main.1", scope: null, file: !5, line: 20, type: !6, scopeLine: 21, spFlags: DISPFlagDefinition, unit: !1) diff --git a/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_qalloc/panic-helios-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_qalloc/panic-helios-aarch64-unknown-linux-gnu.ll index 94a034cc..ef856342 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_qalloc/panic-helios-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_qalloc/panic-helios-aarch64-unknown-linux-gnu.ll @@ -21,10 +21,10 @@ __hugr__.__tk2_helios_qalloc.55.exit: ; preds = %alloca_block tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) %0 = tail call fastcc i64 @__hugr__.__main__.recursive_cx.12(i64 %qalloc.i, i64 1000), !dbg !9 - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i), !dbg !10 + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i), !dbg !10 tail call void @___qfree(i64 %qalloc.i), !dbg !10 - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure), !dbg !10 - tail call void @___dec_future_refcount(i64 %lazy_measure), !dbg !10 + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure), !dbg !10 + tail call void @___dec_future_refcount(i64 %___lazy_measure), !dbg !10 tail call void @print_bool(ptr nonnull @res_q.B83B1738.0, i64 11, i1 %read_bool), !dbg !11 ret void } @@ -50,10 +50,10 @@ __hugr__.__tk2_helios_qalloc.55.exit: ; preds = %alloca_block br i1 %2, label %4, label %3 3: ; preds = %__hugr__.__tk2_helios_qalloc.55.exit, %4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i), !dbg !18 + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i), !dbg !18 tail call void @___qfree(i64 %qalloc.i), !dbg !18 - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure), !dbg !18 - tail call void @___dec_future_refcount(i64 %lazy_measure), !dbg !18 + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure), !dbg !18 + tail call void @___dec_future_refcount(i64 %___lazy_measure), !dbg !18 tail call void @print_bool(ptr nonnull @res_q.B83B1738.0, i64 11, i1 %read_bool), !dbg !19 ret i64 %0 @@ -105,7 +105,7 @@ attributes #0 = { noreturn } !name = !{!3} !0 = !{i32 2, !"Debug Info Version", i32 3} -!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v1.0.2)-v1.0.2", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v1.0.1)-v1.0.1", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) !2 = !DIFile(filename: "/sanitized/path/program.py", directory: "/sanitized/path") !3 = !{!"mainlib"} !4 = distinct !DISubprogram(name: "main", linkageName: "__hugr__.__main__.main.1", scope: null, file: !5, line: 20, type: !6, scopeLine: 21, spFlags: DISPFlagDefinition, unit: !1) diff --git a/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_qalloc/panic-helios-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_qalloc/panic-helios-x86_64-apple-darwin.ll index a9341315..4a6cc426 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_qalloc/panic-helios-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_qalloc/panic-helios-x86_64-apple-darwin.ll @@ -21,10 +21,10 @@ __hugr__.__tk2_helios_qalloc.55.exit: ; preds = %alloca_block tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) %0 = tail call fastcc i64 @__hugr__.__main__.recursive_cx.12(i64 %qalloc.i, i64 1000), !dbg !9 - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i), !dbg !10 + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i), !dbg !10 tail call void @___qfree(i64 %qalloc.i), !dbg !10 - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure), !dbg !10 - tail call void @___dec_future_refcount(i64 %lazy_measure), !dbg !10 + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure), !dbg !10 + tail call void @___dec_future_refcount(i64 %___lazy_measure), !dbg !10 tail call void @print_bool(ptr nonnull @res_q.B83B1738.0, i64 11, i1 %read_bool), !dbg !11 ret void } @@ -50,10 +50,10 @@ __hugr__.__tk2_helios_qalloc.55.exit: ; preds = %alloca_block br i1 %2, label %4, label %3 3: ; preds = %__hugr__.__tk2_helios_qalloc.55.exit, %4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i), !dbg !18 + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i), !dbg !18 tail call void @___qfree(i64 %qalloc.i), !dbg !18 - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure), !dbg !18 - tail call void @___dec_future_refcount(i64 %lazy_measure), !dbg !18 + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure), !dbg !18 + tail call void @___dec_future_refcount(i64 %___lazy_measure), !dbg !18 tail call void @print_bool(ptr nonnull @res_q.B83B1738.0, i64 11, i1 %read_bool), !dbg !19 ret i64 %0 @@ -105,7 +105,7 @@ attributes #0 = { noreturn } !name = !{!3} !0 = !{i32 2, !"Debug Info Version", i32 3} -!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v1.0.2)-v1.0.2", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v1.0.1)-v1.0.1", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) !2 = !DIFile(filename: "/sanitized/path/program.py", directory: "/sanitized/path") !3 = !{!"mainlib"} !4 = distinct !DISubprogram(name: "main", linkageName: "__hugr__.__main__.main.1", scope: null, file: !5, line: 20, type: !6, scopeLine: 21, spFlags: DISPFlagDefinition, unit: !1) diff --git a/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_qalloc/panic-helios-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_qalloc/panic-helios-x86_64-unknown-linux-gnu.ll index a6ab3d12..cdabae30 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_qalloc/panic-helios-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_qalloc/panic-helios-x86_64-unknown-linux-gnu.ll @@ -21,10 +21,10 @@ __hugr__.__tk2_helios_qalloc.55.exit: ; preds = %alloca_block tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) %0 = tail call fastcc i64 @__hugr__.__main__.recursive_cx.12(i64 %qalloc.i, i64 1000), !dbg !9 - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i), !dbg !10 + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i), !dbg !10 tail call void @___qfree(i64 %qalloc.i), !dbg !10 - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure), !dbg !10 - tail call void @___dec_future_refcount(i64 %lazy_measure), !dbg !10 + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure), !dbg !10 + tail call void @___dec_future_refcount(i64 %___lazy_measure), !dbg !10 tail call void @print_bool(ptr nonnull @res_q.B83B1738.0, i64 11, i1 %read_bool), !dbg !11 ret void } @@ -50,10 +50,10 @@ __hugr__.__tk2_helios_qalloc.55.exit: ; preds = %alloca_block br i1 %2, label %4, label %3 3: ; preds = %__hugr__.__tk2_helios_qalloc.55.exit, %4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i), !dbg !18 + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i), !dbg !18 tail call void @___qfree(i64 %qalloc.i), !dbg !18 - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure), !dbg !18 - tail call void @___dec_future_refcount(i64 %lazy_measure), !dbg !18 + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure), !dbg !18 + tail call void @___dec_future_refcount(i64 %___lazy_measure), !dbg !18 tail call void @print_bool(ptr nonnull @res_q.B83B1738.0, i64 11, i1 %read_bool), !dbg !19 ret i64 %0 @@ -105,7 +105,7 @@ attributes #0 = { noreturn } !name = !{!3} !0 = !{i32 2, !"Debug Info Version", i32 3} -!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v1.0.2)-v1.0.2", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v1.0.1)-v1.0.1", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) !2 = !DIFile(filename: "/sanitized/path/program.py", directory: "/sanitized/path") !3 = !{!"mainlib"} !4 = distinct !DISubprogram(name: "main", linkageName: "__hugr__.__main__.main.1", scope: null, file: !5, line: 20, type: !6, scopeLine: 21, spFlags: DISPFlagDefinition, unit: !1) diff --git a/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_qalloc/panic-helios-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_qalloc/panic-helios-x86_64-windows-gnu.ll index 69335f29..a1579a53 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_qalloc/panic-helios-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_qalloc/panic-helios-x86_64-windows-gnu.ll @@ -21,10 +21,10 @@ __hugr__.__tk2_helios_qalloc.55.exit: ; preds = %alloca_block tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) %0 = tail call fastcc i64 @__hugr__.__main__.recursive_cx.12(i64 %qalloc.i, i64 1000), !dbg !9 - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i), !dbg !10 + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i), !dbg !10 tail call void @___qfree(i64 %qalloc.i), !dbg !10 - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure), !dbg !10 - tail call void @___dec_future_refcount(i64 %lazy_measure), !dbg !10 + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure), !dbg !10 + tail call void @___dec_future_refcount(i64 %___lazy_measure), !dbg !10 tail call void @print_bool(ptr nonnull @res_q.B83B1738.0, i64 11, i1 %read_bool), !dbg !11 ret void } @@ -50,10 +50,10 @@ __hugr__.__tk2_helios_qalloc.55.exit: ; preds = %alloca_block br i1 %2, label %4, label %3 3: ; preds = %__hugr__.__tk2_helios_qalloc.55.exit, %4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i), !dbg !18 + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i), !dbg !18 tail call void @___qfree(i64 %qalloc.i), !dbg !18 - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure), !dbg !18 - tail call void @___dec_future_refcount(i64 %lazy_measure), !dbg !18 + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure), !dbg !18 + tail call void @___dec_future_refcount(i64 %___lazy_measure), !dbg !18 tail call void @print_bool(ptr nonnull @res_q.B83B1738.0, i64 11, i1 %read_bool), !dbg !19 ret i64 %0 @@ -105,7 +105,7 @@ attributes #0 = { noreturn } !name = !{!3} !0 = !{i32 2, !"Debug Info Version", i32 3} -!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v1.0.2)-v1.0.2", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v1.0.1)-v1.0.1", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) !2 = !DIFile(filename: "/sanitized/path/program.py", directory: "/sanitized/path") !3 = !{!"mainlib"} !4 = distinct !DISubprogram(name: "main", linkageName: "__hugr__.__main__.main.1", scope: null, file: !5, line: 20, type: !6, scopeLine: 21, spFlags: DISPFlagDefinition, unit: !1) diff --git a/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_qalloc/panic-sol-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_qalloc/panic-sol-aarch64-apple-darwin.ll index 0a66543e..6becbb32 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_qalloc/panic-sol-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_qalloc/panic-sol-aarch64-apple-darwin.ll @@ -21,10 +21,10 @@ __hugr__.__tk2_sol_qalloc.55.exit: ; preds = %alloca_block tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) %0 = tail call fastcc i64 @__hugr__.__main__.recursive_cx.12(i64 %qalloc.i, i64 1000), !dbg !9 - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i), !dbg !10 + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0), !dbg !10 tail call void @___qfree(i64 %qalloc.i), !dbg !10 - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure), !dbg !10 - tail call void @___dec_future_refcount(i64 %lazy_measure), !dbg !10 + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure), !dbg !10 + tail call void @___dec_future_refcount(i64 %___future_measure), !dbg !10 tail call void @print_bool(ptr nonnull @res_q.B83B1738.0, i64 11, i1 %read_bool), !dbg !11 ret void } @@ -50,10 +50,10 @@ __hugr__.__tk2_sol_qalloc.55.exit: ; preds = %alloca_block br i1 %2, label %4, label %3 3: ; preds = %__hugr__.__tk2_sol_qalloc.55.exit, %4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i), !dbg !18 + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0), !dbg !18 tail call void @___qfree(i64 %qalloc.i), !dbg !18 - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure), !dbg !18 - tail call void @___dec_future_refcount(i64 %lazy_measure), !dbg !18 + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure), !dbg !18 + tail call void @___dec_future_refcount(i64 %___future_measure), !dbg !18 tail call void @print_bool(ptr nonnull @res_q.B83B1738.0, i64 11, i1 %read_bool), !dbg !19 ret i64 %0 @@ -63,7 +63,7 @@ __hugr__.__tk2_sol_qalloc.55.exit: ; preds = %alloca_block br label %3 } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -105,7 +105,7 @@ attributes #0 = { noreturn } !name = !{!3} !0 = !{i32 2, !"Debug Info Version", i32 3} -!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v1.0.2)-v1.0.2", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v1.0.1)-v1.0.1", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) !2 = !DIFile(filename: "/sanitized/path/program.py", directory: "/sanitized/path") !3 = !{!"mainlib"} !4 = distinct !DISubprogram(name: "main", linkageName: "__hugr__.__main__.main.1", scope: null, file: !5, line: 20, type: !6, scopeLine: 21, spFlags: DISPFlagDefinition, unit: !1) diff --git a/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_qalloc/panic-sol-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_qalloc/panic-sol-aarch64-unknown-linux-gnu.ll index 55cf99de..2ff24895 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_qalloc/panic-sol-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_qalloc/panic-sol-aarch64-unknown-linux-gnu.ll @@ -21,10 +21,10 @@ __hugr__.__tk2_sol_qalloc.55.exit: ; preds = %alloca_block tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) %0 = tail call fastcc i64 @__hugr__.__main__.recursive_cx.12(i64 %qalloc.i, i64 1000), !dbg !9 - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i), !dbg !10 + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0), !dbg !10 tail call void @___qfree(i64 %qalloc.i), !dbg !10 - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure), !dbg !10 - tail call void @___dec_future_refcount(i64 %lazy_measure), !dbg !10 + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure), !dbg !10 + tail call void @___dec_future_refcount(i64 %___future_measure), !dbg !10 tail call void @print_bool(ptr nonnull @res_q.B83B1738.0, i64 11, i1 %read_bool), !dbg !11 ret void } @@ -50,10 +50,10 @@ __hugr__.__tk2_sol_qalloc.55.exit: ; preds = %alloca_block br i1 %2, label %4, label %3 3: ; preds = %__hugr__.__tk2_sol_qalloc.55.exit, %4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i), !dbg !18 + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0), !dbg !18 tail call void @___qfree(i64 %qalloc.i), !dbg !18 - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure), !dbg !18 - tail call void @___dec_future_refcount(i64 %lazy_measure), !dbg !18 + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure), !dbg !18 + tail call void @___dec_future_refcount(i64 %___future_measure), !dbg !18 tail call void @print_bool(ptr nonnull @res_q.B83B1738.0, i64 11, i1 %read_bool), !dbg !19 ret i64 %0 @@ -63,7 +63,7 @@ __hugr__.__tk2_sol_qalloc.55.exit: ; preds = %alloca_block br label %3 } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -105,7 +105,7 @@ attributes #0 = { noreturn } !name = !{!3} !0 = !{i32 2, !"Debug Info Version", i32 3} -!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v1.0.2)-v1.0.2", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v1.0.1)-v1.0.1", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) !2 = !DIFile(filename: "/sanitized/path/program.py", directory: "/sanitized/path") !3 = !{!"mainlib"} !4 = distinct !DISubprogram(name: "main", linkageName: "__hugr__.__main__.main.1", scope: null, file: !5, line: 20, type: !6, scopeLine: 21, spFlags: DISPFlagDefinition, unit: !1) diff --git a/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_qalloc/panic-sol-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_qalloc/panic-sol-x86_64-apple-darwin.ll index 5c7890de..cdc9954a 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_qalloc/panic-sol-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_qalloc/panic-sol-x86_64-apple-darwin.ll @@ -21,10 +21,10 @@ __hugr__.__tk2_sol_qalloc.55.exit: ; preds = %alloca_block tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) %0 = tail call fastcc i64 @__hugr__.__main__.recursive_cx.12(i64 %qalloc.i, i64 1000), !dbg !9 - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i), !dbg !10 + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0), !dbg !10 tail call void @___qfree(i64 %qalloc.i), !dbg !10 - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure), !dbg !10 - tail call void @___dec_future_refcount(i64 %lazy_measure), !dbg !10 + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure), !dbg !10 + tail call void @___dec_future_refcount(i64 %___future_measure), !dbg !10 tail call void @print_bool(ptr nonnull @res_q.B83B1738.0, i64 11, i1 %read_bool), !dbg !11 ret void } @@ -50,10 +50,10 @@ __hugr__.__tk2_sol_qalloc.55.exit: ; preds = %alloca_block br i1 %2, label %4, label %3 3: ; preds = %__hugr__.__tk2_sol_qalloc.55.exit, %4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i), !dbg !18 + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0), !dbg !18 tail call void @___qfree(i64 %qalloc.i), !dbg !18 - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure), !dbg !18 - tail call void @___dec_future_refcount(i64 %lazy_measure), !dbg !18 + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure), !dbg !18 + tail call void @___dec_future_refcount(i64 %___future_measure), !dbg !18 tail call void @print_bool(ptr nonnull @res_q.B83B1738.0, i64 11, i1 %read_bool), !dbg !19 ret i64 %0 @@ -63,7 +63,7 @@ __hugr__.__tk2_sol_qalloc.55.exit: ; preds = %alloca_block br label %3 } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -105,7 +105,7 @@ attributes #0 = { noreturn } !name = !{!3} !0 = !{i32 2, !"Debug Info Version", i32 3} -!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v1.0.2)-v1.0.2", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v1.0.1)-v1.0.1", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) !2 = !DIFile(filename: "/sanitized/path/program.py", directory: "/sanitized/path") !3 = !{!"mainlib"} !4 = distinct !DISubprogram(name: "main", linkageName: "__hugr__.__main__.main.1", scope: null, file: !5, line: 20, type: !6, scopeLine: 21, spFlags: DISPFlagDefinition, unit: !1) diff --git a/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_qalloc/panic-sol-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_qalloc/panic-sol-x86_64-unknown-linux-gnu.ll index ba76aa37..432b6759 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_qalloc/panic-sol-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_qalloc/panic-sol-x86_64-unknown-linux-gnu.ll @@ -21,10 +21,10 @@ __hugr__.__tk2_sol_qalloc.55.exit: ; preds = %alloca_block tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) %0 = tail call fastcc i64 @__hugr__.__main__.recursive_cx.12(i64 %qalloc.i, i64 1000), !dbg !9 - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i), !dbg !10 + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0), !dbg !10 tail call void @___qfree(i64 %qalloc.i), !dbg !10 - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure), !dbg !10 - tail call void @___dec_future_refcount(i64 %lazy_measure), !dbg !10 + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure), !dbg !10 + tail call void @___dec_future_refcount(i64 %___future_measure), !dbg !10 tail call void @print_bool(ptr nonnull @res_q.B83B1738.0, i64 11, i1 %read_bool), !dbg !11 ret void } @@ -50,10 +50,10 @@ __hugr__.__tk2_sol_qalloc.55.exit: ; preds = %alloca_block br i1 %2, label %4, label %3 3: ; preds = %__hugr__.__tk2_sol_qalloc.55.exit, %4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i), !dbg !18 + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0), !dbg !18 tail call void @___qfree(i64 %qalloc.i), !dbg !18 - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure), !dbg !18 - tail call void @___dec_future_refcount(i64 %lazy_measure), !dbg !18 + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure), !dbg !18 + tail call void @___dec_future_refcount(i64 %___future_measure), !dbg !18 tail call void @print_bool(ptr nonnull @res_q.B83B1738.0, i64 11, i1 %read_bool), !dbg !19 ret i64 %0 @@ -63,7 +63,7 @@ __hugr__.__tk2_sol_qalloc.55.exit: ; preds = %alloca_block br label %3 } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -105,7 +105,7 @@ attributes #0 = { noreturn } !name = !{!3} !0 = !{i32 2, !"Debug Info Version", i32 3} -!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v1.0.2)-v1.0.2", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v1.0.1)-v1.0.1", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) !2 = !DIFile(filename: "/sanitized/path/program.py", directory: "/sanitized/path") !3 = !{!"mainlib"} !4 = distinct !DISubprogram(name: "main", linkageName: "__hugr__.__main__.main.1", scope: null, file: !5, line: 20, type: !6, scopeLine: 21, spFlags: DISPFlagDefinition, unit: !1) diff --git a/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_qalloc/panic-sol-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_qalloc/panic-sol-x86_64-windows-gnu.ll index 6f8a3d0b..74313bb2 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_qalloc/panic-sol-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_qalloc/panic-sol-x86_64-windows-gnu.ll @@ -21,10 +21,10 @@ __hugr__.__tk2_sol_qalloc.55.exit: ; preds = %alloca_block tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) %0 = tail call fastcc i64 @__hugr__.__main__.recursive_cx.12(i64 %qalloc.i, i64 1000), !dbg !9 - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i), !dbg !10 + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0), !dbg !10 tail call void @___qfree(i64 %qalloc.i), !dbg !10 - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure), !dbg !10 - tail call void @___dec_future_refcount(i64 %lazy_measure), !dbg !10 + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure), !dbg !10 + tail call void @___dec_future_refcount(i64 %___future_measure), !dbg !10 tail call void @print_bool(ptr nonnull @res_q.B83B1738.0, i64 11, i1 %read_bool), !dbg !11 ret void } @@ -50,10 +50,10 @@ __hugr__.__tk2_sol_qalloc.55.exit: ; preds = %alloca_block br i1 %2, label %4, label %3 3: ; preds = %__hugr__.__tk2_sol_qalloc.55.exit, %4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i), !dbg !18 + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0), !dbg !18 tail call void @___qfree(i64 %qalloc.i), !dbg !18 - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure), !dbg !18 - tail call void @___dec_future_refcount(i64 %lazy_measure), !dbg !18 + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure), !dbg !18 + tail call void @___dec_future_refcount(i64 %___future_measure), !dbg !18 tail call void @print_bool(ptr nonnull @res_q.B83B1738.0, i64 11, i1 %read_bool), !dbg !19 ret i64 %0 @@ -63,7 +63,7 @@ __hugr__.__tk2_sol_qalloc.55.exit: ; preds = %alloca_block br label %3 } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -105,7 +105,7 @@ attributes #0 = { noreturn } !name = !{!3} !0 = !{i32 2, !"Debug Info Version", i32 3} -!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v1.0.2)-v1.0.2", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v1.0.1)-v1.0.1", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) !2 = !DIFile(filename: "/sanitized/path/program.py", directory: "/sanitized/path") !3 = !{!"mainlib"} !4 = distinct !DISubprogram(name: "main", linkageName: "__hugr__.__main__.main.1", scope: null, file: !5, line: 20, type: !6, scopeLine: 21, spFlags: DISPFlagDefinition, unit: !1) diff --git a/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_sometimes_panic/panic-helios-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_sometimes_panic/panic-helios-aarch64-apple-darwin.ll index d129e82d..25a8349f 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_sometimes_panic/panic-helios-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_sometimes_panic/panic-helios-aarch64-apple-darwin.ll @@ -20,10 +20,10 @@ __hugr__.__tk2_helios_qalloc.30.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i), !dbg !8 tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i), !dbg !9 + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i), !dbg !9 tail call void @___qfree(i64 %qalloc.i), !dbg !9 - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure), !dbg !9 - tail call void @___dec_future_refcount(i64 %lazy_measure), !dbg !9 + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure), !dbg !9 + tail call void @___dec_future_refcount(i64 %___lazy_measure), !dbg !9 br i1 %read_bool, label %0, label %1 0: ; preds = %__hugr__.__tk2_helios_qalloc.30.exit @@ -72,7 +72,7 @@ attributes #0 = { noreturn } !name = !{!3} !0 = !{i32 2, !"Debug Info Version", i32 3} -!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v1.0.2)-v1.0.2", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v1.0.1)-v1.0.1", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) !2 = !DIFile(filename: "/sanitized/path/program.py", directory: "/sanitized/path") !3 = !{!"mainlib"} !4 = distinct !DISubprogram(name: "main", linkageName: "__hugr__.__main__.main.1", scope: null, file: !5, line: 12, type: !6, scopeLine: 13, spFlags: DISPFlagDefinition, unit: !1) diff --git a/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_sometimes_panic/panic-helios-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_sometimes_panic/panic-helios-aarch64-unknown-linux-gnu.ll index 59ae7f73..095022ca 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_sometimes_panic/panic-helios-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_sometimes_panic/panic-helios-aarch64-unknown-linux-gnu.ll @@ -20,10 +20,10 @@ __hugr__.__tk2_helios_qalloc.30.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i), !dbg !8 tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i), !dbg !9 + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i), !dbg !9 tail call void @___qfree(i64 %qalloc.i), !dbg !9 - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure), !dbg !9 - tail call void @___dec_future_refcount(i64 %lazy_measure), !dbg !9 + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure), !dbg !9 + tail call void @___dec_future_refcount(i64 %___lazy_measure), !dbg !9 br i1 %read_bool, label %0, label %1 0: ; preds = %__hugr__.__tk2_helios_qalloc.30.exit @@ -72,7 +72,7 @@ attributes #0 = { noreturn } !name = !{!3} !0 = !{i32 2, !"Debug Info Version", i32 3} -!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v1.0.2)-v1.0.2", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v1.0.1)-v1.0.1", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) !2 = !DIFile(filename: "/sanitized/path/program.py", directory: "/sanitized/path") !3 = !{!"mainlib"} !4 = distinct !DISubprogram(name: "main", linkageName: "__hugr__.__main__.main.1", scope: null, file: !5, line: 12, type: !6, scopeLine: 13, spFlags: DISPFlagDefinition, unit: !1) diff --git a/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_sometimes_panic/panic-helios-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_sometimes_panic/panic-helios-x86_64-apple-darwin.ll index 0c3b1eed..f9c815e5 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_sometimes_panic/panic-helios-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_sometimes_panic/panic-helios-x86_64-apple-darwin.ll @@ -20,10 +20,10 @@ __hugr__.__tk2_helios_qalloc.30.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i), !dbg !8 tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i), !dbg !9 + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i), !dbg !9 tail call void @___qfree(i64 %qalloc.i), !dbg !9 - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure), !dbg !9 - tail call void @___dec_future_refcount(i64 %lazy_measure), !dbg !9 + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure), !dbg !9 + tail call void @___dec_future_refcount(i64 %___lazy_measure), !dbg !9 br i1 %read_bool, label %0, label %1 0: ; preds = %__hugr__.__tk2_helios_qalloc.30.exit @@ -72,7 +72,7 @@ attributes #0 = { noreturn } !name = !{!3} !0 = !{i32 2, !"Debug Info Version", i32 3} -!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v1.0.2)-v1.0.2", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v1.0.1)-v1.0.1", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) !2 = !DIFile(filename: "/sanitized/path/program.py", directory: "/sanitized/path") !3 = !{!"mainlib"} !4 = distinct !DISubprogram(name: "main", linkageName: "__hugr__.__main__.main.1", scope: null, file: !5, line: 12, type: !6, scopeLine: 13, spFlags: DISPFlagDefinition, unit: !1) diff --git a/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_sometimes_panic/panic-helios-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_sometimes_panic/panic-helios-x86_64-unknown-linux-gnu.ll index 15a5b369..f25e7eb7 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_sometimes_panic/panic-helios-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_sometimes_panic/panic-helios-x86_64-unknown-linux-gnu.ll @@ -20,10 +20,10 @@ __hugr__.__tk2_helios_qalloc.30.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i), !dbg !8 tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i), !dbg !9 + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i), !dbg !9 tail call void @___qfree(i64 %qalloc.i), !dbg !9 - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure), !dbg !9 - tail call void @___dec_future_refcount(i64 %lazy_measure), !dbg !9 + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure), !dbg !9 + tail call void @___dec_future_refcount(i64 %___lazy_measure), !dbg !9 br i1 %read_bool, label %0, label %1 0: ; preds = %__hugr__.__tk2_helios_qalloc.30.exit @@ -72,7 +72,7 @@ attributes #0 = { noreturn } !name = !{!3} !0 = !{i32 2, !"Debug Info Version", i32 3} -!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v1.0.2)-v1.0.2", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v1.0.1)-v1.0.1", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) !2 = !DIFile(filename: "/sanitized/path/program.py", directory: "/sanitized/path") !3 = !{!"mainlib"} !4 = distinct !DISubprogram(name: "main", linkageName: "__hugr__.__main__.main.1", scope: null, file: !5, line: 12, type: !6, scopeLine: 13, spFlags: DISPFlagDefinition, unit: !1) diff --git a/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_sometimes_panic/panic-helios-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_sometimes_panic/panic-helios-x86_64-windows-gnu.ll index 30a36aea..9fcb53f8 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_sometimes_panic/panic-helios-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_sometimes_panic/panic-helios-x86_64-windows-gnu.ll @@ -20,10 +20,10 @@ __hugr__.__tk2_helios_qalloc.30.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i), !dbg !8 tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i), !dbg !9 + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i), !dbg !9 tail call void @___qfree(i64 %qalloc.i), !dbg !9 - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure), !dbg !9 - tail call void @___dec_future_refcount(i64 %lazy_measure), !dbg !9 + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure), !dbg !9 + tail call void @___dec_future_refcount(i64 %___lazy_measure), !dbg !9 br i1 %read_bool, label %0, label %1 0: ; preds = %__hugr__.__tk2_helios_qalloc.30.exit @@ -72,7 +72,7 @@ attributes #0 = { noreturn } !name = !{!3} !0 = !{i32 2, !"Debug Info Version", i32 3} -!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v1.0.2)-v1.0.2", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v1.0.1)-v1.0.1", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) !2 = !DIFile(filename: "/sanitized/path/program.py", directory: "/sanitized/path") !3 = !{!"mainlib"} !4 = distinct !DISubprogram(name: "main", linkageName: "__hugr__.__main__.main.1", scope: null, file: !5, line: 12, type: !6, scopeLine: 13, spFlags: DISPFlagDefinition, unit: !1) diff --git a/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_sometimes_panic/panic-sol-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_sometimes_panic/panic-sol-aarch64-apple-darwin.ll index 0b22678c..9b457e8e 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_sometimes_panic/panic-sol-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_sometimes_panic/panic-sol-aarch64-apple-darwin.ll @@ -20,10 +20,10 @@ __hugr__.__tk2_sol_qalloc.30.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i), !dbg !8 tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i), !dbg !9 + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0), !dbg !9 tail call void @___qfree(i64 %qalloc.i), !dbg !9 - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure), !dbg !9 - tail call void @___dec_future_refcount(i64 %lazy_measure), !dbg !9 + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure), !dbg !9 + tail call void @___dec_future_refcount(i64 %___future_measure), !dbg !9 br i1 %read_bool, label %0, label %1 0: ; preds = %__hugr__.__tk2_sol_qalloc.30.exit @@ -34,7 +34,7 @@ __hugr__.__tk2_sol_qalloc.30.exit: ; preds = %alloca_block ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -72,7 +72,7 @@ attributes #0 = { noreturn } !name = !{!3} !0 = !{i32 2, !"Debug Info Version", i32 3} -!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v1.0.2)-v1.0.2", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v1.0.1)-v1.0.1", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) !2 = !DIFile(filename: "/sanitized/path/program.py", directory: "/sanitized/path") !3 = !{!"mainlib"} !4 = distinct !DISubprogram(name: "main", linkageName: "__hugr__.__main__.main.1", scope: null, file: !5, line: 12, type: !6, scopeLine: 13, spFlags: DISPFlagDefinition, unit: !1) diff --git a/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_sometimes_panic/panic-sol-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_sometimes_panic/panic-sol-aarch64-unknown-linux-gnu.ll index 19e05abd..310952fa 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_sometimes_panic/panic-sol-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_sometimes_panic/panic-sol-aarch64-unknown-linux-gnu.ll @@ -20,10 +20,10 @@ __hugr__.__tk2_sol_qalloc.30.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i), !dbg !8 tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i), !dbg !9 + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0), !dbg !9 tail call void @___qfree(i64 %qalloc.i), !dbg !9 - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure), !dbg !9 - tail call void @___dec_future_refcount(i64 %lazy_measure), !dbg !9 + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure), !dbg !9 + tail call void @___dec_future_refcount(i64 %___future_measure), !dbg !9 br i1 %read_bool, label %0, label %1 0: ; preds = %__hugr__.__tk2_sol_qalloc.30.exit @@ -34,7 +34,7 @@ __hugr__.__tk2_sol_qalloc.30.exit: ; preds = %alloca_block ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -72,7 +72,7 @@ attributes #0 = { noreturn } !name = !{!3} !0 = !{i32 2, !"Debug Info Version", i32 3} -!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v1.0.2)-v1.0.2", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v1.0.1)-v1.0.1", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) !2 = !DIFile(filename: "/sanitized/path/program.py", directory: "/sanitized/path") !3 = !{!"mainlib"} !4 = distinct !DISubprogram(name: "main", linkageName: "__hugr__.__main__.main.1", scope: null, file: !5, line: 12, type: !6, scopeLine: 13, spFlags: DISPFlagDefinition, unit: !1) diff --git a/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_sometimes_panic/panic-sol-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_sometimes_panic/panic-sol-x86_64-apple-darwin.ll index 8991f1f3..6ce965fc 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_sometimes_panic/panic-sol-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_sometimes_panic/panic-sol-x86_64-apple-darwin.ll @@ -20,10 +20,10 @@ __hugr__.__tk2_sol_qalloc.30.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i), !dbg !8 tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i), !dbg !9 + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0), !dbg !9 tail call void @___qfree(i64 %qalloc.i), !dbg !9 - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure), !dbg !9 - tail call void @___dec_future_refcount(i64 %lazy_measure), !dbg !9 + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure), !dbg !9 + tail call void @___dec_future_refcount(i64 %___future_measure), !dbg !9 br i1 %read_bool, label %0, label %1 0: ; preds = %__hugr__.__tk2_sol_qalloc.30.exit @@ -34,7 +34,7 @@ __hugr__.__tk2_sol_qalloc.30.exit: ; preds = %alloca_block ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -72,7 +72,7 @@ attributes #0 = { noreturn } !name = !{!3} !0 = !{i32 2, !"Debug Info Version", i32 3} -!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v1.0.2)-v1.0.2", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v1.0.1)-v1.0.1", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) !2 = !DIFile(filename: "/sanitized/path/program.py", directory: "/sanitized/path") !3 = !{!"mainlib"} !4 = distinct !DISubprogram(name: "main", linkageName: "__hugr__.__main__.main.1", scope: null, file: !5, line: 12, type: !6, scopeLine: 13, spFlags: DISPFlagDefinition, unit: !1) diff --git a/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_sometimes_panic/panic-sol-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_sometimes_panic/panic-sol-x86_64-unknown-linux-gnu.ll index 5e39f68f..efacc5d3 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_sometimes_panic/panic-sol-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_sometimes_panic/panic-sol-x86_64-unknown-linux-gnu.ll @@ -20,10 +20,10 @@ __hugr__.__tk2_sol_qalloc.30.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i), !dbg !8 tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i), !dbg !9 + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0), !dbg !9 tail call void @___qfree(i64 %qalloc.i), !dbg !9 - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure), !dbg !9 - tail call void @___dec_future_refcount(i64 %lazy_measure), !dbg !9 + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure), !dbg !9 + tail call void @___dec_future_refcount(i64 %___future_measure), !dbg !9 br i1 %read_bool, label %0, label %1 0: ; preds = %__hugr__.__tk2_sol_qalloc.30.exit @@ -34,7 +34,7 @@ __hugr__.__tk2_sol_qalloc.30.exit: ; preds = %alloca_block ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -72,7 +72,7 @@ attributes #0 = { noreturn } !name = !{!3} !0 = !{i32 2, !"Debug Info Version", i32 3} -!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v1.0.2)-v1.0.2", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v1.0.1)-v1.0.1", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) !2 = !DIFile(filename: "/sanitized/path/program.py", directory: "/sanitized/path") !3 = !{!"mainlib"} !4 = distinct !DISubprogram(name: "main", linkageName: "__hugr__.__main__.main.1", scope: null, file: !5, line: 12, type: !6, scopeLine: 13, spFlags: DISPFlagDefinition, unit: !1) diff --git a/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_sometimes_panic/panic-sol-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_sometimes_panic/panic-sol-x86_64-windows-gnu.ll index e5e7f97f..dde56531 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_sometimes_panic/panic-sol-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_backtrace/test_backtrace_sometimes_panic/panic-sol-x86_64-windows-gnu.ll @@ -20,10 +20,10 @@ __hugr__.__tk2_sol_qalloc.30.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i), !dbg !8 tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i), !dbg !9 + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0), !dbg !9 tail call void @___qfree(i64 %qalloc.i), !dbg !9 - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure), !dbg !9 - tail call void @___dec_future_refcount(i64 %lazy_measure), !dbg !9 + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure), !dbg !9 + tail call void @___dec_future_refcount(i64 %___future_measure), !dbg !9 br i1 %read_bool, label %0, label %1 0: ; preds = %__hugr__.__tk2_sol_qalloc.30.exit @@ -34,7 +34,7 @@ __hugr__.__tk2_sol_qalloc.30.exit: ; preds = %alloca_block ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -72,7 +72,7 @@ attributes #0 = { noreturn } !name = !{!3} !0 = !{i32 2, !"Debug Info Version", i32 3} -!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v1.0.2)-v1.0.2", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v1.0.1)-v1.0.1", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) !2 = !DIFile(filename: "/sanitized/path/program.py", directory: "/sanitized/path") !3 = !{!"mainlib"} !4 = distinct !DISubprogram(name: "main", linkageName: "__hugr__.__main__.main.1", scope: null, file: !5, line: 12, type: !6, scopeLine: 13, spFlags: DISPFlagDefinition, unit: !1) diff --git a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_1q_error/depolarising_1q_error-helios-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_1q_error/depolarising_1q_error-helios-aarch64-apple-darwin.ll index d161afb1..f1ac86f7 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_1q_error/depolarising_1q_error-helios-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_1q_error/depolarising_1q_error-helios-aarch64-apple-darwin.ll @@ -30,15 +30,15 @@ cond_17_case_0.i16: ; preds = %__hugr__.__tk2_heli __hugr__.__tk2_helios_qalloc.13.exit17: ; preds = %__hugr__.__tk2_helios_qalloc.13.exit tail call void @___reset(i64 %qalloc.i14) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool) - %lazy_measure7 = tail call i64 @___lazy_measure(i64 %qalloc.i14) + %___lazy_measure7 = tail call i64 @___lazy_measure(i64 %qalloc.i14) tail call void @___qfree(i64 %qalloc.i14) - %read_bool9 = tail call i1 @___read_future_bool(i64 %lazy_measure7) - tail call void @___dec_future_refcount(i64 %lazy_measure7) + %read_bool9 = tail call i1 @___read_future_bool(i64 %___lazy_measure7) + tail call void @___dec_future_refcount(i64 %___lazy_measure7) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool9) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_1q_error/depolarising_1q_error-helios-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_1q_error/depolarising_1q_error-helios-aarch64-unknown-linux-gnu.ll index e1f47c54..8b947d09 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_1q_error/depolarising_1q_error-helios-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_1q_error/depolarising_1q_error-helios-aarch64-unknown-linux-gnu.ll @@ -30,15 +30,15 @@ cond_17_case_0.i16: ; preds = %__hugr__.__tk2_heli __hugr__.__tk2_helios_qalloc.13.exit17: ; preds = %__hugr__.__tk2_helios_qalloc.13.exit tail call void @___reset(i64 %qalloc.i14) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool) - %lazy_measure7 = tail call i64 @___lazy_measure(i64 %qalloc.i14) + %___lazy_measure7 = tail call i64 @___lazy_measure(i64 %qalloc.i14) tail call void @___qfree(i64 %qalloc.i14) - %read_bool9 = tail call i1 @___read_future_bool(i64 %lazy_measure7) - tail call void @___dec_future_refcount(i64 %lazy_measure7) + %read_bool9 = tail call i1 @___read_future_bool(i64 %___lazy_measure7) + tail call void @___dec_future_refcount(i64 %___lazy_measure7) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool9) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_1q_error/depolarising_1q_error-helios-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_1q_error/depolarising_1q_error-helios-x86_64-apple-darwin.ll index 3682f073..6aca95e5 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_1q_error/depolarising_1q_error-helios-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_1q_error/depolarising_1q_error-helios-x86_64-apple-darwin.ll @@ -30,15 +30,15 @@ cond_17_case_0.i16: ; preds = %__hugr__.__tk2_heli __hugr__.__tk2_helios_qalloc.13.exit17: ; preds = %__hugr__.__tk2_helios_qalloc.13.exit tail call void @___reset(i64 %qalloc.i14) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool) - %lazy_measure7 = tail call i64 @___lazy_measure(i64 %qalloc.i14) + %___lazy_measure7 = tail call i64 @___lazy_measure(i64 %qalloc.i14) tail call void @___qfree(i64 %qalloc.i14) - %read_bool9 = tail call i1 @___read_future_bool(i64 %lazy_measure7) - tail call void @___dec_future_refcount(i64 %lazy_measure7) + %read_bool9 = tail call i1 @___read_future_bool(i64 %___lazy_measure7) + tail call void @___dec_future_refcount(i64 %___lazy_measure7) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool9) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_1q_error/depolarising_1q_error-helios-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_1q_error/depolarising_1q_error-helios-x86_64-unknown-linux-gnu.ll index 2d9e1230..65e04152 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_1q_error/depolarising_1q_error-helios-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_1q_error/depolarising_1q_error-helios-x86_64-unknown-linux-gnu.ll @@ -30,15 +30,15 @@ cond_17_case_0.i16: ; preds = %__hugr__.__tk2_heli __hugr__.__tk2_helios_qalloc.13.exit17: ; preds = %__hugr__.__tk2_helios_qalloc.13.exit tail call void @___reset(i64 %qalloc.i14) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool) - %lazy_measure7 = tail call i64 @___lazy_measure(i64 %qalloc.i14) + %___lazy_measure7 = tail call i64 @___lazy_measure(i64 %qalloc.i14) tail call void @___qfree(i64 %qalloc.i14) - %read_bool9 = tail call i1 @___read_future_bool(i64 %lazy_measure7) - tail call void @___dec_future_refcount(i64 %lazy_measure7) + %read_bool9 = tail call i1 @___read_future_bool(i64 %___lazy_measure7) + tail call void @___dec_future_refcount(i64 %___lazy_measure7) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool9) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_1q_error/depolarising_1q_error-helios-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_1q_error/depolarising_1q_error-helios-x86_64-windows-gnu.ll index c25dd231..46dc3187 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_1q_error/depolarising_1q_error-helios-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_1q_error/depolarising_1q_error-helios-x86_64-windows-gnu.ll @@ -30,15 +30,15 @@ cond_17_case_0.i16: ; preds = %__hugr__.__tk2_heli __hugr__.__tk2_helios_qalloc.13.exit17: ; preds = %__hugr__.__tk2_helios_qalloc.13.exit tail call void @___reset(i64 %qalloc.i14) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool) - %lazy_measure7 = tail call i64 @___lazy_measure(i64 %qalloc.i14) + %___lazy_measure7 = tail call i64 @___lazy_measure(i64 %qalloc.i14) tail call void @___qfree(i64 %qalloc.i14) - %read_bool9 = tail call i1 @___read_future_bool(i64 %lazy_measure7) - tail call void @___dec_future_refcount(i64 %lazy_measure7) + %read_bool9 = tail call i1 @___read_future_bool(i64 %___lazy_measure7) + tail call void @___dec_future_refcount(i64 %___lazy_measure7) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool9) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_1q_error/depolarising_1q_error-sol-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_1q_error/depolarising_1q_error-sol-aarch64-apple-darwin.ll index 75d57d8a..8e47db21 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_1q_error/depolarising_1q_error-sol-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_1q_error/depolarising_1q_error-sol-aarch64-apple-darwin.ll @@ -30,20 +30,20 @@ cond_17_case_0.i16: ; preds = %__hugr__.__tk2_sol_ __hugr__.__tk2_sol_qalloc.13.exit17: ; preds = %__hugr__.__tk2_sol_qalloc.13.exit tail call void @___reset(i64 %qalloc.i14) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool) - %lazy_measure7 = tail call i64 @___lazy_measure(i64 %qalloc.i14) + %___future_measure7 = tail call i64 @___future_measure(i64 %qalloc.i14, i64 0) tail call void @___qfree(i64 %qalloc.i14) - %read_bool9 = tail call i1 @___read_future_bool(i64 %lazy_measure7) - tail call void @___dec_future_refcount(i64 %lazy_measure7) + %read_bool9 = tail call i1 @___read_future_bool(i64 %___future_measure7) + tail call void @___dec_future_refcount(i64 %___future_measure7) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool9) ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_1q_error/depolarising_1q_error-sol-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_1q_error/depolarising_1q_error-sol-aarch64-unknown-linux-gnu.ll index 25b601f4..001bfdcc 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_1q_error/depolarising_1q_error-sol-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_1q_error/depolarising_1q_error-sol-aarch64-unknown-linux-gnu.ll @@ -30,20 +30,20 @@ cond_17_case_0.i16: ; preds = %__hugr__.__tk2_sol_ __hugr__.__tk2_sol_qalloc.13.exit17: ; preds = %__hugr__.__tk2_sol_qalloc.13.exit tail call void @___reset(i64 %qalloc.i14) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool) - %lazy_measure7 = tail call i64 @___lazy_measure(i64 %qalloc.i14) + %___future_measure7 = tail call i64 @___future_measure(i64 %qalloc.i14, i64 0) tail call void @___qfree(i64 %qalloc.i14) - %read_bool9 = tail call i1 @___read_future_bool(i64 %lazy_measure7) - tail call void @___dec_future_refcount(i64 %lazy_measure7) + %read_bool9 = tail call i1 @___read_future_bool(i64 %___future_measure7) + tail call void @___dec_future_refcount(i64 %___future_measure7) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool9) ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_1q_error/depolarising_1q_error-sol-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_1q_error/depolarising_1q_error-sol-x86_64-apple-darwin.ll index 12222304..43bc5e85 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_1q_error/depolarising_1q_error-sol-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_1q_error/depolarising_1q_error-sol-x86_64-apple-darwin.ll @@ -30,20 +30,20 @@ cond_17_case_0.i16: ; preds = %__hugr__.__tk2_sol_ __hugr__.__tk2_sol_qalloc.13.exit17: ; preds = %__hugr__.__tk2_sol_qalloc.13.exit tail call void @___reset(i64 %qalloc.i14) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool) - %lazy_measure7 = tail call i64 @___lazy_measure(i64 %qalloc.i14) + %___future_measure7 = tail call i64 @___future_measure(i64 %qalloc.i14, i64 0) tail call void @___qfree(i64 %qalloc.i14) - %read_bool9 = tail call i1 @___read_future_bool(i64 %lazy_measure7) - tail call void @___dec_future_refcount(i64 %lazy_measure7) + %read_bool9 = tail call i1 @___read_future_bool(i64 %___future_measure7) + tail call void @___dec_future_refcount(i64 %___future_measure7) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool9) ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_1q_error/depolarising_1q_error-sol-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_1q_error/depolarising_1q_error-sol-x86_64-unknown-linux-gnu.ll index e3f29817..22d3e140 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_1q_error/depolarising_1q_error-sol-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_1q_error/depolarising_1q_error-sol-x86_64-unknown-linux-gnu.ll @@ -30,20 +30,20 @@ cond_17_case_0.i16: ; preds = %__hugr__.__tk2_sol_ __hugr__.__tk2_sol_qalloc.13.exit17: ; preds = %__hugr__.__tk2_sol_qalloc.13.exit tail call void @___reset(i64 %qalloc.i14) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool) - %lazy_measure7 = tail call i64 @___lazy_measure(i64 %qalloc.i14) + %___future_measure7 = tail call i64 @___future_measure(i64 %qalloc.i14, i64 0) tail call void @___qfree(i64 %qalloc.i14) - %read_bool9 = tail call i1 @___read_future_bool(i64 %lazy_measure7) - tail call void @___dec_future_refcount(i64 %lazy_measure7) + %read_bool9 = tail call i1 @___read_future_bool(i64 %___future_measure7) + tail call void @___dec_future_refcount(i64 %___future_measure7) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool9) ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_1q_error/depolarising_1q_error-sol-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_1q_error/depolarising_1q_error-sol-x86_64-windows-gnu.ll index a4461930..6dc2786d 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_1q_error/depolarising_1q_error-sol-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_1q_error/depolarising_1q_error-sol-x86_64-windows-gnu.ll @@ -30,20 +30,20 @@ cond_17_case_0.i16: ; preds = %__hugr__.__tk2_sol_ __hugr__.__tk2_sol_qalloc.13.exit17: ; preds = %__hugr__.__tk2_sol_qalloc.13.exit tail call void @___reset(i64 %qalloc.i14) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool) - %lazy_measure7 = tail call i64 @___lazy_measure(i64 %qalloc.i14) + %___future_measure7 = tail call i64 @___future_measure(i64 %qalloc.i14, i64 0) tail call void @___qfree(i64 %qalloc.i14) - %read_bool9 = tail call i1 @___read_future_bool(i64 %lazy_measure7) - tail call void @___dec_future_refcount(i64 %lazy_measure7) + %read_bool9 = tail call i1 @___read_future_bool(i64 %___future_measure7) + tail call void @___dec_future_refcount(i64 %___future_measure7) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool9) ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_2q_error/depolarising_2q_error-helios-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_2q_error/depolarising_2q_error-helios-aarch64-apple-darwin.ll index d161afb1..f1ac86f7 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_2q_error/depolarising_2q_error-helios-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_2q_error/depolarising_2q_error-helios-aarch64-apple-darwin.ll @@ -30,15 +30,15 @@ cond_17_case_0.i16: ; preds = %__hugr__.__tk2_heli __hugr__.__tk2_helios_qalloc.13.exit17: ; preds = %__hugr__.__tk2_helios_qalloc.13.exit tail call void @___reset(i64 %qalloc.i14) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool) - %lazy_measure7 = tail call i64 @___lazy_measure(i64 %qalloc.i14) + %___lazy_measure7 = tail call i64 @___lazy_measure(i64 %qalloc.i14) tail call void @___qfree(i64 %qalloc.i14) - %read_bool9 = tail call i1 @___read_future_bool(i64 %lazy_measure7) - tail call void @___dec_future_refcount(i64 %lazy_measure7) + %read_bool9 = tail call i1 @___read_future_bool(i64 %___lazy_measure7) + tail call void @___dec_future_refcount(i64 %___lazy_measure7) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool9) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_2q_error/depolarising_2q_error-helios-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_2q_error/depolarising_2q_error-helios-aarch64-unknown-linux-gnu.ll index e1f47c54..8b947d09 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_2q_error/depolarising_2q_error-helios-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_2q_error/depolarising_2q_error-helios-aarch64-unknown-linux-gnu.ll @@ -30,15 +30,15 @@ cond_17_case_0.i16: ; preds = %__hugr__.__tk2_heli __hugr__.__tk2_helios_qalloc.13.exit17: ; preds = %__hugr__.__tk2_helios_qalloc.13.exit tail call void @___reset(i64 %qalloc.i14) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool) - %lazy_measure7 = tail call i64 @___lazy_measure(i64 %qalloc.i14) + %___lazy_measure7 = tail call i64 @___lazy_measure(i64 %qalloc.i14) tail call void @___qfree(i64 %qalloc.i14) - %read_bool9 = tail call i1 @___read_future_bool(i64 %lazy_measure7) - tail call void @___dec_future_refcount(i64 %lazy_measure7) + %read_bool9 = tail call i1 @___read_future_bool(i64 %___lazy_measure7) + tail call void @___dec_future_refcount(i64 %___lazy_measure7) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool9) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_2q_error/depolarising_2q_error-helios-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_2q_error/depolarising_2q_error-helios-x86_64-apple-darwin.ll index 3682f073..6aca95e5 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_2q_error/depolarising_2q_error-helios-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_2q_error/depolarising_2q_error-helios-x86_64-apple-darwin.ll @@ -30,15 +30,15 @@ cond_17_case_0.i16: ; preds = %__hugr__.__tk2_heli __hugr__.__tk2_helios_qalloc.13.exit17: ; preds = %__hugr__.__tk2_helios_qalloc.13.exit tail call void @___reset(i64 %qalloc.i14) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool) - %lazy_measure7 = tail call i64 @___lazy_measure(i64 %qalloc.i14) + %___lazy_measure7 = tail call i64 @___lazy_measure(i64 %qalloc.i14) tail call void @___qfree(i64 %qalloc.i14) - %read_bool9 = tail call i1 @___read_future_bool(i64 %lazy_measure7) - tail call void @___dec_future_refcount(i64 %lazy_measure7) + %read_bool9 = tail call i1 @___read_future_bool(i64 %___lazy_measure7) + tail call void @___dec_future_refcount(i64 %___lazy_measure7) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool9) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_2q_error/depolarising_2q_error-helios-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_2q_error/depolarising_2q_error-helios-x86_64-unknown-linux-gnu.ll index 2d9e1230..65e04152 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_2q_error/depolarising_2q_error-helios-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_2q_error/depolarising_2q_error-helios-x86_64-unknown-linux-gnu.ll @@ -30,15 +30,15 @@ cond_17_case_0.i16: ; preds = %__hugr__.__tk2_heli __hugr__.__tk2_helios_qalloc.13.exit17: ; preds = %__hugr__.__tk2_helios_qalloc.13.exit tail call void @___reset(i64 %qalloc.i14) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool) - %lazy_measure7 = tail call i64 @___lazy_measure(i64 %qalloc.i14) + %___lazy_measure7 = tail call i64 @___lazy_measure(i64 %qalloc.i14) tail call void @___qfree(i64 %qalloc.i14) - %read_bool9 = tail call i1 @___read_future_bool(i64 %lazy_measure7) - tail call void @___dec_future_refcount(i64 %lazy_measure7) + %read_bool9 = tail call i1 @___read_future_bool(i64 %___lazy_measure7) + tail call void @___dec_future_refcount(i64 %___lazy_measure7) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool9) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_2q_error/depolarising_2q_error-helios-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_2q_error/depolarising_2q_error-helios-x86_64-windows-gnu.ll index c25dd231..46dc3187 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_2q_error/depolarising_2q_error-helios-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_2q_error/depolarising_2q_error-helios-x86_64-windows-gnu.ll @@ -30,15 +30,15 @@ cond_17_case_0.i16: ; preds = %__hugr__.__tk2_heli __hugr__.__tk2_helios_qalloc.13.exit17: ; preds = %__hugr__.__tk2_helios_qalloc.13.exit tail call void @___reset(i64 %qalloc.i14) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool) - %lazy_measure7 = tail call i64 @___lazy_measure(i64 %qalloc.i14) + %___lazy_measure7 = tail call i64 @___lazy_measure(i64 %qalloc.i14) tail call void @___qfree(i64 %qalloc.i14) - %read_bool9 = tail call i1 @___read_future_bool(i64 %lazy_measure7) - tail call void @___dec_future_refcount(i64 %lazy_measure7) + %read_bool9 = tail call i1 @___read_future_bool(i64 %___lazy_measure7) + tail call void @___dec_future_refcount(i64 %___lazy_measure7) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool9) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_2q_error/depolarising_2q_error-sol-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_2q_error/depolarising_2q_error-sol-aarch64-apple-darwin.ll index 75d57d8a..8e47db21 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_2q_error/depolarising_2q_error-sol-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_2q_error/depolarising_2q_error-sol-aarch64-apple-darwin.ll @@ -30,20 +30,20 @@ cond_17_case_0.i16: ; preds = %__hugr__.__tk2_sol_ __hugr__.__tk2_sol_qalloc.13.exit17: ; preds = %__hugr__.__tk2_sol_qalloc.13.exit tail call void @___reset(i64 %qalloc.i14) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool) - %lazy_measure7 = tail call i64 @___lazy_measure(i64 %qalloc.i14) + %___future_measure7 = tail call i64 @___future_measure(i64 %qalloc.i14, i64 0) tail call void @___qfree(i64 %qalloc.i14) - %read_bool9 = tail call i1 @___read_future_bool(i64 %lazy_measure7) - tail call void @___dec_future_refcount(i64 %lazy_measure7) + %read_bool9 = tail call i1 @___read_future_bool(i64 %___future_measure7) + tail call void @___dec_future_refcount(i64 %___future_measure7) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool9) ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_2q_error/depolarising_2q_error-sol-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_2q_error/depolarising_2q_error-sol-aarch64-unknown-linux-gnu.ll index 25b601f4..001bfdcc 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_2q_error/depolarising_2q_error-sol-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_2q_error/depolarising_2q_error-sol-aarch64-unknown-linux-gnu.ll @@ -30,20 +30,20 @@ cond_17_case_0.i16: ; preds = %__hugr__.__tk2_sol_ __hugr__.__tk2_sol_qalloc.13.exit17: ; preds = %__hugr__.__tk2_sol_qalloc.13.exit tail call void @___reset(i64 %qalloc.i14) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool) - %lazy_measure7 = tail call i64 @___lazy_measure(i64 %qalloc.i14) + %___future_measure7 = tail call i64 @___future_measure(i64 %qalloc.i14, i64 0) tail call void @___qfree(i64 %qalloc.i14) - %read_bool9 = tail call i1 @___read_future_bool(i64 %lazy_measure7) - tail call void @___dec_future_refcount(i64 %lazy_measure7) + %read_bool9 = tail call i1 @___read_future_bool(i64 %___future_measure7) + tail call void @___dec_future_refcount(i64 %___future_measure7) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool9) ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_2q_error/depolarising_2q_error-sol-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_2q_error/depolarising_2q_error-sol-x86_64-apple-darwin.ll index 12222304..43bc5e85 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_2q_error/depolarising_2q_error-sol-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_2q_error/depolarising_2q_error-sol-x86_64-apple-darwin.ll @@ -30,20 +30,20 @@ cond_17_case_0.i16: ; preds = %__hugr__.__tk2_sol_ __hugr__.__tk2_sol_qalloc.13.exit17: ; preds = %__hugr__.__tk2_sol_qalloc.13.exit tail call void @___reset(i64 %qalloc.i14) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool) - %lazy_measure7 = tail call i64 @___lazy_measure(i64 %qalloc.i14) + %___future_measure7 = tail call i64 @___future_measure(i64 %qalloc.i14, i64 0) tail call void @___qfree(i64 %qalloc.i14) - %read_bool9 = tail call i1 @___read_future_bool(i64 %lazy_measure7) - tail call void @___dec_future_refcount(i64 %lazy_measure7) + %read_bool9 = tail call i1 @___read_future_bool(i64 %___future_measure7) + tail call void @___dec_future_refcount(i64 %___future_measure7) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool9) ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_2q_error/depolarising_2q_error-sol-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_2q_error/depolarising_2q_error-sol-x86_64-unknown-linux-gnu.ll index e3f29817..22d3e140 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_2q_error/depolarising_2q_error-sol-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_2q_error/depolarising_2q_error-sol-x86_64-unknown-linux-gnu.ll @@ -30,20 +30,20 @@ cond_17_case_0.i16: ; preds = %__hugr__.__tk2_sol_ __hugr__.__tk2_sol_qalloc.13.exit17: ; preds = %__hugr__.__tk2_sol_qalloc.13.exit tail call void @___reset(i64 %qalloc.i14) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool) - %lazy_measure7 = tail call i64 @___lazy_measure(i64 %qalloc.i14) + %___future_measure7 = tail call i64 @___future_measure(i64 %qalloc.i14, i64 0) tail call void @___qfree(i64 %qalloc.i14) - %read_bool9 = tail call i1 @___read_future_bool(i64 %lazy_measure7) - tail call void @___dec_future_refcount(i64 %lazy_measure7) + %read_bool9 = tail call i1 @___read_future_bool(i64 %___future_measure7) + tail call void @___dec_future_refcount(i64 %___future_measure7) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool9) ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_2q_error/depolarising_2q_error-sol-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_2q_error/depolarising_2q_error-sol-x86_64-windows-gnu.ll index a4461930..6dc2786d 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_2q_error/depolarising_2q_error-sol-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_2q_error/depolarising_2q_error-sol-x86_64-windows-gnu.ll @@ -30,20 +30,20 @@ cond_17_case_0.i16: ; preds = %__hugr__.__tk2_sol_ __hugr__.__tk2_sol_qalloc.13.exit17: ; preds = %__hugr__.__tk2_sol_qalloc.13.exit tail call void @___reset(i64 %qalloc.i14) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool) - %lazy_measure7 = tail call i64 @___lazy_measure(i64 %qalloc.i14) + %___future_measure7 = tail call i64 @___future_measure(i64 %qalloc.i14, i64 0) tail call void @___qfree(i64 %qalloc.i14) - %read_bool9 = tail call i1 @___read_future_bool(i64 %lazy_measure7) - tail call void @___dec_future_refcount(i64 %lazy_measure7) + %read_bool9 = tail call i1 @___read_future_bool(i64 %___future_measure7) + tail call void @___dec_future_refcount(i64 %___future_measure7) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool9) ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_init_error/depolarising_init_error-helios-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_init_error/depolarising_init_error-helios-aarch64-apple-darwin.ll index 5390ee04..59370277 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_init_error/depolarising_init_error-helios-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_init_error/depolarising_init_error-helios-aarch64-apple-darwin.ll @@ -29,15 +29,15 @@ cond_16_case_0.i15: ; preds = %__hugr__.__tk2_heli __hugr__.__tk2_helios_qalloc.12.exit16: ; preds = %__hugr__.__tk2_helios_qalloc.12.exit tail call void @___reset(i64 %qalloc.i13) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool) - %lazy_measure6 = tail call i64 @___lazy_measure(i64 %qalloc.i13) + %___lazy_measure6 = tail call i64 @___lazy_measure(i64 %qalloc.i13) tail call void @___qfree(i64 %qalloc.i13) - %read_bool8 = tail call i1 @___read_future_bool(i64 %lazy_measure6) - tail call void @___dec_future_refcount(i64 %lazy_measure6) + %read_bool8 = tail call i1 @___read_future_bool(i64 %___lazy_measure6) + tail call void @___dec_future_refcount(i64 %___lazy_measure6) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool8) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_init_error/depolarising_init_error-helios-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_init_error/depolarising_init_error-helios-aarch64-unknown-linux-gnu.ll index b452a06e..df24c6cb 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_init_error/depolarising_init_error-helios-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_init_error/depolarising_init_error-helios-aarch64-unknown-linux-gnu.ll @@ -29,15 +29,15 @@ cond_16_case_0.i15: ; preds = %__hugr__.__tk2_heli __hugr__.__tk2_helios_qalloc.12.exit16: ; preds = %__hugr__.__tk2_helios_qalloc.12.exit tail call void @___reset(i64 %qalloc.i13) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool) - %lazy_measure6 = tail call i64 @___lazy_measure(i64 %qalloc.i13) + %___lazy_measure6 = tail call i64 @___lazy_measure(i64 %qalloc.i13) tail call void @___qfree(i64 %qalloc.i13) - %read_bool8 = tail call i1 @___read_future_bool(i64 %lazy_measure6) - tail call void @___dec_future_refcount(i64 %lazy_measure6) + %read_bool8 = tail call i1 @___read_future_bool(i64 %___lazy_measure6) + tail call void @___dec_future_refcount(i64 %___lazy_measure6) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool8) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_init_error/depolarising_init_error-helios-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_init_error/depolarising_init_error-helios-x86_64-apple-darwin.ll index 4f5908f1..1aaede18 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_init_error/depolarising_init_error-helios-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_init_error/depolarising_init_error-helios-x86_64-apple-darwin.ll @@ -29,15 +29,15 @@ cond_16_case_0.i15: ; preds = %__hugr__.__tk2_heli __hugr__.__tk2_helios_qalloc.12.exit16: ; preds = %__hugr__.__tk2_helios_qalloc.12.exit tail call void @___reset(i64 %qalloc.i13) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool) - %lazy_measure6 = tail call i64 @___lazy_measure(i64 %qalloc.i13) + %___lazy_measure6 = tail call i64 @___lazy_measure(i64 %qalloc.i13) tail call void @___qfree(i64 %qalloc.i13) - %read_bool8 = tail call i1 @___read_future_bool(i64 %lazy_measure6) - tail call void @___dec_future_refcount(i64 %lazy_measure6) + %read_bool8 = tail call i1 @___read_future_bool(i64 %___lazy_measure6) + tail call void @___dec_future_refcount(i64 %___lazy_measure6) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool8) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_init_error/depolarising_init_error-helios-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_init_error/depolarising_init_error-helios-x86_64-unknown-linux-gnu.ll index ef0c5554..7237d08b 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_init_error/depolarising_init_error-helios-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_init_error/depolarising_init_error-helios-x86_64-unknown-linux-gnu.ll @@ -29,15 +29,15 @@ cond_16_case_0.i15: ; preds = %__hugr__.__tk2_heli __hugr__.__tk2_helios_qalloc.12.exit16: ; preds = %__hugr__.__tk2_helios_qalloc.12.exit tail call void @___reset(i64 %qalloc.i13) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool) - %lazy_measure6 = tail call i64 @___lazy_measure(i64 %qalloc.i13) + %___lazy_measure6 = tail call i64 @___lazy_measure(i64 %qalloc.i13) tail call void @___qfree(i64 %qalloc.i13) - %read_bool8 = tail call i1 @___read_future_bool(i64 %lazy_measure6) - tail call void @___dec_future_refcount(i64 %lazy_measure6) + %read_bool8 = tail call i1 @___read_future_bool(i64 %___lazy_measure6) + tail call void @___dec_future_refcount(i64 %___lazy_measure6) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool8) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_init_error/depolarising_init_error-helios-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_init_error/depolarising_init_error-helios-x86_64-windows-gnu.ll index db0a6bb6..fd2bad70 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_init_error/depolarising_init_error-helios-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_init_error/depolarising_init_error-helios-x86_64-windows-gnu.ll @@ -29,15 +29,15 @@ cond_16_case_0.i15: ; preds = %__hugr__.__tk2_heli __hugr__.__tk2_helios_qalloc.12.exit16: ; preds = %__hugr__.__tk2_helios_qalloc.12.exit tail call void @___reset(i64 %qalloc.i13) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool) - %lazy_measure6 = tail call i64 @___lazy_measure(i64 %qalloc.i13) + %___lazy_measure6 = tail call i64 @___lazy_measure(i64 %qalloc.i13) tail call void @___qfree(i64 %qalloc.i13) - %read_bool8 = tail call i1 @___read_future_bool(i64 %lazy_measure6) - tail call void @___dec_future_refcount(i64 %lazy_measure6) + %read_bool8 = tail call i1 @___read_future_bool(i64 %___lazy_measure6) + tail call void @___dec_future_refcount(i64 %___lazy_measure6) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool8) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_init_error/depolarising_init_error-sol-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_init_error/depolarising_init_error-sol-aarch64-apple-darwin.ll index 96dc84dd..13869ee4 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_init_error/depolarising_init_error-sol-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_init_error/depolarising_init_error-sol-aarch64-apple-darwin.ll @@ -29,20 +29,20 @@ cond_16_case_0.i15: ; preds = %__hugr__.__tk2_sol_ __hugr__.__tk2_sol_qalloc.12.exit16: ; preds = %__hugr__.__tk2_sol_qalloc.12.exit tail call void @___reset(i64 %qalloc.i13) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool) - %lazy_measure6 = tail call i64 @___lazy_measure(i64 %qalloc.i13) + %___future_measure6 = tail call i64 @___future_measure(i64 %qalloc.i13, i64 0) tail call void @___qfree(i64 %qalloc.i13) - %read_bool8 = tail call i1 @___read_future_bool(i64 %lazy_measure6) - tail call void @___dec_future_refcount(i64 %lazy_measure6) + %read_bool8 = tail call i1 @___read_future_bool(i64 %___future_measure6) + tail call void @___dec_future_refcount(i64 %___future_measure6) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool8) ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_init_error/depolarising_init_error-sol-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_init_error/depolarising_init_error-sol-aarch64-unknown-linux-gnu.ll index 54423aee..9a551b83 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_init_error/depolarising_init_error-sol-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_init_error/depolarising_init_error-sol-aarch64-unknown-linux-gnu.ll @@ -29,20 +29,20 @@ cond_16_case_0.i15: ; preds = %__hugr__.__tk2_sol_ __hugr__.__tk2_sol_qalloc.12.exit16: ; preds = %__hugr__.__tk2_sol_qalloc.12.exit tail call void @___reset(i64 %qalloc.i13) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool) - %lazy_measure6 = tail call i64 @___lazy_measure(i64 %qalloc.i13) + %___future_measure6 = tail call i64 @___future_measure(i64 %qalloc.i13, i64 0) tail call void @___qfree(i64 %qalloc.i13) - %read_bool8 = tail call i1 @___read_future_bool(i64 %lazy_measure6) - tail call void @___dec_future_refcount(i64 %lazy_measure6) + %read_bool8 = tail call i1 @___read_future_bool(i64 %___future_measure6) + tail call void @___dec_future_refcount(i64 %___future_measure6) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool8) ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_init_error/depolarising_init_error-sol-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_init_error/depolarising_init_error-sol-x86_64-apple-darwin.ll index d90c0a09..2ffe9c33 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_init_error/depolarising_init_error-sol-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_init_error/depolarising_init_error-sol-x86_64-apple-darwin.ll @@ -29,20 +29,20 @@ cond_16_case_0.i15: ; preds = %__hugr__.__tk2_sol_ __hugr__.__tk2_sol_qalloc.12.exit16: ; preds = %__hugr__.__tk2_sol_qalloc.12.exit tail call void @___reset(i64 %qalloc.i13) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool) - %lazy_measure6 = tail call i64 @___lazy_measure(i64 %qalloc.i13) + %___future_measure6 = tail call i64 @___future_measure(i64 %qalloc.i13, i64 0) tail call void @___qfree(i64 %qalloc.i13) - %read_bool8 = tail call i1 @___read_future_bool(i64 %lazy_measure6) - tail call void @___dec_future_refcount(i64 %lazy_measure6) + %read_bool8 = tail call i1 @___read_future_bool(i64 %___future_measure6) + tail call void @___dec_future_refcount(i64 %___future_measure6) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool8) ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_init_error/depolarising_init_error-sol-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_init_error/depolarising_init_error-sol-x86_64-unknown-linux-gnu.ll index 4ed6a335..7425beee 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_init_error/depolarising_init_error-sol-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_init_error/depolarising_init_error-sol-x86_64-unknown-linux-gnu.ll @@ -29,20 +29,20 @@ cond_16_case_0.i15: ; preds = %__hugr__.__tk2_sol_ __hugr__.__tk2_sol_qalloc.12.exit16: ; preds = %__hugr__.__tk2_sol_qalloc.12.exit tail call void @___reset(i64 %qalloc.i13) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool) - %lazy_measure6 = tail call i64 @___lazy_measure(i64 %qalloc.i13) + %___future_measure6 = tail call i64 @___future_measure(i64 %qalloc.i13, i64 0) tail call void @___qfree(i64 %qalloc.i13) - %read_bool8 = tail call i1 @___read_future_bool(i64 %lazy_measure6) - tail call void @___dec_future_refcount(i64 %lazy_measure6) + %read_bool8 = tail call i1 @___read_future_bool(i64 %___future_measure6) + tail call void @___dec_future_refcount(i64 %___future_measure6) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool8) ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_init_error/depolarising_init_error-sol-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_init_error/depolarising_init_error-sol-x86_64-windows-gnu.ll index 46f38d7c..acd6ccc0 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_init_error/depolarising_init_error-sol-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_init_error/depolarising_init_error-sol-x86_64-windows-gnu.ll @@ -29,20 +29,20 @@ cond_16_case_0.i15: ; preds = %__hugr__.__tk2_sol_ __hugr__.__tk2_sol_qalloc.12.exit16: ; preds = %__hugr__.__tk2_sol_qalloc.12.exit tail call void @___reset(i64 %qalloc.i13) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool) - %lazy_measure6 = tail call i64 @___lazy_measure(i64 %qalloc.i13) + %___future_measure6 = tail call i64 @___future_measure(i64 %qalloc.i13, i64 0) tail call void @___qfree(i64 %qalloc.i13) - %read_bool8 = tail call i1 @___read_future_bool(i64 %lazy_measure6) - tail call void @___dec_future_refcount(i64 %lazy_measure6) + %read_bool8 = tail call i1 @___read_future_bool(i64 %___future_measure6) + tail call void @___dec_future_refcount(i64 %___future_measure6) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool8) ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_measurement_error/depolarising_measurement_error-helios-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_measurement_error/depolarising_measurement_error-helios-aarch64-apple-darwin.ll index 254fcaaf..2ef5d24f 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_measurement_error/depolarising_measurement_error-helios-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_measurement_error/depolarising_measurement_error-helios-aarch64-apple-darwin.ll @@ -31,17 +31,17 @@ cond_18_case_0.i17: ; preds = %__hugr__.__tk2_heli __hugr__.__tk2_helios_qalloc.14.exit18: ; preds = %__hugr__.__tk2_helios_qalloc.14.exit tail call void @___reset(i64 %qalloc.i15) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i15, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i15, double 0x400921FB54442D18) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool) - %lazy_measure8 = tail call i64 @___lazy_measure(i64 %qalloc.i15) + %___lazy_measure8 = tail call i64 @___lazy_measure(i64 %qalloc.i15) tail call void @___qfree(i64 %qalloc.i15) - %read_bool10 = tail call i1 @___read_future_bool(i64 %lazy_measure8) - tail call void @___dec_future_refcount(i64 %lazy_measure8) + %read_bool10 = tail call i1 @___read_future_bool(i64 %___lazy_measure8) + tail call void @___dec_future_refcount(i64 %___lazy_measure8) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool10) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_measurement_error/depolarising_measurement_error-helios-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_measurement_error/depolarising_measurement_error-helios-aarch64-unknown-linux-gnu.ll index 176c54ea..cb6a0cde 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_measurement_error/depolarising_measurement_error-helios-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_measurement_error/depolarising_measurement_error-helios-aarch64-unknown-linux-gnu.ll @@ -31,17 +31,17 @@ cond_18_case_0.i17: ; preds = %__hugr__.__tk2_heli __hugr__.__tk2_helios_qalloc.14.exit18: ; preds = %__hugr__.__tk2_helios_qalloc.14.exit tail call void @___reset(i64 %qalloc.i15) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i15, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i15, double 0x400921FB54442D18) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool) - %lazy_measure8 = tail call i64 @___lazy_measure(i64 %qalloc.i15) + %___lazy_measure8 = tail call i64 @___lazy_measure(i64 %qalloc.i15) tail call void @___qfree(i64 %qalloc.i15) - %read_bool10 = tail call i1 @___read_future_bool(i64 %lazy_measure8) - tail call void @___dec_future_refcount(i64 %lazy_measure8) + %read_bool10 = tail call i1 @___read_future_bool(i64 %___lazy_measure8) + tail call void @___dec_future_refcount(i64 %___lazy_measure8) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool10) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_measurement_error/depolarising_measurement_error-helios-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_measurement_error/depolarising_measurement_error-helios-x86_64-apple-darwin.ll index b9714f8f..4719bed0 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_measurement_error/depolarising_measurement_error-helios-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_measurement_error/depolarising_measurement_error-helios-x86_64-apple-darwin.ll @@ -31,17 +31,17 @@ cond_18_case_0.i17: ; preds = %__hugr__.__tk2_heli __hugr__.__tk2_helios_qalloc.14.exit18: ; preds = %__hugr__.__tk2_helios_qalloc.14.exit tail call void @___reset(i64 %qalloc.i15) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i15, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i15, double 0x400921FB54442D18) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool) - %lazy_measure8 = tail call i64 @___lazy_measure(i64 %qalloc.i15) + %___lazy_measure8 = tail call i64 @___lazy_measure(i64 %qalloc.i15) tail call void @___qfree(i64 %qalloc.i15) - %read_bool10 = tail call i1 @___read_future_bool(i64 %lazy_measure8) - tail call void @___dec_future_refcount(i64 %lazy_measure8) + %read_bool10 = tail call i1 @___read_future_bool(i64 %___lazy_measure8) + tail call void @___dec_future_refcount(i64 %___lazy_measure8) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool10) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_measurement_error/depolarising_measurement_error-helios-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_measurement_error/depolarising_measurement_error-helios-x86_64-unknown-linux-gnu.ll index eac02ba6..40fad6ac 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_measurement_error/depolarising_measurement_error-helios-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_measurement_error/depolarising_measurement_error-helios-x86_64-unknown-linux-gnu.ll @@ -31,17 +31,17 @@ cond_18_case_0.i17: ; preds = %__hugr__.__tk2_heli __hugr__.__tk2_helios_qalloc.14.exit18: ; preds = %__hugr__.__tk2_helios_qalloc.14.exit tail call void @___reset(i64 %qalloc.i15) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i15, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i15, double 0x400921FB54442D18) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool) - %lazy_measure8 = tail call i64 @___lazy_measure(i64 %qalloc.i15) + %___lazy_measure8 = tail call i64 @___lazy_measure(i64 %qalloc.i15) tail call void @___qfree(i64 %qalloc.i15) - %read_bool10 = tail call i1 @___read_future_bool(i64 %lazy_measure8) - tail call void @___dec_future_refcount(i64 %lazy_measure8) + %read_bool10 = tail call i1 @___read_future_bool(i64 %___lazy_measure8) + tail call void @___dec_future_refcount(i64 %___lazy_measure8) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool10) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_measurement_error/depolarising_measurement_error-helios-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_measurement_error/depolarising_measurement_error-helios-x86_64-windows-gnu.ll index b2370d57..ea661188 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_measurement_error/depolarising_measurement_error-helios-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_measurement_error/depolarising_measurement_error-helios-x86_64-windows-gnu.ll @@ -31,17 +31,17 @@ cond_18_case_0.i17: ; preds = %__hugr__.__tk2_heli __hugr__.__tk2_helios_qalloc.14.exit18: ; preds = %__hugr__.__tk2_helios_qalloc.14.exit tail call void @___reset(i64 %qalloc.i15) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i15, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i15, double 0x400921FB54442D18) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool) - %lazy_measure8 = tail call i64 @___lazy_measure(i64 %qalloc.i15) + %___lazy_measure8 = tail call i64 @___lazy_measure(i64 %qalloc.i15) tail call void @___qfree(i64 %qalloc.i15) - %read_bool10 = tail call i1 @___read_future_bool(i64 %lazy_measure8) - tail call void @___dec_future_refcount(i64 %lazy_measure8) + %read_bool10 = tail call i1 @___read_future_bool(i64 %___lazy_measure8) + tail call void @___dec_future_refcount(i64 %___lazy_measure8) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool10) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_measurement_error/depolarising_measurement_error-sol-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_measurement_error/depolarising_measurement_error-sol-aarch64-apple-darwin.ll index e25b91d9..30d9187e 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_measurement_error/depolarising_measurement_error-sol-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_measurement_error/depolarising_measurement_error-sol-aarch64-apple-darwin.ll @@ -31,22 +31,22 @@ cond_18_case_0.i17: ; preds = %__hugr__.__tk2_sol_ __hugr__.__tk2_sol_qalloc.14.exit18: ; preds = %__hugr__.__tk2_sol_qalloc.14.exit tail call void @___reset(i64 %qalloc.i15) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i15, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i15, double 0x400921FB54442D18) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool) - %lazy_measure8 = tail call i64 @___lazy_measure(i64 %qalloc.i15) + %___future_measure8 = tail call i64 @___future_measure(i64 %qalloc.i15, i64 0) tail call void @___qfree(i64 %qalloc.i15) - %read_bool10 = tail call i1 @___read_future_bool(i64 %lazy_measure8) - tail call void @___dec_future_refcount(i64 %lazy_measure8) + %read_bool10 = tail call i1 @___read_future_bool(i64 %___future_measure8) + tail call void @___dec_future_refcount(i64 %___future_measure8) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool10) ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_measurement_error/depolarising_measurement_error-sol-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_measurement_error/depolarising_measurement_error-sol-aarch64-unknown-linux-gnu.ll index d206c2c1..3f144beb 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_measurement_error/depolarising_measurement_error-sol-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_measurement_error/depolarising_measurement_error-sol-aarch64-unknown-linux-gnu.ll @@ -31,22 +31,22 @@ cond_18_case_0.i17: ; preds = %__hugr__.__tk2_sol_ __hugr__.__tk2_sol_qalloc.14.exit18: ; preds = %__hugr__.__tk2_sol_qalloc.14.exit tail call void @___reset(i64 %qalloc.i15) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i15, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i15, double 0x400921FB54442D18) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool) - %lazy_measure8 = tail call i64 @___lazy_measure(i64 %qalloc.i15) + %___future_measure8 = tail call i64 @___future_measure(i64 %qalloc.i15, i64 0) tail call void @___qfree(i64 %qalloc.i15) - %read_bool10 = tail call i1 @___read_future_bool(i64 %lazy_measure8) - tail call void @___dec_future_refcount(i64 %lazy_measure8) + %read_bool10 = tail call i1 @___read_future_bool(i64 %___future_measure8) + tail call void @___dec_future_refcount(i64 %___future_measure8) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool10) ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_measurement_error/depolarising_measurement_error-sol-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_measurement_error/depolarising_measurement_error-sol-x86_64-apple-darwin.ll index 44982308..789b0425 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_measurement_error/depolarising_measurement_error-sol-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_measurement_error/depolarising_measurement_error-sol-x86_64-apple-darwin.ll @@ -31,22 +31,22 @@ cond_18_case_0.i17: ; preds = %__hugr__.__tk2_sol_ __hugr__.__tk2_sol_qalloc.14.exit18: ; preds = %__hugr__.__tk2_sol_qalloc.14.exit tail call void @___reset(i64 %qalloc.i15) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i15, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i15, double 0x400921FB54442D18) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool) - %lazy_measure8 = tail call i64 @___lazy_measure(i64 %qalloc.i15) + %___future_measure8 = tail call i64 @___future_measure(i64 %qalloc.i15, i64 0) tail call void @___qfree(i64 %qalloc.i15) - %read_bool10 = tail call i1 @___read_future_bool(i64 %lazy_measure8) - tail call void @___dec_future_refcount(i64 %lazy_measure8) + %read_bool10 = tail call i1 @___read_future_bool(i64 %___future_measure8) + tail call void @___dec_future_refcount(i64 %___future_measure8) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool10) ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_measurement_error/depolarising_measurement_error-sol-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_measurement_error/depolarising_measurement_error-sol-x86_64-unknown-linux-gnu.ll index 890ef7aa..e04a9f7a 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_measurement_error/depolarising_measurement_error-sol-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_measurement_error/depolarising_measurement_error-sol-x86_64-unknown-linux-gnu.ll @@ -31,22 +31,22 @@ cond_18_case_0.i17: ; preds = %__hugr__.__tk2_sol_ __hugr__.__tk2_sol_qalloc.14.exit18: ; preds = %__hugr__.__tk2_sol_qalloc.14.exit tail call void @___reset(i64 %qalloc.i15) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i15, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i15, double 0x400921FB54442D18) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool) - %lazy_measure8 = tail call i64 @___lazy_measure(i64 %qalloc.i15) + %___future_measure8 = tail call i64 @___future_measure(i64 %qalloc.i15, i64 0) tail call void @___qfree(i64 %qalloc.i15) - %read_bool10 = tail call i1 @___read_future_bool(i64 %lazy_measure8) - tail call void @___dec_future_refcount(i64 %lazy_measure8) + %read_bool10 = tail call i1 @___read_future_bool(i64 %___future_measure8) + tail call void @___dec_future_refcount(i64 %___future_measure8) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool10) ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_measurement_error/depolarising_measurement_error-sol-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_measurement_error/depolarising_measurement_error-sol-x86_64-windows-gnu.ll index ee6a3163..8ae8bf9c 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_measurement_error/depolarising_measurement_error-sol-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_depolarising_error_model/test_measurement_error/depolarising_measurement_error-sol-x86_64-windows-gnu.ll @@ -31,22 +31,22 @@ cond_18_case_0.i17: ; preds = %__hugr__.__tk2_sol_ __hugr__.__tk2_sol_qalloc.14.exit18: ; preds = %__hugr__.__tk2_sol_qalloc.14.exit tail call void @___reset(i64 %qalloc.i15) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i15, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i15, double 0x400921FB54442D18) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool) - %lazy_measure8 = tail call i64 @___lazy_measure(i64 %qalloc.i15) + %___future_measure8 = tail call i64 @___future_measure(i64 %qalloc.i15, i64 0) tail call void @___qfree(i64 %qalloc.i15) - %read_bool10 = tail call i1 @___read_future_bool(i64 %lazy_measure8) - tail call void @___dec_future_refcount(i64 %lazy_measure8) + %read_bool10 = tail call i1 @___read_future_bool(i64 %___future_measure8) + tail call void @___dec_future_refcount(i64 %___future_measure8) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool10) ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition/determinism_repetition-helios-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition/determinism_repetition-helios-aarch64-apple-darwin.ll deleted file mode 100644 index 0ecde1d0..00000000 --- a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition/determinism_repetition-helios-aarch64-apple-darwin.ll +++ /dev/null @@ -1,642 +0,0 @@ -; ModuleID = 'hugr' -source_filename = "hugr" -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" -@"e_Array elem.E746B1A3.0" = private constant [43 x i8] c"*EXIT:INT:Array element is already borrowed" -@"e_Array cont.EFA5AC45.0" = private constant [70 x i8] c"EEXIT:INT:Array contains non-borrowed elements and cannot be discarded" -@res_a.A4A74DAF.0 = private constant [12 x i8] c"\0BUSER:BOOL:a" -@res_b.3BD50C23.0 = private constant [12 x i8] c"\0BUSER:BOOL:b" -@res_c.1C9EF4D1.0 = private constant [12 x i8] c"\0BUSER:BOOL:c" -@res_d.00B84DC7.0 = private constant [12 x i8] c"\0BUSER:BOOL:d" -@res_e.B9A29CAF.0 = private constant [12 x i8] c"\0BUSER:BOOL:e" -@res_shot.6D86EAF7.0 = private constant [14 x i8] c"\0DUSER:INT:shot" -@res_random_int.805B8DD0.0 = private constant [20 x i8] c"\13USER:INT:random_int" -@res_random_flo.4EFA2734.0 = private constant [24 x i8] c"\17USER:FLOAT:random_float" -@"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." - -define void @__hugr__.__main__.main.1() local_unnamed_addr { -cond_104_case_1: - %0 = tail call ptr @heap_alloc(i64 40) - %1 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %1, align 1 - %shot = tail call i64 @get_current_shot() - tail call void @random_seed(i64 %shot) - %shot2 = tail call i64 @get_current_shot() - %2 = tail call ptr @heap_alloc(i64 40) - %3 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %3, align 1 - %qalloc.i = tail call i64 @___qalloc() - %not_max.not.not.i = icmp eq i64 %qalloc.i, -1 - br i1 %not_max.not.not.i, label %cond_535_case_0.i, label %__barray_check_bounds.exit - -cond_535_case_0.i: ; preds = %cond_104_case_1.4, %cond_104_case_1.3, %cond_104_case_1.2, %cond_104_case_1.1, %cond_104_case_1 - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__barray_check_bounds.exit: ; preds = %cond_104_case_1 - tail call void @___reset(i64 %qalloc.i) - %4 = load i64, ptr %3, align 4 - %5 = trunc i64 %4 to i1 - br i1 %5, label %cond_104_case_1.1, label %panic.i - -panic.i: ; preds = %__barray_check_bounds.exit.4, %__barray_check_bounds.exit.3, %__barray_check_bounds.exit.2, %__barray_check_bounds.exit.1, %__barray_check_bounds.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -cond_104_case_1.1: ; preds = %__barray_check_bounds.exit - %6 = and i64 %4, -2 - store i64 %6, ptr %3, align 4 - store i64 %qalloc.i, ptr %2, align 4 - %qalloc.i.1 = tail call i64 @___qalloc() - %not_max.not.not.i.1 = icmp eq i64 %qalloc.i.1, -1 - br i1 %not_max.not.not.i.1, label %cond_535_case_0.i, label %__barray_check_bounds.exit.1 - -__barray_check_bounds.exit.1: ; preds = %cond_104_case_1.1 - tail call void @___reset(i64 %qalloc.i.1) - %7 = load i64, ptr %3, align 4 - %8 = and i64 %7, 2 - %.not1178 = icmp eq i64 %8, 0 - br i1 %.not1178, label %panic.i, label %cond_104_case_1.2 - -cond_104_case_1.2: ; preds = %__barray_check_bounds.exit.1 - %9 = and i64 %7, -3 - store i64 %9, ptr %3, align 4 - %10 = getelementptr inbounds nuw i8, ptr %2, i64 8 - store i64 %qalloc.i.1, ptr %10, align 4 - %qalloc.i.2 = tail call i64 @___qalloc() - %not_max.not.not.i.2 = icmp eq i64 %qalloc.i.2, -1 - br i1 %not_max.not.not.i.2, label %cond_535_case_0.i, label %__barray_check_bounds.exit.2 - -__barray_check_bounds.exit.2: ; preds = %cond_104_case_1.2 - tail call void @___reset(i64 %qalloc.i.2) - %11 = load i64, ptr %3, align 4 - %12 = and i64 %11, 4 - %.not1179 = icmp eq i64 %12, 0 - br i1 %.not1179, label %panic.i, label %cond_104_case_1.3 - -cond_104_case_1.3: ; preds = %__barray_check_bounds.exit.2 - %13 = and i64 %11, -5 - store i64 %13, ptr %3, align 4 - %14 = getelementptr inbounds nuw i8, ptr %2, i64 16 - store i64 %qalloc.i.2, ptr %14, align 4 - %qalloc.i.3 = tail call i64 @___qalloc() - %not_max.not.not.i.3 = icmp eq i64 %qalloc.i.3, -1 - br i1 %not_max.not.not.i.3, label %cond_535_case_0.i, label %__barray_check_bounds.exit.3 - -__barray_check_bounds.exit.3: ; preds = %cond_104_case_1.3 - tail call void @___reset(i64 %qalloc.i.3) - %15 = load i64, ptr %3, align 4 - %16 = and i64 %15, 8 - %.not1180 = icmp eq i64 %16, 0 - br i1 %.not1180, label %panic.i, label %cond_104_case_1.4 - -cond_104_case_1.4: ; preds = %__barray_check_bounds.exit.3 - %17 = and i64 %15, -9 - store i64 %17, ptr %3, align 4 - %18 = getelementptr inbounds nuw i8, ptr %2, i64 24 - store i64 %qalloc.i.3, ptr %18, align 4 - %qalloc.i.4 = tail call i64 @___qalloc() - %not_max.not.not.i.4 = icmp eq i64 %qalloc.i.4, -1 - br i1 %not_max.not.not.i.4, label %cond_535_case_0.i, label %__barray_check_bounds.exit.4 - -__barray_check_bounds.exit.4: ; preds = %cond_104_case_1.4 - tail call void @___reset(i64 %qalloc.i.4) - %19 = load i64, ptr %3, align 4 - %20 = and i64 %19, 16 - %.not1181 = icmp eq i64 %20, 0 - br i1 %.not1181, label %panic.i, label %cond_exit_104.5 - -cond_exit_104.5: ; preds = %__barray_check_bounds.exit.4 - %21 = and i64 %19, -17 - store i64 %21, ptr %3, align 4 - %22 = getelementptr inbounds nuw i8, ptr %2, i64 32 - store i64 %qalloc.i.4, ptr %22, align 4 - %.pre = load i64, ptr %3, align 4 - %23 = trunc i64 %.pre to i1 - br i1 %23, label %panic.i1116, label %__barray_check_bounds.exit1118 - -panic.i1116: ; preds = %__barray_check_bounds.exit1115.4, %__barray_mask_return.exit1120.2, %__barray_mask_return.exit1120.1, %__barray_mask_return.exit1120, %cond_exit_104.5 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1118: ; preds = %cond_exit_104.5 - %24 = or disjoint i64 %.pre, 1 - store i64 %24, ptr %3, align 4 - %25 = load i64, ptr %2, align 4 - tail call void @___rxy(i64 %25, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %25, double 0x400921FB54442D18) - %26 = load i64, ptr %3, align 4 - %27 = trunc i64 %26 to i1 - br i1 %27, label %__barray_mask_return.exit1120, label %panic.i1119 - -panic.i1119: ; preds = %__barray_check_bounds.exit1118.4, %__barray_check_bounds.exit1118.3, %__barray_check_bounds.exit1118.2, %__barray_check_bounds.exit1118.1, %__barray_check_bounds.exit1118 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1120: ; preds = %__barray_check_bounds.exit1118 - %28 = and i64 %26, -2 - store i64 %28, ptr %3, align 4 - store i64 %25, ptr %2, align 4 - %29 = load i64, ptr %3, align 4 - %30 = and i64 %29, 2 - %.not1182 = icmp eq i64 %30, 0 - br i1 %.not1182, label %__barray_check_bounds.exit1118.1, label %panic.i1116 - -__barray_check_bounds.exit1118.1: ; preds = %__barray_mask_return.exit1120 - %31 = or disjoint i64 %29, 2 - store i64 %31, ptr %3, align 4 - %32 = getelementptr inbounds nuw i8, ptr %2, i64 8 - %33 = load i64, ptr %32, align 4 - tail call void @___rxy(i64 %33, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %33, double 0x400921FB54442D18) - %34 = load i64, ptr %3, align 4 - %35 = and i64 %34, 2 - %.not1183 = icmp eq i64 %35, 0 - br i1 %.not1183, label %panic.i1119, label %__barray_mask_return.exit1120.1 - -__barray_mask_return.exit1120.1: ; preds = %__barray_check_bounds.exit1118.1 - %36 = and i64 %34, -3 - store i64 %36, ptr %3, align 4 - store i64 %33, ptr %32, align 4 - %37 = load i64, ptr %3, align 4 - %38 = and i64 %37, 4 - %.not1184 = icmp eq i64 %38, 0 - br i1 %.not1184, label %__barray_check_bounds.exit1118.2, label %panic.i1116 - -__barray_check_bounds.exit1118.2: ; preds = %__barray_mask_return.exit1120.1 - %39 = or disjoint i64 %37, 4 - store i64 %39, ptr %3, align 4 - %40 = getelementptr inbounds nuw i8, ptr %2, i64 16 - %41 = load i64, ptr %40, align 4 - tail call void @___rxy(i64 %41, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %41, double 0x400921FB54442D18) - %42 = load i64, ptr %3, align 4 - %43 = and i64 %42, 4 - %.not1185 = icmp eq i64 %43, 0 - br i1 %.not1185, label %panic.i1119, label %__barray_mask_return.exit1120.2 - -__barray_mask_return.exit1120.2: ; preds = %__barray_check_bounds.exit1118.2 - %44 = and i64 %42, -5 - store i64 %44, ptr %3, align 4 - store i64 %41, ptr %40, align 4 - %45 = load i64, ptr %3, align 4 - %46 = and i64 %45, 8 - %.not1186 = icmp eq i64 %46, 0 - br i1 %.not1186, label %__barray_check_bounds.exit1118.3, label %panic.i1116 - -__barray_check_bounds.exit1118.3: ; preds = %__barray_mask_return.exit1120.2 - %47 = or disjoint i64 %45, 8 - store i64 %47, ptr %3, align 4 - %48 = getelementptr inbounds nuw i8, ptr %2, i64 24 - %49 = load i64, ptr %48, align 4 - tail call void @___rxy(i64 %49, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %49, double 0x400921FB54442D18) - %50 = load i64, ptr %3, align 4 - %51 = and i64 %50, 8 - %.not1187 = icmp eq i64 %51, 0 - br i1 %.not1187, label %panic.i1119, label %__barray_check_bounds.exit1115.4 - -__barray_check_bounds.exit1115.4: ; preds = %__barray_check_bounds.exit1118.3 - %52 = and i64 %50, -9 - store i64 %52, ptr %3, align 4 - store i64 %49, ptr %48, align 4 - %53 = load i64, ptr %3, align 4 - %54 = and i64 %53, 16 - %.not1188 = icmp eq i64 %54, 0 - br i1 %.not1188, label %__barray_check_bounds.exit1118.4, label %panic.i1116 - -__barray_check_bounds.exit1118.4: ; preds = %__barray_check_bounds.exit1115.4 - %55 = or disjoint i64 %53, 16 - store i64 %55, ptr %3, align 4 - %56 = getelementptr inbounds nuw i8, ptr %2, i64 32 - %57 = load i64, ptr %56, align 4 - tail call void @___rxy(i64 %57, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %57, double 0x400921FB54442D18) - %58 = load i64, ptr %3, align 4 - %59 = and i64 %58, 16 - %.not1189 = icmp eq i64 %59, 0 - br i1 %.not1189, label %panic.i1119, label %__barray_mask_return.exit1120.4 - -__barray_mask_return.exit1120.4: ; preds = %__barray_check_bounds.exit1118.4 - %60 = and i64 %58, -17 - store i64 %60, ptr %3, align 4 - store i64 %57, ptr %56, align 4 - %61 = load i64, ptr %3, align 4 - %62 = trunc i64 %61 to i1 - br i1 %62, label %panic.i1127, label %.thread - -panic.i1123: ; preds = %__barray_check_bounds.exit1122.4, %.thread.3, %.thread.2, %.thread.1, %.thread - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -loop_out318: ; preds = %cond_exit_298.4 - tail call void @heap_free(ptr nonnull %2) - tail call void @heap_free(ptr nonnull %3) - %63 = load i64, ptr %1, align 4 - %64 = trunc i64 %63 to i1 - br i1 %64, label %panic.i1129, label %__barray_mask_borrow.exit1130 - -mask_block_err.i: ; preds = %cond_exit_298.4 - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -panic.i1127: ; preds = %__barray_check_bounds.exit1126.4, %cond_exit_298.2, %cond_exit_298.1, %cond_exit_298, %__barray_mask_return.exit1120.4 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -.thread: ; preds = %__barray_mask_return.exit1120.4 - %65 = or disjoint i64 %61, 1 - store i64 %65, ptr %3, align 4 - %66 = load i64, ptr %2, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %66) - tail call void @___qfree(i64 %66) - %67 = load i64, ptr %1, align 4 - %68 = trunc i64 %67 to i1 - br i1 %68, label %cond_exit_298, label %panic.i1123 - -cond_exit_298: ; preds = %.thread - %69 = and i64 %67, -2 - store i64 %69, ptr %1, align 4 - store i64 %lazy_measure, ptr %0, align 4 - %70 = load i64, ptr %3, align 4 - %71 = and i64 %70, 2 - %.not1190 = icmp eq i64 %71, 0 - br i1 %.not1190, label %.thread.1, label %panic.i1127 - -.thread.1: ; preds = %cond_exit_298 - %72 = or disjoint i64 %70, 2 - store i64 %72, ptr %3, align 4 - %73 = load i64, ptr %32, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %73) - tail call void @___qfree(i64 %73) - %74 = load i64, ptr %1, align 4 - %75 = and i64 %74, 2 - %.not1191 = icmp eq i64 %75, 0 - br i1 %.not1191, label %panic.i1123, label %cond_exit_298.1 - -cond_exit_298.1: ; preds = %.thread.1 - %76 = and i64 %74, -3 - store i64 %76, ptr %1, align 4 - %77 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %lazy_measure.1, ptr %77, align 4 - %78 = load i64, ptr %3, align 4 - %79 = and i64 %78, 4 - %.not1192 = icmp eq i64 %79, 0 - br i1 %.not1192, label %.thread.2, label %panic.i1127 - -.thread.2: ; preds = %cond_exit_298.1 - %80 = or disjoint i64 %78, 4 - store i64 %80, ptr %3, align 4 - %81 = load i64, ptr %40, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %81) - tail call void @___qfree(i64 %81) - %82 = load i64, ptr %1, align 4 - %83 = and i64 %82, 4 - %.not1193 = icmp eq i64 %83, 0 - br i1 %.not1193, label %panic.i1123, label %cond_exit_298.2 - -cond_exit_298.2: ; preds = %.thread.2 - %84 = and i64 %82, -5 - store i64 %84, ptr %1, align 4 - %85 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %lazy_measure.2, ptr %85, align 4 - %86 = load i64, ptr %3, align 4 - %87 = and i64 %86, 8 - %.not1194 = icmp eq i64 %87, 0 - br i1 %.not1194, label %.thread.3, label %panic.i1127 - -.thread.3: ; preds = %cond_exit_298.2 - %88 = or disjoint i64 %86, 8 - store i64 %88, ptr %3, align 4 - %89 = load i64, ptr %48, align 4 - %lazy_measure.3 = tail call i64 @___lazy_measure(i64 %89) - tail call void @___qfree(i64 %89) - %90 = load i64, ptr %1, align 4 - %91 = and i64 %90, 8 - %.not1195 = icmp eq i64 %91, 0 - br i1 %.not1195, label %panic.i1123, label %__barray_check_bounds.exit1126.4 - -__barray_check_bounds.exit1126.4: ; preds = %.thread.3 - %92 = and i64 %90, -9 - store i64 %92, ptr %1, align 4 - %93 = getelementptr inbounds nuw i8, ptr %0, i64 24 - store i64 %lazy_measure.3, ptr %93, align 4 - %94 = load i64, ptr %3, align 4 - %95 = and i64 %94, 16 - %.not1196 = icmp eq i64 %95, 0 - br i1 %.not1196, label %__barray_check_bounds.exit1122.4, label %panic.i1127 - -__barray_check_bounds.exit1122.4: ; preds = %__barray_check_bounds.exit1126.4 - %96 = or disjoint i64 %94, 16 - store i64 %96, ptr %3, align 4 - %97 = load i64, ptr %56, align 4 - %lazy_measure.4 = tail call i64 @___lazy_measure(i64 %97) - tail call void @___qfree(i64 %97) - %98 = load i64, ptr %1, align 4 - %99 = and i64 %98, 16 - %.not1197 = icmp eq i64 %99, 0 - br i1 %.not1197, label %panic.i1123, label %cond_exit_298.4 - -cond_exit_298.4: ; preds = %__barray_check_bounds.exit1122.4 - %100 = and i64 %98, -17 - store i64 %100, ptr %1, align 4 - %101 = getelementptr inbounds nuw i8, ptr %0, i64 32 - store i64 %lazy_measure.4, ptr %101, align 4 - %102 = load i64, ptr %3, align 4 - %103 = or i64 %102, -32 - store i64 %103, ptr %3, align 4 - %104 = icmp eq i64 %103, -1 - br i1 %104, label %loop_out318, label %mask_block_err.i - -panic.i1129: ; preds = %loop_out318 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit1130: ; preds = %loop_out318 - %105 = or disjoint i64 %63, 1 - store i64 %105, ptr %1, align 4 - %106 = load i64, ptr %0, align 4 - tail call void @___inc_future_refcount(i64 %106) - %107 = load i64, ptr %1, align 4 - %108 = trunc i64 %107 to i1 - br i1 %108, label %__barray_mask_return.exit1132, label %panic.i1131 - -panic.i1131: ; preds = %__barray_mask_borrow.exit1130 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1132: ; preds = %__barray_mask_borrow.exit1130 - %109 = and i64 %107, -2 - store i64 %109, ptr %1, align 4 - store i64 %106, ptr %0, align 4 - %110 = load i64, ptr %1, align 4 - %111 = and i64 %110, 2 - %.not = icmp eq i64 %111, 0 - br i1 %.not, label %__barray_mask_borrow.exit1134, label %panic.i1133 - -panic.i1133: ; preds = %__barray_mask_return.exit1132 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit1134: ; preds = %__barray_mask_return.exit1132 - %112 = or disjoint i64 %110, 2 - store i64 %112, ptr %1, align 4 - %113 = load i64, ptr %77, align 4 - tail call void @___inc_future_refcount(i64 %113) - %114 = load i64, ptr %1, align 4 - %115 = and i64 %114, 2 - %.not1168 = icmp eq i64 %115, 0 - br i1 %.not1168, label %panic.i1135, label %__barray_mask_return.exit1136 - -panic.i1135: ; preds = %__barray_mask_borrow.exit1134 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1136: ; preds = %__barray_mask_borrow.exit1134 - %116 = and i64 %114, -3 - store i64 %116, ptr %1, align 4 - store i64 %113, ptr %77, align 4 - %117 = load i64, ptr %1, align 4 - %118 = and i64 %117, 4 - %.not1169 = icmp eq i64 %118, 0 - br i1 %.not1169, label %__barray_mask_borrow.exit1138, label %panic.i1137 - -panic.i1137: ; preds = %__barray_mask_return.exit1136 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit1138: ; preds = %__barray_mask_return.exit1136 - %119 = or disjoint i64 %117, 4 - store i64 %119, ptr %1, align 4 - %120 = load i64, ptr %85, align 4 - tail call void @___inc_future_refcount(i64 %120) - %121 = load i64, ptr %1, align 4 - %122 = and i64 %121, 4 - %.not1170 = icmp eq i64 %122, 0 - br i1 %.not1170, label %panic.i1139, label %__barray_mask_return.exit1140 - -panic.i1139: ; preds = %__barray_mask_borrow.exit1138 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1140: ; preds = %__barray_mask_borrow.exit1138 - %123 = and i64 %121, -5 - store i64 %123, ptr %1, align 4 - store i64 %120, ptr %85, align 4 - %124 = load i64, ptr %1, align 4 - %125 = and i64 %124, 8 - %.not1171 = icmp eq i64 %125, 0 - br i1 %.not1171, label %__barray_mask_borrow.exit1142, label %panic.i1141 - -panic.i1141: ; preds = %__barray_mask_return.exit1140 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit1142: ; preds = %__barray_mask_return.exit1140 - %126 = or disjoint i64 %124, 8 - store i64 %126, ptr %1, align 4 - %127 = load i64, ptr %93, align 4 - tail call void @___inc_future_refcount(i64 %127) - %128 = load i64, ptr %1, align 4 - %129 = and i64 %128, 8 - %.not1172 = icmp eq i64 %129, 0 - br i1 %.not1172, label %panic.i1143, label %__barray_mask_return.exit1144 - -panic.i1143: ; preds = %__barray_mask_borrow.exit1142 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1144: ; preds = %__barray_mask_borrow.exit1142 - %130 = and i64 %128, -9 - store i64 %130, ptr %1, align 4 - store i64 %127, ptr %93, align 4 - %131 = load i64, ptr %1, align 4 - %132 = and i64 %131, 16 - %.not1173 = icmp eq i64 %132, 0 - br i1 %.not1173, label %__barray_mask_borrow.exit1146, label %panic.i1145 - -panic.i1145: ; preds = %__barray_mask_return.exit1144 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit1146: ; preds = %__barray_mask_return.exit1144 - %133 = or disjoint i64 %131, 16 - store i64 %133, ptr %1, align 4 - %134 = load i64, ptr %101, align 4 - tail call void @___inc_future_refcount(i64 %134) - %135 = load i64, ptr %1, align 4 - %136 = and i64 %135, 16 - %.not1174 = icmp eq i64 %136, 0 - br i1 %.not1174, label %panic.i1147, label %__barray_mask_return.exit1148 - -panic.i1147: ; preds = %__barray_mask_borrow.exit1146 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1148: ; preds = %__barray_mask_borrow.exit1146 - %137 = and i64 %135, -17 - store i64 %137, ptr %1, align 4 - store i64 %134, ptr %101, align 4 - %138 = load i64, ptr %1, align 4 - %139 = trunc i64 %138 to i1 - br i1 %139, label %cond_exit_558, label %__barray_mask_borrow.exit1160 - -mask_block_err.i1152: ; preds = %cond_exit_558.4 - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_mask_borrow.exit1160: ; preds = %__barray_mask_return.exit1148 - %140 = or disjoint i64 %138, 1 - store i64 %140, ptr %1, align 4 - %141 = load i64, ptr %0, align 4 - tail call void @___dec_future_refcount(i64 %141) - br label %cond_exit_558 - -cond_exit_558: ; preds = %__barray_mask_borrow.exit1160, %__barray_mask_return.exit1148 - %142 = load i64, ptr %1, align 4 - %143 = and i64 %142, 2 - %.not1200 = icmp eq i64 %143, 0 - br i1 %.not1200, label %__barray_mask_borrow.exit1160.1, label %cond_exit_558.1 - -__barray_mask_borrow.exit1160.1: ; preds = %cond_exit_558 - %144 = or disjoint i64 %142, 2 - store i64 %144, ptr %1, align 4 - %145 = getelementptr inbounds nuw i8, ptr %0, i64 8 - %146 = load i64, ptr %145, align 4 - tail call void @___dec_future_refcount(i64 %146) - br label %cond_exit_558.1 - -cond_exit_558.1: ; preds = %__barray_mask_borrow.exit1160.1, %cond_exit_558 - %147 = load i64, ptr %1, align 4 - %148 = and i64 %147, 4 - %.not1201 = icmp eq i64 %148, 0 - br i1 %.not1201, label %__barray_mask_borrow.exit1160.2, label %cond_exit_558.2 - -__barray_mask_borrow.exit1160.2: ; preds = %cond_exit_558.1 - %149 = or disjoint i64 %147, 4 - store i64 %149, ptr %1, align 4 - %150 = getelementptr inbounds nuw i8, ptr %0, i64 16 - %151 = load i64, ptr %150, align 4 - tail call void @___dec_future_refcount(i64 %151) - br label %cond_exit_558.2 - -cond_exit_558.2: ; preds = %__barray_mask_borrow.exit1160.2, %cond_exit_558.1 - %152 = load i64, ptr %1, align 4 - %153 = and i64 %152, 8 - %.not1202 = icmp eq i64 %153, 0 - br i1 %.not1202, label %__barray_mask_borrow.exit1160.3, label %cond_exit_558.3 - -__barray_mask_borrow.exit1160.3: ; preds = %cond_exit_558.2 - %154 = or disjoint i64 %152, 8 - store i64 %154, ptr %1, align 4 - %155 = getelementptr inbounds nuw i8, ptr %0, i64 24 - %156 = load i64, ptr %155, align 4 - tail call void @___dec_future_refcount(i64 %156) - br label %cond_exit_558.3 - -cond_exit_558.3: ; preds = %__barray_mask_borrow.exit1160.3, %cond_exit_558.2 - %157 = load i64, ptr %1, align 4 - %158 = and i64 %157, 16 - %.not1203 = icmp eq i64 %158, 0 - br i1 %.not1203, label %__barray_mask_borrow.exit1160.4, label %cond_exit_558.4 - -__barray_mask_borrow.exit1160.4: ; preds = %cond_exit_558.3 - %159 = or disjoint i64 %157, 16 - store i64 %159, ptr %1, align 4 - %160 = getelementptr inbounds nuw i8, ptr %0, i64 32 - %161 = load i64, ptr %160, align 4 - tail call void @___dec_future_refcount(i64 %161) - br label %cond_exit_558.4 - -cond_exit_558.4: ; preds = %__barray_mask_borrow.exit1160.4, %cond_exit_558.3 - %162 = load i64, ptr %1, align 4 - %163 = or i64 %162, -32 - store i64 %163, ptr %1, align 4 - %164 = icmp eq i64 %163, -1 - br i1 %164, label %loop_out620, label %mask_block_err.i1152 - -loop_out620: ; preds = %cond_exit_558.4 - tail call void @heap_free(ptr nonnull %0) - tail call void @heap_free(ptr nonnull %1) - %read_bool = tail call i1 @___read_future_bool(i64 %106) - tail call void @___dec_future_refcount(i64 %106) - tail call void @print_bool(ptr nonnull @res_a.A4A74DAF.0, i64 11, i1 %read_bool) - %read_bool690 = tail call i1 @___read_future_bool(i64 %113) - tail call void @___dec_future_refcount(i64 %113) - tail call void @print_bool(ptr nonnull @res_b.3BD50C23.0, i64 11, i1 %read_bool690) - %read_bool705 = tail call i1 @___read_future_bool(i64 %120) - tail call void @___dec_future_refcount(i64 %120) - tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool705) - %read_bool720 = tail call i1 @___read_future_bool(i64 %127) - tail call void @___dec_future_refcount(i64 %127) - tail call void @print_bool(ptr nonnull @res_d.00B84DC7.0, i64 11, i1 %read_bool720) - %read_bool735 = tail call i1 @___read_future_bool(i64 %134) - tail call void @___dec_future_refcount(i64 %134) - tail call void @print_bool(ptr nonnull @res_e.B9A29CAF.0, i64 11, i1 %read_bool735) - tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot2) - %rint = tail call i32 @random_int() - %rfloat = tail call double @random_float() - %165 = sext i32 %rint to i64 - tail call void @print_int(ptr nonnull @res_random_int.805B8DD0.0, i64 19, i64 %165) - tail call void @print_float(ptr nonnull @res_random_flo.4EFA2734.0, i64 23, double %rfloat) - ret void -} - -declare ptr @heap_alloc(i64) local_unnamed_addr - -declare i64 @get_current_shot() local_unnamed_addr - -declare void @random_seed(i64) local_unnamed_addr - -; Function Attrs: noreturn -declare void @panic(i32, ptr) local_unnamed_addr #0 - -declare void @heap_free(ptr) local_unnamed_addr - -declare i64 @___lazy_measure(i64) local_unnamed_addr - -declare void @___qfree(i64) local_unnamed_addr - -declare void @___inc_future_refcount(i64) local_unnamed_addr - -declare void @___dec_future_refcount(i64) local_unnamed_addr - -declare i1 @___read_future_bool(i64) local_unnamed_addr - -declare void @print_bool(ptr, i64, i1) local_unnamed_addr - -declare void @print_int(ptr, i64, i64) local_unnamed_addr - -declare i32 @random_int() local_unnamed_addr - -declare double @random_float() local_unnamed_addr - -declare void @print_float(ptr, i64, double) local_unnamed_addr - -declare void @___rxy(i64, double, double) local_unnamed_addr - -declare void @___rz(i64, double) local_unnamed_addr - -declare i64 @___qalloc() local_unnamed_addr - -declare void @___reset(i64) local_unnamed_addr - -define i64 @qmain(i64 %0) local_unnamed_addr { -entry: - tail call void @setup(i64 %0) - tail call void @__hugr__.__main__.main.1() - %1 = tail call i64 @teardown() - ret i64 %1 -} - -declare void @setup(i64) local_unnamed_addr - -declare i64 @teardown() local_unnamed_addr - -attributes #0 = { noreturn } - -!name = !{!0} - -!0 = !{!"mainlib"} diff --git a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition/determinism_repetition-helios-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition/determinism_repetition-helios-aarch64-unknown-linux-gnu.ll deleted file mode 100644 index eac072dc..00000000 --- a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition/determinism_repetition-helios-aarch64-unknown-linux-gnu.ll +++ /dev/null @@ -1,642 +0,0 @@ -; ModuleID = 'hugr' -source_filename = "hugr" -target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32" -target triple = "aarch64-unknown-linux-gnu" - -@"e_Array alre.5A300C2A.0" = private constant [57 x i8] c"8EXIT:INT:Array already contains an element at this index" -@"e_Array elem.E746B1A3.0" = private constant [43 x i8] c"*EXIT:INT:Array element is already borrowed" -@"e_Array cont.EFA5AC45.0" = private constant [70 x i8] c"EEXIT:INT:Array contains non-borrowed elements and cannot be discarded" -@res_a.A4A74DAF.0 = private constant [12 x i8] c"\0BUSER:BOOL:a" -@res_b.3BD50C23.0 = private constant [12 x i8] c"\0BUSER:BOOL:b" -@res_c.1C9EF4D1.0 = private constant [12 x i8] c"\0BUSER:BOOL:c" -@res_d.00B84DC7.0 = private constant [12 x i8] c"\0BUSER:BOOL:d" -@res_e.B9A29CAF.0 = private constant [12 x i8] c"\0BUSER:BOOL:e" -@res_shot.6D86EAF7.0 = private constant [14 x i8] c"\0DUSER:INT:shot" -@res_random_int.805B8DD0.0 = private constant [20 x i8] c"\13USER:INT:random_int" -@res_random_flo.4EFA2734.0 = private constant [24 x i8] c"\17USER:FLOAT:random_float" -@"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." - -define void @__hugr__.__main__.main.1() local_unnamed_addr { -cond_104_case_1: - %0 = tail call ptr @heap_alloc(i64 40) - %1 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %1, align 1 - %shot = tail call i64 @get_current_shot() - tail call void @random_seed(i64 %shot) - %shot2 = tail call i64 @get_current_shot() - %2 = tail call ptr @heap_alloc(i64 40) - %3 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %3, align 1 - %qalloc.i = tail call i64 @___qalloc() - %not_max.not.not.i = icmp eq i64 %qalloc.i, -1 - br i1 %not_max.not.not.i, label %cond_535_case_0.i, label %__barray_check_bounds.exit - -cond_535_case_0.i: ; preds = %cond_104_case_1.4, %cond_104_case_1.3, %cond_104_case_1.2, %cond_104_case_1.1, %cond_104_case_1 - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__barray_check_bounds.exit: ; preds = %cond_104_case_1 - tail call void @___reset(i64 %qalloc.i) - %4 = load i64, ptr %3, align 4 - %5 = trunc i64 %4 to i1 - br i1 %5, label %cond_104_case_1.1, label %panic.i - -panic.i: ; preds = %__barray_check_bounds.exit.4, %__barray_check_bounds.exit.3, %__barray_check_bounds.exit.2, %__barray_check_bounds.exit.1, %__barray_check_bounds.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -cond_104_case_1.1: ; preds = %__barray_check_bounds.exit - %6 = and i64 %4, -2 - store i64 %6, ptr %3, align 4 - store i64 %qalloc.i, ptr %2, align 4 - %qalloc.i.1 = tail call i64 @___qalloc() - %not_max.not.not.i.1 = icmp eq i64 %qalloc.i.1, -1 - br i1 %not_max.not.not.i.1, label %cond_535_case_0.i, label %__barray_check_bounds.exit.1 - -__barray_check_bounds.exit.1: ; preds = %cond_104_case_1.1 - tail call void @___reset(i64 %qalloc.i.1) - %7 = load i64, ptr %3, align 4 - %8 = and i64 %7, 2 - %.not1178 = icmp eq i64 %8, 0 - br i1 %.not1178, label %panic.i, label %cond_104_case_1.2 - -cond_104_case_1.2: ; preds = %__barray_check_bounds.exit.1 - %9 = and i64 %7, -3 - store i64 %9, ptr %3, align 4 - %10 = getelementptr inbounds nuw i8, ptr %2, i64 8 - store i64 %qalloc.i.1, ptr %10, align 4 - %qalloc.i.2 = tail call i64 @___qalloc() - %not_max.not.not.i.2 = icmp eq i64 %qalloc.i.2, -1 - br i1 %not_max.not.not.i.2, label %cond_535_case_0.i, label %__barray_check_bounds.exit.2 - -__barray_check_bounds.exit.2: ; preds = %cond_104_case_1.2 - tail call void @___reset(i64 %qalloc.i.2) - %11 = load i64, ptr %3, align 4 - %12 = and i64 %11, 4 - %.not1179 = icmp eq i64 %12, 0 - br i1 %.not1179, label %panic.i, label %cond_104_case_1.3 - -cond_104_case_1.3: ; preds = %__barray_check_bounds.exit.2 - %13 = and i64 %11, -5 - store i64 %13, ptr %3, align 4 - %14 = getelementptr inbounds nuw i8, ptr %2, i64 16 - store i64 %qalloc.i.2, ptr %14, align 4 - %qalloc.i.3 = tail call i64 @___qalloc() - %not_max.not.not.i.3 = icmp eq i64 %qalloc.i.3, -1 - br i1 %not_max.not.not.i.3, label %cond_535_case_0.i, label %__barray_check_bounds.exit.3 - -__barray_check_bounds.exit.3: ; preds = %cond_104_case_1.3 - tail call void @___reset(i64 %qalloc.i.3) - %15 = load i64, ptr %3, align 4 - %16 = and i64 %15, 8 - %.not1180 = icmp eq i64 %16, 0 - br i1 %.not1180, label %panic.i, label %cond_104_case_1.4 - -cond_104_case_1.4: ; preds = %__barray_check_bounds.exit.3 - %17 = and i64 %15, -9 - store i64 %17, ptr %3, align 4 - %18 = getelementptr inbounds nuw i8, ptr %2, i64 24 - store i64 %qalloc.i.3, ptr %18, align 4 - %qalloc.i.4 = tail call i64 @___qalloc() - %not_max.not.not.i.4 = icmp eq i64 %qalloc.i.4, -1 - br i1 %not_max.not.not.i.4, label %cond_535_case_0.i, label %__barray_check_bounds.exit.4 - -__barray_check_bounds.exit.4: ; preds = %cond_104_case_1.4 - tail call void @___reset(i64 %qalloc.i.4) - %19 = load i64, ptr %3, align 4 - %20 = and i64 %19, 16 - %.not1181 = icmp eq i64 %20, 0 - br i1 %.not1181, label %panic.i, label %cond_exit_104.5 - -cond_exit_104.5: ; preds = %__barray_check_bounds.exit.4 - %21 = and i64 %19, -17 - store i64 %21, ptr %3, align 4 - %22 = getelementptr inbounds nuw i8, ptr %2, i64 32 - store i64 %qalloc.i.4, ptr %22, align 4 - %.pre = load i64, ptr %3, align 4 - %23 = trunc i64 %.pre to i1 - br i1 %23, label %panic.i1116, label %__barray_check_bounds.exit1118 - -panic.i1116: ; preds = %__barray_check_bounds.exit1115.4, %__barray_mask_return.exit1120.2, %__barray_mask_return.exit1120.1, %__barray_mask_return.exit1120, %cond_exit_104.5 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1118: ; preds = %cond_exit_104.5 - %24 = or disjoint i64 %.pre, 1 - store i64 %24, ptr %3, align 4 - %25 = load i64, ptr %2, align 4 - tail call void @___rxy(i64 %25, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %25, double 0x400921FB54442D18) - %26 = load i64, ptr %3, align 4 - %27 = trunc i64 %26 to i1 - br i1 %27, label %__barray_mask_return.exit1120, label %panic.i1119 - -panic.i1119: ; preds = %__barray_check_bounds.exit1118.4, %__barray_check_bounds.exit1118.3, %__barray_check_bounds.exit1118.2, %__barray_check_bounds.exit1118.1, %__barray_check_bounds.exit1118 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1120: ; preds = %__barray_check_bounds.exit1118 - %28 = and i64 %26, -2 - store i64 %28, ptr %3, align 4 - store i64 %25, ptr %2, align 4 - %29 = load i64, ptr %3, align 4 - %30 = and i64 %29, 2 - %.not1182 = icmp eq i64 %30, 0 - br i1 %.not1182, label %__barray_check_bounds.exit1118.1, label %panic.i1116 - -__barray_check_bounds.exit1118.1: ; preds = %__barray_mask_return.exit1120 - %31 = or disjoint i64 %29, 2 - store i64 %31, ptr %3, align 4 - %32 = getelementptr inbounds nuw i8, ptr %2, i64 8 - %33 = load i64, ptr %32, align 4 - tail call void @___rxy(i64 %33, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %33, double 0x400921FB54442D18) - %34 = load i64, ptr %3, align 4 - %35 = and i64 %34, 2 - %.not1183 = icmp eq i64 %35, 0 - br i1 %.not1183, label %panic.i1119, label %__barray_mask_return.exit1120.1 - -__barray_mask_return.exit1120.1: ; preds = %__barray_check_bounds.exit1118.1 - %36 = and i64 %34, -3 - store i64 %36, ptr %3, align 4 - store i64 %33, ptr %32, align 4 - %37 = load i64, ptr %3, align 4 - %38 = and i64 %37, 4 - %.not1184 = icmp eq i64 %38, 0 - br i1 %.not1184, label %__barray_check_bounds.exit1118.2, label %panic.i1116 - -__barray_check_bounds.exit1118.2: ; preds = %__barray_mask_return.exit1120.1 - %39 = or disjoint i64 %37, 4 - store i64 %39, ptr %3, align 4 - %40 = getelementptr inbounds nuw i8, ptr %2, i64 16 - %41 = load i64, ptr %40, align 4 - tail call void @___rxy(i64 %41, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %41, double 0x400921FB54442D18) - %42 = load i64, ptr %3, align 4 - %43 = and i64 %42, 4 - %.not1185 = icmp eq i64 %43, 0 - br i1 %.not1185, label %panic.i1119, label %__barray_mask_return.exit1120.2 - -__barray_mask_return.exit1120.2: ; preds = %__barray_check_bounds.exit1118.2 - %44 = and i64 %42, -5 - store i64 %44, ptr %3, align 4 - store i64 %41, ptr %40, align 4 - %45 = load i64, ptr %3, align 4 - %46 = and i64 %45, 8 - %.not1186 = icmp eq i64 %46, 0 - br i1 %.not1186, label %__barray_check_bounds.exit1118.3, label %panic.i1116 - -__barray_check_bounds.exit1118.3: ; preds = %__barray_mask_return.exit1120.2 - %47 = or disjoint i64 %45, 8 - store i64 %47, ptr %3, align 4 - %48 = getelementptr inbounds nuw i8, ptr %2, i64 24 - %49 = load i64, ptr %48, align 4 - tail call void @___rxy(i64 %49, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %49, double 0x400921FB54442D18) - %50 = load i64, ptr %3, align 4 - %51 = and i64 %50, 8 - %.not1187 = icmp eq i64 %51, 0 - br i1 %.not1187, label %panic.i1119, label %__barray_check_bounds.exit1115.4 - -__barray_check_bounds.exit1115.4: ; preds = %__barray_check_bounds.exit1118.3 - %52 = and i64 %50, -9 - store i64 %52, ptr %3, align 4 - store i64 %49, ptr %48, align 4 - %53 = load i64, ptr %3, align 4 - %54 = and i64 %53, 16 - %.not1188 = icmp eq i64 %54, 0 - br i1 %.not1188, label %__barray_check_bounds.exit1118.4, label %panic.i1116 - -__barray_check_bounds.exit1118.4: ; preds = %__barray_check_bounds.exit1115.4 - %55 = or disjoint i64 %53, 16 - store i64 %55, ptr %3, align 4 - %56 = getelementptr inbounds nuw i8, ptr %2, i64 32 - %57 = load i64, ptr %56, align 4 - tail call void @___rxy(i64 %57, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %57, double 0x400921FB54442D18) - %58 = load i64, ptr %3, align 4 - %59 = and i64 %58, 16 - %.not1189 = icmp eq i64 %59, 0 - br i1 %.not1189, label %panic.i1119, label %__barray_mask_return.exit1120.4 - -__barray_mask_return.exit1120.4: ; preds = %__barray_check_bounds.exit1118.4 - %60 = and i64 %58, -17 - store i64 %60, ptr %3, align 4 - store i64 %57, ptr %56, align 4 - %61 = load i64, ptr %3, align 4 - %62 = trunc i64 %61 to i1 - br i1 %62, label %panic.i1127, label %.thread - -panic.i1123: ; preds = %__barray_check_bounds.exit1122.4, %.thread.3, %.thread.2, %.thread.1, %.thread - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -loop_out318: ; preds = %cond_exit_298.4 - tail call void @heap_free(ptr nonnull %2) - tail call void @heap_free(ptr nonnull %3) - %63 = load i64, ptr %1, align 4 - %64 = trunc i64 %63 to i1 - br i1 %64, label %panic.i1129, label %__barray_mask_borrow.exit1130 - -mask_block_err.i: ; preds = %cond_exit_298.4 - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -panic.i1127: ; preds = %__barray_check_bounds.exit1126.4, %cond_exit_298.2, %cond_exit_298.1, %cond_exit_298, %__barray_mask_return.exit1120.4 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -.thread: ; preds = %__barray_mask_return.exit1120.4 - %65 = or disjoint i64 %61, 1 - store i64 %65, ptr %3, align 4 - %66 = load i64, ptr %2, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %66) - tail call void @___qfree(i64 %66) - %67 = load i64, ptr %1, align 4 - %68 = trunc i64 %67 to i1 - br i1 %68, label %cond_exit_298, label %panic.i1123 - -cond_exit_298: ; preds = %.thread - %69 = and i64 %67, -2 - store i64 %69, ptr %1, align 4 - store i64 %lazy_measure, ptr %0, align 4 - %70 = load i64, ptr %3, align 4 - %71 = and i64 %70, 2 - %.not1190 = icmp eq i64 %71, 0 - br i1 %.not1190, label %.thread.1, label %panic.i1127 - -.thread.1: ; preds = %cond_exit_298 - %72 = or disjoint i64 %70, 2 - store i64 %72, ptr %3, align 4 - %73 = load i64, ptr %32, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %73) - tail call void @___qfree(i64 %73) - %74 = load i64, ptr %1, align 4 - %75 = and i64 %74, 2 - %.not1191 = icmp eq i64 %75, 0 - br i1 %.not1191, label %panic.i1123, label %cond_exit_298.1 - -cond_exit_298.1: ; preds = %.thread.1 - %76 = and i64 %74, -3 - store i64 %76, ptr %1, align 4 - %77 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %lazy_measure.1, ptr %77, align 4 - %78 = load i64, ptr %3, align 4 - %79 = and i64 %78, 4 - %.not1192 = icmp eq i64 %79, 0 - br i1 %.not1192, label %.thread.2, label %panic.i1127 - -.thread.2: ; preds = %cond_exit_298.1 - %80 = or disjoint i64 %78, 4 - store i64 %80, ptr %3, align 4 - %81 = load i64, ptr %40, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %81) - tail call void @___qfree(i64 %81) - %82 = load i64, ptr %1, align 4 - %83 = and i64 %82, 4 - %.not1193 = icmp eq i64 %83, 0 - br i1 %.not1193, label %panic.i1123, label %cond_exit_298.2 - -cond_exit_298.2: ; preds = %.thread.2 - %84 = and i64 %82, -5 - store i64 %84, ptr %1, align 4 - %85 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %lazy_measure.2, ptr %85, align 4 - %86 = load i64, ptr %3, align 4 - %87 = and i64 %86, 8 - %.not1194 = icmp eq i64 %87, 0 - br i1 %.not1194, label %.thread.3, label %panic.i1127 - -.thread.3: ; preds = %cond_exit_298.2 - %88 = or disjoint i64 %86, 8 - store i64 %88, ptr %3, align 4 - %89 = load i64, ptr %48, align 4 - %lazy_measure.3 = tail call i64 @___lazy_measure(i64 %89) - tail call void @___qfree(i64 %89) - %90 = load i64, ptr %1, align 4 - %91 = and i64 %90, 8 - %.not1195 = icmp eq i64 %91, 0 - br i1 %.not1195, label %panic.i1123, label %__barray_check_bounds.exit1126.4 - -__barray_check_bounds.exit1126.4: ; preds = %.thread.3 - %92 = and i64 %90, -9 - store i64 %92, ptr %1, align 4 - %93 = getelementptr inbounds nuw i8, ptr %0, i64 24 - store i64 %lazy_measure.3, ptr %93, align 4 - %94 = load i64, ptr %3, align 4 - %95 = and i64 %94, 16 - %.not1196 = icmp eq i64 %95, 0 - br i1 %.not1196, label %__barray_check_bounds.exit1122.4, label %panic.i1127 - -__barray_check_bounds.exit1122.4: ; preds = %__barray_check_bounds.exit1126.4 - %96 = or disjoint i64 %94, 16 - store i64 %96, ptr %3, align 4 - %97 = load i64, ptr %56, align 4 - %lazy_measure.4 = tail call i64 @___lazy_measure(i64 %97) - tail call void @___qfree(i64 %97) - %98 = load i64, ptr %1, align 4 - %99 = and i64 %98, 16 - %.not1197 = icmp eq i64 %99, 0 - br i1 %.not1197, label %panic.i1123, label %cond_exit_298.4 - -cond_exit_298.4: ; preds = %__barray_check_bounds.exit1122.4 - %100 = and i64 %98, -17 - store i64 %100, ptr %1, align 4 - %101 = getelementptr inbounds nuw i8, ptr %0, i64 32 - store i64 %lazy_measure.4, ptr %101, align 4 - %102 = load i64, ptr %3, align 4 - %103 = or i64 %102, -32 - store i64 %103, ptr %3, align 4 - %104 = icmp eq i64 %103, -1 - br i1 %104, label %loop_out318, label %mask_block_err.i - -panic.i1129: ; preds = %loop_out318 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit1130: ; preds = %loop_out318 - %105 = or disjoint i64 %63, 1 - store i64 %105, ptr %1, align 4 - %106 = load i64, ptr %0, align 4 - tail call void @___inc_future_refcount(i64 %106) - %107 = load i64, ptr %1, align 4 - %108 = trunc i64 %107 to i1 - br i1 %108, label %__barray_mask_return.exit1132, label %panic.i1131 - -panic.i1131: ; preds = %__barray_mask_borrow.exit1130 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1132: ; preds = %__barray_mask_borrow.exit1130 - %109 = and i64 %107, -2 - store i64 %109, ptr %1, align 4 - store i64 %106, ptr %0, align 4 - %110 = load i64, ptr %1, align 4 - %111 = and i64 %110, 2 - %.not = icmp eq i64 %111, 0 - br i1 %.not, label %__barray_mask_borrow.exit1134, label %panic.i1133 - -panic.i1133: ; preds = %__barray_mask_return.exit1132 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit1134: ; preds = %__barray_mask_return.exit1132 - %112 = or disjoint i64 %110, 2 - store i64 %112, ptr %1, align 4 - %113 = load i64, ptr %77, align 4 - tail call void @___inc_future_refcount(i64 %113) - %114 = load i64, ptr %1, align 4 - %115 = and i64 %114, 2 - %.not1168 = icmp eq i64 %115, 0 - br i1 %.not1168, label %panic.i1135, label %__barray_mask_return.exit1136 - -panic.i1135: ; preds = %__barray_mask_borrow.exit1134 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1136: ; preds = %__barray_mask_borrow.exit1134 - %116 = and i64 %114, -3 - store i64 %116, ptr %1, align 4 - store i64 %113, ptr %77, align 4 - %117 = load i64, ptr %1, align 4 - %118 = and i64 %117, 4 - %.not1169 = icmp eq i64 %118, 0 - br i1 %.not1169, label %__barray_mask_borrow.exit1138, label %panic.i1137 - -panic.i1137: ; preds = %__barray_mask_return.exit1136 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit1138: ; preds = %__barray_mask_return.exit1136 - %119 = or disjoint i64 %117, 4 - store i64 %119, ptr %1, align 4 - %120 = load i64, ptr %85, align 4 - tail call void @___inc_future_refcount(i64 %120) - %121 = load i64, ptr %1, align 4 - %122 = and i64 %121, 4 - %.not1170 = icmp eq i64 %122, 0 - br i1 %.not1170, label %panic.i1139, label %__barray_mask_return.exit1140 - -panic.i1139: ; preds = %__barray_mask_borrow.exit1138 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1140: ; preds = %__barray_mask_borrow.exit1138 - %123 = and i64 %121, -5 - store i64 %123, ptr %1, align 4 - store i64 %120, ptr %85, align 4 - %124 = load i64, ptr %1, align 4 - %125 = and i64 %124, 8 - %.not1171 = icmp eq i64 %125, 0 - br i1 %.not1171, label %__barray_mask_borrow.exit1142, label %panic.i1141 - -panic.i1141: ; preds = %__barray_mask_return.exit1140 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit1142: ; preds = %__barray_mask_return.exit1140 - %126 = or disjoint i64 %124, 8 - store i64 %126, ptr %1, align 4 - %127 = load i64, ptr %93, align 4 - tail call void @___inc_future_refcount(i64 %127) - %128 = load i64, ptr %1, align 4 - %129 = and i64 %128, 8 - %.not1172 = icmp eq i64 %129, 0 - br i1 %.not1172, label %panic.i1143, label %__barray_mask_return.exit1144 - -panic.i1143: ; preds = %__barray_mask_borrow.exit1142 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1144: ; preds = %__barray_mask_borrow.exit1142 - %130 = and i64 %128, -9 - store i64 %130, ptr %1, align 4 - store i64 %127, ptr %93, align 4 - %131 = load i64, ptr %1, align 4 - %132 = and i64 %131, 16 - %.not1173 = icmp eq i64 %132, 0 - br i1 %.not1173, label %__barray_mask_borrow.exit1146, label %panic.i1145 - -panic.i1145: ; preds = %__barray_mask_return.exit1144 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit1146: ; preds = %__barray_mask_return.exit1144 - %133 = or disjoint i64 %131, 16 - store i64 %133, ptr %1, align 4 - %134 = load i64, ptr %101, align 4 - tail call void @___inc_future_refcount(i64 %134) - %135 = load i64, ptr %1, align 4 - %136 = and i64 %135, 16 - %.not1174 = icmp eq i64 %136, 0 - br i1 %.not1174, label %panic.i1147, label %__barray_mask_return.exit1148 - -panic.i1147: ; preds = %__barray_mask_borrow.exit1146 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1148: ; preds = %__barray_mask_borrow.exit1146 - %137 = and i64 %135, -17 - store i64 %137, ptr %1, align 4 - store i64 %134, ptr %101, align 4 - %138 = load i64, ptr %1, align 4 - %139 = trunc i64 %138 to i1 - br i1 %139, label %cond_exit_558, label %__barray_mask_borrow.exit1160 - -mask_block_err.i1152: ; preds = %cond_exit_558.4 - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_mask_borrow.exit1160: ; preds = %__barray_mask_return.exit1148 - %140 = or disjoint i64 %138, 1 - store i64 %140, ptr %1, align 4 - %141 = load i64, ptr %0, align 4 - tail call void @___dec_future_refcount(i64 %141) - br label %cond_exit_558 - -cond_exit_558: ; preds = %__barray_mask_borrow.exit1160, %__barray_mask_return.exit1148 - %142 = load i64, ptr %1, align 4 - %143 = and i64 %142, 2 - %.not1200 = icmp eq i64 %143, 0 - br i1 %.not1200, label %__barray_mask_borrow.exit1160.1, label %cond_exit_558.1 - -__barray_mask_borrow.exit1160.1: ; preds = %cond_exit_558 - %144 = or disjoint i64 %142, 2 - store i64 %144, ptr %1, align 4 - %145 = getelementptr inbounds nuw i8, ptr %0, i64 8 - %146 = load i64, ptr %145, align 4 - tail call void @___dec_future_refcount(i64 %146) - br label %cond_exit_558.1 - -cond_exit_558.1: ; preds = %__barray_mask_borrow.exit1160.1, %cond_exit_558 - %147 = load i64, ptr %1, align 4 - %148 = and i64 %147, 4 - %.not1201 = icmp eq i64 %148, 0 - br i1 %.not1201, label %__barray_mask_borrow.exit1160.2, label %cond_exit_558.2 - -__barray_mask_borrow.exit1160.2: ; preds = %cond_exit_558.1 - %149 = or disjoint i64 %147, 4 - store i64 %149, ptr %1, align 4 - %150 = getelementptr inbounds nuw i8, ptr %0, i64 16 - %151 = load i64, ptr %150, align 4 - tail call void @___dec_future_refcount(i64 %151) - br label %cond_exit_558.2 - -cond_exit_558.2: ; preds = %__barray_mask_borrow.exit1160.2, %cond_exit_558.1 - %152 = load i64, ptr %1, align 4 - %153 = and i64 %152, 8 - %.not1202 = icmp eq i64 %153, 0 - br i1 %.not1202, label %__barray_mask_borrow.exit1160.3, label %cond_exit_558.3 - -__barray_mask_borrow.exit1160.3: ; preds = %cond_exit_558.2 - %154 = or disjoint i64 %152, 8 - store i64 %154, ptr %1, align 4 - %155 = getelementptr inbounds nuw i8, ptr %0, i64 24 - %156 = load i64, ptr %155, align 4 - tail call void @___dec_future_refcount(i64 %156) - br label %cond_exit_558.3 - -cond_exit_558.3: ; preds = %__barray_mask_borrow.exit1160.3, %cond_exit_558.2 - %157 = load i64, ptr %1, align 4 - %158 = and i64 %157, 16 - %.not1203 = icmp eq i64 %158, 0 - br i1 %.not1203, label %__barray_mask_borrow.exit1160.4, label %cond_exit_558.4 - -__barray_mask_borrow.exit1160.4: ; preds = %cond_exit_558.3 - %159 = or disjoint i64 %157, 16 - store i64 %159, ptr %1, align 4 - %160 = getelementptr inbounds nuw i8, ptr %0, i64 32 - %161 = load i64, ptr %160, align 4 - tail call void @___dec_future_refcount(i64 %161) - br label %cond_exit_558.4 - -cond_exit_558.4: ; preds = %__barray_mask_borrow.exit1160.4, %cond_exit_558.3 - %162 = load i64, ptr %1, align 4 - %163 = or i64 %162, -32 - store i64 %163, ptr %1, align 4 - %164 = icmp eq i64 %163, -1 - br i1 %164, label %loop_out620, label %mask_block_err.i1152 - -loop_out620: ; preds = %cond_exit_558.4 - tail call void @heap_free(ptr nonnull %0) - tail call void @heap_free(ptr nonnull %1) - %read_bool = tail call i1 @___read_future_bool(i64 %106) - tail call void @___dec_future_refcount(i64 %106) - tail call void @print_bool(ptr nonnull @res_a.A4A74DAF.0, i64 11, i1 %read_bool) - %read_bool690 = tail call i1 @___read_future_bool(i64 %113) - tail call void @___dec_future_refcount(i64 %113) - tail call void @print_bool(ptr nonnull @res_b.3BD50C23.0, i64 11, i1 %read_bool690) - %read_bool705 = tail call i1 @___read_future_bool(i64 %120) - tail call void @___dec_future_refcount(i64 %120) - tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool705) - %read_bool720 = tail call i1 @___read_future_bool(i64 %127) - tail call void @___dec_future_refcount(i64 %127) - tail call void @print_bool(ptr nonnull @res_d.00B84DC7.0, i64 11, i1 %read_bool720) - %read_bool735 = tail call i1 @___read_future_bool(i64 %134) - tail call void @___dec_future_refcount(i64 %134) - tail call void @print_bool(ptr nonnull @res_e.B9A29CAF.0, i64 11, i1 %read_bool735) - tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot2) - %rint = tail call i32 @random_int() - %rfloat = tail call double @random_float() - %165 = sext i32 %rint to i64 - tail call void @print_int(ptr nonnull @res_random_int.805B8DD0.0, i64 19, i64 %165) - tail call void @print_float(ptr nonnull @res_random_flo.4EFA2734.0, i64 23, double %rfloat) - ret void -} - -declare ptr @heap_alloc(i64) local_unnamed_addr - -declare i64 @get_current_shot() local_unnamed_addr - -declare void @random_seed(i64) local_unnamed_addr - -; Function Attrs: noreturn -declare void @panic(i32, ptr) local_unnamed_addr #0 - -declare void @heap_free(ptr) local_unnamed_addr - -declare i64 @___lazy_measure(i64) local_unnamed_addr - -declare void @___qfree(i64) local_unnamed_addr - -declare void @___inc_future_refcount(i64) local_unnamed_addr - -declare void @___dec_future_refcount(i64) local_unnamed_addr - -declare i1 @___read_future_bool(i64) local_unnamed_addr - -declare void @print_bool(ptr, i64, i1) local_unnamed_addr - -declare void @print_int(ptr, i64, i64) local_unnamed_addr - -declare i32 @random_int() local_unnamed_addr - -declare double @random_float() local_unnamed_addr - -declare void @print_float(ptr, i64, double) local_unnamed_addr - -declare void @___rxy(i64, double, double) local_unnamed_addr - -declare void @___rz(i64, double) local_unnamed_addr - -declare i64 @___qalloc() local_unnamed_addr - -declare void @___reset(i64) local_unnamed_addr - -define i64 @qmain(i64 %0) local_unnamed_addr { -entry: - tail call void @setup(i64 %0) - tail call void @__hugr__.__main__.main.1() - %1 = tail call i64 @teardown() - ret i64 %1 -} - -declare void @setup(i64) local_unnamed_addr - -declare i64 @teardown() local_unnamed_addr - -attributes #0 = { noreturn } - -!name = !{!0} - -!0 = !{!"mainlib"} diff --git a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition/determinism_repetition-helios-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition/determinism_repetition-helios-x86_64-apple-darwin.ll deleted file mode 100644 index a7b5f348..00000000 --- a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition/determinism_repetition-helios-x86_64-apple-darwin.ll +++ /dev/null @@ -1,642 +0,0 @@ -; ModuleID = 'hugr' -source_filename = "hugr" -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" -@"e_Array elem.E746B1A3.0" = private constant [43 x i8] c"*EXIT:INT:Array element is already borrowed" -@"e_Array cont.EFA5AC45.0" = private constant [70 x i8] c"EEXIT:INT:Array contains non-borrowed elements and cannot be discarded" -@res_a.A4A74DAF.0 = private constant [12 x i8] c"\0BUSER:BOOL:a" -@res_b.3BD50C23.0 = private constant [12 x i8] c"\0BUSER:BOOL:b" -@res_c.1C9EF4D1.0 = private constant [12 x i8] c"\0BUSER:BOOL:c" -@res_d.00B84DC7.0 = private constant [12 x i8] c"\0BUSER:BOOL:d" -@res_e.B9A29CAF.0 = private constant [12 x i8] c"\0BUSER:BOOL:e" -@res_shot.6D86EAF7.0 = private constant [14 x i8] c"\0DUSER:INT:shot" -@res_random_int.805B8DD0.0 = private constant [20 x i8] c"\13USER:INT:random_int" -@res_random_flo.4EFA2734.0 = private constant [24 x i8] c"\17USER:FLOAT:random_float" -@"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." - -define void @__hugr__.__main__.main.1() local_unnamed_addr { -cond_104_case_1: - %0 = tail call ptr @heap_alloc(i64 40) - %1 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %1, align 1 - %shot = tail call i64 @get_current_shot() - tail call void @random_seed(i64 %shot) - %shot2 = tail call i64 @get_current_shot() - %2 = tail call ptr @heap_alloc(i64 40) - %3 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %3, align 1 - %qalloc.i = tail call i64 @___qalloc() - %not_max.not.not.i = icmp eq i64 %qalloc.i, -1 - br i1 %not_max.not.not.i, label %cond_535_case_0.i, label %__barray_check_bounds.exit - -cond_535_case_0.i: ; preds = %cond_104_case_1.4, %cond_104_case_1.3, %cond_104_case_1.2, %cond_104_case_1.1, %cond_104_case_1 - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__barray_check_bounds.exit: ; preds = %cond_104_case_1 - tail call void @___reset(i64 %qalloc.i) - %4 = load i64, ptr %3, align 4 - %5 = trunc i64 %4 to i1 - br i1 %5, label %cond_104_case_1.1, label %panic.i - -panic.i: ; preds = %__barray_check_bounds.exit.4, %__barray_check_bounds.exit.3, %__barray_check_bounds.exit.2, %__barray_check_bounds.exit.1, %__barray_check_bounds.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -cond_104_case_1.1: ; preds = %__barray_check_bounds.exit - %6 = and i64 %4, -2 - store i64 %6, ptr %3, align 4 - store i64 %qalloc.i, ptr %2, align 4 - %qalloc.i.1 = tail call i64 @___qalloc() - %not_max.not.not.i.1 = icmp eq i64 %qalloc.i.1, -1 - br i1 %not_max.not.not.i.1, label %cond_535_case_0.i, label %__barray_check_bounds.exit.1 - -__barray_check_bounds.exit.1: ; preds = %cond_104_case_1.1 - tail call void @___reset(i64 %qalloc.i.1) - %7 = load i64, ptr %3, align 4 - %8 = and i64 %7, 2 - %.not1178 = icmp eq i64 %8, 0 - br i1 %.not1178, label %panic.i, label %cond_104_case_1.2 - -cond_104_case_1.2: ; preds = %__barray_check_bounds.exit.1 - %9 = and i64 %7, -3 - store i64 %9, ptr %3, align 4 - %10 = getelementptr inbounds nuw i8, ptr %2, i64 8 - store i64 %qalloc.i.1, ptr %10, align 4 - %qalloc.i.2 = tail call i64 @___qalloc() - %not_max.not.not.i.2 = icmp eq i64 %qalloc.i.2, -1 - br i1 %not_max.not.not.i.2, label %cond_535_case_0.i, label %__barray_check_bounds.exit.2 - -__barray_check_bounds.exit.2: ; preds = %cond_104_case_1.2 - tail call void @___reset(i64 %qalloc.i.2) - %11 = load i64, ptr %3, align 4 - %12 = and i64 %11, 4 - %.not1179 = icmp eq i64 %12, 0 - br i1 %.not1179, label %panic.i, label %cond_104_case_1.3 - -cond_104_case_1.3: ; preds = %__barray_check_bounds.exit.2 - %13 = and i64 %11, -5 - store i64 %13, ptr %3, align 4 - %14 = getelementptr inbounds nuw i8, ptr %2, i64 16 - store i64 %qalloc.i.2, ptr %14, align 4 - %qalloc.i.3 = tail call i64 @___qalloc() - %not_max.not.not.i.3 = icmp eq i64 %qalloc.i.3, -1 - br i1 %not_max.not.not.i.3, label %cond_535_case_0.i, label %__barray_check_bounds.exit.3 - -__barray_check_bounds.exit.3: ; preds = %cond_104_case_1.3 - tail call void @___reset(i64 %qalloc.i.3) - %15 = load i64, ptr %3, align 4 - %16 = and i64 %15, 8 - %.not1180 = icmp eq i64 %16, 0 - br i1 %.not1180, label %panic.i, label %cond_104_case_1.4 - -cond_104_case_1.4: ; preds = %__barray_check_bounds.exit.3 - %17 = and i64 %15, -9 - store i64 %17, ptr %3, align 4 - %18 = getelementptr inbounds nuw i8, ptr %2, i64 24 - store i64 %qalloc.i.3, ptr %18, align 4 - %qalloc.i.4 = tail call i64 @___qalloc() - %not_max.not.not.i.4 = icmp eq i64 %qalloc.i.4, -1 - br i1 %not_max.not.not.i.4, label %cond_535_case_0.i, label %__barray_check_bounds.exit.4 - -__barray_check_bounds.exit.4: ; preds = %cond_104_case_1.4 - tail call void @___reset(i64 %qalloc.i.4) - %19 = load i64, ptr %3, align 4 - %20 = and i64 %19, 16 - %.not1181 = icmp eq i64 %20, 0 - br i1 %.not1181, label %panic.i, label %cond_exit_104.5 - -cond_exit_104.5: ; preds = %__barray_check_bounds.exit.4 - %21 = and i64 %19, -17 - store i64 %21, ptr %3, align 4 - %22 = getelementptr inbounds nuw i8, ptr %2, i64 32 - store i64 %qalloc.i.4, ptr %22, align 4 - %.pre = load i64, ptr %3, align 4 - %23 = trunc i64 %.pre to i1 - br i1 %23, label %panic.i1116, label %__barray_check_bounds.exit1118 - -panic.i1116: ; preds = %__barray_check_bounds.exit1115.4, %__barray_mask_return.exit1120.2, %__barray_mask_return.exit1120.1, %__barray_mask_return.exit1120, %cond_exit_104.5 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1118: ; preds = %cond_exit_104.5 - %24 = or disjoint i64 %.pre, 1 - store i64 %24, ptr %3, align 4 - %25 = load i64, ptr %2, align 4 - tail call void @___rxy(i64 %25, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %25, double 0x400921FB54442D18) - %26 = load i64, ptr %3, align 4 - %27 = trunc i64 %26 to i1 - br i1 %27, label %__barray_mask_return.exit1120, label %panic.i1119 - -panic.i1119: ; preds = %__barray_check_bounds.exit1118.4, %__barray_check_bounds.exit1118.3, %__barray_check_bounds.exit1118.2, %__barray_check_bounds.exit1118.1, %__barray_check_bounds.exit1118 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1120: ; preds = %__barray_check_bounds.exit1118 - %28 = and i64 %26, -2 - store i64 %28, ptr %3, align 4 - store i64 %25, ptr %2, align 4 - %29 = load i64, ptr %3, align 4 - %30 = and i64 %29, 2 - %.not1182 = icmp eq i64 %30, 0 - br i1 %.not1182, label %__barray_check_bounds.exit1118.1, label %panic.i1116 - -__barray_check_bounds.exit1118.1: ; preds = %__barray_mask_return.exit1120 - %31 = or disjoint i64 %29, 2 - store i64 %31, ptr %3, align 4 - %32 = getelementptr inbounds nuw i8, ptr %2, i64 8 - %33 = load i64, ptr %32, align 4 - tail call void @___rxy(i64 %33, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %33, double 0x400921FB54442D18) - %34 = load i64, ptr %3, align 4 - %35 = and i64 %34, 2 - %.not1183 = icmp eq i64 %35, 0 - br i1 %.not1183, label %panic.i1119, label %__barray_mask_return.exit1120.1 - -__barray_mask_return.exit1120.1: ; preds = %__barray_check_bounds.exit1118.1 - %36 = and i64 %34, -3 - store i64 %36, ptr %3, align 4 - store i64 %33, ptr %32, align 4 - %37 = load i64, ptr %3, align 4 - %38 = and i64 %37, 4 - %.not1184 = icmp eq i64 %38, 0 - br i1 %.not1184, label %__barray_check_bounds.exit1118.2, label %panic.i1116 - -__barray_check_bounds.exit1118.2: ; preds = %__barray_mask_return.exit1120.1 - %39 = or disjoint i64 %37, 4 - store i64 %39, ptr %3, align 4 - %40 = getelementptr inbounds nuw i8, ptr %2, i64 16 - %41 = load i64, ptr %40, align 4 - tail call void @___rxy(i64 %41, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %41, double 0x400921FB54442D18) - %42 = load i64, ptr %3, align 4 - %43 = and i64 %42, 4 - %.not1185 = icmp eq i64 %43, 0 - br i1 %.not1185, label %panic.i1119, label %__barray_mask_return.exit1120.2 - -__barray_mask_return.exit1120.2: ; preds = %__barray_check_bounds.exit1118.2 - %44 = and i64 %42, -5 - store i64 %44, ptr %3, align 4 - store i64 %41, ptr %40, align 4 - %45 = load i64, ptr %3, align 4 - %46 = and i64 %45, 8 - %.not1186 = icmp eq i64 %46, 0 - br i1 %.not1186, label %__barray_check_bounds.exit1118.3, label %panic.i1116 - -__barray_check_bounds.exit1118.3: ; preds = %__barray_mask_return.exit1120.2 - %47 = or disjoint i64 %45, 8 - store i64 %47, ptr %3, align 4 - %48 = getelementptr inbounds nuw i8, ptr %2, i64 24 - %49 = load i64, ptr %48, align 4 - tail call void @___rxy(i64 %49, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %49, double 0x400921FB54442D18) - %50 = load i64, ptr %3, align 4 - %51 = and i64 %50, 8 - %.not1187 = icmp eq i64 %51, 0 - br i1 %.not1187, label %panic.i1119, label %__barray_check_bounds.exit1115.4 - -__barray_check_bounds.exit1115.4: ; preds = %__barray_check_bounds.exit1118.3 - %52 = and i64 %50, -9 - store i64 %52, ptr %3, align 4 - store i64 %49, ptr %48, align 4 - %53 = load i64, ptr %3, align 4 - %54 = and i64 %53, 16 - %.not1188 = icmp eq i64 %54, 0 - br i1 %.not1188, label %__barray_check_bounds.exit1118.4, label %panic.i1116 - -__barray_check_bounds.exit1118.4: ; preds = %__barray_check_bounds.exit1115.4 - %55 = or disjoint i64 %53, 16 - store i64 %55, ptr %3, align 4 - %56 = getelementptr inbounds nuw i8, ptr %2, i64 32 - %57 = load i64, ptr %56, align 4 - tail call void @___rxy(i64 %57, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %57, double 0x400921FB54442D18) - %58 = load i64, ptr %3, align 4 - %59 = and i64 %58, 16 - %.not1189 = icmp eq i64 %59, 0 - br i1 %.not1189, label %panic.i1119, label %__barray_mask_return.exit1120.4 - -__barray_mask_return.exit1120.4: ; preds = %__barray_check_bounds.exit1118.4 - %60 = and i64 %58, -17 - store i64 %60, ptr %3, align 4 - store i64 %57, ptr %56, align 4 - %61 = load i64, ptr %3, align 4 - %62 = trunc i64 %61 to i1 - br i1 %62, label %panic.i1127, label %.thread - -panic.i1123: ; preds = %__barray_check_bounds.exit1122.4, %.thread.3, %.thread.2, %.thread.1, %.thread - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -loop_out318: ; preds = %cond_exit_298.4 - tail call void @heap_free(ptr nonnull %2) - tail call void @heap_free(ptr nonnull %3) - %63 = load i64, ptr %1, align 4 - %64 = trunc i64 %63 to i1 - br i1 %64, label %panic.i1129, label %__barray_mask_borrow.exit1130 - -mask_block_err.i: ; preds = %cond_exit_298.4 - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -panic.i1127: ; preds = %__barray_check_bounds.exit1126.4, %cond_exit_298.2, %cond_exit_298.1, %cond_exit_298, %__barray_mask_return.exit1120.4 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -.thread: ; preds = %__barray_mask_return.exit1120.4 - %65 = or disjoint i64 %61, 1 - store i64 %65, ptr %3, align 4 - %66 = load i64, ptr %2, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %66) - tail call void @___qfree(i64 %66) - %67 = load i64, ptr %1, align 4 - %68 = trunc i64 %67 to i1 - br i1 %68, label %cond_exit_298, label %panic.i1123 - -cond_exit_298: ; preds = %.thread - %69 = and i64 %67, -2 - store i64 %69, ptr %1, align 4 - store i64 %lazy_measure, ptr %0, align 4 - %70 = load i64, ptr %3, align 4 - %71 = and i64 %70, 2 - %.not1190 = icmp eq i64 %71, 0 - br i1 %.not1190, label %.thread.1, label %panic.i1127 - -.thread.1: ; preds = %cond_exit_298 - %72 = or disjoint i64 %70, 2 - store i64 %72, ptr %3, align 4 - %73 = load i64, ptr %32, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %73) - tail call void @___qfree(i64 %73) - %74 = load i64, ptr %1, align 4 - %75 = and i64 %74, 2 - %.not1191 = icmp eq i64 %75, 0 - br i1 %.not1191, label %panic.i1123, label %cond_exit_298.1 - -cond_exit_298.1: ; preds = %.thread.1 - %76 = and i64 %74, -3 - store i64 %76, ptr %1, align 4 - %77 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %lazy_measure.1, ptr %77, align 4 - %78 = load i64, ptr %3, align 4 - %79 = and i64 %78, 4 - %.not1192 = icmp eq i64 %79, 0 - br i1 %.not1192, label %.thread.2, label %panic.i1127 - -.thread.2: ; preds = %cond_exit_298.1 - %80 = or disjoint i64 %78, 4 - store i64 %80, ptr %3, align 4 - %81 = load i64, ptr %40, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %81) - tail call void @___qfree(i64 %81) - %82 = load i64, ptr %1, align 4 - %83 = and i64 %82, 4 - %.not1193 = icmp eq i64 %83, 0 - br i1 %.not1193, label %panic.i1123, label %cond_exit_298.2 - -cond_exit_298.2: ; preds = %.thread.2 - %84 = and i64 %82, -5 - store i64 %84, ptr %1, align 4 - %85 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %lazy_measure.2, ptr %85, align 4 - %86 = load i64, ptr %3, align 4 - %87 = and i64 %86, 8 - %.not1194 = icmp eq i64 %87, 0 - br i1 %.not1194, label %.thread.3, label %panic.i1127 - -.thread.3: ; preds = %cond_exit_298.2 - %88 = or disjoint i64 %86, 8 - store i64 %88, ptr %3, align 4 - %89 = load i64, ptr %48, align 4 - %lazy_measure.3 = tail call i64 @___lazy_measure(i64 %89) - tail call void @___qfree(i64 %89) - %90 = load i64, ptr %1, align 4 - %91 = and i64 %90, 8 - %.not1195 = icmp eq i64 %91, 0 - br i1 %.not1195, label %panic.i1123, label %__barray_check_bounds.exit1126.4 - -__barray_check_bounds.exit1126.4: ; preds = %.thread.3 - %92 = and i64 %90, -9 - store i64 %92, ptr %1, align 4 - %93 = getelementptr inbounds nuw i8, ptr %0, i64 24 - store i64 %lazy_measure.3, ptr %93, align 4 - %94 = load i64, ptr %3, align 4 - %95 = and i64 %94, 16 - %.not1196 = icmp eq i64 %95, 0 - br i1 %.not1196, label %__barray_check_bounds.exit1122.4, label %panic.i1127 - -__barray_check_bounds.exit1122.4: ; preds = %__barray_check_bounds.exit1126.4 - %96 = or disjoint i64 %94, 16 - store i64 %96, ptr %3, align 4 - %97 = load i64, ptr %56, align 4 - %lazy_measure.4 = tail call i64 @___lazy_measure(i64 %97) - tail call void @___qfree(i64 %97) - %98 = load i64, ptr %1, align 4 - %99 = and i64 %98, 16 - %.not1197 = icmp eq i64 %99, 0 - br i1 %.not1197, label %panic.i1123, label %cond_exit_298.4 - -cond_exit_298.4: ; preds = %__barray_check_bounds.exit1122.4 - %100 = and i64 %98, -17 - store i64 %100, ptr %1, align 4 - %101 = getelementptr inbounds nuw i8, ptr %0, i64 32 - store i64 %lazy_measure.4, ptr %101, align 4 - %102 = load i64, ptr %3, align 4 - %103 = or i64 %102, -32 - store i64 %103, ptr %3, align 4 - %104 = icmp eq i64 %103, -1 - br i1 %104, label %loop_out318, label %mask_block_err.i - -panic.i1129: ; preds = %loop_out318 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit1130: ; preds = %loop_out318 - %105 = or disjoint i64 %63, 1 - store i64 %105, ptr %1, align 4 - %106 = load i64, ptr %0, align 4 - tail call void @___inc_future_refcount(i64 %106) - %107 = load i64, ptr %1, align 4 - %108 = trunc i64 %107 to i1 - br i1 %108, label %__barray_mask_return.exit1132, label %panic.i1131 - -panic.i1131: ; preds = %__barray_mask_borrow.exit1130 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1132: ; preds = %__barray_mask_borrow.exit1130 - %109 = and i64 %107, -2 - store i64 %109, ptr %1, align 4 - store i64 %106, ptr %0, align 4 - %110 = load i64, ptr %1, align 4 - %111 = and i64 %110, 2 - %.not = icmp eq i64 %111, 0 - br i1 %.not, label %__barray_mask_borrow.exit1134, label %panic.i1133 - -panic.i1133: ; preds = %__barray_mask_return.exit1132 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit1134: ; preds = %__barray_mask_return.exit1132 - %112 = or disjoint i64 %110, 2 - store i64 %112, ptr %1, align 4 - %113 = load i64, ptr %77, align 4 - tail call void @___inc_future_refcount(i64 %113) - %114 = load i64, ptr %1, align 4 - %115 = and i64 %114, 2 - %.not1168 = icmp eq i64 %115, 0 - br i1 %.not1168, label %panic.i1135, label %__barray_mask_return.exit1136 - -panic.i1135: ; preds = %__barray_mask_borrow.exit1134 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1136: ; preds = %__barray_mask_borrow.exit1134 - %116 = and i64 %114, -3 - store i64 %116, ptr %1, align 4 - store i64 %113, ptr %77, align 4 - %117 = load i64, ptr %1, align 4 - %118 = and i64 %117, 4 - %.not1169 = icmp eq i64 %118, 0 - br i1 %.not1169, label %__barray_mask_borrow.exit1138, label %panic.i1137 - -panic.i1137: ; preds = %__barray_mask_return.exit1136 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit1138: ; preds = %__barray_mask_return.exit1136 - %119 = or disjoint i64 %117, 4 - store i64 %119, ptr %1, align 4 - %120 = load i64, ptr %85, align 4 - tail call void @___inc_future_refcount(i64 %120) - %121 = load i64, ptr %1, align 4 - %122 = and i64 %121, 4 - %.not1170 = icmp eq i64 %122, 0 - br i1 %.not1170, label %panic.i1139, label %__barray_mask_return.exit1140 - -panic.i1139: ; preds = %__barray_mask_borrow.exit1138 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1140: ; preds = %__barray_mask_borrow.exit1138 - %123 = and i64 %121, -5 - store i64 %123, ptr %1, align 4 - store i64 %120, ptr %85, align 4 - %124 = load i64, ptr %1, align 4 - %125 = and i64 %124, 8 - %.not1171 = icmp eq i64 %125, 0 - br i1 %.not1171, label %__barray_mask_borrow.exit1142, label %panic.i1141 - -panic.i1141: ; preds = %__barray_mask_return.exit1140 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit1142: ; preds = %__barray_mask_return.exit1140 - %126 = or disjoint i64 %124, 8 - store i64 %126, ptr %1, align 4 - %127 = load i64, ptr %93, align 4 - tail call void @___inc_future_refcount(i64 %127) - %128 = load i64, ptr %1, align 4 - %129 = and i64 %128, 8 - %.not1172 = icmp eq i64 %129, 0 - br i1 %.not1172, label %panic.i1143, label %__barray_mask_return.exit1144 - -panic.i1143: ; preds = %__barray_mask_borrow.exit1142 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1144: ; preds = %__barray_mask_borrow.exit1142 - %130 = and i64 %128, -9 - store i64 %130, ptr %1, align 4 - store i64 %127, ptr %93, align 4 - %131 = load i64, ptr %1, align 4 - %132 = and i64 %131, 16 - %.not1173 = icmp eq i64 %132, 0 - br i1 %.not1173, label %__barray_mask_borrow.exit1146, label %panic.i1145 - -panic.i1145: ; preds = %__barray_mask_return.exit1144 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit1146: ; preds = %__barray_mask_return.exit1144 - %133 = or disjoint i64 %131, 16 - store i64 %133, ptr %1, align 4 - %134 = load i64, ptr %101, align 4 - tail call void @___inc_future_refcount(i64 %134) - %135 = load i64, ptr %1, align 4 - %136 = and i64 %135, 16 - %.not1174 = icmp eq i64 %136, 0 - br i1 %.not1174, label %panic.i1147, label %__barray_mask_return.exit1148 - -panic.i1147: ; preds = %__barray_mask_borrow.exit1146 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1148: ; preds = %__barray_mask_borrow.exit1146 - %137 = and i64 %135, -17 - store i64 %137, ptr %1, align 4 - store i64 %134, ptr %101, align 4 - %138 = load i64, ptr %1, align 4 - %139 = trunc i64 %138 to i1 - br i1 %139, label %cond_exit_558, label %__barray_mask_borrow.exit1160 - -mask_block_err.i1152: ; preds = %cond_exit_558.4 - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_mask_borrow.exit1160: ; preds = %__barray_mask_return.exit1148 - %140 = or disjoint i64 %138, 1 - store i64 %140, ptr %1, align 4 - %141 = load i64, ptr %0, align 4 - tail call void @___dec_future_refcount(i64 %141) - br label %cond_exit_558 - -cond_exit_558: ; preds = %__barray_mask_borrow.exit1160, %__barray_mask_return.exit1148 - %142 = load i64, ptr %1, align 4 - %143 = and i64 %142, 2 - %.not1200 = icmp eq i64 %143, 0 - br i1 %.not1200, label %__barray_mask_borrow.exit1160.1, label %cond_exit_558.1 - -__barray_mask_borrow.exit1160.1: ; preds = %cond_exit_558 - %144 = or disjoint i64 %142, 2 - store i64 %144, ptr %1, align 4 - %145 = getelementptr inbounds nuw i8, ptr %0, i64 8 - %146 = load i64, ptr %145, align 4 - tail call void @___dec_future_refcount(i64 %146) - br label %cond_exit_558.1 - -cond_exit_558.1: ; preds = %__barray_mask_borrow.exit1160.1, %cond_exit_558 - %147 = load i64, ptr %1, align 4 - %148 = and i64 %147, 4 - %.not1201 = icmp eq i64 %148, 0 - br i1 %.not1201, label %__barray_mask_borrow.exit1160.2, label %cond_exit_558.2 - -__barray_mask_borrow.exit1160.2: ; preds = %cond_exit_558.1 - %149 = or disjoint i64 %147, 4 - store i64 %149, ptr %1, align 4 - %150 = getelementptr inbounds nuw i8, ptr %0, i64 16 - %151 = load i64, ptr %150, align 4 - tail call void @___dec_future_refcount(i64 %151) - br label %cond_exit_558.2 - -cond_exit_558.2: ; preds = %__barray_mask_borrow.exit1160.2, %cond_exit_558.1 - %152 = load i64, ptr %1, align 4 - %153 = and i64 %152, 8 - %.not1202 = icmp eq i64 %153, 0 - br i1 %.not1202, label %__barray_mask_borrow.exit1160.3, label %cond_exit_558.3 - -__barray_mask_borrow.exit1160.3: ; preds = %cond_exit_558.2 - %154 = or disjoint i64 %152, 8 - store i64 %154, ptr %1, align 4 - %155 = getelementptr inbounds nuw i8, ptr %0, i64 24 - %156 = load i64, ptr %155, align 4 - tail call void @___dec_future_refcount(i64 %156) - br label %cond_exit_558.3 - -cond_exit_558.3: ; preds = %__barray_mask_borrow.exit1160.3, %cond_exit_558.2 - %157 = load i64, ptr %1, align 4 - %158 = and i64 %157, 16 - %.not1203 = icmp eq i64 %158, 0 - br i1 %.not1203, label %__barray_mask_borrow.exit1160.4, label %cond_exit_558.4 - -__barray_mask_borrow.exit1160.4: ; preds = %cond_exit_558.3 - %159 = or disjoint i64 %157, 16 - store i64 %159, ptr %1, align 4 - %160 = getelementptr inbounds nuw i8, ptr %0, i64 32 - %161 = load i64, ptr %160, align 4 - tail call void @___dec_future_refcount(i64 %161) - br label %cond_exit_558.4 - -cond_exit_558.4: ; preds = %__barray_mask_borrow.exit1160.4, %cond_exit_558.3 - %162 = load i64, ptr %1, align 4 - %163 = or i64 %162, -32 - store i64 %163, ptr %1, align 4 - %164 = icmp eq i64 %163, -1 - br i1 %164, label %loop_out620, label %mask_block_err.i1152 - -loop_out620: ; preds = %cond_exit_558.4 - tail call void @heap_free(ptr nonnull %0) - tail call void @heap_free(ptr nonnull %1) - %read_bool = tail call i1 @___read_future_bool(i64 %106) - tail call void @___dec_future_refcount(i64 %106) - tail call void @print_bool(ptr nonnull @res_a.A4A74DAF.0, i64 11, i1 %read_bool) - %read_bool690 = tail call i1 @___read_future_bool(i64 %113) - tail call void @___dec_future_refcount(i64 %113) - tail call void @print_bool(ptr nonnull @res_b.3BD50C23.0, i64 11, i1 %read_bool690) - %read_bool705 = tail call i1 @___read_future_bool(i64 %120) - tail call void @___dec_future_refcount(i64 %120) - tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool705) - %read_bool720 = tail call i1 @___read_future_bool(i64 %127) - tail call void @___dec_future_refcount(i64 %127) - tail call void @print_bool(ptr nonnull @res_d.00B84DC7.0, i64 11, i1 %read_bool720) - %read_bool735 = tail call i1 @___read_future_bool(i64 %134) - tail call void @___dec_future_refcount(i64 %134) - tail call void @print_bool(ptr nonnull @res_e.B9A29CAF.0, i64 11, i1 %read_bool735) - tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot2) - %rint = tail call i32 @random_int() - %rfloat = tail call double @random_float() - %165 = sext i32 %rint to i64 - tail call void @print_int(ptr nonnull @res_random_int.805B8DD0.0, i64 19, i64 %165) - tail call void @print_float(ptr nonnull @res_random_flo.4EFA2734.0, i64 23, double %rfloat) - ret void -} - -declare ptr @heap_alloc(i64) local_unnamed_addr - -declare i64 @get_current_shot() local_unnamed_addr - -declare void @random_seed(i64) local_unnamed_addr - -; Function Attrs: noreturn -declare void @panic(i32, ptr) local_unnamed_addr #0 - -declare void @heap_free(ptr) local_unnamed_addr - -declare i64 @___lazy_measure(i64) local_unnamed_addr - -declare void @___qfree(i64) local_unnamed_addr - -declare void @___inc_future_refcount(i64) local_unnamed_addr - -declare void @___dec_future_refcount(i64) local_unnamed_addr - -declare i1 @___read_future_bool(i64) local_unnamed_addr - -declare void @print_bool(ptr, i64, i1) local_unnamed_addr - -declare void @print_int(ptr, i64, i64) local_unnamed_addr - -declare i32 @random_int() local_unnamed_addr - -declare double @random_float() local_unnamed_addr - -declare void @print_float(ptr, i64, double) local_unnamed_addr - -declare void @___rxy(i64, double, double) local_unnamed_addr - -declare void @___rz(i64, double) local_unnamed_addr - -declare i64 @___qalloc() local_unnamed_addr - -declare void @___reset(i64) local_unnamed_addr - -define i64 @qmain(i64 %0) local_unnamed_addr { -entry: - tail call void @setup(i64 %0) - tail call void @__hugr__.__main__.main.1() - %1 = tail call i64 @teardown() - ret i64 %1 -} - -declare void @setup(i64) local_unnamed_addr - -declare i64 @teardown() local_unnamed_addr - -attributes #0 = { noreturn } - -!name = !{!0} - -!0 = !{!"mainlib"} diff --git a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition/determinism_repetition-helios-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition/determinism_repetition-helios-x86_64-unknown-linux-gnu.ll deleted file mode 100644 index 2b6935e1..00000000 --- a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition/determinism_repetition-helios-x86_64-unknown-linux-gnu.ll +++ /dev/null @@ -1,642 +0,0 @@ -; ModuleID = 'hugr' -source_filename = "hugr" -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" -@"e_Array elem.E746B1A3.0" = private constant [43 x i8] c"*EXIT:INT:Array element is already borrowed" -@"e_Array cont.EFA5AC45.0" = private constant [70 x i8] c"EEXIT:INT:Array contains non-borrowed elements and cannot be discarded" -@res_a.A4A74DAF.0 = private constant [12 x i8] c"\0BUSER:BOOL:a" -@res_b.3BD50C23.0 = private constant [12 x i8] c"\0BUSER:BOOL:b" -@res_c.1C9EF4D1.0 = private constant [12 x i8] c"\0BUSER:BOOL:c" -@res_d.00B84DC7.0 = private constant [12 x i8] c"\0BUSER:BOOL:d" -@res_e.B9A29CAF.0 = private constant [12 x i8] c"\0BUSER:BOOL:e" -@res_shot.6D86EAF7.0 = private constant [14 x i8] c"\0DUSER:INT:shot" -@res_random_int.805B8DD0.0 = private constant [20 x i8] c"\13USER:INT:random_int" -@res_random_flo.4EFA2734.0 = private constant [24 x i8] c"\17USER:FLOAT:random_float" -@"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." - -define void @__hugr__.__main__.main.1() local_unnamed_addr { -cond_104_case_1: - %0 = tail call ptr @heap_alloc(i64 40) - %1 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %1, align 1 - %shot = tail call i64 @get_current_shot() - tail call void @random_seed(i64 %shot) - %shot2 = tail call i64 @get_current_shot() - %2 = tail call ptr @heap_alloc(i64 40) - %3 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %3, align 1 - %qalloc.i = tail call i64 @___qalloc() - %not_max.not.not.i = icmp eq i64 %qalloc.i, -1 - br i1 %not_max.not.not.i, label %cond_535_case_0.i, label %__barray_check_bounds.exit - -cond_535_case_0.i: ; preds = %cond_104_case_1.4, %cond_104_case_1.3, %cond_104_case_1.2, %cond_104_case_1.1, %cond_104_case_1 - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__barray_check_bounds.exit: ; preds = %cond_104_case_1 - tail call void @___reset(i64 %qalloc.i) - %4 = load i64, ptr %3, align 4 - %5 = trunc i64 %4 to i1 - br i1 %5, label %cond_104_case_1.1, label %panic.i - -panic.i: ; preds = %__barray_check_bounds.exit.4, %__barray_check_bounds.exit.3, %__barray_check_bounds.exit.2, %__barray_check_bounds.exit.1, %__barray_check_bounds.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -cond_104_case_1.1: ; preds = %__barray_check_bounds.exit - %6 = and i64 %4, -2 - store i64 %6, ptr %3, align 4 - store i64 %qalloc.i, ptr %2, align 4 - %qalloc.i.1 = tail call i64 @___qalloc() - %not_max.not.not.i.1 = icmp eq i64 %qalloc.i.1, -1 - br i1 %not_max.not.not.i.1, label %cond_535_case_0.i, label %__barray_check_bounds.exit.1 - -__barray_check_bounds.exit.1: ; preds = %cond_104_case_1.1 - tail call void @___reset(i64 %qalloc.i.1) - %7 = load i64, ptr %3, align 4 - %8 = and i64 %7, 2 - %.not1178 = icmp eq i64 %8, 0 - br i1 %.not1178, label %panic.i, label %cond_104_case_1.2 - -cond_104_case_1.2: ; preds = %__barray_check_bounds.exit.1 - %9 = and i64 %7, -3 - store i64 %9, ptr %3, align 4 - %10 = getelementptr inbounds nuw i8, ptr %2, i64 8 - store i64 %qalloc.i.1, ptr %10, align 4 - %qalloc.i.2 = tail call i64 @___qalloc() - %not_max.not.not.i.2 = icmp eq i64 %qalloc.i.2, -1 - br i1 %not_max.not.not.i.2, label %cond_535_case_0.i, label %__barray_check_bounds.exit.2 - -__barray_check_bounds.exit.2: ; preds = %cond_104_case_1.2 - tail call void @___reset(i64 %qalloc.i.2) - %11 = load i64, ptr %3, align 4 - %12 = and i64 %11, 4 - %.not1179 = icmp eq i64 %12, 0 - br i1 %.not1179, label %panic.i, label %cond_104_case_1.3 - -cond_104_case_1.3: ; preds = %__barray_check_bounds.exit.2 - %13 = and i64 %11, -5 - store i64 %13, ptr %3, align 4 - %14 = getelementptr inbounds nuw i8, ptr %2, i64 16 - store i64 %qalloc.i.2, ptr %14, align 4 - %qalloc.i.3 = tail call i64 @___qalloc() - %not_max.not.not.i.3 = icmp eq i64 %qalloc.i.3, -1 - br i1 %not_max.not.not.i.3, label %cond_535_case_0.i, label %__barray_check_bounds.exit.3 - -__barray_check_bounds.exit.3: ; preds = %cond_104_case_1.3 - tail call void @___reset(i64 %qalloc.i.3) - %15 = load i64, ptr %3, align 4 - %16 = and i64 %15, 8 - %.not1180 = icmp eq i64 %16, 0 - br i1 %.not1180, label %panic.i, label %cond_104_case_1.4 - -cond_104_case_1.4: ; preds = %__barray_check_bounds.exit.3 - %17 = and i64 %15, -9 - store i64 %17, ptr %3, align 4 - %18 = getelementptr inbounds nuw i8, ptr %2, i64 24 - store i64 %qalloc.i.3, ptr %18, align 4 - %qalloc.i.4 = tail call i64 @___qalloc() - %not_max.not.not.i.4 = icmp eq i64 %qalloc.i.4, -1 - br i1 %not_max.not.not.i.4, label %cond_535_case_0.i, label %__barray_check_bounds.exit.4 - -__barray_check_bounds.exit.4: ; preds = %cond_104_case_1.4 - tail call void @___reset(i64 %qalloc.i.4) - %19 = load i64, ptr %3, align 4 - %20 = and i64 %19, 16 - %.not1181 = icmp eq i64 %20, 0 - br i1 %.not1181, label %panic.i, label %cond_exit_104.5 - -cond_exit_104.5: ; preds = %__barray_check_bounds.exit.4 - %21 = and i64 %19, -17 - store i64 %21, ptr %3, align 4 - %22 = getelementptr inbounds nuw i8, ptr %2, i64 32 - store i64 %qalloc.i.4, ptr %22, align 4 - %.pre = load i64, ptr %3, align 4 - %23 = trunc i64 %.pre to i1 - br i1 %23, label %panic.i1116, label %__barray_check_bounds.exit1118 - -panic.i1116: ; preds = %__barray_check_bounds.exit1115.4, %__barray_mask_return.exit1120.2, %__barray_mask_return.exit1120.1, %__barray_mask_return.exit1120, %cond_exit_104.5 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1118: ; preds = %cond_exit_104.5 - %24 = or disjoint i64 %.pre, 1 - store i64 %24, ptr %3, align 4 - %25 = load i64, ptr %2, align 4 - tail call void @___rxy(i64 %25, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %25, double 0x400921FB54442D18) - %26 = load i64, ptr %3, align 4 - %27 = trunc i64 %26 to i1 - br i1 %27, label %__barray_mask_return.exit1120, label %panic.i1119 - -panic.i1119: ; preds = %__barray_check_bounds.exit1118.4, %__barray_check_bounds.exit1118.3, %__barray_check_bounds.exit1118.2, %__barray_check_bounds.exit1118.1, %__barray_check_bounds.exit1118 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1120: ; preds = %__barray_check_bounds.exit1118 - %28 = and i64 %26, -2 - store i64 %28, ptr %3, align 4 - store i64 %25, ptr %2, align 4 - %29 = load i64, ptr %3, align 4 - %30 = and i64 %29, 2 - %.not1182 = icmp eq i64 %30, 0 - br i1 %.not1182, label %__barray_check_bounds.exit1118.1, label %panic.i1116 - -__barray_check_bounds.exit1118.1: ; preds = %__barray_mask_return.exit1120 - %31 = or disjoint i64 %29, 2 - store i64 %31, ptr %3, align 4 - %32 = getelementptr inbounds nuw i8, ptr %2, i64 8 - %33 = load i64, ptr %32, align 4 - tail call void @___rxy(i64 %33, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %33, double 0x400921FB54442D18) - %34 = load i64, ptr %3, align 4 - %35 = and i64 %34, 2 - %.not1183 = icmp eq i64 %35, 0 - br i1 %.not1183, label %panic.i1119, label %__barray_mask_return.exit1120.1 - -__barray_mask_return.exit1120.1: ; preds = %__barray_check_bounds.exit1118.1 - %36 = and i64 %34, -3 - store i64 %36, ptr %3, align 4 - store i64 %33, ptr %32, align 4 - %37 = load i64, ptr %3, align 4 - %38 = and i64 %37, 4 - %.not1184 = icmp eq i64 %38, 0 - br i1 %.not1184, label %__barray_check_bounds.exit1118.2, label %panic.i1116 - -__barray_check_bounds.exit1118.2: ; preds = %__barray_mask_return.exit1120.1 - %39 = or disjoint i64 %37, 4 - store i64 %39, ptr %3, align 4 - %40 = getelementptr inbounds nuw i8, ptr %2, i64 16 - %41 = load i64, ptr %40, align 4 - tail call void @___rxy(i64 %41, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %41, double 0x400921FB54442D18) - %42 = load i64, ptr %3, align 4 - %43 = and i64 %42, 4 - %.not1185 = icmp eq i64 %43, 0 - br i1 %.not1185, label %panic.i1119, label %__barray_mask_return.exit1120.2 - -__barray_mask_return.exit1120.2: ; preds = %__barray_check_bounds.exit1118.2 - %44 = and i64 %42, -5 - store i64 %44, ptr %3, align 4 - store i64 %41, ptr %40, align 4 - %45 = load i64, ptr %3, align 4 - %46 = and i64 %45, 8 - %.not1186 = icmp eq i64 %46, 0 - br i1 %.not1186, label %__barray_check_bounds.exit1118.3, label %panic.i1116 - -__barray_check_bounds.exit1118.3: ; preds = %__barray_mask_return.exit1120.2 - %47 = or disjoint i64 %45, 8 - store i64 %47, ptr %3, align 4 - %48 = getelementptr inbounds nuw i8, ptr %2, i64 24 - %49 = load i64, ptr %48, align 4 - tail call void @___rxy(i64 %49, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %49, double 0x400921FB54442D18) - %50 = load i64, ptr %3, align 4 - %51 = and i64 %50, 8 - %.not1187 = icmp eq i64 %51, 0 - br i1 %.not1187, label %panic.i1119, label %__barray_check_bounds.exit1115.4 - -__barray_check_bounds.exit1115.4: ; preds = %__barray_check_bounds.exit1118.3 - %52 = and i64 %50, -9 - store i64 %52, ptr %3, align 4 - store i64 %49, ptr %48, align 4 - %53 = load i64, ptr %3, align 4 - %54 = and i64 %53, 16 - %.not1188 = icmp eq i64 %54, 0 - br i1 %.not1188, label %__barray_check_bounds.exit1118.4, label %panic.i1116 - -__barray_check_bounds.exit1118.4: ; preds = %__barray_check_bounds.exit1115.4 - %55 = or disjoint i64 %53, 16 - store i64 %55, ptr %3, align 4 - %56 = getelementptr inbounds nuw i8, ptr %2, i64 32 - %57 = load i64, ptr %56, align 4 - tail call void @___rxy(i64 %57, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %57, double 0x400921FB54442D18) - %58 = load i64, ptr %3, align 4 - %59 = and i64 %58, 16 - %.not1189 = icmp eq i64 %59, 0 - br i1 %.not1189, label %panic.i1119, label %__barray_mask_return.exit1120.4 - -__barray_mask_return.exit1120.4: ; preds = %__barray_check_bounds.exit1118.4 - %60 = and i64 %58, -17 - store i64 %60, ptr %3, align 4 - store i64 %57, ptr %56, align 4 - %61 = load i64, ptr %3, align 4 - %62 = trunc i64 %61 to i1 - br i1 %62, label %panic.i1127, label %.thread - -panic.i1123: ; preds = %__barray_check_bounds.exit1122.4, %.thread.3, %.thread.2, %.thread.1, %.thread - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -loop_out318: ; preds = %cond_exit_298.4 - tail call void @heap_free(ptr nonnull %2) - tail call void @heap_free(ptr nonnull %3) - %63 = load i64, ptr %1, align 4 - %64 = trunc i64 %63 to i1 - br i1 %64, label %panic.i1129, label %__barray_mask_borrow.exit1130 - -mask_block_err.i: ; preds = %cond_exit_298.4 - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -panic.i1127: ; preds = %__barray_check_bounds.exit1126.4, %cond_exit_298.2, %cond_exit_298.1, %cond_exit_298, %__barray_mask_return.exit1120.4 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -.thread: ; preds = %__barray_mask_return.exit1120.4 - %65 = or disjoint i64 %61, 1 - store i64 %65, ptr %3, align 4 - %66 = load i64, ptr %2, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %66) - tail call void @___qfree(i64 %66) - %67 = load i64, ptr %1, align 4 - %68 = trunc i64 %67 to i1 - br i1 %68, label %cond_exit_298, label %panic.i1123 - -cond_exit_298: ; preds = %.thread - %69 = and i64 %67, -2 - store i64 %69, ptr %1, align 4 - store i64 %lazy_measure, ptr %0, align 4 - %70 = load i64, ptr %3, align 4 - %71 = and i64 %70, 2 - %.not1190 = icmp eq i64 %71, 0 - br i1 %.not1190, label %.thread.1, label %panic.i1127 - -.thread.1: ; preds = %cond_exit_298 - %72 = or disjoint i64 %70, 2 - store i64 %72, ptr %3, align 4 - %73 = load i64, ptr %32, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %73) - tail call void @___qfree(i64 %73) - %74 = load i64, ptr %1, align 4 - %75 = and i64 %74, 2 - %.not1191 = icmp eq i64 %75, 0 - br i1 %.not1191, label %panic.i1123, label %cond_exit_298.1 - -cond_exit_298.1: ; preds = %.thread.1 - %76 = and i64 %74, -3 - store i64 %76, ptr %1, align 4 - %77 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %lazy_measure.1, ptr %77, align 4 - %78 = load i64, ptr %3, align 4 - %79 = and i64 %78, 4 - %.not1192 = icmp eq i64 %79, 0 - br i1 %.not1192, label %.thread.2, label %panic.i1127 - -.thread.2: ; preds = %cond_exit_298.1 - %80 = or disjoint i64 %78, 4 - store i64 %80, ptr %3, align 4 - %81 = load i64, ptr %40, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %81) - tail call void @___qfree(i64 %81) - %82 = load i64, ptr %1, align 4 - %83 = and i64 %82, 4 - %.not1193 = icmp eq i64 %83, 0 - br i1 %.not1193, label %panic.i1123, label %cond_exit_298.2 - -cond_exit_298.2: ; preds = %.thread.2 - %84 = and i64 %82, -5 - store i64 %84, ptr %1, align 4 - %85 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %lazy_measure.2, ptr %85, align 4 - %86 = load i64, ptr %3, align 4 - %87 = and i64 %86, 8 - %.not1194 = icmp eq i64 %87, 0 - br i1 %.not1194, label %.thread.3, label %panic.i1127 - -.thread.3: ; preds = %cond_exit_298.2 - %88 = or disjoint i64 %86, 8 - store i64 %88, ptr %3, align 4 - %89 = load i64, ptr %48, align 4 - %lazy_measure.3 = tail call i64 @___lazy_measure(i64 %89) - tail call void @___qfree(i64 %89) - %90 = load i64, ptr %1, align 4 - %91 = and i64 %90, 8 - %.not1195 = icmp eq i64 %91, 0 - br i1 %.not1195, label %panic.i1123, label %__barray_check_bounds.exit1126.4 - -__barray_check_bounds.exit1126.4: ; preds = %.thread.3 - %92 = and i64 %90, -9 - store i64 %92, ptr %1, align 4 - %93 = getelementptr inbounds nuw i8, ptr %0, i64 24 - store i64 %lazy_measure.3, ptr %93, align 4 - %94 = load i64, ptr %3, align 4 - %95 = and i64 %94, 16 - %.not1196 = icmp eq i64 %95, 0 - br i1 %.not1196, label %__barray_check_bounds.exit1122.4, label %panic.i1127 - -__barray_check_bounds.exit1122.4: ; preds = %__barray_check_bounds.exit1126.4 - %96 = or disjoint i64 %94, 16 - store i64 %96, ptr %3, align 4 - %97 = load i64, ptr %56, align 4 - %lazy_measure.4 = tail call i64 @___lazy_measure(i64 %97) - tail call void @___qfree(i64 %97) - %98 = load i64, ptr %1, align 4 - %99 = and i64 %98, 16 - %.not1197 = icmp eq i64 %99, 0 - br i1 %.not1197, label %panic.i1123, label %cond_exit_298.4 - -cond_exit_298.4: ; preds = %__barray_check_bounds.exit1122.4 - %100 = and i64 %98, -17 - store i64 %100, ptr %1, align 4 - %101 = getelementptr inbounds nuw i8, ptr %0, i64 32 - store i64 %lazy_measure.4, ptr %101, align 4 - %102 = load i64, ptr %3, align 4 - %103 = or i64 %102, -32 - store i64 %103, ptr %3, align 4 - %104 = icmp eq i64 %103, -1 - br i1 %104, label %loop_out318, label %mask_block_err.i - -panic.i1129: ; preds = %loop_out318 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit1130: ; preds = %loop_out318 - %105 = or disjoint i64 %63, 1 - store i64 %105, ptr %1, align 4 - %106 = load i64, ptr %0, align 4 - tail call void @___inc_future_refcount(i64 %106) - %107 = load i64, ptr %1, align 4 - %108 = trunc i64 %107 to i1 - br i1 %108, label %__barray_mask_return.exit1132, label %panic.i1131 - -panic.i1131: ; preds = %__barray_mask_borrow.exit1130 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1132: ; preds = %__barray_mask_borrow.exit1130 - %109 = and i64 %107, -2 - store i64 %109, ptr %1, align 4 - store i64 %106, ptr %0, align 4 - %110 = load i64, ptr %1, align 4 - %111 = and i64 %110, 2 - %.not = icmp eq i64 %111, 0 - br i1 %.not, label %__barray_mask_borrow.exit1134, label %panic.i1133 - -panic.i1133: ; preds = %__barray_mask_return.exit1132 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit1134: ; preds = %__barray_mask_return.exit1132 - %112 = or disjoint i64 %110, 2 - store i64 %112, ptr %1, align 4 - %113 = load i64, ptr %77, align 4 - tail call void @___inc_future_refcount(i64 %113) - %114 = load i64, ptr %1, align 4 - %115 = and i64 %114, 2 - %.not1168 = icmp eq i64 %115, 0 - br i1 %.not1168, label %panic.i1135, label %__barray_mask_return.exit1136 - -panic.i1135: ; preds = %__barray_mask_borrow.exit1134 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1136: ; preds = %__barray_mask_borrow.exit1134 - %116 = and i64 %114, -3 - store i64 %116, ptr %1, align 4 - store i64 %113, ptr %77, align 4 - %117 = load i64, ptr %1, align 4 - %118 = and i64 %117, 4 - %.not1169 = icmp eq i64 %118, 0 - br i1 %.not1169, label %__barray_mask_borrow.exit1138, label %panic.i1137 - -panic.i1137: ; preds = %__barray_mask_return.exit1136 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit1138: ; preds = %__barray_mask_return.exit1136 - %119 = or disjoint i64 %117, 4 - store i64 %119, ptr %1, align 4 - %120 = load i64, ptr %85, align 4 - tail call void @___inc_future_refcount(i64 %120) - %121 = load i64, ptr %1, align 4 - %122 = and i64 %121, 4 - %.not1170 = icmp eq i64 %122, 0 - br i1 %.not1170, label %panic.i1139, label %__barray_mask_return.exit1140 - -panic.i1139: ; preds = %__barray_mask_borrow.exit1138 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1140: ; preds = %__barray_mask_borrow.exit1138 - %123 = and i64 %121, -5 - store i64 %123, ptr %1, align 4 - store i64 %120, ptr %85, align 4 - %124 = load i64, ptr %1, align 4 - %125 = and i64 %124, 8 - %.not1171 = icmp eq i64 %125, 0 - br i1 %.not1171, label %__barray_mask_borrow.exit1142, label %panic.i1141 - -panic.i1141: ; preds = %__barray_mask_return.exit1140 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit1142: ; preds = %__barray_mask_return.exit1140 - %126 = or disjoint i64 %124, 8 - store i64 %126, ptr %1, align 4 - %127 = load i64, ptr %93, align 4 - tail call void @___inc_future_refcount(i64 %127) - %128 = load i64, ptr %1, align 4 - %129 = and i64 %128, 8 - %.not1172 = icmp eq i64 %129, 0 - br i1 %.not1172, label %panic.i1143, label %__barray_mask_return.exit1144 - -panic.i1143: ; preds = %__barray_mask_borrow.exit1142 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1144: ; preds = %__barray_mask_borrow.exit1142 - %130 = and i64 %128, -9 - store i64 %130, ptr %1, align 4 - store i64 %127, ptr %93, align 4 - %131 = load i64, ptr %1, align 4 - %132 = and i64 %131, 16 - %.not1173 = icmp eq i64 %132, 0 - br i1 %.not1173, label %__barray_mask_borrow.exit1146, label %panic.i1145 - -panic.i1145: ; preds = %__barray_mask_return.exit1144 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit1146: ; preds = %__barray_mask_return.exit1144 - %133 = or disjoint i64 %131, 16 - store i64 %133, ptr %1, align 4 - %134 = load i64, ptr %101, align 4 - tail call void @___inc_future_refcount(i64 %134) - %135 = load i64, ptr %1, align 4 - %136 = and i64 %135, 16 - %.not1174 = icmp eq i64 %136, 0 - br i1 %.not1174, label %panic.i1147, label %__barray_mask_return.exit1148 - -panic.i1147: ; preds = %__barray_mask_borrow.exit1146 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1148: ; preds = %__barray_mask_borrow.exit1146 - %137 = and i64 %135, -17 - store i64 %137, ptr %1, align 4 - store i64 %134, ptr %101, align 4 - %138 = load i64, ptr %1, align 4 - %139 = trunc i64 %138 to i1 - br i1 %139, label %cond_exit_558, label %__barray_mask_borrow.exit1160 - -mask_block_err.i1152: ; preds = %cond_exit_558.4 - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_mask_borrow.exit1160: ; preds = %__barray_mask_return.exit1148 - %140 = or disjoint i64 %138, 1 - store i64 %140, ptr %1, align 4 - %141 = load i64, ptr %0, align 4 - tail call void @___dec_future_refcount(i64 %141) - br label %cond_exit_558 - -cond_exit_558: ; preds = %__barray_mask_borrow.exit1160, %__barray_mask_return.exit1148 - %142 = load i64, ptr %1, align 4 - %143 = and i64 %142, 2 - %.not1200 = icmp eq i64 %143, 0 - br i1 %.not1200, label %__barray_mask_borrow.exit1160.1, label %cond_exit_558.1 - -__barray_mask_borrow.exit1160.1: ; preds = %cond_exit_558 - %144 = or disjoint i64 %142, 2 - store i64 %144, ptr %1, align 4 - %145 = getelementptr inbounds nuw i8, ptr %0, i64 8 - %146 = load i64, ptr %145, align 4 - tail call void @___dec_future_refcount(i64 %146) - br label %cond_exit_558.1 - -cond_exit_558.1: ; preds = %__barray_mask_borrow.exit1160.1, %cond_exit_558 - %147 = load i64, ptr %1, align 4 - %148 = and i64 %147, 4 - %.not1201 = icmp eq i64 %148, 0 - br i1 %.not1201, label %__barray_mask_borrow.exit1160.2, label %cond_exit_558.2 - -__barray_mask_borrow.exit1160.2: ; preds = %cond_exit_558.1 - %149 = or disjoint i64 %147, 4 - store i64 %149, ptr %1, align 4 - %150 = getelementptr inbounds nuw i8, ptr %0, i64 16 - %151 = load i64, ptr %150, align 4 - tail call void @___dec_future_refcount(i64 %151) - br label %cond_exit_558.2 - -cond_exit_558.2: ; preds = %__barray_mask_borrow.exit1160.2, %cond_exit_558.1 - %152 = load i64, ptr %1, align 4 - %153 = and i64 %152, 8 - %.not1202 = icmp eq i64 %153, 0 - br i1 %.not1202, label %__barray_mask_borrow.exit1160.3, label %cond_exit_558.3 - -__barray_mask_borrow.exit1160.3: ; preds = %cond_exit_558.2 - %154 = or disjoint i64 %152, 8 - store i64 %154, ptr %1, align 4 - %155 = getelementptr inbounds nuw i8, ptr %0, i64 24 - %156 = load i64, ptr %155, align 4 - tail call void @___dec_future_refcount(i64 %156) - br label %cond_exit_558.3 - -cond_exit_558.3: ; preds = %__barray_mask_borrow.exit1160.3, %cond_exit_558.2 - %157 = load i64, ptr %1, align 4 - %158 = and i64 %157, 16 - %.not1203 = icmp eq i64 %158, 0 - br i1 %.not1203, label %__barray_mask_borrow.exit1160.4, label %cond_exit_558.4 - -__barray_mask_borrow.exit1160.4: ; preds = %cond_exit_558.3 - %159 = or disjoint i64 %157, 16 - store i64 %159, ptr %1, align 4 - %160 = getelementptr inbounds nuw i8, ptr %0, i64 32 - %161 = load i64, ptr %160, align 4 - tail call void @___dec_future_refcount(i64 %161) - br label %cond_exit_558.4 - -cond_exit_558.4: ; preds = %__barray_mask_borrow.exit1160.4, %cond_exit_558.3 - %162 = load i64, ptr %1, align 4 - %163 = or i64 %162, -32 - store i64 %163, ptr %1, align 4 - %164 = icmp eq i64 %163, -1 - br i1 %164, label %loop_out620, label %mask_block_err.i1152 - -loop_out620: ; preds = %cond_exit_558.4 - tail call void @heap_free(ptr nonnull %0) - tail call void @heap_free(ptr nonnull %1) - %read_bool = tail call i1 @___read_future_bool(i64 %106) - tail call void @___dec_future_refcount(i64 %106) - tail call void @print_bool(ptr nonnull @res_a.A4A74DAF.0, i64 11, i1 %read_bool) - %read_bool690 = tail call i1 @___read_future_bool(i64 %113) - tail call void @___dec_future_refcount(i64 %113) - tail call void @print_bool(ptr nonnull @res_b.3BD50C23.0, i64 11, i1 %read_bool690) - %read_bool705 = tail call i1 @___read_future_bool(i64 %120) - tail call void @___dec_future_refcount(i64 %120) - tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool705) - %read_bool720 = tail call i1 @___read_future_bool(i64 %127) - tail call void @___dec_future_refcount(i64 %127) - tail call void @print_bool(ptr nonnull @res_d.00B84DC7.0, i64 11, i1 %read_bool720) - %read_bool735 = tail call i1 @___read_future_bool(i64 %134) - tail call void @___dec_future_refcount(i64 %134) - tail call void @print_bool(ptr nonnull @res_e.B9A29CAF.0, i64 11, i1 %read_bool735) - tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot2) - %rint = tail call i32 @random_int() - %rfloat = tail call double @random_float() - %165 = sext i32 %rint to i64 - tail call void @print_int(ptr nonnull @res_random_int.805B8DD0.0, i64 19, i64 %165) - tail call void @print_float(ptr nonnull @res_random_flo.4EFA2734.0, i64 23, double %rfloat) - ret void -} - -declare ptr @heap_alloc(i64) local_unnamed_addr - -declare i64 @get_current_shot() local_unnamed_addr - -declare void @random_seed(i64) local_unnamed_addr - -; Function Attrs: noreturn -declare void @panic(i32, ptr) local_unnamed_addr #0 - -declare void @heap_free(ptr) local_unnamed_addr - -declare i64 @___lazy_measure(i64) local_unnamed_addr - -declare void @___qfree(i64) local_unnamed_addr - -declare void @___inc_future_refcount(i64) local_unnamed_addr - -declare void @___dec_future_refcount(i64) local_unnamed_addr - -declare i1 @___read_future_bool(i64) local_unnamed_addr - -declare void @print_bool(ptr, i64, i1) local_unnamed_addr - -declare void @print_int(ptr, i64, i64) local_unnamed_addr - -declare i32 @random_int() local_unnamed_addr - -declare double @random_float() local_unnamed_addr - -declare void @print_float(ptr, i64, double) local_unnamed_addr - -declare void @___rxy(i64, double, double) local_unnamed_addr - -declare void @___rz(i64, double) local_unnamed_addr - -declare i64 @___qalloc() local_unnamed_addr - -declare void @___reset(i64) local_unnamed_addr - -define i64 @qmain(i64 %0) local_unnamed_addr { -entry: - tail call void @setup(i64 %0) - tail call void @__hugr__.__main__.main.1() - %1 = tail call i64 @teardown() - ret i64 %1 -} - -declare void @setup(i64) local_unnamed_addr - -declare i64 @teardown() local_unnamed_addr - -attributes #0 = { noreturn } - -!name = !{!0} - -!0 = !{!"mainlib"} diff --git a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition/determinism_repetition-helios-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition/determinism_repetition-helios-x86_64-windows-gnu.ll deleted file mode 100644 index b021aa27..00000000 --- a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition/determinism_repetition-helios-x86_64-windows-gnu.ll +++ /dev/null @@ -1,642 +0,0 @@ -; ModuleID = 'hugr' -source_filename = "hugr" -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-gnu" - -@"e_Array alre.5A300C2A.0" = private constant [57 x i8] c"8EXIT:INT:Array already contains an element at this index" -@"e_Array elem.E746B1A3.0" = private constant [43 x i8] c"*EXIT:INT:Array element is already borrowed" -@"e_Array cont.EFA5AC45.0" = private constant [70 x i8] c"EEXIT:INT:Array contains non-borrowed elements and cannot be discarded" -@res_a.A4A74DAF.0 = private constant [12 x i8] c"\0BUSER:BOOL:a" -@res_b.3BD50C23.0 = private constant [12 x i8] c"\0BUSER:BOOL:b" -@res_c.1C9EF4D1.0 = private constant [12 x i8] c"\0BUSER:BOOL:c" -@res_d.00B84DC7.0 = private constant [12 x i8] c"\0BUSER:BOOL:d" -@res_e.B9A29CAF.0 = private constant [12 x i8] c"\0BUSER:BOOL:e" -@res_shot.6D86EAF7.0 = private constant [14 x i8] c"\0DUSER:INT:shot" -@res_random_int.805B8DD0.0 = private constant [20 x i8] c"\13USER:INT:random_int" -@res_random_flo.4EFA2734.0 = private constant [24 x i8] c"\17USER:FLOAT:random_float" -@"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." - -define void @__hugr__.__main__.main.1() local_unnamed_addr { -cond_104_case_1: - %0 = tail call ptr @heap_alloc(i64 40) - %1 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %1, align 1 - %shot = tail call i64 @get_current_shot() - tail call void @random_seed(i64 %shot) - %shot2 = tail call i64 @get_current_shot() - %2 = tail call ptr @heap_alloc(i64 40) - %3 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %3, align 1 - %qalloc.i = tail call i64 @___qalloc() - %not_max.not.not.i = icmp eq i64 %qalloc.i, -1 - br i1 %not_max.not.not.i, label %cond_535_case_0.i, label %__barray_check_bounds.exit - -cond_535_case_0.i: ; preds = %cond_104_case_1.4, %cond_104_case_1.3, %cond_104_case_1.2, %cond_104_case_1.1, %cond_104_case_1 - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__barray_check_bounds.exit: ; preds = %cond_104_case_1 - tail call void @___reset(i64 %qalloc.i) - %4 = load i64, ptr %3, align 4 - %5 = trunc i64 %4 to i1 - br i1 %5, label %cond_104_case_1.1, label %panic.i - -panic.i: ; preds = %__barray_check_bounds.exit.4, %__barray_check_bounds.exit.3, %__barray_check_bounds.exit.2, %__barray_check_bounds.exit.1, %__barray_check_bounds.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -cond_104_case_1.1: ; preds = %__barray_check_bounds.exit - %6 = and i64 %4, -2 - store i64 %6, ptr %3, align 4 - store i64 %qalloc.i, ptr %2, align 4 - %qalloc.i.1 = tail call i64 @___qalloc() - %not_max.not.not.i.1 = icmp eq i64 %qalloc.i.1, -1 - br i1 %not_max.not.not.i.1, label %cond_535_case_0.i, label %__barray_check_bounds.exit.1 - -__barray_check_bounds.exit.1: ; preds = %cond_104_case_1.1 - tail call void @___reset(i64 %qalloc.i.1) - %7 = load i64, ptr %3, align 4 - %8 = and i64 %7, 2 - %.not1178 = icmp eq i64 %8, 0 - br i1 %.not1178, label %panic.i, label %cond_104_case_1.2 - -cond_104_case_1.2: ; preds = %__barray_check_bounds.exit.1 - %9 = and i64 %7, -3 - store i64 %9, ptr %3, align 4 - %10 = getelementptr inbounds nuw i8, ptr %2, i64 8 - store i64 %qalloc.i.1, ptr %10, align 4 - %qalloc.i.2 = tail call i64 @___qalloc() - %not_max.not.not.i.2 = icmp eq i64 %qalloc.i.2, -1 - br i1 %not_max.not.not.i.2, label %cond_535_case_0.i, label %__barray_check_bounds.exit.2 - -__barray_check_bounds.exit.2: ; preds = %cond_104_case_1.2 - tail call void @___reset(i64 %qalloc.i.2) - %11 = load i64, ptr %3, align 4 - %12 = and i64 %11, 4 - %.not1179 = icmp eq i64 %12, 0 - br i1 %.not1179, label %panic.i, label %cond_104_case_1.3 - -cond_104_case_1.3: ; preds = %__barray_check_bounds.exit.2 - %13 = and i64 %11, -5 - store i64 %13, ptr %3, align 4 - %14 = getelementptr inbounds nuw i8, ptr %2, i64 16 - store i64 %qalloc.i.2, ptr %14, align 4 - %qalloc.i.3 = tail call i64 @___qalloc() - %not_max.not.not.i.3 = icmp eq i64 %qalloc.i.3, -1 - br i1 %not_max.not.not.i.3, label %cond_535_case_0.i, label %__barray_check_bounds.exit.3 - -__barray_check_bounds.exit.3: ; preds = %cond_104_case_1.3 - tail call void @___reset(i64 %qalloc.i.3) - %15 = load i64, ptr %3, align 4 - %16 = and i64 %15, 8 - %.not1180 = icmp eq i64 %16, 0 - br i1 %.not1180, label %panic.i, label %cond_104_case_1.4 - -cond_104_case_1.4: ; preds = %__barray_check_bounds.exit.3 - %17 = and i64 %15, -9 - store i64 %17, ptr %3, align 4 - %18 = getelementptr inbounds nuw i8, ptr %2, i64 24 - store i64 %qalloc.i.3, ptr %18, align 4 - %qalloc.i.4 = tail call i64 @___qalloc() - %not_max.not.not.i.4 = icmp eq i64 %qalloc.i.4, -1 - br i1 %not_max.not.not.i.4, label %cond_535_case_0.i, label %__barray_check_bounds.exit.4 - -__barray_check_bounds.exit.4: ; preds = %cond_104_case_1.4 - tail call void @___reset(i64 %qalloc.i.4) - %19 = load i64, ptr %3, align 4 - %20 = and i64 %19, 16 - %.not1181 = icmp eq i64 %20, 0 - br i1 %.not1181, label %panic.i, label %cond_exit_104.5 - -cond_exit_104.5: ; preds = %__barray_check_bounds.exit.4 - %21 = and i64 %19, -17 - store i64 %21, ptr %3, align 4 - %22 = getelementptr inbounds nuw i8, ptr %2, i64 32 - store i64 %qalloc.i.4, ptr %22, align 4 - %.pre = load i64, ptr %3, align 4 - %23 = trunc i64 %.pre to i1 - br i1 %23, label %panic.i1116, label %__barray_check_bounds.exit1118 - -panic.i1116: ; preds = %__barray_check_bounds.exit1115.4, %__barray_mask_return.exit1120.2, %__barray_mask_return.exit1120.1, %__barray_mask_return.exit1120, %cond_exit_104.5 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1118: ; preds = %cond_exit_104.5 - %24 = or disjoint i64 %.pre, 1 - store i64 %24, ptr %3, align 4 - %25 = load i64, ptr %2, align 4 - tail call void @___rxy(i64 %25, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %25, double 0x400921FB54442D18) - %26 = load i64, ptr %3, align 4 - %27 = trunc i64 %26 to i1 - br i1 %27, label %__barray_mask_return.exit1120, label %panic.i1119 - -panic.i1119: ; preds = %__barray_check_bounds.exit1118.4, %__barray_check_bounds.exit1118.3, %__barray_check_bounds.exit1118.2, %__barray_check_bounds.exit1118.1, %__barray_check_bounds.exit1118 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1120: ; preds = %__barray_check_bounds.exit1118 - %28 = and i64 %26, -2 - store i64 %28, ptr %3, align 4 - store i64 %25, ptr %2, align 4 - %29 = load i64, ptr %3, align 4 - %30 = and i64 %29, 2 - %.not1182 = icmp eq i64 %30, 0 - br i1 %.not1182, label %__barray_check_bounds.exit1118.1, label %panic.i1116 - -__barray_check_bounds.exit1118.1: ; preds = %__barray_mask_return.exit1120 - %31 = or disjoint i64 %29, 2 - store i64 %31, ptr %3, align 4 - %32 = getelementptr inbounds nuw i8, ptr %2, i64 8 - %33 = load i64, ptr %32, align 4 - tail call void @___rxy(i64 %33, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %33, double 0x400921FB54442D18) - %34 = load i64, ptr %3, align 4 - %35 = and i64 %34, 2 - %.not1183 = icmp eq i64 %35, 0 - br i1 %.not1183, label %panic.i1119, label %__barray_mask_return.exit1120.1 - -__barray_mask_return.exit1120.1: ; preds = %__barray_check_bounds.exit1118.1 - %36 = and i64 %34, -3 - store i64 %36, ptr %3, align 4 - store i64 %33, ptr %32, align 4 - %37 = load i64, ptr %3, align 4 - %38 = and i64 %37, 4 - %.not1184 = icmp eq i64 %38, 0 - br i1 %.not1184, label %__barray_check_bounds.exit1118.2, label %panic.i1116 - -__barray_check_bounds.exit1118.2: ; preds = %__barray_mask_return.exit1120.1 - %39 = or disjoint i64 %37, 4 - store i64 %39, ptr %3, align 4 - %40 = getelementptr inbounds nuw i8, ptr %2, i64 16 - %41 = load i64, ptr %40, align 4 - tail call void @___rxy(i64 %41, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %41, double 0x400921FB54442D18) - %42 = load i64, ptr %3, align 4 - %43 = and i64 %42, 4 - %.not1185 = icmp eq i64 %43, 0 - br i1 %.not1185, label %panic.i1119, label %__barray_mask_return.exit1120.2 - -__barray_mask_return.exit1120.2: ; preds = %__barray_check_bounds.exit1118.2 - %44 = and i64 %42, -5 - store i64 %44, ptr %3, align 4 - store i64 %41, ptr %40, align 4 - %45 = load i64, ptr %3, align 4 - %46 = and i64 %45, 8 - %.not1186 = icmp eq i64 %46, 0 - br i1 %.not1186, label %__barray_check_bounds.exit1118.3, label %panic.i1116 - -__barray_check_bounds.exit1118.3: ; preds = %__barray_mask_return.exit1120.2 - %47 = or disjoint i64 %45, 8 - store i64 %47, ptr %3, align 4 - %48 = getelementptr inbounds nuw i8, ptr %2, i64 24 - %49 = load i64, ptr %48, align 4 - tail call void @___rxy(i64 %49, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %49, double 0x400921FB54442D18) - %50 = load i64, ptr %3, align 4 - %51 = and i64 %50, 8 - %.not1187 = icmp eq i64 %51, 0 - br i1 %.not1187, label %panic.i1119, label %__barray_check_bounds.exit1115.4 - -__barray_check_bounds.exit1115.4: ; preds = %__barray_check_bounds.exit1118.3 - %52 = and i64 %50, -9 - store i64 %52, ptr %3, align 4 - store i64 %49, ptr %48, align 4 - %53 = load i64, ptr %3, align 4 - %54 = and i64 %53, 16 - %.not1188 = icmp eq i64 %54, 0 - br i1 %.not1188, label %__barray_check_bounds.exit1118.4, label %panic.i1116 - -__barray_check_bounds.exit1118.4: ; preds = %__barray_check_bounds.exit1115.4 - %55 = or disjoint i64 %53, 16 - store i64 %55, ptr %3, align 4 - %56 = getelementptr inbounds nuw i8, ptr %2, i64 32 - %57 = load i64, ptr %56, align 4 - tail call void @___rxy(i64 %57, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %57, double 0x400921FB54442D18) - %58 = load i64, ptr %3, align 4 - %59 = and i64 %58, 16 - %.not1189 = icmp eq i64 %59, 0 - br i1 %.not1189, label %panic.i1119, label %__barray_mask_return.exit1120.4 - -__barray_mask_return.exit1120.4: ; preds = %__barray_check_bounds.exit1118.4 - %60 = and i64 %58, -17 - store i64 %60, ptr %3, align 4 - store i64 %57, ptr %56, align 4 - %61 = load i64, ptr %3, align 4 - %62 = trunc i64 %61 to i1 - br i1 %62, label %panic.i1127, label %.thread - -panic.i1123: ; preds = %__barray_check_bounds.exit1122.4, %.thread.3, %.thread.2, %.thread.1, %.thread - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -loop_out318: ; preds = %cond_exit_298.4 - tail call void @heap_free(ptr nonnull %2) - tail call void @heap_free(ptr nonnull %3) - %63 = load i64, ptr %1, align 4 - %64 = trunc i64 %63 to i1 - br i1 %64, label %panic.i1129, label %__barray_mask_borrow.exit1130 - -mask_block_err.i: ; preds = %cond_exit_298.4 - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -panic.i1127: ; preds = %__barray_check_bounds.exit1126.4, %cond_exit_298.2, %cond_exit_298.1, %cond_exit_298, %__barray_mask_return.exit1120.4 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -.thread: ; preds = %__barray_mask_return.exit1120.4 - %65 = or disjoint i64 %61, 1 - store i64 %65, ptr %3, align 4 - %66 = load i64, ptr %2, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %66) - tail call void @___qfree(i64 %66) - %67 = load i64, ptr %1, align 4 - %68 = trunc i64 %67 to i1 - br i1 %68, label %cond_exit_298, label %panic.i1123 - -cond_exit_298: ; preds = %.thread - %69 = and i64 %67, -2 - store i64 %69, ptr %1, align 4 - store i64 %lazy_measure, ptr %0, align 4 - %70 = load i64, ptr %3, align 4 - %71 = and i64 %70, 2 - %.not1190 = icmp eq i64 %71, 0 - br i1 %.not1190, label %.thread.1, label %panic.i1127 - -.thread.1: ; preds = %cond_exit_298 - %72 = or disjoint i64 %70, 2 - store i64 %72, ptr %3, align 4 - %73 = load i64, ptr %32, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %73) - tail call void @___qfree(i64 %73) - %74 = load i64, ptr %1, align 4 - %75 = and i64 %74, 2 - %.not1191 = icmp eq i64 %75, 0 - br i1 %.not1191, label %panic.i1123, label %cond_exit_298.1 - -cond_exit_298.1: ; preds = %.thread.1 - %76 = and i64 %74, -3 - store i64 %76, ptr %1, align 4 - %77 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %lazy_measure.1, ptr %77, align 4 - %78 = load i64, ptr %3, align 4 - %79 = and i64 %78, 4 - %.not1192 = icmp eq i64 %79, 0 - br i1 %.not1192, label %.thread.2, label %panic.i1127 - -.thread.2: ; preds = %cond_exit_298.1 - %80 = or disjoint i64 %78, 4 - store i64 %80, ptr %3, align 4 - %81 = load i64, ptr %40, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %81) - tail call void @___qfree(i64 %81) - %82 = load i64, ptr %1, align 4 - %83 = and i64 %82, 4 - %.not1193 = icmp eq i64 %83, 0 - br i1 %.not1193, label %panic.i1123, label %cond_exit_298.2 - -cond_exit_298.2: ; preds = %.thread.2 - %84 = and i64 %82, -5 - store i64 %84, ptr %1, align 4 - %85 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %lazy_measure.2, ptr %85, align 4 - %86 = load i64, ptr %3, align 4 - %87 = and i64 %86, 8 - %.not1194 = icmp eq i64 %87, 0 - br i1 %.not1194, label %.thread.3, label %panic.i1127 - -.thread.3: ; preds = %cond_exit_298.2 - %88 = or disjoint i64 %86, 8 - store i64 %88, ptr %3, align 4 - %89 = load i64, ptr %48, align 4 - %lazy_measure.3 = tail call i64 @___lazy_measure(i64 %89) - tail call void @___qfree(i64 %89) - %90 = load i64, ptr %1, align 4 - %91 = and i64 %90, 8 - %.not1195 = icmp eq i64 %91, 0 - br i1 %.not1195, label %panic.i1123, label %__barray_check_bounds.exit1126.4 - -__barray_check_bounds.exit1126.4: ; preds = %.thread.3 - %92 = and i64 %90, -9 - store i64 %92, ptr %1, align 4 - %93 = getelementptr inbounds nuw i8, ptr %0, i64 24 - store i64 %lazy_measure.3, ptr %93, align 4 - %94 = load i64, ptr %3, align 4 - %95 = and i64 %94, 16 - %.not1196 = icmp eq i64 %95, 0 - br i1 %.not1196, label %__barray_check_bounds.exit1122.4, label %panic.i1127 - -__barray_check_bounds.exit1122.4: ; preds = %__barray_check_bounds.exit1126.4 - %96 = or disjoint i64 %94, 16 - store i64 %96, ptr %3, align 4 - %97 = load i64, ptr %56, align 4 - %lazy_measure.4 = tail call i64 @___lazy_measure(i64 %97) - tail call void @___qfree(i64 %97) - %98 = load i64, ptr %1, align 4 - %99 = and i64 %98, 16 - %.not1197 = icmp eq i64 %99, 0 - br i1 %.not1197, label %panic.i1123, label %cond_exit_298.4 - -cond_exit_298.4: ; preds = %__barray_check_bounds.exit1122.4 - %100 = and i64 %98, -17 - store i64 %100, ptr %1, align 4 - %101 = getelementptr inbounds nuw i8, ptr %0, i64 32 - store i64 %lazy_measure.4, ptr %101, align 4 - %102 = load i64, ptr %3, align 4 - %103 = or i64 %102, -32 - store i64 %103, ptr %3, align 4 - %104 = icmp eq i64 %103, -1 - br i1 %104, label %loop_out318, label %mask_block_err.i - -panic.i1129: ; preds = %loop_out318 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit1130: ; preds = %loop_out318 - %105 = or disjoint i64 %63, 1 - store i64 %105, ptr %1, align 4 - %106 = load i64, ptr %0, align 4 - tail call void @___inc_future_refcount(i64 %106) - %107 = load i64, ptr %1, align 4 - %108 = trunc i64 %107 to i1 - br i1 %108, label %__barray_mask_return.exit1132, label %panic.i1131 - -panic.i1131: ; preds = %__barray_mask_borrow.exit1130 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1132: ; preds = %__barray_mask_borrow.exit1130 - %109 = and i64 %107, -2 - store i64 %109, ptr %1, align 4 - store i64 %106, ptr %0, align 4 - %110 = load i64, ptr %1, align 4 - %111 = and i64 %110, 2 - %.not = icmp eq i64 %111, 0 - br i1 %.not, label %__barray_mask_borrow.exit1134, label %panic.i1133 - -panic.i1133: ; preds = %__barray_mask_return.exit1132 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit1134: ; preds = %__barray_mask_return.exit1132 - %112 = or disjoint i64 %110, 2 - store i64 %112, ptr %1, align 4 - %113 = load i64, ptr %77, align 4 - tail call void @___inc_future_refcount(i64 %113) - %114 = load i64, ptr %1, align 4 - %115 = and i64 %114, 2 - %.not1168 = icmp eq i64 %115, 0 - br i1 %.not1168, label %panic.i1135, label %__barray_mask_return.exit1136 - -panic.i1135: ; preds = %__barray_mask_borrow.exit1134 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1136: ; preds = %__barray_mask_borrow.exit1134 - %116 = and i64 %114, -3 - store i64 %116, ptr %1, align 4 - store i64 %113, ptr %77, align 4 - %117 = load i64, ptr %1, align 4 - %118 = and i64 %117, 4 - %.not1169 = icmp eq i64 %118, 0 - br i1 %.not1169, label %__barray_mask_borrow.exit1138, label %panic.i1137 - -panic.i1137: ; preds = %__barray_mask_return.exit1136 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit1138: ; preds = %__barray_mask_return.exit1136 - %119 = or disjoint i64 %117, 4 - store i64 %119, ptr %1, align 4 - %120 = load i64, ptr %85, align 4 - tail call void @___inc_future_refcount(i64 %120) - %121 = load i64, ptr %1, align 4 - %122 = and i64 %121, 4 - %.not1170 = icmp eq i64 %122, 0 - br i1 %.not1170, label %panic.i1139, label %__barray_mask_return.exit1140 - -panic.i1139: ; preds = %__barray_mask_borrow.exit1138 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1140: ; preds = %__barray_mask_borrow.exit1138 - %123 = and i64 %121, -5 - store i64 %123, ptr %1, align 4 - store i64 %120, ptr %85, align 4 - %124 = load i64, ptr %1, align 4 - %125 = and i64 %124, 8 - %.not1171 = icmp eq i64 %125, 0 - br i1 %.not1171, label %__barray_mask_borrow.exit1142, label %panic.i1141 - -panic.i1141: ; preds = %__barray_mask_return.exit1140 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit1142: ; preds = %__barray_mask_return.exit1140 - %126 = or disjoint i64 %124, 8 - store i64 %126, ptr %1, align 4 - %127 = load i64, ptr %93, align 4 - tail call void @___inc_future_refcount(i64 %127) - %128 = load i64, ptr %1, align 4 - %129 = and i64 %128, 8 - %.not1172 = icmp eq i64 %129, 0 - br i1 %.not1172, label %panic.i1143, label %__barray_mask_return.exit1144 - -panic.i1143: ; preds = %__barray_mask_borrow.exit1142 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1144: ; preds = %__barray_mask_borrow.exit1142 - %130 = and i64 %128, -9 - store i64 %130, ptr %1, align 4 - store i64 %127, ptr %93, align 4 - %131 = load i64, ptr %1, align 4 - %132 = and i64 %131, 16 - %.not1173 = icmp eq i64 %132, 0 - br i1 %.not1173, label %__barray_mask_borrow.exit1146, label %panic.i1145 - -panic.i1145: ; preds = %__barray_mask_return.exit1144 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit1146: ; preds = %__barray_mask_return.exit1144 - %133 = or disjoint i64 %131, 16 - store i64 %133, ptr %1, align 4 - %134 = load i64, ptr %101, align 4 - tail call void @___inc_future_refcount(i64 %134) - %135 = load i64, ptr %1, align 4 - %136 = and i64 %135, 16 - %.not1174 = icmp eq i64 %136, 0 - br i1 %.not1174, label %panic.i1147, label %__barray_mask_return.exit1148 - -panic.i1147: ; preds = %__barray_mask_borrow.exit1146 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1148: ; preds = %__barray_mask_borrow.exit1146 - %137 = and i64 %135, -17 - store i64 %137, ptr %1, align 4 - store i64 %134, ptr %101, align 4 - %138 = load i64, ptr %1, align 4 - %139 = trunc i64 %138 to i1 - br i1 %139, label %cond_exit_558, label %__barray_mask_borrow.exit1160 - -mask_block_err.i1152: ; preds = %cond_exit_558.4 - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_mask_borrow.exit1160: ; preds = %__barray_mask_return.exit1148 - %140 = or disjoint i64 %138, 1 - store i64 %140, ptr %1, align 4 - %141 = load i64, ptr %0, align 4 - tail call void @___dec_future_refcount(i64 %141) - br label %cond_exit_558 - -cond_exit_558: ; preds = %__barray_mask_borrow.exit1160, %__barray_mask_return.exit1148 - %142 = load i64, ptr %1, align 4 - %143 = and i64 %142, 2 - %.not1200 = icmp eq i64 %143, 0 - br i1 %.not1200, label %__barray_mask_borrow.exit1160.1, label %cond_exit_558.1 - -__barray_mask_borrow.exit1160.1: ; preds = %cond_exit_558 - %144 = or disjoint i64 %142, 2 - store i64 %144, ptr %1, align 4 - %145 = getelementptr inbounds nuw i8, ptr %0, i64 8 - %146 = load i64, ptr %145, align 4 - tail call void @___dec_future_refcount(i64 %146) - br label %cond_exit_558.1 - -cond_exit_558.1: ; preds = %__barray_mask_borrow.exit1160.1, %cond_exit_558 - %147 = load i64, ptr %1, align 4 - %148 = and i64 %147, 4 - %.not1201 = icmp eq i64 %148, 0 - br i1 %.not1201, label %__barray_mask_borrow.exit1160.2, label %cond_exit_558.2 - -__barray_mask_borrow.exit1160.2: ; preds = %cond_exit_558.1 - %149 = or disjoint i64 %147, 4 - store i64 %149, ptr %1, align 4 - %150 = getelementptr inbounds nuw i8, ptr %0, i64 16 - %151 = load i64, ptr %150, align 4 - tail call void @___dec_future_refcount(i64 %151) - br label %cond_exit_558.2 - -cond_exit_558.2: ; preds = %__barray_mask_borrow.exit1160.2, %cond_exit_558.1 - %152 = load i64, ptr %1, align 4 - %153 = and i64 %152, 8 - %.not1202 = icmp eq i64 %153, 0 - br i1 %.not1202, label %__barray_mask_borrow.exit1160.3, label %cond_exit_558.3 - -__barray_mask_borrow.exit1160.3: ; preds = %cond_exit_558.2 - %154 = or disjoint i64 %152, 8 - store i64 %154, ptr %1, align 4 - %155 = getelementptr inbounds nuw i8, ptr %0, i64 24 - %156 = load i64, ptr %155, align 4 - tail call void @___dec_future_refcount(i64 %156) - br label %cond_exit_558.3 - -cond_exit_558.3: ; preds = %__barray_mask_borrow.exit1160.3, %cond_exit_558.2 - %157 = load i64, ptr %1, align 4 - %158 = and i64 %157, 16 - %.not1203 = icmp eq i64 %158, 0 - br i1 %.not1203, label %__barray_mask_borrow.exit1160.4, label %cond_exit_558.4 - -__barray_mask_borrow.exit1160.4: ; preds = %cond_exit_558.3 - %159 = or disjoint i64 %157, 16 - store i64 %159, ptr %1, align 4 - %160 = getelementptr inbounds nuw i8, ptr %0, i64 32 - %161 = load i64, ptr %160, align 4 - tail call void @___dec_future_refcount(i64 %161) - br label %cond_exit_558.4 - -cond_exit_558.4: ; preds = %__barray_mask_borrow.exit1160.4, %cond_exit_558.3 - %162 = load i64, ptr %1, align 4 - %163 = or i64 %162, -32 - store i64 %163, ptr %1, align 4 - %164 = icmp eq i64 %163, -1 - br i1 %164, label %loop_out620, label %mask_block_err.i1152 - -loop_out620: ; preds = %cond_exit_558.4 - tail call void @heap_free(ptr nonnull %0) - tail call void @heap_free(ptr nonnull %1) - %read_bool = tail call i1 @___read_future_bool(i64 %106) - tail call void @___dec_future_refcount(i64 %106) - tail call void @print_bool(ptr nonnull @res_a.A4A74DAF.0, i64 11, i1 %read_bool) - %read_bool690 = tail call i1 @___read_future_bool(i64 %113) - tail call void @___dec_future_refcount(i64 %113) - tail call void @print_bool(ptr nonnull @res_b.3BD50C23.0, i64 11, i1 %read_bool690) - %read_bool705 = tail call i1 @___read_future_bool(i64 %120) - tail call void @___dec_future_refcount(i64 %120) - tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool705) - %read_bool720 = tail call i1 @___read_future_bool(i64 %127) - tail call void @___dec_future_refcount(i64 %127) - tail call void @print_bool(ptr nonnull @res_d.00B84DC7.0, i64 11, i1 %read_bool720) - %read_bool735 = tail call i1 @___read_future_bool(i64 %134) - tail call void @___dec_future_refcount(i64 %134) - tail call void @print_bool(ptr nonnull @res_e.B9A29CAF.0, i64 11, i1 %read_bool735) - tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot2) - %rint = tail call i32 @random_int() - %rfloat = tail call double @random_float() - %165 = sext i32 %rint to i64 - tail call void @print_int(ptr nonnull @res_random_int.805B8DD0.0, i64 19, i64 %165) - tail call void @print_float(ptr nonnull @res_random_flo.4EFA2734.0, i64 23, double %rfloat) - ret void -} - -declare ptr @heap_alloc(i64) local_unnamed_addr - -declare i64 @get_current_shot() local_unnamed_addr - -declare void @random_seed(i64) local_unnamed_addr - -; Function Attrs: noreturn -declare void @panic(i32, ptr) local_unnamed_addr #0 - -declare void @heap_free(ptr) local_unnamed_addr - -declare i64 @___lazy_measure(i64) local_unnamed_addr - -declare void @___qfree(i64) local_unnamed_addr - -declare void @___inc_future_refcount(i64) local_unnamed_addr - -declare void @___dec_future_refcount(i64) local_unnamed_addr - -declare i1 @___read_future_bool(i64) local_unnamed_addr - -declare void @print_bool(ptr, i64, i1) local_unnamed_addr - -declare void @print_int(ptr, i64, i64) local_unnamed_addr - -declare i32 @random_int() local_unnamed_addr - -declare double @random_float() local_unnamed_addr - -declare void @print_float(ptr, i64, double) local_unnamed_addr - -declare void @___rxy(i64, double, double) local_unnamed_addr - -declare void @___rz(i64, double) local_unnamed_addr - -declare i64 @___qalloc() local_unnamed_addr - -declare void @___reset(i64) local_unnamed_addr - -define i64 @qmain(i64 %0) local_unnamed_addr { -entry: - tail call void @setup(i64 %0) - tail call void @__hugr__.__main__.main.1() - %1 = tail call i64 @teardown() - ret i64 %1 -} - -declare void @setup(i64) local_unnamed_addr - -declare i64 @teardown() local_unnamed_addr - -attributes #0 = { noreturn } - -!name = !{!0} - -!0 = !{!"mainlib"} diff --git a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition/determinism_repetition-sol-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition/determinism_repetition-sol-aarch64-apple-darwin.ll deleted file mode 100644 index a87be65a..00000000 --- a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition/determinism_repetition-sol-aarch64-apple-darwin.ll +++ /dev/null @@ -1,642 +0,0 @@ -; ModuleID = 'hugr' -source_filename = "hugr" -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" -@"e_Array elem.E746B1A3.0" = private constant [43 x i8] c"*EXIT:INT:Array element is already borrowed" -@"e_Array cont.EFA5AC45.0" = private constant [70 x i8] c"EEXIT:INT:Array contains non-borrowed elements and cannot be discarded" -@res_a.A4A74DAF.0 = private constant [12 x i8] c"\0BUSER:BOOL:a" -@res_b.3BD50C23.0 = private constant [12 x i8] c"\0BUSER:BOOL:b" -@res_c.1C9EF4D1.0 = private constant [12 x i8] c"\0BUSER:BOOL:c" -@res_d.00B84DC7.0 = private constant [12 x i8] c"\0BUSER:BOOL:d" -@res_e.B9A29CAF.0 = private constant [12 x i8] c"\0BUSER:BOOL:e" -@res_shot.6D86EAF7.0 = private constant [14 x i8] c"\0DUSER:INT:shot" -@res_random_int.805B8DD0.0 = private constant [20 x i8] c"\13USER:INT:random_int" -@res_random_flo.4EFA2734.0 = private constant [24 x i8] c"\17USER:FLOAT:random_float" -@"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." - -define void @__hugr__.__main__.main.1() local_unnamed_addr { -cond_104_case_1: - %0 = tail call ptr @heap_alloc(i64 40) - %1 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %1, align 1 - %shot = tail call i64 @get_current_shot() - tail call void @random_seed(i64 %shot) - %shot2 = tail call i64 @get_current_shot() - %2 = tail call ptr @heap_alloc(i64 40) - %3 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %3, align 1 - %qalloc.i = tail call i64 @___qalloc() - %not_max.not.not.i = icmp eq i64 %qalloc.i, -1 - br i1 %not_max.not.not.i, label %cond_535_case_0.i, label %__barray_check_bounds.exit - -cond_535_case_0.i: ; preds = %cond_104_case_1.4, %cond_104_case_1.3, %cond_104_case_1.2, %cond_104_case_1.1, %cond_104_case_1 - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__barray_check_bounds.exit: ; preds = %cond_104_case_1 - tail call void @___reset(i64 %qalloc.i) - %4 = load i64, ptr %3, align 4 - %5 = trunc i64 %4 to i1 - br i1 %5, label %cond_104_case_1.1, label %panic.i - -panic.i: ; preds = %__barray_check_bounds.exit.4, %__barray_check_bounds.exit.3, %__barray_check_bounds.exit.2, %__barray_check_bounds.exit.1, %__barray_check_bounds.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -cond_104_case_1.1: ; preds = %__barray_check_bounds.exit - %6 = and i64 %4, -2 - store i64 %6, ptr %3, align 4 - store i64 %qalloc.i, ptr %2, align 4 - %qalloc.i.1 = tail call i64 @___qalloc() - %not_max.not.not.i.1 = icmp eq i64 %qalloc.i.1, -1 - br i1 %not_max.not.not.i.1, label %cond_535_case_0.i, label %__barray_check_bounds.exit.1 - -__barray_check_bounds.exit.1: ; preds = %cond_104_case_1.1 - tail call void @___reset(i64 %qalloc.i.1) - %7 = load i64, ptr %3, align 4 - %8 = and i64 %7, 2 - %.not1178 = icmp eq i64 %8, 0 - br i1 %.not1178, label %panic.i, label %cond_104_case_1.2 - -cond_104_case_1.2: ; preds = %__barray_check_bounds.exit.1 - %9 = and i64 %7, -3 - store i64 %9, ptr %3, align 4 - %10 = getelementptr inbounds nuw i8, ptr %2, i64 8 - store i64 %qalloc.i.1, ptr %10, align 4 - %qalloc.i.2 = tail call i64 @___qalloc() - %not_max.not.not.i.2 = icmp eq i64 %qalloc.i.2, -1 - br i1 %not_max.not.not.i.2, label %cond_535_case_0.i, label %__barray_check_bounds.exit.2 - -__barray_check_bounds.exit.2: ; preds = %cond_104_case_1.2 - tail call void @___reset(i64 %qalloc.i.2) - %11 = load i64, ptr %3, align 4 - %12 = and i64 %11, 4 - %.not1179 = icmp eq i64 %12, 0 - br i1 %.not1179, label %panic.i, label %cond_104_case_1.3 - -cond_104_case_1.3: ; preds = %__barray_check_bounds.exit.2 - %13 = and i64 %11, -5 - store i64 %13, ptr %3, align 4 - %14 = getelementptr inbounds nuw i8, ptr %2, i64 16 - store i64 %qalloc.i.2, ptr %14, align 4 - %qalloc.i.3 = tail call i64 @___qalloc() - %not_max.not.not.i.3 = icmp eq i64 %qalloc.i.3, -1 - br i1 %not_max.not.not.i.3, label %cond_535_case_0.i, label %__barray_check_bounds.exit.3 - -__barray_check_bounds.exit.3: ; preds = %cond_104_case_1.3 - tail call void @___reset(i64 %qalloc.i.3) - %15 = load i64, ptr %3, align 4 - %16 = and i64 %15, 8 - %.not1180 = icmp eq i64 %16, 0 - br i1 %.not1180, label %panic.i, label %cond_104_case_1.4 - -cond_104_case_1.4: ; preds = %__barray_check_bounds.exit.3 - %17 = and i64 %15, -9 - store i64 %17, ptr %3, align 4 - %18 = getelementptr inbounds nuw i8, ptr %2, i64 24 - store i64 %qalloc.i.3, ptr %18, align 4 - %qalloc.i.4 = tail call i64 @___qalloc() - %not_max.not.not.i.4 = icmp eq i64 %qalloc.i.4, -1 - br i1 %not_max.not.not.i.4, label %cond_535_case_0.i, label %__barray_check_bounds.exit.4 - -__barray_check_bounds.exit.4: ; preds = %cond_104_case_1.4 - tail call void @___reset(i64 %qalloc.i.4) - %19 = load i64, ptr %3, align 4 - %20 = and i64 %19, 16 - %.not1181 = icmp eq i64 %20, 0 - br i1 %.not1181, label %panic.i, label %cond_exit_104.5 - -cond_exit_104.5: ; preds = %__barray_check_bounds.exit.4 - %21 = and i64 %19, -17 - store i64 %21, ptr %3, align 4 - %22 = getelementptr inbounds nuw i8, ptr %2, i64 32 - store i64 %qalloc.i.4, ptr %22, align 4 - %.pre = load i64, ptr %3, align 4 - %23 = trunc i64 %.pre to i1 - br i1 %23, label %panic.i1116, label %__barray_check_bounds.exit1118 - -panic.i1116: ; preds = %__barray_check_bounds.exit1115.4, %__barray_mask_return.exit1120.2, %__barray_mask_return.exit1120.1, %__barray_mask_return.exit1120, %cond_exit_104.5 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1118: ; preds = %cond_exit_104.5 - %24 = or disjoint i64 %.pre, 1 - store i64 %24, ptr %3, align 4 - %25 = load i64, ptr %2, align 4 - tail call void @___rp(i64 %25, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %25, double 0x400921FB54442D18) - %26 = load i64, ptr %3, align 4 - %27 = trunc i64 %26 to i1 - br i1 %27, label %__barray_mask_return.exit1120, label %panic.i1119 - -panic.i1119: ; preds = %__barray_check_bounds.exit1118.4, %__barray_check_bounds.exit1118.3, %__barray_check_bounds.exit1118.2, %__barray_check_bounds.exit1118.1, %__barray_check_bounds.exit1118 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1120: ; preds = %__barray_check_bounds.exit1118 - %28 = and i64 %26, -2 - store i64 %28, ptr %3, align 4 - store i64 %25, ptr %2, align 4 - %29 = load i64, ptr %3, align 4 - %30 = and i64 %29, 2 - %.not1182 = icmp eq i64 %30, 0 - br i1 %.not1182, label %__barray_check_bounds.exit1118.1, label %panic.i1116 - -__barray_check_bounds.exit1118.1: ; preds = %__barray_mask_return.exit1120 - %31 = or disjoint i64 %29, 2 - store i64 %31, ptr %3, align 4 - %32 = getelementptr inbounds nuw i8, ptr %2, i64 8 - %33 = load i64, ptr %32, align 4 - tail call void @___rp(i64 %33, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %33, double 0x400921FB54442D18) - %34 = load i64, ptr %3, align 4 - %35 = and i64 %34, 2 - %.not1183 = icmp eq i64 %35, 0 - br i1 %.not1183, label %panic.i1119, label %__barray_mask_return.exit1120.1 - -__barray_mask_return.exit1120.1: ; preds = %__barray_check_bounds.exit1118.1 - %36 = and i64 %34, -3 - store i64 %36, ptr %3, align 4 - store i64 %33, ptr %32, align 4 - %37 = load i64, ptr %3, align 4 - %38 = and i64 %37, 4 - %.not1184 = icmp eq i64 %38, 0 - br i1 %.not1184, label %__barray_check_bounds.exit1118.2, label %panic.i1116 - -__barray_check_bounds.exit1118.2: ; preds = %__barray_mask_return.exit1120.1 - %39 = or disjoint i64 %37, 4 - store i64 %39, ptr %3, align 4 - %40 = getelementptr inbounds nuw i8, ptr %2, i64 16 - %41 = load i64, ptr %40, align 4 - tail call void @___rp(i64 %41, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %41, double 0x400921FB54442D18) - %42 = load i64, ptr %3, align 4 - %43 = and i64 %42, 4 - %.not1185 = icmp eq i64 %43, 0 - br i1 %.not1185, label %panic.i1119, label %__barray_mask_return.exit1120.2 - -__barray_mask_return.exit1120.2: ; preds = %__barray_check_bounds.exit1118.2 - %44 = and i64 %42, -5 - store i64 %44, ptr %3, align 4 - store i64 %41, ptr %40, align 4 - %45 = load i64, ptr %3, align 4 - %46 = and i64 %45, 8 - %.not1186 = icmp eq i64 %46, 0 - br i1 %.not1186, label %__barray_check_bounds.exit1118.3, label %panic.i1116 - -__barray_check_bounds.exit1118.3: ; preds = %__barray_mask_return.exit1120.2 - %47 = or disjoint i64 %45, 8 - store i64 %47, ptr %3, align 4 - %48 = getelementptr inbounds nuw i8, ptr %2, i64 24 - %49 = load i64, ptr %48, align 4 - tail call void @___rp(i64 %49, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %49, double 0x400921FB54442D18) - %50 = load i64, ptr %3, align 4 - %51 = and i64 %50, 8 - %.not1187 = icmp eq i64 %51, 0 - br i1 %.not1187, label %panic.i1119, label %__barray_check_bounds.exit1115.4 - -__barray_check_bounds.exit1115.4: ; preds = %__barray_check_bounds.exit1118.3 - %52 = and i64 %50, -9 - store i64 %52, ptr %3, align 4 - store i64 %49, ptr %48, align 4 - %53 = load i64, ptr %3, align 4 - %54 = and i64 %53, 16 - %.not1188 = icmp eq i64 %54, 0 - br i1 %.not1188, label %__barray_check_bounds.exit1118.4, label %panic.i1116 - -__barray_check_bounds.exit1118.4: ; preds = %__barray_check_bounds.exit1115.4 - %55 = or disjoint i64 %53, 16 - store i64 %55, ptr %3, align 4 - %56 = getelementptr inbounds nuw i8, ptr %2, i64 32 - %57 = load i64, ptr %56, align 4 - tail call void @___rp(i64 %57, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %57, double 0x400921FB54442D18) - %58 = load i64, ptr %3, align 4 - %59 = and i64 %58, 16 - %.not1189 = icmp eq i64 %59, 0 - br i1 %.not1189, label %panic.i1119, label %__barray_mask_return.exit1120.4 - -__barray_mask_return.exit1120.4: ; preds = %__barray_check_bounds.exit1118.4 - %60 = and i64 %58, -17 - store i64 %60, ptr %3, align 4 - store i64 %57, ptr %56, align 4 - %61 = load i64, ptr %3, align 4 - %62 = trunc i64 %61 to i1 - br i1 %62, label %panic.i1127, label %.thread - -panic.i1123: ; preds = %__barray_check_bounds.exit1122.4, %.thread.3, %.thread.2, %.thread.1, %.thread - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -loop_out318: ; preds = %cond_exit_298.4 - tail call void @heap_free(ptr nonnull %2) - tail call void @heap_free(ptr nonnull %3) - %63 = load i64, ptr %1, align 4 - %64 = trunc i64 %63 to i1 - br i1 %64, label %panic.i1129, label %__barray_mask_borrow.exit1130 - -mask_block_err.i: ; preds = %cond_exit_298.4 - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -panic.i1127: ; preds = %__barray_check_bounds.exit1126.4, %cond_exit_298.2, %cond_exit_298.1, %cond_exit_298, %__barray_mask_return.exit1120.4 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -.thread: ; preds = %__barray_mask_return.exit1120.4 - %65 = or disjoint i64 %61, 1 - store i64 %65, ptr %3, align 4 - %66 = load i64, ptr %2, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %66) - tail call void @___qfree(i64 %66) - %67 = load i64, ptr %1, align 4 - %68 = trunc i64 %67 to i1 - br i1 %68, label %cond_exit_298, label %panic.i1123 - -cond_exit_298: ; preds = %.thread - %69 = and i64 %67, -2 - store i64 %69, ptr %1, align 4 - store i64 %lazy_measure, ptr %0, align 4 - %70 = load i64, ptr %3, align 4 - %71 = and i64 %70, 2 - %.not1190 = icmp eq i64 %71, 0 - br i1 %.not1190, label %.thread.1, label %panic.i1127 - -.thread.1: ; preds = %cond_exit_298 - %72 = or disjoint i64 %70, 2 - store i64 %72, ptr %3, align 4 - %73 = load i64, ptr %32, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %73) - tail call void @___qfree(i64 %73) - %74 = load i64, ptr %1, align 4 - %75 = and i64 %74, 2 - %.not1191 = icmp eq i64 %75, 0 - br i1 %.not1191, label %panic.i1123, label %cond_exit_298.1 - -cond_exit_298.1: ; preds = %.thread.1 - %76 = and i64 %74, -3 - store i64 %76, ptr %1, align 4 - %77 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %lazy_measure.1, ptr %77, align 4 - %78 = load i64, ptr %3, align 4 - %79 = and i64 %78, 4 - %.not1192 = icmp eq i64 %79, 0 - br i1 %.not1192, label %.thread.2, label %panic.i1127 - -.thread.2: ; preds = %cond_exit_298.1 - %80 = or disjoint i64 %78, 4 - store i64 %80, ptr %3, align 4 - %81 = load i64, ptr %40, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %81) - tail call void @___qfree(i64 %81) - %82 = load i64, ptr %1, align 4 - %83 = and i64 %82, 4 - %.not1193 = icmp eq i64 %83, 0 - br i1 %.not1193, label %panic.i1123, label %cond_exit_298.2 - -cond_exit_298.2: ; preds = %.thread.2 - %84 = and i64 %82, -5 - store i64 %84, ptr %1, align 4 - %85 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %lazy_measure.2, ptr %85, align 4 - %86 = load i64, ptr %3, align 4 - %87 = and i64 %86, 8 - %.not1194 = icmp eq i64 %87, 0 - br i1 %.not1194, label %.thread.3, label %panic.i1127 - -.thread.3: ; preds = %cond_exit_298.2 - %88 = or disjoint i64 %86, 8 - store i64 %88, ptr %3, align 4 - %89 = load i64, ptr %48, align 4 - %lazy_measure.3 = tail call i64 @___lazy_measure(i64 %89) - tail call void @___qfree(i64 %89) - %90 = load i64, ptr %1, align 4 - %91 = and i64 %90, 8 - %.not1195 = icmp eq i64 %91, 0 - br i1 %.not1195, label %panic.i1123, label %__barray_check_bounds.exit1126.4 - -__barray_check_bounds.exit1126.4: ; preds = %.thread.3 - %92 = and i64 %90, -9 - store i64 %92, ptr %1, align 4 - %93 = getelementptr inbounds nuw i8, ptr %0, i64 24 - store i64 %lazy_measure.3, ptr %93, align 4 - %94 = load i64, ptr %3, align 4 - %95 = and i64 %94, 16 - %.not1196 = icmp eq i64 %95, 0 - br i1 %.not1196, label %__barray_check_bounds.exit1122.4, label %panic.i1127 - -__barray_check_bounds.exit1122.4: ; preds = %__barray_check_bounds.exit1126.4 - %96 = or disjoint i64 %94, 16 - store i64 %96, ptr %3, align 4 - %97 = load i64, ptr %56, align 4 - %lazy_measure.4 = tail call i64 @___lazy_measure(i64 %97) - tail call void @___qfree(i64 %97) - %98 = load i64, ptr %1, align 4 - %99 = and i64 %98, 16 - %.not1197 = icmp eq i64 %99, 0 - br i1 %.not1197, label %panic.i1123, label %cond_exit_298.4 - -cond_exit_298.4: ; preds = %__barray_check_bounds.exit1122.4 - %100 = and i64 %98, -17 - store i64 %100, ptr %1, align 4 - %101 = getelementptr inbounds nuw i8, ptr %0, i64 32 - store i64 %lazy_measure.4, ptr %101, align 4 - %102 = load i64, ptr %3, align 4 - %103 = or i64 %102, -32 - store i64 %103, ptr %3, align 4 - %104 = icmp eq i64 %103, -1 - br i1 %104, label %loop_out318, label %mask_block_err.i - -panic.i1129: ; preds = %loop_out318 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit1130: ; preds = %loop_out318 - %105 = or disjoint i64 %63, 1 - store i64 %105, ptr %1, align 4 - %106 = load i64, ptr %0, align 4 - tail call void @___inc_future_refcount(i64 %106) - %107 = load i64, ptr %1, align 4 - %108 = trunc i64 %107 to i1 - br i1 %108, label %__barray_mask_return.exit1132, label %panic.i1131 - -panic.i1131: ; preds = %__barray_mask_borrow.exit1130 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1132: ; preds = %__barray_mask_borrow.exit1130 - %109 = and i64 %107, -2 - store i64 %109, ptr %1, align 4 - store i64 %106, ptr %0, align 4 - %110 = load i64, ptr %1, align 4 - %111 = and i64 %110, 2 - %.not = icmp eq i64 %111, 0 - br i1 %.not, label %__barray_mask_borrow.exit1134, label %panic.i1133 - -panic.i1133: ; preds = %__barray_mask_return.exit1132 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit1134: ; preds = %__barray_mask_return.exit1132 - %112 = or disjoint i64 %110, 2 - store i64 %112, ptr %1, align 4 - %113 = load i64, ptr %77, align 4 - tail call void @___inc_future_refcount(i64 %113) - %114 = load i64, ptr %1, align 4 - %115 = and i64 %114, 2 - %.not1168 = icmp eq i64 %115, 0 - br i1 %.not1168, label %panic.i1135, label %__barray_mask_return.exit1136 - -panic.i1135: ; preds = %__barray_mask_borrow.exit1134 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1136: ; preds = %__barray_mask_borrow.exit1134 - %116 = and i64 %114, -3 - store i64 %116, ptr %1, align 4 - store i64 %113, ptr %77, align 4 - %117 = load i64, ptr %1, align 4 - %118 = and i64 %117, 4 - %.not1169 = icmp eq i64 %118, 0 - br i1 %.not1169, label %__barray_mask_borrow.exit1138, label %panic.i1137 - -panic.i1137: ; preds = %__barray_mask_return.exit1136 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit1138: ; preds = %__barray_mask_return.exit1136 - %119 = or disjoint i64 %117, 4 - store i64 %119, ptr %1, align 4 - %120 = load i64, ptr %85, align 4 - tail call void @___inc_future_refcount(i64 %120) - %121 = load i64, ptr %1, align 4 - %122 = and i64 %121, 4 - %.not1170 = icmp eq i64 %122, 0 - br i1 %.not1170, label %panic.i1139, label %__barray_mask_return.exit1140 - -panic.i1139: ; preds = %__barray_mask_borrow.exit1138 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1140: ; preds = %__barray_mask_borrow.exit1138 - %123 = and i64 %121, -5 - store i64 %123, ptr %1, align 4 - store i64 %120, ptr %85, align 4 - %124 = load i64, ptr %1, align 4 - %125 = and i64 %124, 8 - %.not1171 = icmp eq i64 %125, 0 - br i1 %.not1171, label %__barray_mask_borrow.exit1142, label %panic.i1141 - -panic.i1141: ; preds = %__barray_mask_return.exit1140 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit1142: ; preds = %__barray_mask_return.exit1140 - %126 = or disjoint i64 %124, 8 - store i64 %126, ptr %1, align 4 - %127 = load i64, ptr %93, align 4 - tail call void @___inc_future_refcount(i64 %127) - %128 = load i64, ptr %1, align 4 - %129 = and i64 %128, 8 - %.not1172 = icmp eq i64 %129, 0 - br i1 %.not1172, label %panic.i1143, label %__barray_mask_return.exit1144 - -panic.i1143: ; preds = %__barray_mask_borrow.exit1142 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1144: ; preds = %__barray_mask_borrow.exit1142 - %130 = and i64 %128, -9 - store i64 %130, ptr %1, align 4 - store i64 %127, ptr %93, align 4 - %131 = load i64, ptr %1, align 4 - %132 = and i64 %131, 16 - %.not1173 = icmp eq i64 %132, 0 - br i1 %.not1173, label %__barray_mask_borrow.exit1146, label %panic.i1145 - -panic.i1145: ; preds = %__barray_mask_return.exit1144 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit1146: ; preds = %__barray_mask_return.exit1144 - %133 = or disjoint i64 %131, 16 - store i64 %133, ptr %1, align 4 - %134 = load i64, ptr %101, align 4 - tail call void @___inc_future_refcount(i64 %134) - %135 = load i64, ptr %1, align 4 - %136 = and i64 %135, 16 - %.not1174 = icmp eq i64 %136, 0 - br i1 %.not1174, label %panic.i1147, label %__barray_mask_return.exit1148 - -panic.i1147: ; preds = %__barray_mask_borrow.exit1146 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1148: ; preds = %__barray_mask_borrow.exit1146 - %137 = and i64 %135, -17 - store i64 %137, ptr %1, align 4 - store i64 %134, ptr %101, align 4 - %138 = load i64, ptr %1, align 4 - %139 = trunc i64 %138 to i1 - br i1 %139, label %cond_exit_558, label %__barray_mask_borrow.exit1160 - -mask_block_err.i1152: ; preds = %cond_exit_558.4 - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_mask_borrow.exit1160: ; preds = %__barray_mask_return.exit1148 - %140 = or disjoint i64 %138, 1 - store i64 %140, ptr %1, align 4 - %141 = load i64, ptr %0, align 4 - tail call void @___dec_future_refcount(i64 %141) - br label %cond_exit_558 - -cond_exit_558: ; preds = %__barray_mask_borrow.exit1160, %__barray_mask_return.exit1148 - %142 = load i64, ptr %1, align 4 - %143 = and i64 %142, 2 - %.not1200 = icmp eq i64 %143, 0 - br i1 %.not1200, label %__barray_mask_borrow.exit1160.1, label %cond_exit_558.1 - -__barray_mask_borrow.exit1160.1: ; preds = %cond_exit_558 - %144 = or disjoint i64 %142, 2 - store i64 %144, ptr %1, align 4 - %145 = getelementptr inbounds nuw i8, ptr %0, i64 8 - %146 = load i64, ptr %145, align 4 - tail call void @___dec_future_refcount(i64 %146) - br label %cond_exit_558.1 - -cond_exit_558.1: ; preds = %__barray_mask_borrow.exit1160.1, %cond_exit_558 - %147 = load i64, ptr %1, align 4 - %148 = and i64 %147, 4 - %.not1201 = icmp eq i64 %148, 0 - br i1 %.not1201, label %__barray_mask_borrow.exit1160.2, label %cond_exit_558.2 - -__barray_mask_borrow.exit1160.2: ; preds = %cond_exit_558.1 - %149 = or disjoint i64 %147, 4 - store i64 %149, ptr %1, align 4 - %150 = getelementptr inbounds nuw i8, ptr %0, i64 16 - %151 = load i64, ptr %150, align 4 - tail call void @___dec_future_refcount(i64 %151) - br label %cond_exit_558.2 - -cond_exit_558.2: ; preds = %__barray_mask_borrow.exit1160.2, %cond_exit_558.1 - %152 = load i64, ptr %1, align 4 - %153 = and i64 %152, 8 - %.not1202 = icmp eq i64 %153, 0 - br i1 %.not1202, label %__barray_mask_borrow.exit1160.3, label %cond_exit_558.3 - -__barray_mask_borrow.exit1160.3: ; preds = %cond_exit_558.2 - %154 = or disjoint i64 %152, 8 - store i64 %154, ptr %1, align 4 - %155 = getelementptr inbounds nuw i8, ptr %0, i64 24 - %156 = load i64, ptr %155, align 4 - tail call void @___dec_future_refcount(i64 %156) - br label %cond_exit_558.3 - -cond_exit_558.3: ; preds = %__barray_mask_borrow.exit1160.3, %cond_exit_558.2 - %157 = load i64, ptr %1, align 4 - %158 = and i64 %157, 16 - %.not1203 = icmp eq i64 %158, 0 - br i1 %.not1203, label %__barray_mask_borrow.exit1160.4, label %cond_exit_558.4 - -__barray_mask_borrow.exit1160.4: ; preds = %cond_exit_558.3 - %159 = or disjoint i64 %157, 16 - store i64 %159, ptr %1, align 4 - %160 = getelementptr inbounds nuw i8, ptr %0, i64 32 - %161 = load i64, ptr %160, align 4 - tail call void @___dec_future_refcount(i64 %161) - br label %cond_exit_558.4 - -cond_exit_558.4: ; preds = %__barray_mask_borrow.exit1160.4, %cond_exit_558.3 - %162 = load i64, ptr %1, align 4 - %163 = or i64 %162, -32 - store i64 %163, ptr %1, align 4 - %164 = icmp eq i64 %163, -1 - br i1 %164, label %loop_out620, label %mask_block_err.i1152 - -loop_out620: ; preds = %cond_exit_558.4 - tail call void @heap_free(ptr nonnull %0) - tail call void @heap_free(ptr nonnull %1) - %read_bool = tail call i1 @___read_future_bool(i64 %106) - tail call void @___dec_future_refcount(i64 %106) - tail call void @print_bool(ptr nonnull @res_a.A4A74DAF.0, i64 11, i1 %read_bool) - %read_bool690 = tail call i1 @___read_future_bool(i64 %113) - tail call void @___dec_future_refcount(i64 %113) - tail call void @print_bool(ptr nonnull @res_b.3BD50C23.0, i64 11, i1 %read_bool690) - %read_bool705 = tail call i1 @___read_future_bool(i64 %120) - tail call void @___dec_future_refcount(i64 %120) - tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool705) - %read_bool720 = tail call i1 @___read_future_bool(i64 %127) - tail call void @___dec_future_refcount(i64 %127) - tail call void @print_bool(ptr nonnull @res_d.00B84DC7.0, i64 11, i1 %read_bool720) - %read_bool735 = tail call i1 @___read_future_bool(i64 %134) - tail call void @___dec_future_refcount(i64 %134) - tail call void @print_bool(ptr nonnull @res_e.B9A29CAF.0, i64 11, i1 %read_bool735) - tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot2) - %rint = tail call i32 @random_int() - %rfloat = tail call double @random_float() - %165 = sext i32 %rint to i64 - tail call void @print_int(ptr nonnull @res_random_int.805B8DD0.0, i64 19, i64 %165) - tail call void @print_float(ptr nonnull @res_random_flo.4EFA2734.0, i64 23, double %rfloat) - ret void -} - -declare ptr @heap_alloc(i64) local_unnamed_addr - -declare i64 @get_current_shot() local_unnamed_addr - -declare void @random_seed(i64) local_unnamed_addr - -; Function Attrs: noreturn -declare void @panic(i32, ptr) local_unnamed_addr #0 - -declare void @heap_free(ptr) local_unnamed_addr - -declare i64 @___lazy_measure(i64) local_unnamed_addr - -declare void @___qfree(i64) local_unnamed_addr - -declare void @___inc_future_refcount(i64) local_unnamed_addr - -declare void @___dec_future_refcount(i64) local_unnamed_addr - -declare i1 @___read_future_bool(i64) local_unnamed_addr - -declare void @print_bool(ptr, i64, i1) local_unnamed_addr - -declare void @print_int(ptr, i64, i64) local_unnamed_addr - -declare i32 @random_int() local_unnamed_addr - -declare double @random_float() local_unnamed_addr - -declare void @print_float(ptr, i64, double) local_unnamed_addr - -declare void @___rp(i64, double, double) local_unnamed_addr - -declare void @___rz(i64, double) local_unnamed_addr - -declare i64 @___qalloc() local_unnamed_addr - -declare void @___reset(i64) local_unnamed_addr - -define i64 @qmain(i64 %0) local_unnamed_addr { -entry: - tail call void @setup(i64 %0) - tail call void @__hugr__.__main__.main.1() - %1 = tail call i64 @teardown() - ret i64 %1 -} - -declare void @setup(i64) local_unnamed_addr - -declare i64 @teardown() local_unnamed_addr - -attributes #0 = { noreturn } - -!name = !{!0} - -!0 = !{!"mainlib"} diff --git a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition/determinism_repetition-sol-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition/determinism_repetition-sol-aarch64-unknown-linux-gnu.ll deleted file mode 100644 index 25da2c5a..00000000 --- a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition/determinism_repetition-sol-aarch64-unknown-linux-gnu.ll +++ /dev/null @@ -1,642 +0,0 @@ -; ModuleID = 'hugr' -source_filename = "hugr" -target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32" -target triple = "aarch64-unknown-linux-gnu" - -@"e_Array alre.5A300C2A.0" = private constant [57 x i8] c"8EXIT:INT:Array already contains an element at this index" -@"e_Array elem.E746B1A3.0" = private constant [43 x i8] c"*EXIT:INT:Array element is already borrowed" -@"e_Array cont.EFA5AC45.0" = private constant [70 x i8] c"EEXIT:INT:Array contains non-borrowed elements and cannot be discarded" -@res_a.A4A74DAF.0 = private constant [12 x i8] c"\0BUSER:BOOL:a" -@res_b.3BD50C23.0 = private constant [12 x i8] c"\0BUSER:BOOL:b" -@res_c.1C9EF4D1.0 = private constant [12 x i8] c"\0BUSER:BOOL:c" -@res_d.00B84DC7.0 = private constant [12 x i8] c"\0BUSER:BOOL:d" -@res_e.B9A29CAF.0 = private constant [12 x i8] c"\0BUSER:BOOL:e" -@res_shot.6D86EAF7.0 = private constant [14 x i8] c"\0DUSER:INT:shot" -@res_random_int.805B8DD0.0 = private constant [20 x i8] c"\13USER:INT:random_int" -@res_random_flo.4EFA2734.0 = private constant [24 x i8] c"\17USER:FLOAT:random_float" -@"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." - -define void @__hugr__.__main__.main.1() local_unnamed_addr { -cond_104_case_1: - %0 = tail call ptr @heap_alloc(i64 40) - %1 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %1, align 1 - %shot = tail call i64 @get_current_shot() - tail call void @random_seed(i64 %shot) - %shot2 = tail call i64 @get_current_shot() - %2 = tail call ptr @heap_alloc(i64 40) - %3 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %3, align 1 - %qalloc.i = tail call i64 @___qalloc() - %not_max.not.not.i = icmp eq i64 %qalloc.i, -1 - br i1 %not_max.not.not.i, label %cond_535_case_0.i, label %__barray_check_bounds.exit - -cond_535_case_0.i: ; preds = %cond_104_case_1.4, %cond_104_case_1.3, %cond_104_case_1.2, %cond_104_case_1.1, %cond_104_case_1 - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__barray_check_bounds.exit: ; preds = %cond_104_case_1 - tail call void @___reset(i64 %qalloc.i) - %4 = load i64, ptr %3, align 4 - %5 = trunc i64 %4 to i1 - br i1 %5, label %cond_104_case_1.1, label %panic.i - -panic.i: ; preds = %__barray_check_bounds.exit.4, %__barray_check_bounds.exit.3, %__barray_check_bounds.exit.2, %__barray_check_bounds.exit.1, %__barray_check_bounds.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -cond_104_case_1.1: ; preds = %__barray_check_bounds.exit - %6 = and i64 %4, -2 - store i64 %6, ptr %3, align 4 - store i64 %qalloc.i, ptr %2, align 4 - %qalloc.i.1 = tail call i64 @___qalloc() - %not_max.not.not.i.1 = icmp eq i64 %qalloc.i.1, -1 - br i1 %not_max.not.not.i.1, label %cond_535_case_0.i, label %__barray_check_bounds.exit.1 - -__barray_check_bounds.exit.1: ; preds = %cond_104_case_1.1 - tail call void @___reset(i64 %qalloc.i.1) - %7 = load i64, ptr %3, align 4 - %8 = and i64 %7, 2 - %.not1178 = icmp eq i64 %8, 0 - br i1 %.not1178, label %panic.i, label %cond_104_case_1.2 - -cond_104_case_1.2: ; preds = %__barray_check_bounds.exit.1 - %9 = and i64 %7, -3 - store i64 %9, ptr %3, align 4 - %10 = getelementptr inbounds nuw i8, ptr %2, i64 8 - store i64 %qalloc.i.1, ptr %10, align 4 - %qalloc.i.2 = tail call i64 @___qalloc() - %not_max.not.not.i.2 = icmp eq i64 %qalloc.i.2, -1 - br i1 %not_max.not.not.i.2, label %cond_535_case_0.i, label %__barray_check_bounds.exit.2 - -__barray_check_bounds.exit.2: ; preds = %cond_104_case_1.2 - tail call void @___reset(i64 %qalloc.i.2) - %11 = load i64, ptr %3, align 4 - %12 = and i64 %11, 4 - %.not1179 = icmp eq i64 %12, 0 - br i1 %.not1179, label %panic.i, label %cond_104_case_1.3 - -cond_104_case_1.3: ; preds = %__barray_check_bounds.exit.2 - %13 = and i64 %11, -5 - store i64 %13, ptr %3, align 4 - %14 = getelementptr inbounds nuw i8, ptr %2, i64 16 - store i64 %qalloc.i.2, ptr %14, align 4 - %qalloc.i.3 = tail call i64 @___qalloc() - %not_max.not.not.i.3 = icmp eq i64 %qalloc.i.3, -1 - br i1 %not_max.not.not.i.3, label %cond_535_case_0.i, label %__barray_check_bounds.exit.3 - -__barray_check_bounds.exit.3: ; preds = %cond_104_case_1.3 - tail call void @___reset(i64 %qalloc.i.3) - %15 = load i64, ptr %3, align 4 - %16 = and i64 %15, 8 - %.not1180 = icmp eq i64 %16, 0 - br i1 %.not1180, label %panic.i, label %cond_104_case_1.4 - -cond_104_case_1.4: ; preds = %__barray_check_bounds.exit.3 - %17 = and i64 %15, -9 - store i64 %17, ptr %3, align 4 - %18 = getelementptr inbounds nuw i8, ptr %2, i64 24 - store i64 %qalloc.i.3, ptr %18, align 4 - %qalloc.i.4 = tail call i64 @___qalloc() - %not_max.not.not.i.4 = icmp eq i64 %qalloc.i.4, -1 - br i1 %not_max.not.not.i.4, label %cond_535_case_0.i, label %__barray_check_bounds.exit.4 - -__barray_check_bounds.exit.4: ; preds = %cond_104_case_1.4 - tail call void @___reset(i64 %qalloc.i.4) - %19 = load i64, ptr %3, align 4 - %20 = and i64 %19, 16 - %.not1181 = icmp eq i64 %20, 0 - br i1 %.not1181, label %panic.i, label %cond_exit_104.5 - -cond_exit_104.5: ; preds = %__barray_check_bounds.exit.4 - %21 = and i64 %19, -17 - store i64 %21, ptr %3, align 4 - %22 = getelementptr inbounds nuw i8, ptr %2, i64 32 - store i64 %qalloc.i.4, ptr %22, align 4 - %.pre = load i64, ptr %3, align 4 - %23 = trunc i64 %.pre to i1 - br i1 %23, label %panic.i1116, label %__barray_check_bounds.exit1118 - -panic.i1116: ; preds = %__barray_check_bounds.exit1115.4, %__barray_mask_return.exit1120.2, %__barray_mask_return.exit1120.1, %__barray_mask_return.exit1120, %cond_exit_104.5 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1118: ; preds = %cond_exit_104.5 - %24 = or disjoint i64 %.pre, 1 - store i64 %24, ptr %3, align 4 - %25 = load i64, ptr %2, align 4 - tail call void @___rp(i64 %25, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %25, double 0x400921FB54442D18) - %26 = load i64, ptr %3, align 4 - %27 = trunc i64 %26 to i1 - br i1 %27, label %__barray_mask_return.exit1120, label %panic.i1119 - -panic.i1119: ; preds = %__barray_check_bounds.exit1118.4, %__barray_check_bounds.exit1118.3, %__barray_check_bounds.exit1118.2, %__barray_check_bounds.exit1118.1, %__barray_check_bounds.exit1118 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1120: ; preds = %__barray_check_bounds.exit1118 - %28 = and i64 %26, -2 - store i64 %28, ptr %3, align 4 - store i64 %25, ptr %2, align 4 - %29 = load i64, ptr %3, align 4 - %30 = and i64 %29, 2 - %.not1182 = icmp eq i64 %30, 0 - br i1 %.not1182, label %__barray_check_bounds.exit1118.1, label %panic.i1116 - -__barray_check_bounds.exit1118.1: ; preds = %__barray_mask_return.exit1120 - %31 = or disjoint i64 %29, 2 - store i64 %31, ptr %3, align 4 - %32 = getelementptr inbounds nuw i8, ptr %2, i64 8 - %33 = load i64, ptr %32, align 4 - tail call void @___rp(i64 %33, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %33, double 0x400921FB54442D18) - %34 = load i64, ptr %3, align 4 - %35 = and i64 %34, 2 - %.not1183 = icmp eq i64 %35, 0 - br i1 %.not1183, label %panic.i1119, label %__barray_mask_return.exit1120.1 - -__barray_mask_return.exit1120.1: ; preds = %__barray_check_bounds.exit1118.1 - %36 = and i64 %34, -3 - store i64 %36, ptr %3, align 4 - store i64 %33, ptr %32, align 4 - %37 = load i64, ptr %3, align 4 - %38 = and i64 %37, 4 - %.not1184 = icmp eq i64 %38, 0 - br i1 %.not1184, label %__barray_check_bounds.exit1118.2, label %panic.i1116 - -__barray_check_bounds.exit1118.2: ; preds = %__barray_mask_return.exit1120.1 - %39 = or disjoint i64 %37, 4 - store i64 %39, ptr %3, align 4 - %40 = getelementptr inbounds nuw i8, ptr %2, i64 16 - %41 = load i64, ptr %40, align 4 - tail call void @___rp(i64 %41, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %41, double 0x400921FB54442D18) - %42 = load i64, ptr %3, align 4 - %43 = and i64 %42, 4 - %.not1185 = icmp eq i64 %43, 0 - br i1 %.not1185, label %panic.i1119, label %__barray_mask_return.exit1120.2 - -__barray_mask_return.exit1120.2: ; preds = %__barray_check_bounds.exit1118.2 - %44 = and i64 %42, -5 - store i64 %44, ptr %3, align 4 - store i64 %41, ptr %40, align 4 - %45 = load i64, ptr %3, align 4 - %46 = and i64 %45, 8 - %.not1186 = icmp eq i64 %46, 0 - br i1 %.not1186, label %__barray_check_bounds.exit1118.3, label %panic.i1116 - -__barray_check_bounds.exit1118.3: ; preds = %__barray_mask_return.exit1120.2 - %47 = or disjoint i64 %45, 8 - store i64 %47, ptr %3, align 4 - %48 = getelementptr inbounds nuw i8, ptr %2, i64 24 - %49 = load i64, ptr %48, align 4 - tail call void @___rp(i64 %49, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %49, double 0x400921FB54442D18) - %50 = load i64, ptr %3, align 4 - %51 = and i64 %50, 8 - %.not1187 = icmp eq i64 %51, 0 - br i1 %.not1187, label %panic.i1119, label %__barray_check_bounds.exit1115.4 - -__barray_check_bounds.exit1115.4: ; preds = %__barray_check_bounds.exit1118.3 - %52 = and i64 %50, -9 - store i64 %52, ptr %3, align 4 - store i64 %49, ptr %48, align 4 - %53 = load i64, ptr %3, align 4 - %54 = and i64 %53, 16 - %.not1188 = icmp eq i64 %54, 0 - br i1 %.not1188, label %__barray_check_bounds.exit1118.4, label %panic.i1116 - -__barray_check_bounds.exit1118.4: ; preds = %__barray_check_bounds.exit1115.4 - %55 = or disjoint i64 %53, 16 - store i64 %55, ptr %3, align 4 - %56 = getelementptr inbounds nuw i8, ptr %2, i64 32 - %57 = load i64, ptr %56, align 4 - tail call void @___rp(i64 %57, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %57, double 0x400921FB54442D18) - %58 = load i64, ptr %3, align 4 - %59 = and i64 %58, 16 - %.not1189 = icmp eq i64 %59, 0 - br i1 %.not1189, label %panic.i1119, label %__barray_mask_return.exit1120.4 - -__barray_mask_return.exit1120.4: ; preds = %__barray_check_bounds.exit1118.4 - %60 = and i64 %58, -17 - store i64 %60, ptr %3, align 4 - store i64 %57, ptr %56, align 4 - %61 = load i64, ptr %3, align 4 - %62 = trunc i64 %61 to i1 - br i1 %62, label %panic.i1127, label %.thread - -panic.i1123: ; preds = %__barray_check_bounds.exit1122.4, %.thread.3, %.thread.2, %.thread.1, %.thread - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -loop_out318: ; preds = %cond_exit_298.4 - tail call void @heap_free(ptr nonnull %2) - tail call void @heap_free(ptr nonnull %3) - %63 = load i64, ptr %1, align 4 - %64 = trunc i64 %63 to i1 - br i1 %64, label %panic.i1129, label %__barray_mask_borrow.exit1130 - -mask_block_err.i: ; preds = %cond_exit_298.4 - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -panic.i1127: ; preds = %__barray_check_bounds.exit1126.4, %cond_exit_298.2, %cond_exit_298.1, %cond_exit_298, %__barray_mask_return.exit1120.4 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -.thread: ; preds = %__barray_mask_return.exit1120.4 - %65 = or disjoint i64 %61, 1 - store i64 %65, ptr %3, align 4 - %66 = load i64, ptr %2, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %66) - tail call void @___qfree(i64 %66) - %67 = load i64, ptr %1, align 4 - %68 = trunc i64 %67 to i1 - br i1 %68, label %cond_exit_298, label %panic.i1123 - -cond_exit_298: ; preds = %.thread - %69 = and i64 %67, -2 - store i64 %69, ptr %1, align 4 - store i64 %lazy_measure, ptr %0, align 4 - %70 = load i64, ptr %3, align 4 - %71 = and i64 %70, 2 - %.not1190 = icmp eq i64 %71, 0 - br i1 %.not1190, label %.thread.1, label %panic.i1127 - -.thread.1: ; preds = %cond_exit_298 - %72 = or disjoint i64 %70, 2 - store i64 %72, ptr %3, align 4 - %73 = load i64, ptr %32, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %73) - tail call void @___qfree(i64 %73) - %74 = load i64, ptr %1, align 4 - %75 = and i64 %74, 2 - %.not1191 = icmp eq i64 %75, 0 - br i1 %.not1191, label %panic.i1123, label %cond_exit_298.1 - -cond_exit_298.1: ; preds = %.thread.1 - %76 = and i64 %74, -3 - store i64 %76, ptr %1, align 4 - %77 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %lazy_measure.1, ptr %77, align 4 - %78 = load i64, ptr %3, align 4 - %79 = and i64 %78, 4 - %.not1192 = icmp eq i64 %79, 0 - br i1 %.not1192, label %.thread.2, label %panic.i1127 - -.thread.2: ; preds = %cond_exit_298.1 - %80 = or disjoint i64 %78, 4 - store i64 %80, ptr %3, align 4 - %81 = load i64, ptr %40, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %81) - tail call void @___qfree(i64 %81) - %82 = load i64, ptr %1, align 4 - %83 = and i64 %82, 4 - %.not1193 = icmp eq i64 %83, 0 - br i1 %.not1193, label %panic.i1123, label %cond_exit_298.2 - -cond_exit_298.2: ; preds = %.thread.2 - %84 = and i64 %82, -5 - store i64 %84, ptr %1, align 4 - %85 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %lazy_measure.2, ptr %85, align 4 - %86 = load i64, ptr %3, align 4 - %87 = and i64 %86, 8 - %.not1194 = icmp eq i64 %87, 0 - br i1 %.not1194, label %.thread.3, label %panic.i1127 - -.thread.3: ; preds = %cond_exit_298.2 - %88 = or disjoint i64 %86, 8 - store i64 %88, ptr %3, align 4 - %89 = load i64, ptr %48, align 4 - %lazy_measure.3 = tail call i64 @___lazy_measure(i64 %89) - tail call void @___qfree(i64 %89) - %90 = load i64, ptr %1, align 4 - %91 = and i64 %90, 8 - %.not1195 = icmp eq i64 %91, 0 - br i1 %.not1195, label %panic.i1123, label %__barray_check_bounds.exit1126.4 - -__barray_check_bounds.exit1126.4: ; preds = %.thread.3 - %92 = and i64 %90, -9 - store i64 %92, ptr %1, align 4 - %93 = getelementptr inbounds nuw i8, ptr %0, i64 24 - store i64 %lazy_measure.3, ptr %93, align 4 - %94 = load i64, ptr %3, align 4 - %95 = and i64 %94, 16 - %.not1196 = icmp eq i64 %95, 0 - br i1 %.not1196, label %__barray_check_bounds.exit1122.4, label %panic.i1127 - -__barray_check_bounds.exit1122.4: ; preds = %__barray_check_bounds.exit1126.4 - %96 = or disjoint i64 %94, 16 - store i64 %96, ptr %3, align 4 - %97 = load i64, ptr %56, align 4 - %lazy_measure.4 = tail call i64 @___lazy_measure(i64 %97) - tail call void @___qfree(i64 %97) - %98 = load i64, ptr %1, align 4 - %99 = and i64 %98, 16 - %.not1197 = icmp eq i64 %99, 0 - br i1 %.not1197, label %panic.i1123, label %cond_exit_298.4 - -cond_exit_298.4: ; preds = %__barray_check_bounds.exit1122.4 - %100 = and i64 %98, -17 - store i64 %100, ptr %1, align 4 - %101 = getelementptr inbounds nuw i8, ptr %0, i64 32 - store i64 %lazy_measure.4, ptr %101, align 4 - %102 = load i64, ptr %3, align 4 - %103 = or i64 %102, -32 - store i64 %103, ptr %3, align 4 - %104 = icmp eq i64 %103, -1 - br i1 %104, label %loop_out318, label %mask_block_err.i - -panic.i1129: ; preds = %loop_out318 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit1130: ; preds = %loop_out318 - %105 = or disjoint i64 %63, 1 - store i64 %105, ptr %1, align 4 - %106 = load i64, ptr %0, align 4 - tail call void @___inc_future_refcount(i64 %106) - %107 = load i64, ptr %1, align 4 - %108 = trunc i64 %107 to i1 - br i1 %108, label %__barray_mask_return.exit1132, label %panic.i1131 - -panic.i1131: ; preds = %__barray_mask_borrow.exit1130 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1132: ; preds = %__barray_mask_borrow.exit1130 - %109 = and i64 %107, -2 - store i64 %109, ptr %1, align 4 - store i64 %106, ptr %0, align 4 - %110 = load i64, ptr %1, align 4 - %111 = and i64 %110, 2 - %.not = icmp eq i64 %111, 0 - br i1 %.not, label %__barray_mask_borrow.exit1134, label %panic.i1133 - -panic.i1133: ; preds = %__barray_mask_return.exit1132 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit1134: ; preds = %__barray_mask_return.exit1132 - %112 = or disjoint i64 %110, 2 - store i64 %112, ptr %1, align 4 - %113 = load i64, ptr %77, align 4 - tail call void @___inc_future_refcount(i64 %113) - %114 = load i64, ptr %1, align 4 - %115 = and i64 %114, 2 - %.not1168 = icmp eq i64 %115, 0 - br i1 %.not1168, label %panic.i1135, label %__barray_mask_return.exit1136 - -panic.i1135: ; preds = %__barray_mask_borrow.exit1134 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1136: ; preds = %__barray_mask_borrow.exit1134 - %116 = and i64 %114, -3 - store i64 %116, ptr %1, align 4 - store i64 %113, ptr %77, align 4 - %117 = load i64, ptr %1, align 4 - %118 = and i64 %117, 4 - %.not1169 = icmp eq i64 %118, 0 - br i1 %.not1169, label %__barray_mask_borrow.exit1138, label %panic.i1137 - -panic.i1137: ; preds = %__barray_mask_return.exit1136 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit1138: ; preds = %__barray_mask_return.exit1136 - %119 = or disjoint i64 %117, 4 - store i64 %119, ptr %1, align 4 - %120 = load i64, ptr %85, align 4 - tail call void @___inc_future_refcount(i64 %120) - %121 = load i64, ptr %1, align 4 - %122 = and i64 %121, 4 - %.not1170 = icmp eq i64 %122, 0 - br i1 %.not1170, label %panic.i1139, label %__barray_mask_return.exit1140 - -panic.i1139: ; preds = %__barray_mask_borrow.exit1138 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1140: ; preds = %__barray_mask_borrow.exit1138 - %123 = and i64 %121, -5 - store i64 %123, ptr %1, align 4 - store i64 %120, ptr %85, align 4 - %124 = load i64, ptr %1, align 4 - %125 = and i64 %124, 8 - %.not1171 = icmp eq i64 %125, 0 - br i1 %.not1171, label %__barray_mask_borrow.exit1142, label %panic.i1141 - -panic.i1141: ; preds = %__barray_mask_return.exit1140 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit1142: ; preds = %__barray_mask_return.exit1140 - %126 = or disjoint i64 %124, 8 - store i64 %126, ptr %1, align 4 - %127 = load i64, ptr %93, align 4 - tail call void @___inc_future_refcount(i64 %127) - %128 = load i64, ptr %1, align 4 - %129 = and i64 %128, 8 - %.not1172 = icmp eq i64 %129, 0 - br i1 %.not1172, label %panic.i1143, label %__barray_mask_return.exit1144 - -panic.i1143: ; preds = %__barray_mask_borrow.exit1142 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1144: ; preds = %__barray_mask_borrow.exit1142 - %130 = and i64 %128, -9 - store i64 %130, ptr %1, align 4 - store i64 %127, ptr %93, align 4 - %131 = load i64, ptr %1, align 4 - %132 = and i64 %131, 16 - %.not1173 = icmp eq i64 %132, 0 - br i1 %.not1173, label %__barray_mask_borrow.exit1146, label %panic.i1145 - -panic.i1145: ; preds = %__barray_mask_return.exit1144 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit1146: ; preds = %__barray_mask_return.exit1144 - %133 = or disjoint i64 %131, 16 - store i64 %133, ptr %1, align 4 - %134 = load i64, ptr %101, align 4 - tail call void @___inc_future_refcount(i64 %134) - %135 = load i64, ptr %1, align 4 - %136 = and i64 %135, 16 - %.not1174 = icmp eq i64 %136, 0 - br i1 %.not1174, label %panic.i1147, label %__barray_mask_return.exit1148 - -panic.i1147: ; preds = %__barray_mask_borrow.exit1146 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1148: ; preds = %__barray_mask_borrow.exit1146 - %137 = and i64 %135, -17 - store i64 %137, ptr %1, align 4 - store i64 %134, ptr %101, align 4 - %138 = load i64, ptr %1, align 4 - %139 = trunc i64 %138 to i1 - br i1 %139, label %cond_exit_558, label %__barray_mask_borrow.exit1160 - -mask_block_err.i1152: ; preds = %cond_exit_558.4 - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_mask_borrow.exit1160: ; preds = %__barray_mask_return.exit1148 - %140 = or disjoint i64 %138, 1 - store i64 %140, ptr %1, align 4 - %141 = load i64, ptr %0, align 4 - tail call void @___dec_future_refcount(i64 %141) - br label %cond_exit_558 - -cond_exit_558: ; preds = %__barray_mask_borrow.exit1160, %__barray_mask_return.exit1148 - %142 = load i64, ptr %1, align 4 - %143 = and i64 %142, 2 - %.not1200 = icmp eq i64 %143, 0 - br i1 %.not1200, label %__barray_mask_borrow.exit1160.1, label %cond_exit_558.1 - -__barray_mask_borrow.exit1160.1: ; preds = %cond_exit_558 - %144 = or disjoint i64 %142, 2 - store i64 %144, ptr %1, align 4 - %145 = getelementptr inbounds nuw i8, ptr %0, i64 8 - %146 = load i64, ptr %145, align 4 - tail call void @___dec_future_refcount(i64 %146) - br label %cond_exit_558.1 - -cond_exit_558.1: ; preds = %__barray_mask_borrow.exit1160.1, %cond_exit_558 - %147 = load i64, ptr %1, align 4 - %148 = and i64 %147, 4 - %.not1201 = icmp eq i64 %148, 0 - br i1 %.not1201, label %__barray_mask_borrow.exit1160.2, label %cond_exit_558.2 - -__barray_mask_borrow.exit1160.2: ; preds = %cond_exit_558.1 - %149 = or disjoint i64 %147, 4 - store i64 %149, ptr %1, align 4 - %150 = getelementptr inbounds nuw i8, ptr %0, i64 16 - %151 = load i64, ptr %150, align 4 - tail call void @___dec_future_refcount(i64 %151) - br label %cond_exit_558.2 - -cond_exit_558.2: ; preds = %__barray_mask_borrow.exit1160.2, %cond_exit_558.1 - %152 = load i64, ptr %1, align 4 - %153 = and i64 %152, 8 - %.not1202 = icmp eq i64 %153, 0 - br i1 %.not1202, label %__barray_mask_borrow.exit1160.3, label %cond_exit_558.3 - -__barray_mask_borrow.exit1160.3: ; preds = %cond_exit_558.2 - %154 = or disjoint i64 %152, 8 - store i64 %154, ptr %1, align 4 - %155 = getelementptr inbounds nuw i8, ptr %0, i64 24 - %156 = load i64, ptr %155, align 4 - tail call void @___dec_future_refcount(i64 %156) - br label %cond_exit_558.3 - -cond_exit_558.3: ; preds = %__barray_mask_borrow.exit1160.3, %cond_exit_558.2 - %157 = load i64, ptr %1, align 4 - %158 = and i64 %157, 16 - %.not1203 = icmp eq i64 %158, 0 - br i1 %.not1203, label %__barray_mask_borrow.exit1160.4, label %cond_exit_558.4 - -__barray_mask_borrow.exit1160.4: ; preds = %cond_exit_558.3 - %159 = or disjoint i64 %157, 16 - store i64 %159, ptr %1, align 4 - %160 = getelementptr inbounds nuw i8, ptr %0, i64 32 - %161 = load i64, ptr %160, align 4 - tail call void @___dec_future_refcount(i64 %161) - br label %cond_exit_558.4 - -cond_exit_558.4: ; preds = %__barray_mask_borrow.exit1160.4, %cond_exit_558.3 - %162 = load i64, ptr %1, align 4 - %163 = or i64 %162, -32 - store i64 %163, ptr %1, align 4 - %164 = icmp eq i64 %163, -1 - br i1 %164, label %loop_out620, label %mask_block_err.i1152 - -loop_out620: ; preds = %cond_exit_558.4 - tail call void @heap_free(ptr nonnull %0) - tail call void @heap_free(ptr nonnull %1) - %read_bool = tail call i1 @___read_future_bool(i64 %106) - tail call void @___dec_future_refcount(i64 %106) - tail call void @print_bool(ptr nonnull @res_a.A4A74DAF.0, i64 11, i1 %read_bool) - %read_bool690 = tail call i1 @___read_future_bool(i64 %113) - tail call void @___dec_future_refcount(i64 %113) - tail call void @print_bool(ptr nonnull @res_b.3BD50C23.0, i64 11, i1 %read_bool690) - %read_bool705 = tail call i1 @___read_future_bool(i64 %120) - tail call void @___dec_future_refcount(i64 %120) - tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool705) - %read_bool720 = tail call i1 @___read_future_bool(i64 %127) - tail call void @___dec_future_refcount(i64 %127) - tail call void @print_bool(ptr nonnull @res_d.00B84DC7.0, i64 11, i1 %read_bool720) - %read_bool735 = tail call i1 @___read_future_bool(i64 %134) - tail call void @___dec_future_refcount(i64 %134) - tail call void @print_bool(ptr nonnull @res_e.B9A29CAF.0, i64 11, i1 %read_bool735) - tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot2) - %rint = tail call i32 @random_int() - %rfloat = tail call double @random_float() - %165 = sext i32 %rint to i64 - tail call void @print_int(ptr nonnull @res_random_int.805B8DD0.0, i64 19, i64 %165) - tail call void @print_float(ptr nonnull @res_random_flo.4EFA2734.0, i64 23, double %rfloat) - ret void -} - -declare ptr @heap_alloc(i64) local_unnamed_addr - -declare i64 @get_current_shot() local_unnamed_addr - -declare void @random_seed(i64) local_unnamed_addr - -; Function Attrs: noreturn -declare void @panic(i32, ptr) local_unnamed_addr #0 - -declare void @heap_free(ptr) local_unnamed_addr - -declare i64 @___lazy_measure(i64) local_unnamed_addr - -declare void @___qfree(i64) local_unnamed_addr - -declare void @___inc_future_refcount(i64) local_unnamed_addr - -declare void @___dec_future_refcount(i64) local_unnamed_addr - -declare i1 @___read_future_bool(i64) local_unnamed_addr - -declare void @print_bool(ptr, i64, i1) local_unnamed_addr - -declare void @print_int(ptr, i64, i64) local_unnamed_addr - -declare i32 @random_int() local_unnamed_addr - -declare double @random_float() local_unnamed_addr - -declare void @print_float(ptr, i64, double) local_unnamed_addr - -declare void @___rp(i64, double, double) local_unnamed_addr - -declare void @___rz(i64, double) local_unnamed_addr - -declare i64 @___qalloc() local_unnamed_addr - -declare void @___reset(i64) local_unnamed_addr - -define i64 @qmain(i64 %0) local_unnamed_addr { -entry: - tail call void @setup(i64 %0) - tail call void @__hugr__.__main__.main.1() - %1 = tail call i64 @teardown() - ret i64 %1 -} - -declare void @setup(i64) local_unnamed_addr - -declare i64 @teardown() local_unnamed_addr - -attributes #0 = { noreturn } - -!name = !{!0} - -!0 = !{!"mainlib"} diff --git a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition/determinism_repetition-sol-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition/determinism_repetition-sol-x86_64-apple-darwin.ll deleted file mode 100644 index 75844187..00000000 --- a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition/determinism_repetition-sol-x86_64-apple-darwin.ll +++ /dev/null @@ -1,642 +0,0 @@ -; ModuleID = 'hugr' -source_filename = "hugr" -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" -@"e_Array elem.E746B1A3.0" = private constant [43 x i8] c"*EXIT:INT:Array element is already borrowed" -@"e_Array cont.EFA5AC45.0" = private constant [70 x i8] c"EEXIT:INT:Array contains non-borrowed elements and cannot be discarded" -@res_a.A4A74DAF.0 = private constant [12 x i8] c"\0BUSER:BOOL:a" -@res_b.3BD50C23.0 = private constant [12 x i8] c"\0BUSER:BOOL:b" -@res_c.1C9EF4D1.0 = private constant [12 x i8] c"\0BUSER:BOOL:c" -@res_d.00B84DC7.0 = private constant [12 x i8] c"\0BUSER:BOOL:d" -@res_e.B9A29CAF.0 = private constant [12 x i8] c"\0BUSER:BOOL:e" -@res_shot.6D86EAF7.0 = private constant [14 x i8] c"\0DUSER:INT:shot" -@res_random_int.805B8DD0.0 = private constant [20 x i8] c"\13USER:INT:random_int" -@res_random_flo.4EFA2734.0 = private constant [24 x i8] c"\17USER:FLOAT:random_float" -@"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." - -define void @__hugr__.__main__.main.1() local_unnamed_addr { -cond_104_case_1: - %0 = tail call ptr @heap_alloc(i64 40) - %1 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %1, align 1 - %shot = tail call i64 @get_current_shot() - tail call void @random_seed(i64 %shot) - %shot2 = tail call i64 @get_current_shot() - %2 = tail call ptr @heap_alloc(i64 40) - %3 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %3, align 1 - %qalloc.i = tail call i64 @___qalloc() - %not_max.not.not.i = icmp eq i64 %qalloc.i, -1 - br i1 %not_max.not.not.i, label %cond_535_case_0.i, label %__barray_check_bounds.exit - -cond_535_case_0.i: ; preds = %cond_104_case_1.4, %cond_104_case_1.3, %cond_104_case_1.2, %cond_104_case_1.1, %cond_104_case_1 - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__barray_check_bounds.exit: ; preds = %cond_104_case_1 - tail call void @___reset(i64 %qalloc.i) - %4 = load i64, ptr %3, align 4 - %5 = trunc i64 %4 to i1 - br i1 %5, label %cond_104_case_1.1, label %panic.i - -panic.i: ; preds = %__barray_check_bounds.exit.4, %__barray_check_bounds.exit.3, %__barray_check_bounds.exit.2, %__barray_check_bounds.exit.1, %__barray_check_bounds.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -cond_104_case_1.1: ; preds = %__barray_check_bounds.exit - %6 = and i64 %4, -2 - store i64 %6, ptr %3, align 4 - store i64 %qalloc.i, ptr %2, align 4 - %qalloc.i.1 = tail call i64 @___qalloc() - %not_max.not.not.i.1 = icmp eq i64 %qalloc.i.1, -1 - br i1 %not_max.not.not.i.1, label %cond_535_case_0.i, label %__barray_check_bounds.exit.1 - -__barray_check_bounds.exit.1: ; preds = %cond_104_case_1.1 - tail call void @___reset(i64 %qalloc.i.1) - %7 = load i64, ptr %3, align 4 - %8 = and i64 %7, 2 - %.not1178 = icmp eq i64 %8, 0 - br i1 %.not1178, label %panic.i, label %cond_104_case_1.2 - -cond_104_case_1.2: ; preds = %__barray_check_bounds.exit.1 - %9 = and i64 %7, -3 - store i64 %9, ptr %3, align 4 - %10 = getelementptr inbounds nuw i8, ptr %2, i64 8 - store i64 %qalloc.i.1, ptr %10, align 4 - %qalloc.i.2 = tail call i64 @___qalloc() - %not_max.not.not.i.2 = icmp eq i64 %qalloc.i.2, -1 - br i1 %not_max.not.not.i.2, label %cond_535_case_0.i, label %__barray_check_bounds.exit.2 - -__barray_check_bounds.exit.2: ; preds = %cond_104_case_1.2 - tail call void @___reset(i64 %qalloc.i.2) - %11 = load i64, ptr %3, align 4 - %12 = and i64 %11, 4 - %.not1179 = icmp eq i64 %12, 0 - br i1 %.not1179, label %panic.i, label %cond_104_case_1.3 - -cond_104_case_1.3: ; preds = %__barray_check_bounds.exit.2 - %13 = and i64 %11, -5 - store i64 %13, ptr %3, align 4 - %14 = getelementptr inbounds nuw i8, ptr %2, i64 16 - store i64 %qalloc.i.2, ptr %14, align 4 - %qalloc.i.3 = tail call i64 @___qalloc() - %not_max.not.not.i.3 = icmp eq i64 %qalloc.i.3, -1 - br i1 %not_max.not.not.i.3, label %cond_535_case_0.i, label %__barray_check_bounds.exit.3 - -__barray_check_bounds.exit.3: ; preds = %cond_104_case_1.3 - tail call void @___reset(i64 %qalloc.i.3) - %15 = load i64, ptr %3, align 4 - %16 = and i64 %15, 8 - %.not1180 = icmp eq i64 %16, 0 - br i1 %.not1180, label %panic.i, label %cond_104_case_1.4 - -cond_104_case_1.4: ; preds = %__barray_check_bounds.exit.3 - %17 = and i64 %15, -9 - store i64 %17, ptr %3, align 4 - %18 = getelementptr inbounds nuw i8, ptr %2, i64 24 - store i64 %qalloc.i.3, ptr %18, align 4 - %qalloc.i.4 = tail call i64 @___qalloc() - %not_max.not.not.i.4 = icmp eq i64 %qalloc.i.4, -1 - br i1 %not_max.not.not.i.4, label %cond_535_case_0.i, label %__barray_check_bounds.exit.4 - -__barray_check_bounds.exit.4: ; preds = %cond_104_case_1.4 - tail call void @___reset(i64 %qalloc.i.4) - %19 = load i64, ptr %3, align 4 - %20 = and i64 %19, 16 - %.not1181 = icmp eq i64 %20, 0 - br i1 %.not1181, label %panic.i, label %cond_exit_104.5 - -cond_exit_104.5: ; preds = %__barray_check_bounds.exit.4 - %21 = and i64 %19, -17 - store i64 %21, ptr %3, align 4 - %22 = getelementptr inbounds nuw i8, ptr %2, i64 32 - store i64 %qalloc.i.4, ptr %22, align 4 - %.pre = load i64, ptr %3, align 4 - %23 = trunc i64 %.pre to i1 - br i1 %23, label %panic.i1116, label %__barray_check_bounds.exit1118 - -panic.i1116: ; preds = %__barray_check_bounds.exit1115.4, %__barray_mask_return.exit1120.2, %__barray_mask_return.exit1120.1, %__barray_mask_return.exit1120, %cond_exit_104.5 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1118: ; preds = %cond_exit_104.5 - %24 = or disjoint i64 %.pre, 1 - store i64 %24, ptr %3, align 4 - %25 = load i64, ptr %2, align 4 - tail call void @___rp(i64 %25, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %25, double 0x400921FB54442D18) - %26 = load i64, ptr %3, align 4 - %27 = trunc i64 %26 to i1 - br i1 %27, label %__barray_mask_return.exit1120, label %panic.i1119 - -panic.i1119: ; preds = %__barray_check_bounds.exit1118.4, %__barray_check_bounds.exit1118.3, %__barray_check_bounds.exit1118.2, %__barray_check_bounds.exit1118.1, %__barray_check_bounds.exit1118 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1120: ; preds = %__barray_check_bounds.exit1118 - %28 = and i64 %26, -2 - store i64 %28, ptr %3, align 4 - store i64 %25, ptr %2, align 4 - %29 = load i64, ptr %3, align 4 - %30 = and i64 %29, 2 - %.not1182 = icmp eq i64 %30, 0 - br i1 %.not1182, label %__barray_check_bounds.exit1118.1, label %panic.i1116 - -__barray_check_bounds.exit1118.1: ; preds = %__barray_mask_return.exit1120 - %31 = or disjoint i64 %29, 2 - store i64 %31, ptr %3, align 4 - %32 = getelementptr inbounds nuw i8, ptr %2, i64 8 - %33 = load i64, ptr %32, align 4 - tail call void @___rp(i64 %33, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %33, double 0x400921FB54442D18) - %34 = load i64, ptr %3, align 4 - %35 = and i64 %34, 2 - %.not1183 = icmp eq i64 %35, 0 - br i1 %.not1183, label %panic.i1119, label %__barray_mask_return.exit1120.1 - -__barray_mask_return.exit1120.1: ; preds = %__barray_check_bounds.exit1118.1 - %36 = and i64 %34, -3 - store i64 %36, ptr %3, align 4 - store i64 %33, ptr %32, align 4 - %37 = load i64, ptr %3, align 4 - %38 = and i64 %37, 4 - %.not1184 = icmp eq i64 %38, 0 - br i1 %.not1184, label %__barray_check_bounds.exit1118.2, label %panic.i1116 - -__barray_check_bounds.exit1118.2: ; preds = %__barray_mask_return.exit1120.1 - %39 = or disjoint i64 %37, 4 - store i64 %39, ptr %3, align 4 - %40 = getelementptr inbounds nuw i8, ptr %2, i64 16 - %41 = load i64, ptr %40, align 4 - tail call void @___rp(i64 %41, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %41, double 0x400921FB54442D18) - %42 = load i64, ptr %3, align 4 - %43 = and i64 %42, 4 - %.not1185 = icmp eq i64 %43, 0 - br i1 %.not1185, label %panic.i1119, label %__barray_mask_return.exit1120.2 - -__barray_mask_return.exit1120.2: ; preds = %__barray_check_bounds.exit1118.2 - %44 = and i64 %42, -5 - store i64 %44, ptr %3, align 4 - store i64 %41, ptr %40, align 4 - %45 = load i64, ptr %3, align 4 - %46 = and i64 %45, 8 - %.not1186 = icmp eq i64 %46, 0 - br i1 %.not1186, label %__barray_check_bounds.exit1118.3, label %panic.i1116 - -__barray_check_bounds.exit1118.3: ; preds = %__barray_mask_return.exit1120.2 - %47 = or disjoint i64 %45, 8 - store i64 %47, ptr %3, align 4 - %48 = getelementptr inbounds nuw i8, ptr %2, i64 24 - %49 = load i64, ptr %48, align 4 - tail call void @___rp(i64 %49, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %49, double 0x400921FB54442D18) - %50 = load i64, ptr %3, align 4 - %51 = and i64 %50, 8 - %.not1187 = icmp eq i64 %51, 0 - br i1 %.not1187, label %panic.i1119, label %__barray_check_bounds.exit1115.4 - -__barray_check_bounds.exit1115.4: ; preds = %__barray_check_bounds.exit1118.3 - %52 = and i64 %50, -9 - store i64 %52, ptr %3, align 4 - store i64 %49, ptr %48, align 4 - %53 = load i64, ptr %3, align 4 - %54 = and i64 %53, 16 - %.not1188 = icmp eq i64 %54, 0 - br i1 %.not1188, label %__barray_check_bounds.exit1118.4, label %panic.i1116 - -__barray_check_bounds.exit1118.4: ; preds = %__barray_check_bounds.exit1115.4 - %55 = or disjoint i64 %53, 16 - store i64 %55, ptr %3, align 4 - %56 = getelementptr inbounds nuw i8, ptr %2, i64 32 - %57 = load i64, ptr %56, align 4 - tail call void @___rp(i64 %57, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %57, double 0x400921FB54442D18) - %58 = load i64, ptr %3, align 4 - %59 = and i64 %58, 16 - %.not1189 = icmp eq i64 %59, 0 - br i1 %.not1189, label %panic.i1119, label %__barray_mask_return.exit1120.4 - -__barray_mask_return.exit1120.4: ; preds = %__barray_check_bounds.exit1118.4 - %60 = and i64 %58, -17 - store i64 %60, ptr %3, align 4 - store i64 %57, ptr %56, align 4 - %61 = load i64, ptr %3, align 4 - %62 = trunc i64 %61 to i1 - br i1 %62, label %panic.i1127, label %.thread - -panic.i1123: ; preds = %__barray_check_bounds.exit1122.4, %.thread.3, %.thread.2, %.thread.1, %.thread - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -loop_out318: ; preds = %cond_exit_298.4 - tail call void @heap_free(ptr nonnull %2) - tail call void @heap_free(ptr nonnull %3) - %63 = load i64, ptr %1, align 4 - %64 = trunc i64 %63 to i1 - br i1 %64, label %panic.i1129, label %__barray_mask_borrow.exit1130 - -mask_block_err.i: ; preds = %cond_exit_298.4 - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -panic.i1127: ; preds = %__barray_check_bounds.exit1126.4, %cond_exit_298.2, %cond_exit_298.1, %cond_exit_298, %__barray_mask_return.exit1120.4 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -.thread: ; preds = %__barray_mask_return.exit1120.4 - %65 = or disjoint i64 %61, 1 - store i64 %65, ptr %3, align 4 - %66 = load i64, ptr %2, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %66) - tail call void @___qfree(i64 %66) - %67 = load i64, ptr %1, align 4 - %68 = trunc i64 %67 to i1 - br i1 %68, label %cond_exit_298, label %panic.i1123 - -cond_exit_298: ; preds = %.thread - %69 = and i64 %67, -2 - store i64 %69, ptr %1, align 4 - store i64 %lazy_measure, ptr %0, align 4 - %70 = load i64, ptr %3, align 4 - %71 = and i64 %70, 2 - %.not1190 = icmp eq i64 %71, 0 - br i1 %.not1190, label %.thread.1, label %panic.i1127 - -.thread.1: ; preds = %cond_exit_298 - %72 = or disjoint i64 %70, 2 - store i64 %72, ptr %3, align 4 - %73 = load i64, ptr %32, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %73) - tail call void @___qfree(i64 %73) - %74 = load i64, ptr %1, align 4 - %75 = and i64 %74, 2 - %.not1191 = icmp eq i64 %75, 0 - br i1 %.not1191, label %panic.i1123, label %cond_exit_298.1 - -cond_exit_298.1: ; preds = %.thread.1 - %76 = and i64 %74, -3 - store i64 %76, ptr %1, align 4 - %77 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %lazy_measure.1, ptr %77, align 4 - %78 = load i64, ptr %3, align 4 - %79 = and i64 %78, 4 - %.not1192 = icmp eq i64 %79, 0 - br i1 %.not1192, label %.thread.2, label %panic.i1127 - -.thread.2: ; preds = %cond_exit_298.1 - %80 = or disjoint i64 %78, 4 - store i64 %80, ptr %3, align 4 - %81 = load i64, ptr %40, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %81) - tail call void @___qfree(i64 %81) - %82 = load i64, ptr %1, align 4 - %83 = and i64 %82, 4 - %.not1193 = icmp eq i64 %83, 0 - br i1 %.not1193, label %panic.i1123, label %cond_exit_298.2 - -cond_exit_298.2: ; preds = %.thread.2 - %84 = and i64 %82, -5 - store i64 %84, ptr %1, align 4 - %85 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %lazy_measure.2, ptr %85, align 4 - %86 = load i64, ptr %3, align 4 - %87 = and i64 %86, 8 - %.not1194 = icmp eq i64 %87, 0 - br i1 %.not1194, label %.thread.3, label %panic.i1127 - -.thread.3: ; preds = %cond_exit_298.2 - %88 = or disjoint i64 %86, 8 - store i64 %88, ptr %3, align 4 - %89 = load i64, ptr %48, align 4 - %lazy_measure.3 = tail call i64 @___lazy_measure(i64 %89) - tail call void @___qfree(i64 %89) - %90 = load i64, ptr %1, align 4 - %91 = and i64 %90, 8 - %.not1195 = icmp eq i64 %91, 0 - br i1 %.not1195, label %panic.i1123, label %__barray_check_bounds.exit1126.4 - -__barray_check_bounds.exit1126.4: ; preds = %.thread.3 - %92 = and i64 %90, -9 - store i64 %92, ptr %1, align 4 - %93 = getelementptr inbounds nuw i8, ptr %0, i64 24 - store i64 %lazy_measure.3, ptr %93, align 4 - %94 = load i64, ptr %3, align 4 - %95 = and i64 %94, 16 - %.not1196 = icmp eq i64 %95, 0 - br i1 %.not1196, label %__barray_check_bounds.exit1122.4, label %panic.i1127 - -__barray_check_bounds.exit1122.4: ; preds = %__barray_check_bounds.exit1126.4 - %96 = or disjoint i64 %94, 16 - store i64 %96, ptr %3, align 4 - %97 = load i64, ptr %56, align 4 - %lazy_measure.4 = tail call i64 @___lazy_measure(i64 %97) - tail call void @___qfree(i64 %97) - %98 = load i64, ptr %1, align 4 - %99 = and i64 %98, 16 - %.not1197 = icmp eq i64 %99, 0 - br i1 %.not1197, label %panic.i1123, label %cond_exit_298.4 - -cond_exit_298.4: ; preds = %__barray_check_bounds.exit1122.4 - %100 = and i64 %98, -17 - store i64 %100, ptr %1, align 4 - %101 = getelementptr inbounds nuw i8, ptr %0, i64 32 - store i64 %lazy_measure.4, ptr %101, align 4 - %102 = load i64, ptr %3, align 4 - %103 = or i64 %102, -32 - store i64 %103, ptr %3, align 4 - %104 = icmp eq i64 %103, -1 - br i1 %104, label %loop_out318, label %mask_block_err.i - -panic.i1129: ; preds = %loop_out318 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit1130: ; preds = %loop_out318 - %105 = or disjoint i64 %63, 1 - store i64 %105, ptr %1, align 4 - %106 = load i64, ptr %0, align 4 - tail call void @___inc_future_refcount(i64 %106) - %107 = load i64, ptr %1, align 4 - %108 = trunc i64 %107 to i1 - br i1 %108, label %__barray_mask_return.exit1132, label %panic.i1131 - -panic.i1131: ; preds = %__barray_mask_borrow.exit1130 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1132: ; preds = %__barray_mask_borrow.exit1130 - %109 = and i64 %107, -2 - store i64 %109, ptr %1, align 4 - store i64 %106, ptr %0, align 4 - %110 = load i64, ptr %1, align 4 - %111 = and i64 %110, 2 - %.not = icmp eq i64 %111, 0 - br i1 %.not, label %__barray_mask_borrow.exit1134, label %panic.i1133 - -panic.i1133: ; preds = %__barray_mask_return.exit1132 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit1134: ; preds = %__barray_mask_return.exit1132 - %112 = or disjoint i64 %110, 2 - store i64 %112, ptr %1, align 4 - %113 = load i64, ptr %77, align 4 - tail call void @___inc_future_refcount(i64 %113) - %114 = load i64, ptr %1, align 4 - %115 = and i64 %114, 2 - %.not1168 = icmp eq i64 %115, 0 - br i1 %.not1168, label %panic.i1135, label %__barray_mask_return.exit1136 - -panic.i1135: ; preds = %__barray_mask_borrow.exit1134 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1136: ; preds = %__barray_mask_borrow.exit1134 - %116 = and i64 %114, -3 - store i64 %116, ptr %1, align 4 - store i64 %113, ptr %77, align 4 - %117 = load i64, ptr %1, align 4 - %118 = and i64 %117, 4 - %.not1169 = icmp eq i64 %118, 0 - br i1 %.not1169, label %__barray_mask_borrow.exit1138, label %panic.i1137 - -panic.i1137: ; preds = %__barray_mask_return.exit1136 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit1138: ; preds = %__barray_mask_return.exit1136 - %119 = or disjoint i64 %117, 4 - store i64 %119, ptr %1, align 4 - %120 = load i64, ptr %85, align 4 - tail call void @___inc_future_refcount(i64 %120) - %121 = load i64, ptr %1, align 4 - %122 = and i64 %121, 4 - %.not1170 = icmp eq i64 %122, 0 - br i1 %.not1170, label %panic.i1139, label %__barray_mask_return.exit1140 - -panic.i1139: ; preds = %__barray_mask_borrow.exit1138 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1140: ; preds = %__barray_mask_borrow.exit1138 - %123 = and i64 %121, -5 - store i64 %123, ptr %1, align 4 - store i64 %120, ptr %85, align 4 - %124 = load i64, ptr %1, align 4 - %125 = and i64 %124, 8 - %.not1171 = icmp eq i64 %125, 0 - br i1 %.not1171, label %__barray_mask_borrow.exit1142, label %panic.i1141 - -panic.i1141: ; preds = %__barray_mask_return.exit1140 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit1142: ; preds = %__barray_mask_return.exit1140 - %126 = or disjoint i64 %124, 8 - store i64 %126, ptr %1, align 4 - %127 = load i64, ptr %93, align 4 - tail call void @___inc_future_refcount(i64 %127) - %128 = load i64, ptr %1, align 4 - %129 = and i64 %128, 8 - %.not1172 = icmp eq i64 %129, 0 - br i1 %.not1172, label %panic.i1143, label %__barray_mask_return.exit1144 - -panic.i1143: ; preds = %__barray_mask_borrow.exit1142 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1144: ; preds = %__barray_mask_borrow.exit1142 - %130 = and i64 %128, -9 - store i64 %130, ptr %1, align 4 - store i64 %127, ptr %93, align 4 - %131 = load i64, ptr %1, align 4 - %132 = and i64 %131, 16 - %.not1173 = icmp eq i64 %132, 0 - br i1 %.not1173, label %__barray_mask_borrow.exit1146, label %panic.i1145 - -panic.i1145: ; preds = %__barray_mask_return.exit1144 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit1146: ; preds = %__barray_mask_return.exit1144 - %133 = or disjoint i64 %131, 16 - store i64 %133, ptr %1, align 4 - %134 = load i64, ptr %101, align 4 - tail call void @___inc_future_refcount(i64 %134) - %135 = load i64, ptr %1, align 4 - %136 = and i64 %135, 16 - %.not1174 = icmp eq i64 %136, 0 - br i1 %.not1174, label %panic.i1147, label %__barray_mask_return.exit1148 - -panic.i1147: ; preds = %__barray_mask_borrow.exit1146 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1148: ; preds = %__barray_mask_borrow.exit1146 - %137 = and i64 %135, -17 - store i64 %137, ptr %1, align 4 - store i64 %134, ptr %101, align 4 - %138 = load i64, ptr %1, align 4 - %139 = trunc i64 %138 to i1 - br i1 %139, label %cond_exit_558, label %__barray_mask_borrow.exit1160 - -mask_block_err.i1152: ; preds = %cond_exit_558.4 - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_mask_borrow.exit1160: ; preds = %__barray_mask_return.exit1148 - %140 = or disjoint i64 %138, 1 - store i64 %140, ptr %1, align 4 - %141 = load i64, ptr %0, align 4 - tail call void @___dec_future_refcount(i64 %141) - br label %cond_exit_558 - -cond_exit_558: ; preds = %__barray_mask_borrow.exit1160, %__barray_mask_return.exit1148 - %142 = load i64, ptr %1, align 4 - %143 = and i64 %142, 2 - %.not1200 = icmp eq i64 %143, 0 - br i1 %.not1200, label %__barray_mask_borrow.exit1160.1, label %cond_exit_558.1 - -__barray_mask_borrow.exit1160.1: ; preds = %cond_exit_558 - %144 = or disjoint i64 %142, 2 - store i64 %144, ptr %1, align 4 - %145 = getelementptr inbounds nuw i8, ptr %0, i64 8 - %146 = load i64, ptr %145, align 4 - tail call void @___dec_future_refcount(i64 %146) - br label %cond_exit_558.1 - -cond_exit_558.1: ; preds = %__barray_mask_borrow.exit1160.1, %cond_exit_558 - %147 = load i64, ptr %1, align 4 - %148 = and i64 %147, 4 - %.not1201 = icmp eq i64 %148, 0 - br i1 %.not1201, label %__barray_mask_borrow.exit1160.2, label %cond_exit_558.2 - -__barray_mask_borrow.exit1160.2: ; preds = %cond_exit_558.1 - %149 = or disjoint i64 %147, 4 - store i64 %149, ptr %1, align 4 - %150 = getelementptr inbounds nuw i8, ptr %0, i64 16 - %151 = load i64, ptr %150, align 4 - tail call void @___dec_future_refcount(i64 %151) - br label %cond_exit_558.2 - -cond_exit_558.2: ; preds = %__barray_mask_borrow.exit1160.2, %cond_exit_558.1 - %152 = load i64, ptr %1, align 4 - %153 = and i64 %152, 8 - %.not1202 = icmp eq i64 %153, 0 - br i1 %.not1202, label %__barray_mask_borrow.exit1160.3, label %cond_exit_558.3 - -__barray_mask_borrow.exit1160.3: ; preds = %cond_exit_558.2 - %154 = or disjoint i64 %152, 8 - store i64 %154, ptr %1, align 4 - %155 = getelementptr inbounds nuw i8, ptr %0, i64 24 - %156 = load i64, ptr %155, align 4 - tail call void @___dec_future_refcount(i64 %156) - br label %cond_exit_558.3 - -cond_exit_558.3: ; preds = %__barray_mask_borrow.exit1160.3, %cond_exit_558.2 - %157 = load i64, ptr %1, align 4 - %158 = and i64 %157, 16 - %.not1203 = icmp eq i64 %158, 0 - br i1 %.not1203, label %__barray_mask_borrow.exit1160.4, label %cond_exit_558.4 - -__barray_mask_borrow.exit1160.4: ; preds = %cond_exit_558.3 - %159 = or disjoint i64 %157, 16 - store i64 %159, ptr %1, align 4 - %160 = getelementptr inbounds nuw i8, ptr %0, i64 32 - %161 = load i64, ptr %160, align 4 - tail call void @___dec_future_refcount(i64 %161) - br label %cond_exit_558.4 - -cond_exit_558.4: ; preds = %__barray_mask_borrow.exit1160.4, %cond_exit_558.3 - %162 = load i64, ptr %1, align 4 - %163 = or i64 %162, -32 - store i64 %163, ptr %1, align 4 - %164 = icmp eq i64 %163, -1 - br i1 %164, label %loop_out620, label %mask_block_err.i1152 - -loop_out620: ; preds = %cond_exit_558.4 - tail call void @heap_free(ptr nonnull %0) - tail call void @heap_free(ptr nonnull %1) - %read_bool = tail call i1 @___read_future_bool(i64 %106) - tail call void @___dec_future_refcount(i64 %106) - tail call void @print_bool(ptr nonnull @res_a.A4A74DAF.0, i64 11, i1 %read_bool) - %read_bool690 = tail call i1 @___read_future_bool(i64 %113) - tail call void @___dec_future_refcount(i64 %113) - tail call void @print_bool(ptr nonnull @res_b.3BD50C23.0, i64 11, i1 %read_bool690) - %read_bool705 = tail call i1 @___read_future_bool(i64 %120) - tail call void @___dec_future_refcount(i64 %120) - tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool705) - %read_bool720 = tail call i1 @___read_future_bool(i64 %127) - tail call void @___dec_future_refcount(i64 %127) - tail call void @print_bool(ptr nonnull @res_d.00B84DC7.0, i64 11, i1 %read_bool720) - %read_bool735 = tail call i1 @___read_future_bool(i64 %134) - tail call void @___dec_future_refcount(i64 %134) - tail call void @print_bool(ptr nonnull @res_e.B9A29CAF.0, i64 11, i1 %read_bool735) - tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot2) - %rint = tail call i32 @random_int() - %rfloat = tail call double @random_float() - %165 = sext i32 %rint to i64 - tail call void @print_int(ptr nonnull @res_random_int.805B8DD0.0, i64 19, i64 %165) - tail call void @print_float(ptr nonnull @res_random_flo.4EFA2734.0, i64 23, double %rfloat) - ret void -} - -declare ptr @heap_alloc(i64) local_unnamed_addr - -declare i64 @get_current_shot() local_unnamed_addr - -declare void @random_seed(i64) local_unnamed_addr - -; Function Attrs: noreturn -declare void @panic(i32, ptr) local_unnamed_addr #0 - -declare void @heap_free(ptr) local_unnamed_addr - -declare i64 @___lazy_measure(i64) local_unnamed_addr - -declare void @___qfree(i64) local_unnamed_addr - -declare void @___inc_future_refcount(i64) local_unnamed_addr - -declare void @___dec_future_refcount(i64) local_unnamed_addr - -declare i1 @___read_future_bool(i64) local_unnamed_addr - -declare void @print_bool(ptr, i64, i1) local_unnamed_addr - -declare void @print_int(ptr, i64, i64) local_unnamed_addr - -declare i32 @random_int() local_unnamed_addr - -declare double @random_float() local_unnamed_addr - -declare void @print_float(ptr, i64, double) local_unnamed_addr - -declare void @___rp(i64, double, double) local_unnamed_addr - -declare void @___rz(i64, double) local_unnamed_addr - -declare i64 @___qalloc() local_unnamed_addr - -declare void @___reset(i64) local_unnamed_addr - -define i64 @qmain(i64 %0) local_unnamed_addr { -entry: - tail call void @setup(i64 %0) - tail call void @__hugr__.__main__.main.1() - %1 = tail call i64 @teardown() - ret i64 %1 -} - -declare void @setup(i64) local_unnamed_addr - -declare i64 @teardown() local_unnamed_addr - -attributes #0 = { noreturn } - -!name = !{!0} - -!0 = !{!"mainlib"} diff --git a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition/determinism_repetition-sol-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition/determinism_repetition-sol-x86_64-unknown-linux-gnu.ll deleted file mode 100644 index 57145ec1..00000000 --- a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition/determinism_repetition-sol-x86_64-unknown-linux-gnu.ll +++ /dev/null @@ -1,642 +0,0 @@ -; ModuleID = 'hugr' -source_filename = "hugr" -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" -@"e_Array elem.E746B1A3.0" = private constant [43 x i8] c"*EXIT:INT:Array element is already borrowed" -@"e_Array cont.EFA5AC45.0" = private constant [70 x i8] c"EEXIT:INT:Array contains non-borrowed elements and cannot be discarded" -@res_a.A4A74DAF.0 = private constant [12 x i8] c"\0BUSER:BOOL:a" -@res_b.3BD50C23.0 = private constant [12 x i8] c"\0BUSER:BOOL:b" -@res_c.1C9EF4D1.0 = private constant [12 x i8] c"\0BUSER:BOOL:c" -@res_d.00B84DC7.0 = private constant [12 x i8] c"\0BUSER:BOOL:d" -@res_e.B9A29CAF.0 = private constant [12 x i8] c"\0BUSER:BOOL:e" -@res_shot.6D86EAF7.0 = private constant [14 x i8] c"\0DUSER:INT:shot" -@res_random_int.805B8DD0.0 = private constant [20 x i8] c"\13USER:INT:random_int" -@res_random_flo.4EFA2734.0 = private constant [24 x i8] c"\17USER:FLOAT:random_float" -@"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." - -define void @__hugr__.__main__.main.1() local_unnamed_addr { -cond_104_case_1: - %0 = tail call ptr @heap_alloc(i64 40) - %1 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %1, align 1 - %shot = tail call i64 @get_current_shot() - tail call void @random_seed(i64 %shot) - %shot2 = tail call i64 @get_current_shot() - %2 = tail call ptr @heap_alloc(i64 40) - %3 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %3, align 1 - %qalloc.i = tail call i64 @___qalloc() - %not_max.not.not.i = icmp eq i64 %qalloc.i, -1 - br i1 %not_max.not.not.i, label %cond_535_case_0.i, label %__barray_check_bounds.exit - -cond_535_case_0.i: ; preds = %cond_104_case_1.4, %cond_104_case_1.3, %cond_104_case_1.2, %cond_104_case_1.1, %cond_104_case_1 - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__barray_check_bounds.exit: ; preds = %cond_104_case_1 - tail call void @___reset(i64 %qalloc.i) - %4 = load i64, ptr %3, align 4 - %5 = trunc i64 %4 to i1 - br i1 %5, label %cond_104_case_1.1, label %panic.i - -panic.i: ; preds = %__barray_check_bounds.exit.4, %__barray_check_bounds.exit.3, %__barray_check_bounds.exit.2, %__barray_check_bounds.exit.1, %__barray_check_bounds.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -cond_104_case_1.1: ; preds = %__barray_check_bounds.exit - %6 = and i64 %4, -2 - store i64 %6, ptr %3, align 4 - store i64 %qalloc.i, ptr %2, align 4 - %qalloc.i.1 = tail call i64 @___qalloc() - %not_max.not.not.i.1 = icmp eq i64 %qalloc.i.1, -1 - br i1 %not_max.not.not.i.1, label %cond_535_case_0.i, label %__barray_check_bounds.exit.1 - -__barray_check_bounds.exit.1: ; preds = %cond_104_case_1.1 - tail call void @___reset(i64 %qalloc.i.1) - %7 = load i64, ptr %3, align 4 - %8 = and i64 %7, 2 - %.not1178 = icmp eq i64 %8, 0 - br i1 %.not1178, label %panic.i, label %cond_104_case_1.2 - -cond_104_case_1.2: ; preds = %__barray_check_bounds.exit.1 - %9 = and i64 %7, -3 - store i64 %9, ptr %3, align 4 - %10 = getelementptr inbounds nuw i8, ptr %2, i64 8 - store i64 %qalloc.i.1, ptr %10, align 4 - %qalloc.i.2 = tail call i64 @___qalloc() - %not_max.not.not.i.2 = icmp eq i64 %qalloc.i.2, -1 - br i1 %not_max.not.not.i.2, label %cond_535_case_0.i, label %__barray_check_bounds.exit.2 - -__barray_check_bounds.exit.2: ; preds = %cond_104_case_1.2 - tail call void @___reset(i64 %qalloc.i.2) - %11 = load i64, ptr %3, align 4 - %12 = and i64 %11, 4 - %.not1179 = icmp eq i64 %12, 0 - br i1 %.not1179, label %panic.i, label %cond_104_case_1.3 - -cond_104_case_1.3: ; preds = %__barray_check_bounds.exit.2 - %13 = and i64 %11, -5 - store i64 %13, ptr %3, align 4 - %14 = getelementptr inbounds nuw i8, ptr %2, i64 16 - store i64 %qalloc.i.2, ptr %14, align 4 - %qalloc.i.3 = tail call i64 @___qalloc() - %not_max.not.not.i.3 = icmp eq i64 %qalloc.i.3, -1 - br i1 %not_max.not.not.i.3, label %cond_535_case_0.i, label %__barray_check_bounds.exit.3 - -__barray_check_bounds.exit.3: ; preds = %cond_104_case_1.3 - tail call void @___reset(i64 %qalloc.i.3) - %15 = load i64, ptr %3, align 4 - %16 = and i64 %15, 8 - %.not1180 = icmp eq i64 %16, 0 - br i1 %.not1180, label %panic.i, label %cond_104_case_1.4 - -cond_104_case_1.4: ; preds = %__barray_check_bounds.exit.3 - %17 = and i64 %15, -9 - store i64 %17, ptr %3, align 4 - %18 = getelementptr inbounds nuw i8, ptr %2, i64 24 - store i64 %qalloc.i.3, ptr %18, align 4 - %qalloc.i.4 = tail call i64 @___qalloc() - %not_max.not.not.i.4 = icmp eq i64 %qalloc.i.4, -1 - br i1 %not_max.not.not.i.4, label %cond_535_case_0.i, label %__barray_check_bounds.exit.4 - -__barray_check_bounds.exit.4: ; preds = %cond_104_case_1.4 - tail call void @___reset(i64 %qalloc.i.4) - %19 = load i64, ptr %3, align 4 - %20 = and i64 %19, 16 - %.not1181 = icmp eq i64 %20, 0 - br i1 %.not1181, label %panic.i, label %cond_exit_104.5 - -cond_exit_104.5: ; preds = %__barray_check_bounds.exit.4 - %21 = and i64 %19, -17 - store i64 %21, ptr %3, align 4 - %22 = getelementptr inbounds nuw i8, ptr %2, i64 32 - store i64 %qalloc.i.4, ptr %22, align 4 - %.pre = load i64, ptr %3, align 4 - %23 = trunc i64 %.pre to i1 - br i1 %23, label %panic.i1116, label %__barray_check_bounds.exit1118 - -panic.i1116: ; preds = %__barray_check_bounds.exit1115.4, %__barray_mask_return.exit1120.2, %__barray_mask_return.exit1120.1, %__barray_mask_return.exit1120, %cond_exit_104.5 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1118: ; preds = %cond_exit_104.5 - %24 = or disjoint i64 %.pre, 1 - store i64 %24, ptr %3, align 4 - %25 = load i64, ptr %2, align 4 - tail call void @___rp(i64 %25, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %25, double 0x400921FB54442D18) - %26 = load i64, ptr %3, align 4 - %27 = trunc i64 %26 to i1 - br i1 %27, label %__barray_mask_return.exit1120, label %panic.i1119 - -panic.i1119: ; preds = %__barray_check_bounds.exit1118.4, %__barray_check_bounds.exit1118.3, %__barray_check_bounds.exit1118.2, %__barray_check_bounds.exit1118.1, %__barray_check_bounds.exit1118 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1120: ; preds = %__barray_check_bounds.exit1118 - %28 = and i64 %26, -2 - store i64 %28, ptr %3, align 4 - store i64 %25, ptr %2, align 4 - %29 = load i64, ptr %3, align 4 - %30 = and i64 %29, 2 - %.not1182 = icmp eq i64 %30, 0 - br i1 %.not1182, label %__barray_check_bounds.exit1118.1, label %panic.i1116 - -__barray_check_bounds.exit1118.1: ; preds = %__barray_mask_return.exit1120 - %31 = or disjoint i64 %29, 2 - store i64 %31, ptr %3, align 4 - %32 = getelementptr inbounds nuw i8, ptr %2, i64 8 - %33 = load i64, ptr %32, align 4 - tail call void @___rp(i64 %33, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %33, double 0x400921FB54442D18) - %34 = load i64, ptr %3, align 4 - %35 = and i64 %34, 2 - %.not1183 = icmp eq i64 %35, 0 - br i1 %.not1183, label %panic.i1119, label %__barray_mask_return.exit1120.1 - -__barray_mask_return.exit1120.1: ; preds = %__barray_check_bounds.exit1118.1 - %36 = and i64 %34, -3 - store i64 %36, ptr %3, align 4 - store i64 %33, ptr %32, align 4 - %37 = load i64, ptr %3, align 4 - %38 = and i64 %37, 4 - %.not1184 = icmp eq i64 %38, 0 - br i1 %.not1184, label %__barray_check_bounds.exit1118.2, label %panic.i1116 - -__barray_check_bounds.exit1118.2: ; preds = %__barray_mask_return.exit1120.1 - %39 = or disjoint i64 %37, 4 - store i64 %39, ptr %3, align 4 - %40 = getelementptr inbounds nuw i8, ptr %2, i64 16 - %41 = load i64, ptr %40, align 4 - tail call void @___rp(i64 %41, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %41, double 0x400921FB54442D18) - %42 = load i64, ptr %3, align 4 - %43 = and i64 %42, 4 - %.not1185 = icmp eq i64 %43, 0 - br i1 %.not1185, label %panic.i1119, label %__barray_mask_return.exit1120.2 - -__barray_mask_return.exit1120.2: ; preds = %__barray_check_bounds.exit1118.2 - %44 = and i64 %42, -5 - store i64 %44, ptr %3, align 4 - store i64 %41, ptr %40, align 4 - %45 = load i64, ptr %3, align 4 - %46 = and i64 %45, 8 - %.not1186 = icmp eq i64 %46, 0 - br i1 %.not1186, label %__barray_check_bounds.exit1118.3, label %panic.i1116 - -__barray_check_bounds.exit1118.3: ; preds = %__barray_mask_return.exit1120.2 - %47 = or disjoint i64 %45, 8 - store i64 %47, ptr %3, align 4 - %48 = getelementptr inbounds nuw i8, ptr %2, i64 24 - %49 = load i64, ptr %48, align 4 - tail call void @___rp(i64 %49, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %49, double 0x400921FB54442D18) - %50 = load i64, ptr %3, align 4 - %51 = and i64 %50, 8 - %.not1187 = icmp eq i64 %51, 0 - br i1 %.not1187, label %panic.i1119, label %__barray_check_bounds.exit1115.4 - -__barray_check_bounds.exit1115.4: ; preds = %__barray_check_bounds.exit1118.3 - %52 = and i64 %50, -9 - store i64 %52, ptr %3, align 4 - store i64 %49, ptr %48, align 4 - %53 = load i64, ptr %3, align 4 - %54 = and i64 %53, 16 - %.not1188 = icmp eq i64 %54, 0 - br i1 %.not1188, label %__barray_check_bounds.exit1118.4, label %panic.i1116 - -__barray_check_bounds.exit1118.4: ; preds = %__barray_check_bounds.exit1115.4 - %55 = or disjoint i64 %53, 16 - store i64 %55, ptr %3, align 4 - %56 = getelementptr inbounds nuw i8, ptr %2, i64 32 - %57 = load i64, ptr %56, align 4 - tail call void @___rp(i64 %57, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %57, double 0x400921FB54442D18) - %58 = load i64, ptr %3, align 4 - %59 = and i64 %58, 16 - %.not1189 = icmp eq i64 %59, 0 - br i1 %.not1189, label %panic.i1119, label %__barray_mask_return.exit1120.4 - -__barray_mask_return.exit1120.4: ; preds = %__barray_check_bounds.exit1118.4 - %60 = and i64 %58, -17 - store i64 %60, ptr %3, align 4 - store i64 %57, ptr %56, align 4 - %61 = load i64, ptr %3, align 4 - %62 = trunc i64 %61 to i1 - br i1 %62, label %panic.i1127, label %.thread - -panic.i1123: ; preds = %__barray_check_bounds.exit1122.4, %.thread.3, %.thread.2, %.thread.1, %.thread - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -loop_out318: ; preds = %cond_exit_298.4 - tail call void @heap_free(ptr nonnull %2) - tail call void @heap_free(ptr nonnull %3) - %63 = load i64, ptr %1, align 4 - %64 = trunc i64 %63 to i1 - br i1 %64, label %panic.i1129, label %__barray_mask_borrow.exit1130 - -mask_block_err.i: ; preds = %cond_exit_298.4 - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -panic.i1127: ; preds = %__barray_check_bounds.exit1126.4, %cond_exit_298.2, %cond_exit_298.1, %cond_exit_298, %__barray_mask_return.exit1120.4 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -.thread: ; preds = %__barray_mask_return.exit1120.4 - %65 = or disjoint i64 %61, 1 - store i64 %65, ptr %3, align 4 - %66 = load i64, ptr %2, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %66) - tail call void @___qfree(i64 %66) - %67 = load i64, ptr %1, align 4 - %68 = trunc i64 %67 to i1 - br i1 %68, label %cond_exit_298, label %panic.i1123 - -cond_exit_298: ; preds = %.thread - %69 = and i64 %67, -2 - store i64 %69, ptr %1, align 4 - store i64 %lazy_measure, ptr %0, align 4 - %70 = load i64, ptr %3, align 4 - %71 = and i64 %70, 2 - %.not1190 = icmp eq i64 %71, 0 - br i1 %.not1190, label %.thread.1, label %panic.i1127 - -.thread.1: ; preds = %cond_exit_298 - %72 = or disjoint i64 %70, 2 - store i64 %72, ptr %3, align 4 - %73 = load i64, ptr %32, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %73) - tail call void @___qfree(i64 %73) - %74 = load i64, ptr %1, align 4 - %75 = and i64 %74, 2 - %.not1191 = icmp eq i64 %75, 0 - br i1 %.not1191, label %panic.i1123, label %cond_exit_298.1 - -cond_exit_298.1: ; preds = %.thread.1 - %76 = and i64 %74, -3 - store i64 %76, ptr %1, align 4 - %77 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %lazy_measure.1, ptr %77, align 4 - %78 = load i64, ptr %3, align 4 - %79 = and i64 %78, 4 - %.not1192 = icmp eq i64 %79, 0 - br i1 %.not1192, label %.thread.2, label %panic.i1127 - -.thread.2: ; preds = %cond_exit_298.1 - %80 = or disjoint i64 %78, 4 - store i64 %80, ptr %3, align 4 - %81 = load i64, ptr %40, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %81) - tail call void @___qfree(i64 %81) - %82 = load i64, ptr %1, align 4 - %83 = and i64 %82, 4 - %.not1193 = icmp eq i64 %83, 0 - br i1 %.not1193, label %panic.i1123, label %cond_exit_298.2 - -cond_exit_298.2: ; preds = %.thread.2 - %84 = and i64 %82, -5 - store i64 %84, ptr %1, align 4 - %85 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %lazy_measure.2, ptr %85, align 4 - %86 = load i64, ptr %3, align 4 - %87 = and i64 %86, 8 - %.not1194 = icmp eq i64 %87, 0 - br i1 %.not1194, label %.thread.3, label %panic.i1127 - -.thread.3: ; preds = %cond_exit_298.2 - %88 = or disjoint i64 %86, 8 - store i64 %88, ptr %3, align 4 - %89 = load i64, ptr %48, align 4 - %lazy_measure.3 = tail call i64 @___lazy_measure(i64 %89) - tail call void @___qfree(i64 %89) - %90 = load i64, ptr %1, align 4 - %91 = and i64 %90, 8 - %.not1195 = icmp eq i64 %91, 0 - br i1 %.not1195, label %panic.i1123, label %__barray_check_bounds.exit1126.4 - -__barray_check_bounds.exit1126.4: ; preds = %.thread.3 - %92 = and i64 %90, -9 - store i64 %92, ptr %1, align 4 - %93 = getelementptr inbounds nuw i8, ptr %0, i64 24 - store i64 %lazy_measure.3, ptr %93, align 4 - %94 = load i64, ptr %3, align 4 - %95 = and i64 %94, 16 - %.not1196 = icmp eq i64 %95, 0 - br i1 %.not1196, label %__barray_check_bounds.exit1122.4, label %panic.i1127 - -__barray_check_bounds.exit1122.4: ; preds = %__barray_check_bounds.exit1126.4 - %96 = or disjoint i64 %94, 16 - store i64 %96, ptr %3, align 4 - %97 = load i64, ptr %56, align 4 - %lazy_measure.4 = tail call i64 @___lazy_measure(i64 %97) - tail call void @___qfree(i64 %97) - %98 = load i64, ptr %1, align 4 - %99 = and i64 %98, 16 - %.not1197 = icmp eq i64 %99, 0 - br i1 %.not1197, label %panic.i1123, label %cond_exit_298.4 - -cond_exit_298.4: ; preds = %__barray_check_bounds.exit1122.4 - %100 = and i64 %98, -17 - store i64 %100, ptr %1, align 4 - %101 = getelementptr inbounds nuw i8, ptr %0, i64 32 - store i64 %lazy_measure.4, ptr %101, align 4 - %102 = load i64, ptr %3, align 4 - %103 = or i64 %102, -32 - store i64 %103, ptr %3, align 4 - %104 = icmp eq i64 %103, -1 - br i1 %104, label %loop_out318, label %mask_block_err.i - -panic.i1129: ; preds = %loop_out318 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit1130: ; preds = %loop_out318 - %105 = or disjoint i64 %63, 1 - store i64 %105, ptr %1, align 4 - %106 = load i64, ptr %0, align 4 - tail call void @___inc_future_refcount(i64 %106) - %107 = load i64, ptr %1, align 4 - %108 = trunc i64 %107 to i1 - br i1 %108, label %__barray_mask_return.exit1132, label %panic.i1131 - -panic.i1131: ; preds = %__barray_mask_borrow.exit1130 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1132: ; preds = %__barray_mask_borrow.exit1130 - %109 = and i64 %107, -2 - store i64 %109, ptr %1, align 4 - store i64 %106, ptr %0, align 4 - %110 = load i64, ptr %1, align 4 - %111 = and i64 %110, 2 - %.not = icmp eq i64 %111, 0 - br i1 %.not, label %__barray_mask_borrow.exit1134, label %panic.i1133 - -panic.i1133: ; preds = %__barray_mask_return.exit1132 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit1134: ; preds = %__barray_mask_return.exit1132 - %112 = or disjoint i64 %110, 2 - store i64 %112, ptr %1, align 4 - %113 = load i64, ptr %77, align 4 - tail call void @___inc_future_refcount(i64 %113) - %114 = load i64, ptr %1, align 4 - %115 = and i64 %114, 2 - %.not1168 = icmp eq i64 %115, 0 - br i1 %.not1168, label %panic.i1135, label %__barray_mask_return.exit1136 - -panic.i1135: ; preds = %__barray_mask_borrow.exit1134 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1136: ; preds = %__barray_mask_borrow.exit1134 - %116 = and i64 %114, -3 - store i64 %116, ptr %1, align 4 - store i64 %113, ptr %77, align 4 - %117 = load i64, ptr %1, align 4 - %118 = and i64 %117, 4 - %.not1169 = icmp eq i64 %118, 0 - br i1 %.not1169, label %__barray_mask_borrow.exit1138, label %panic.i1137 - -panic.i1137: ; preds = %__barray_mask_return.exit1136 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit1138: ; preds = %__barray_mask_return.exit1136 - %119 = or disjoint i64 %117, 4 - store i64 %119, ptr %1, align 4 - %120 = load i64, ptr %85, align 4 - tail call void @___inc_future_refcount(i64 %120) - %121 = load i64, ptr %1, align 4 - %122 = and i64 %121, 4 - %.not1170 = icmp eq i64 %122, 0 - br i1 %.not1170, label %panic.i1139, label %__barray_mask_return.exit1140 - -panic.i1139: ; preds = %__barray_mask_borrow.exit1138 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1140: ; preds = %__barray_mask_borrow.exit1138 - %123 = and i64 %121, -5 - store i64 %123, ptr %1, align 4 - store i64 %120, ptr %85, align 4 - %124 = load i64, ptr %1, align 4 - %125 = and i64 %124, 8 - %.not1171 = icmp eq i64 %125, 0 - br i1 %.not1171, label %__barray_mask_borrow.exit1142, label %panic.i1141 - -panic.i1141: ; preds = %__barray_mask_return.exit1140 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit1142: ; preds = %__barray_mask_return.exit1140 - %126 = or disjoint i64 %124, 8 - store i64 %126, ptr %1, align 4 - %127 = load i64, ptr %93, align 4 - tail call void @___inc_future_refcount(i64 %127) - %128 = load i64, ptr %1, align 4 - %129 = and i64 %128, 8 - %.not1172 = icmp eq i64 %129, 0 - br i1 %.not1172, label %panic.i1143, label %__barray_mask_return.exit1144 - -panic.i1143: ; preds = %__barray_mask_borrow.exit1142 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1144: ; preds = %__barray_mask_borrow.exit1142 - %130 = and i64 %128, -9 - store i64 %130, ptr %1, align 4 - store i64 %127, ptr %93, align 4 - %131 = load i64, ptr %1, align 4 - %132 = and i64 %131, 16 - %.not1173 = icmp eq i64 %132, 0 - br i1 %.not1173, label %__barray_mask_borrow.exit1146, label %panic.i1145 - -panic.i1145: ; preds = %__barray_mask_return.exit1144 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit1146: ; preds = %__barray_mask_return.exit1144 - %133 = or disjoint i64 %131, 16 - store i64 %133, ptr %1, align 4 - %134 = load i64, ptr %101, align 4 - tail call void @___inc_future_refcount(i64 %134) - %135 = load i64, ptr %1, align 4 - %136 = and i64 %135, 16 - %.not1174 = icmp eq i64 %136, 0 - br i1 %.not1174, label %panic.i1147, label %__barray_mask_return.exit1148 - -panic.i1147: ; preds = %__barray_mask_borrow.exit1146 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1148: ; preds = %__barray_mask_borrow.exit1146 - %137 = and i64 %135, -17 - store i64 %137, ptr %1, align 4 - store i64 %134, ptr %101, align 4 - %138 = load i64, ptr %1, align 4 - %139 = trunc i64 %138 to i1 - br i1 %139, label %cond_exit_558, label %__barray_mask_borrow.exit1160 - -mask_block_err.i1152: ; preds = %cond_exit_558.4 - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_mask_borrow.exit1160: ; preds = %__barray_mask_return.exit1148 - %140 = or disjoint i64 %138, 1 - store i64 %140, ptr %1, align 4 - %141 = load i64, ptr %0, align 4 - tail call void @___dec_future_refcount(i64 %141) - br label %cond_exit_558 - -cond_exit_558: ; preds = %__barray_mask_borrow.exit1160, %__barray_mask_return.exit1148 - %142 = load i64, ptr %1, align 4 - %143 = and i64 %142, 2 - %.not1200 = icmp eq i64 %143, 0 - br i1 %.not1200, label %__barray_mask_borrow.exit1160.1, label %cond_exit_558.1 - -__barray_mask_borrow.exit1160.1: ; preds = %cond_exit_558 - %144 = or disjoint i64 %142, 2 - store i64 %144, ptr %1, align 4 - %145 = getelementptr inbounds nuw i8, ptr %0, i64 8 - %146 = load i64, ptr %145, align 4 - tail call void @___dec_future_refcount(i64 %146) - br label %cond_exit_558.1 - -cond_exit_558.1: ; preds = %__barray_mask_borrow.exit1160.1, %cond_exit_558 - %147 = load i64, ptr %1, align 4 - %148 = and i64 %147, 4 - %.not1201 = icmp eq i64 %148, 0 - br i1 %.not1201, label %__barray_mask_borrow.exit1160.2, label %cond_exit_558.2 - -__barray_mask_borrow.exit1160.2: ; preds = %cond_exit_558.1 - %149 = or disjoint i64 %147, 4 - store i64 %149, ptr %1, align 4 - %150 = getelementptr inbounds nuw i8, ptr %0, i64 16 - %151 = load i64, ptr %150, align 4 - tail call void @___dec_future_refcount(i64 %151) - br label %cond_exit_558.2 - -cond_exit_558.2: ; preds = %__barray_mask_borrow.exit1160.2, %cond_exit_558.1 - %152 = load i64, ptr %1, align 4 - %153 = and i64 %152, 8 - %.not1202 = icmp eq i64 %153, 0 - br i1 %.not1202, label %__barray_mask_borrow.exit1160.3, label %cond_exit_558.3 - -__barray_mask_borrow.exit1160.3: ; preds = %cond_exit_558.2 - %154 = or disjoint i64 %152, 8 - store i64 %154, ptr %1, align 4 - %155 = getelementptr inbounds nuw i8, ptr %0, i64 24 - %156 = load i64, ptr %155, align 4 - tail call void @___dec_future_refcount(i64 %156) - br label %cond_exit_558.3 - -cond_exit_558.3: ; preds = %__barray_mask_borrow.exit1160.3, %cond_exit_558.2 - %157 = load i64, ptr %1, align 4 - %158 = and i64 %157, 16 - %.not1203 = icmp eq i64 %158, 0 - br i1 %.not1203, label %__barray_mask_borrow.exit1160.4, label %cond_exit_558.4 - -__barray_mask_borrow.exit1160.4: ; preds = %cond_exit_558.3 - %159 = or disjoint i64 %157, 16 - store i64 %159, ptr %1, align 4 - %160 = getelementptr inbounds nuw i8, ptr %0, i64 32 - %161 = load i64, ptr %160, align 4 - tail call void @___dec_future_refcount(i64 %161) - br label %cond_exit_558.4 - -cond_exit_558.4: ; preds = %__barray_mask_borrow.exit1160.4, %cond_exit_558.3 - %162 = load i64, ptr %1, align 4 - %163 = or i64 %162, -32 - store i64 %163, ptr %1, align 4 - %164 = icmp eq i64 %163, -1 - br i1 %164, label %loop_out620, label %mask_block_err.i1152 - -loop_out620: ; preds = %cond_exit_558.4 - tail call void @heap_free(ptr nonnull %0) - tail call void @heap_free(ptr nonnull %1) - %read_bool = tail call i1 @___read_future_bool(i64 %106) - tail call void @___dec_future_refcount(i64 %106) - tail call void @print_bool(ptr nonnull @res_a.A4A74DAF.0, i64 11, i1 %read_bool) - %read_bool690 = tail call i1 @___read_future_bool(i64 %113) - tail call void @___dec_future_refcount(i64 %113) - tail call void @print_bool(ptr nonnull @res_b.3BD50C23.0, i64 11, i1 %read_bool690) - %read_bool705 = tail call i1 @___read_future_bool(i64 %120) - tail call void @___dec_future_refcount(i64 %120) - tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool705) - %read_bool720 = tail call i1 @___read_future_bool(i64 %127) - tail call void @___dec_future_refcount(i64 %127) - tail call void @print_bool(ptr nonnull @res_d.00B84DC7.0, i64 11, i1 %read_bool720) - %read_bool735 = tail call i1 @___read_future_bool(i64 %134) - tail call void @___dec_future_refcount(i64 %134) - tail call void @print_bool(ptr nonnull @res_e.B9A29CAF.0, i64 11, i1 %read_bool735) - tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot2) - %rint = tail call i32 @random_int() - %rfloat = tail call double @random_float() - %165 = sext i32 %rint to i64 - tail call void @print_int(ptr nonnull @res_random_int.805B8DD0.0, i64 19, i64 %165) - tail call void @print_float(ptr nonnull @res_random_flo.4EFA2734.0, i64 23, double %rfloat) - ret void -} - -declare ptr @heap_alloc(i64) local_unnamed_addr - -declare i64 @get_current_shot() local_unnamed_addr - -declare void @random_seed(i64) local_unnamed_addr - -; Function Attrs: noreturn -declare void @panic(i32, ptr) local_unnamed_addr #0 - -declare void @heap_free(ptr) local_unnamed_addr - -declare i64 @___lazy_measure(i64) local_unnamed_addr - -declare void @___qfree(i64) local_unnamed_addr - -declare void @___inc_future_refcount(i64) local_unnamed_addr - -declare void @___dec_future_refcount(i64) local_unnamed_addr - -declare i1 @___read_future_bool(i64) local_unnamed_addr - -declare void @print_bool(ptr, i64, i1) local_unnamed_addr - -declare void @print_int(ptr, i64, i64) local_unnamed_addr - -declare i32 @random_int() local_unnamed_addr - -declare double @random_float() local_unnamed_addr - -declare void @print_float(ptr, i64, double) local_unnamed_addr - -declare void @___rp(i64, double, double) local_unnamed_addr - -declare void @___rz(i64, double) local_unnamed_addr - -declare i64 @___qalloc() local_unnamed_addr - -declare void @___reset(i64) local_unnamed_addr - -define i64 @qmain(i64 %0) local_unnamed_addr { -entry: - tail call void @setup(i64 %0) - tail call void @__hugr__.__main__.main.1() - %1 = tail call i64 @teardown() - ret i64 %1 -} - -declare void @setup(i64) local_unnamed_addr - -declare i64 @teardown() local_unnamed_addr - -attributes #0 = { noreturn } - -!name = !{!0} - -!0 = !{!"mainlib"} diff --git a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition/determinism_repetition-sol-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition/determinism_repetition-sol-x86_64-windows-gnu.ll deleted file mode 100644 index 3a96f1fd..00000000 --- a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition/determinism_repetition-sol-x86_64-windows-gnu.ll +++ /dev/null @@ -1,642 +0,0 @@ -; ModuleID = 'hugr' -source_filename = "hugr" -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-gnu" - -@"e_Array alre.5A300C2A.0" = private constant [57 x i8] c"8EXIT:INT:Array already contains an element at this index" -@"e_Array elem.E746B1A3.0" = private constant [43 x i8] c"*EXIT:INT:Array element is already borrowed" -@"e_Array cont.EFA5AC45.0" = private constant [70 x i8] c"EEXIT:INT:Array contains non-borrowed elements and cannot be discarded" -@res_a.A4A74DAF.0 = private constant [12 x i8] c"\0BUSER:BOOL:a" -@res_b.3BD50C23.0 = private constant [12 x i8] c"\0BUSER:BOOL:b" -@res_c.1C9EF4D1.0 = private constant [12 x i8] c"\0BUSER:BOOL:c" -@res_d.00B84DC7.0 = private constant [12 x i8] c"\0BUSER:BOOL:d" -@res_e.B9A29CAF.0 = private constant [12 x i8] c"\0BUSER:BOOL:e" -@res_shot.6D86EAF7.0 = private constant [14 x i8] c"\0DUSER:INT:shot" -@res_random_int.805B8DD0.0 = private constant [20 x i8] c"\13USER:INT:random_int" -@res_random_flo.4EFA2734.0 = private constant [24 x i8] c"\17USER:FLOAT:random_float" -@"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." - -define void @__hugr__.__main__.main.1() local_unnamed_addr { -cond_104_case_1: - %0 = tail call ptr @heap_alloc(i64 40) - %1 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %1, align 1 - %shot = tail call i64 @get_current_shot() - tail call void @random_seed(i64 %shot) - %shot2 = tail call i64 @get_current_shot() - %2 = tail call ptr @heap_alloc(i64 40) - %3 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %3, align 1 - %qalloc.i = tail call i64 @___qalloc() - %not_max.not.not.i = icmp eq i64 %qalloc.i, -1 - br i1 %not_max.not.not.i, label %cond_535_case_0.i, label %__barray_check_bounds.exit - -cond_535_case_0.i: ; preds = %cond_104_case_1.4, %cond_104_case_1.3, %cond_104_case_1.2, %cond_104_case_1.1, %cond_104_case_1 - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__barray_check_bounds.exit: ; preds = %cond_104_case_1 - tail call void @___reset(i64 %qalloc.i) - %4 = load i64, ptr %3, align 4 - %5 = trunc i64 %4 to i1 - br i1 %5, label %cond_104_case_1.1, label %panic.i - -panic.i: ; preds = %__barray_check_bounds.exit.4, %__barray_check_bounds.exit.3, %__barray_check_bounds.exit.2, %__barray_check_bounds.exit.1, %__barray_check_bounds.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -cond_104_case_1.1: ; preds = %__barray_check_bounds.exit - %6 = and i64 %4, -2 - store i64 %6, ptr %3, align 4 - store i64 %qalloc.i, ptr %2, align 4 - %qalloc.i.1 = tail call i64 @___qalloc() - %not_max.not.not.i.1 = icmp eq i64 %qalloc.i.1, -1 - br i1 %not_max.not.not.i.1, label %cond_535_case_0.i, label %__barray_check_bounds.exit.1 - -__barray_check_bounds.exit.1: ; preds = %cond_104_case_1.1 - tail call void @___reset(i64 %qalloc.i.1) - %7 = load i64, ptr %3, align 4 - %8 = and i64 %7, 2 - %.not1178 = icmp eq i64 %8, 0 - br i1 %.not1178, label %panic.i, label %cond_104_case_1.2 - -cond_104_case_1.2: ; preds = %__barray_check_bounds.exit.1 - %9 = and i64 %7, -3 - store i64 %9, ptr %3, align 4 - %10 = getelementptr inbounds nuw i8, ptr %2, i64 8 - store i64 %qalloc.i.1, ptr %10, align 4 - %qalloc.i.2 = tail call i64 @___qalloc() - %not_max.not.not.i.2 = icmp eq i64 %qalloc.i.2, -1 - br i1 %not_max.not.not.i.2, label %cond_535_case_0.i, label %__barray_check_bounds.exit.2 - -__barray_check_bounds.exit.2: ; preds = %cond_104_case_1.2 - tail call void @___reset(i64 %qalloc.i.2) - %11 = load i64, ptr %3, align 4 - %12 = and i64 %11, 4 - %.not1179 = icmp eq i64 %12, 0 - br i1 %.not1179, label %panic.i, label %cond_104_case_1.3 - -cond_104_case_1.3: ; preds = %__barray_check_bounds.exit.2 - %13 = and i64 %11, -5 - store i64 %13, ptr %3, align 4 - %14 = getelementptr inbounds nuw i8, ptr %2, i64 16 - store i64 %qalloc.i.2, ptr %14, align 4 - %qalloc.i.3 = tail call i64 @___qalloc() - %not_max.not.not.i.3 = icmp eq i64 %qalloc.i.3, -1 - br i1 %not_max.not.not.i.3, label %cond_535_case_0.i, label %__barray_check_bounds.exit.3 - -__barray_check_bounds.exit.3: ; preds = %cond_104_case_1.3 - tail call void @___reset(i64 %qalloc.i.3) - %15 = load i64, ptr %3, align 4 - %16 = and i64 %15, 8 - %.not1180 = icmp eq i64 %16, 0 - br i1 %.not1180, label %panic.i, label %cond_104_case_1.4 - -cond_104_case_1.4: ; preds = %__barray_check_bounds.exit.3 - %17 = and i64 %15, -9 - store i64 %17, ptr %3, align 4 - %18 = getelementptr inbounds nuw i8, ptr %2, i64 24 - store i64 %qalloc.i.3, ptr %18, align 4 - %qalloc.i.4 = tail call i64 @___qalloc() - %not_max.not.not.i.4 = icmp eq i64 %qalloc.i.4, -1 - br i1 %not_max.not.not.i.4, label %cond_535_case_0.i, label %__barray_check_bounds.exit.4 - -__barray_check_bounds.exit.4: ; preds = %cond_104_case_1.4 - tail call void @___reset(i64 %qalloc.i.4) - %19 = load i64, ptr %3, align 4 - %20 = and i64 %19, 16 - %.not1181 = icmp eq i64 %20, 0 - br i1 %.not1181, label %panic.i, label %cond_exit_104.5 - -cond_exit_104.5: ; preds = %__barray_check_bounds.exit.4 - %21 = and i64 %19, -17 - store i64 %21, ptr %3, align 4 - %22 = getelementptr inbounds nuw i8, ptr %2, i64 32 - store i64 %qalloc.i.4, ptr %22, align 4 - %.pre = load i64, ptr %3, align 4 - %23 = trunc i64 %.pre to i1 - br i1 %23, label %panic.i1116, label %__barray_check_bounds.exit1118 - -panic.i1116: ; preds = %__barray_check_bounds.exit1115.4, %__barray_mask_return.exit1120.2, %__barray_mask_return.exit1120.1, %__barray_mask_return.exit1120, %cond_exit_104.5 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1118: ; preds = %cond_exit_104.5 - %24 = or disjoint i64 %.pre, 1 - store i64 %24, ptr %3, align 4 - %25 = load i64, ptr %2, align 4 - tail call void @___rp(i64 %25, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %25, double 0x400921FB54442D18) - %26 = load i64, ptr %3, align 4 - %27 = trunc i64 %26 to i1 - br i1 %27, label %__barray_mask_return.exit1120, label %panic.i1119 - -panic.i1119: ; preds = %__barray_check_bounds.exit1118.4, %__barray_check_bounds.exit1118.3, %__barray_check_bounds.exit1118.2, %__barray_check_bounds.exit1118.1, %__barray_check_bounds.exit1118 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1120: ; preds = %__barray_check_bounds.exit1118 - %28 = and i64 %26, -2 - store i64 %28, ptr %3, align 4 - store i64 %25, ptr %2, align 4 - %29 = load i64, ptr %3, align 4 - %30 = and i64 %29, 2 - %.not1182 = icmp eq i64 %30, 0 - br i1 %.not1182, label %__barray_check_bounds.exit1118.1, label %panic.i1116 - -__barray_check_bounds.exit1118.1: ; preds = %__barray_mask_return.exit1120 - %31 = or disjoint i64 %29, 2 - store i64 %31, ptr %3, align 4 - %32 = getelementptr inbounds nuw i8, ptr %2, i64 8 - %33 = load i64, ptr %32, align 4 - tail call void @___rp(i64 %33, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %33, double 0x400921FB54442D18) - %34 = load i64, ptr %3, align 4 - %35 = and i64 %34, 2 - %.not1183 = icmp eq i64 %35, 0 - br i1 %.not1183, label %panic.i1119, label %__barray_mask_return.exit1120.1 - -__barray_mask_return.exit1120.1: ; preds = %__barray_check_bounds.exit1118.1 - %36 = and i64 %34, -3 - store i64 %36, ptr %3, align 4 - store i64 %33, ptr %32, align 4 - %37 = load i64, ptr %3, align 4 - %38 = and i64 %37, 4 - %.not1184 = icmp eq i64 %38, 0 - br i1 %.not1184, label %__barray_check_bounds.exit1118.2, label %panic.i1116 - -__barray_check_bounds.exit1118.2: ; preds = %__barray_mask_return.exit1120.1 - %39 = or disjoint i64 %37, 4 - store i64 %39, ptr %3, align 4 - %40 = getelementptr inbounds nuw i8, ptr %2, i64 16 - %41 = load i64, ptr %40, align 4 - tail call void @___rp(i64 %41, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %41, double 0x400921FB54442D18) - %42 = load i64, ptr %3, align 4 - %43 = and i64 %42, 4 - %.not1185 = icmp eq i64 %43, 0 - br i1 %.not1185, label %panic.i1119, label %__barray_mask_return.exit1120.2 - -__barray_mask_return.exit1120.2: ; preds = %__barray_check_bounds.exit1118.2 - %44 = and i64 %42, -5 - store i64 %44, ptr %3, align 4 - store i64 %41, ptr %40, align 4 - %45 = load i64, ptr %3, align 4 - %46 = and i64 %45, 8 - %.not1186 = icmp eq i64 %46, 0 - br i1 %.not1186, label %__barray_check_bounds.exit1118.3, label %panic.i1116 - -__barray_check_bounds.exit1118.3: ; preds = %__barray_mask_return.exit1120.2 - %47 = or disjoint i64 %45, 8 - store i64 %47, ptr %3, align 4 - %48 = getelementptr inbounds nuw i8, ptr %2, i64 24 - %49 = load i64, ptr %48, align 4 - tail call void @___rp(i64 %49, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %49, double 0x400921FB54442D18) - %50 = load i64, ptr %3, align 4 - %51 = and i64 %50, 8 - %.not1187 = icmp eq i64 %51, 0 - br i1 %.not1187, label %panic.i1119, label %__barray_check_bounds.exit1115.4 - -__barray_check_bounds.exit1115.4: ; preds = %__barray_check_bounds.exit1118.3 - %52 = and i64 %50, -9 - store i64 %52, ptr %3, align 4 - store i64 %49, ptr %48, align 4 - %53 = load i64, ptr %3, align 4 - %54 = and i64 %53, 16 - %.not1188 = icmp eq i64 %54, 0 - br i1 %.not1188, label %__barray_check_bounds.exit1118.4, label %panic.i1116 - -__barray_check_bounds.exit1118.4: ; preds = %__barray_check_bounds.exit1115.4 - %55 = or disjoint i64 %53, 16 - store i64 %55, ptr %3, align 4 - %56 = getelementptr inbounds nuw i8, ptr %2, i64 32 - %57 = load i64, ptr %56, align 4 - tail call void @___rp(i64 %57, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %57, double 0x400921FB54442D18) - %58 = load i64, ptr %3, align 4 - %59 = and i64 %58, 16 - %.not1189 = icmp eq i64 %59, 0 - br i1 %.not1189, label %panic.i1119, label %__barray_mask_return.exit1120.4 - -__barray_mask_return.exit1120.4: ; preds = %__barray_check_bounds.exit1118.4 - %60 = and i64 %58, -17 - store i64 %60, ptr %3, align 4 - store i64 %57, ptr %56, align 4 - %61 = load i64, ptr %3, align 4 - %62 = trunc i64 %61 to i1 - br i1 %62, label %panic.i1127, label %.thread - -panic.i1123: ; preds = %__barray_check_bounds.exit1122.4, %.thread.3, %.thread.2, %.thread.1, %.thread - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -loop_out318: ; preds = %cond_exit_298.4 - tail call void @heap_free(ptr nonnull %2) - tail call void @heap_free(ptr nonnull %3) - %63 = load i64, ptr %1, align 4 - %64 = trunc i64 %63 to i1 - br i1 %64, label %panic.i1129, label %__barray_mask_borrow.exit1130 - -mask_block_err.i: ; preds = %cond_exit_298.4 - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -panic.i1127: ; preds = %__barray_check_bounds.exit1126.4, %cond_exit_298.2, %cond_exit_298.1, %cond_exit_298, %__barray_mask_return.exit1120.4 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -.thread: ; preds = %__barray_mask_return.exit1120.4 - %65 = or disjoint i64 %61, 1 - store i64 %65, ptr %3, align 4 - %66 = load i64, ptr %2, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %66) - tail call void @___qfree(i64 %66) - %67 = load i64, ptr %1, align 4 - %68 = trunc i64 %67 to i1 - br i1 %68, label %cond_exit_298, label %panic.i1123 - -cond_exit_298: ; preds = %.thread - %69 = and i64 %67, -2 - store i64 %69, ptr %1, align 4 - store i64 %lazy_measure, ptr %0, align 4 - %70 = load i64, ptr %3, align 4 - %71 = and i64 %70, 2 - %.not1190 = icmp eq i64 %71, 0 - br i1 %.not1190, label %.thread.1, label %panic.i1127 - -.thread.1: ; preds = %cond_exit_298 - %72 = or disjoint i64 %70, 2 - store i64 %72, ptr %3, align 4 - %73 = load i64, ptr %32, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %73) - tail call void @___qfree(i64 %73) - %74 = load i64, ptr %1, align 4 - %75 = and i64 %74, 2 - %.not1191 = icmp eq i64 %75, 0 - br i1 %.not1191, label %panic.i1123, label %cond_exit_298.1 - -cond_exit_298.1: ; preds = %.thread.1 - %76 = and i64 %74, -3 - store i64 %76, ptr %1, align 4 - %77 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %lazy_measure.1, ptr %77, align 4 - %78 = load i64, ptr %3, align 4 - %79 = and i64 %78, 4 - %.not1192 = icmp eq i64 %79, 0 - br i1 %.not1192, label %.thread.2, label %panic.i1127 - -.thread.2: ; preds = %cond_exit_298.1 - %80 = or disjoint i64 %78, 4 - store i64 %80, ptr %3, align 4 - %81 = load i64, ptr %40, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %81) - tail call void @___qfree(i64 %81) - %82 = load i64, ptr %1, align 4 - %83 = and i64 %82, 4 - %.not1193 = icmp eq i64 %83, 0 - br i1 %.not1193, label %panic.i1123, label %cond_exit_298.2 - -cond_exit_298.2: ; preds = %.thread.2 - %84 = and i64 %82, -5 - store i64 %84, ptr %1, align 4 - %85 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %lazy_measure.2, ptr %85, align 4 - %86 = load i64, ptr %3, align 4 - %87 = and i64 %86, 8 - %.not1194 = icmp eq i64 %87, 0 - br i1 %.not1194, label %.thread.3, label %panic.i1127 - -.thread.3: ; preds = %cond_exit_298.2 - %88 = or disjoint i64 %86, 8 - store i64 %88, ptr %3, align 4 - %89 = load i64, ptr %48, align 4 - %lazy_measure.3 = tail call i64 @___lazy_measure(i64 %89) - tail call void @___qfree(i64 %89) - %90 = load i64, ptr %1, align 4 - %91 = and i64 %90, 8 - %.not1195 = icmp eq i64 %91, 0 - br i1 %.not1195, label %panic.i1123, label %__barray_check_bounds.exit1126.4 - -__barray_check_bounds.exit1126.4: ; preds = %.thread.3 - %92 = and i64 %90, -9 - store i64 %92, ptr %1, align 4 - %93 = getelementptr inbounds nuw i8, ptr %0, i64 24 - store i64 %lazy_measure.3, ptr %93, align 4 - %94 = load i64, ptr %3, align 4 - %95 = and i64 %94, 16 - %.not1196 = icmp eq i64 %95, 0 - br i1 %.not1196, label %__barray_check_bounds.exit1122.4, label %panic.i1127 - -__barray_check_bounds.exit1122.4: ; preds = %__barray_check_bounds.exit1126.4 - %96 = or disjoint i64 %94, 16 - store i64 %96, ptr %3, align 4 - %97 = load i64, ptr %56, align 4 - %lazy_measure.4 = tail call i64 @___lazy_measure(i64 %97) - tail call void @___qfree(i64 %97) - %98 = load i64, ptr %1, align 4 - %99 = and i64 %98, 16 - %.not1197 = icmp eq i64 %99, 0 - br i1 %.not1197, label %panic.i1123, label %cond_exit_298.4 - -cond_exit_298.4: ; preds = %__barray_check_bounds.exit1122.4 - %100 = and i64 %98, -17 - store i64 %100, ptr %1, align 4 - %101 = getelementptr inbounds nuw i8, ptr %0, i64 32 - store i64 %lazy_measure.4, ptr %101, align 4 - %102 = load i64, ptr %3, align 4 - %103 = or i64 %102, -32 - store i64 %103, ptr %3, align 4 - %104 = icmp eq i64 %103, -1 - br i1 %104, label %loop_out318, label %mask_block_err.i - -panic.i1129: ; preds = %loop_out318 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit1130: ; preds = %loop_out318 - %105 = or disjoint i64 %63, 1 - store i64 %105, ptr %1, align 4 - %106 = load i64, ptr %0, align 4 - tail call void @___inc_future_refcount(i64 %106) - %107 = load i64, ptr %1, align 4 - %108 = trunc i64 %107 to i1 - br i1 %108, label %__barray_mask_return.exit1132, label %panic.i1131 - -panic.i1131: ; preds = %__barray_mask_borrow.exit1130 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1132: ; preds = %__barray_mask_borrow.exit1130 - %109 = and i64 %107, -2 - store i64 %109, ptr %1, align 4 - store i64 %106, ptr %0, align 4 - %110 = load i64, ptr %1, align 4 - %111 = and i64 %110, 2 - %.not = icmp eq i64 %111, 0 - br i1 %.not, label %__barray_mask_borrow.exit1134, label %panic.i1133 - -panic.i1133: ; preds = %__barray_mask_return.exit1132 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit1134: ; preds = %__barray_mask_return.exit1132 - %112 = or disjoint i64 %110, 2 - store i64 %112, ptr %1, align 4 - %113 = load i64, ptr %77, align 4 - tail call void @___inc_future_refcount(i64 %113) - %114 = load i64, ptr %1, align 4 - %115 = and i64 %114, 2 - %.not1168 = icmp eq i64 %115, 0 - br i1 %.not1168, label %panic.i1135, label %__barray_mask_return.exit1136 - -panic.i1135: ; preds = %__barray_mask_borrow.exit1134 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1136: ; preds = %__barray_mask_borrow.exit1134 - %116 = and i64 %114, -3 - store i64 %116, ptr %1, align 4 - store i64 %113, ptr %77, align 4 - %117 = load i64, ptr %1, align 4 - %118 = and i64 %117, 4 - %.not1169 = icmp eq i64 %118, 0 - br i1 %.not1169, label %__barray_mask_borrow.exit1138, label %panic.i1137 - -panic.i1137: ; preds = %__barray_mask_return.exit1136 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit1138: ; preds = %__barray_mask_return.exit1136 - %119 = or disjoint i64 %117, 4 - store i64 %119, ptr %1, align 4 - %120 = load i64, ptr %85, align 4 - tail call void @___inc_future_refcount(i64 %120) - %121 = load i64, ptr %1, align 4 - %122 = and i64 %121, 4 - %.not1170 = icmp eq i64 %122, 0 - br i1 %.not1170, label %panic.i1139, label %__barray_mask_return.exit1140 - -panic.i1139: ; preds = %__barray_mask_borrow.exit1138 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1140: ; preds = %__barray_mask_borrow.exit1138 - %123 = and i64 %121, -5 - store i64 %123, ptr %1, align 4 - store i64 %120, ptr %85, align 4 - %124 = load i64, ptr %1, align 4 - %125 = and i64 %124, 8 - %.not1171 = icmp eq i64 %125, 0 - br i1 %.not1171, label %__barray_mask_borrow.exit1142, label %panic.i1141 - -panic.i1141: ; preds = %__barray_mask_return.exit1140 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit1142: ; preds = %__barray_mask_return.exit1140 - %126 = or disjoint i64 %124, 8 - store i64 %126, ptr %1, align 4 - %127 = load i64, ptr %93, align 4 - tail call void @___inc_future_refcount(i64 %127) - %128 = load i64, ptr %1, align 4 - %129 = and i64 %128, 8 - %.not1172 = icmp eq i64 %129, 0 - br i1 %.not1172, label %panic.i1143, label %__barray_mask_return.exit1144 - -panic.i1143: ; preds = %__barray_mask_borrow.exit1142 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1144: ; preds = %__barray_mask_borrow.exit1142 - %130 = and i64 %128, -9 - store i64 %130, ptr %1, align 4 - store i64 %127, ptr %93, align 4 - %131 = load i64, ptr %1, align 4 - %132 = and i64 %131, 16 - %.not1173 = icmp eq i64 %132, 0 - br i1 %.not1173, label %__barray_mask_borrow.exit1146, label %panic.i1145 - -panic.i1145: ; preds = %__barray_mask_return.exit1144 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit1146: ; preds = %__barray_mask_return.exit1144 - %133 = or disjoint i64 %131, 16 - store i64 %133, ptr %1, align 4 - %134 = load i64, ptr %101, align 4 - tail call void @___inc_future_refcount(i64 %134) - %135 = load i64, ptr %1, align 4 - %136 = and i64 %135, 16 - %.not1174 = icmp eq i64 %136, 0 - br i1 %.not1174, label %panic.i1147, label %__barray_mask_return.exit1148 - -panic.i1147: ; preds = %__barray_mask_borrow.exit1146 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1148: ; preds = %__barray_mask_borrow.exit1146 - %137 = and i64 %135, -17 - store i64 %137, ptr %1, align 4 - store i64 %134, ptr %101, align 4 - %138 = load i64, ptr %1, align 4 - %139 = trunc i64 %138 to i1 - br i1 %139, label %cond_exit_558, label %__barray_mask_borrow.exit1160 - -mask_block_err.i1152: ; preds = %cond_exit_558.4 - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_mask_borrow.exit1160: ; preds = %__barray_mask_return.exit1148 - %140 = or disjoint i64 %138, 1 - store i64 %140, ptr %1, align 4 - %141 = load i64, ptr %0, align 4 - tail call void @___dec_future_refcount(i64 %141) - br label %cond_exit_558 - -cond_exit_558: ; preds = %__barray_mask_borrow.exit1160, %__barray_mask_return.exit1148 - %142 = load i64, ptr %1, align 4 - %143 = and i64 %142, 2 - %.not1200 = icmp eq i64 %143, 0 - br i1 %.not1200, label %__barray_mask_borrow.exit1160.1, label %cond_exit_558.1 - -__barray_mask_borrow.exit1160.1: ; preds = %cond_exit_558 - %144 = or disjoint i64 %142, 2 - store i64 %144, ptr %1, align 4 - %145 = getelementptr inbounds nuw i8, ptr %0, i64 8 - %146 = load i64, ptr %145, align 4 - tail call void @___dec_future_refcount(i64 %146) - br label %cond_exit_558.1 - -cond_exit_558.1: ; preds = %__barray_mask_borrow.exit1160.1, %cond_exit_558 - %147 = load i64, ptr %1, align 4 - %148 = and i64 %147, 4 - %.not1201 = icmp eq i64 %148, 0 - br i1 %.not1201, label %__barray_mask_borrow.exit1160.2, label %cond_exit_558.2 - -__barray_mask_borrow.exit1160.2: ; preds = %cond_exit_558.1 - %149 = or disjoint i64 %147, 4 - store i64 %149, ptr %1, align 4 - %150 = getelementptr inbounds nuw i8, ptr %0, i64 16 - %151 = load i64, ptr %150, align 4 - tail call void @___dec_future_refcount(i64 %151) - br label %cond_exit_558.2 - -cond_exit_558.2: ; preds = %__barray_mask_borrow.exit1160.2, %cond_exit_558.1 - %152 = load i64, ptr %1, align 4 - %153 = and i64 %152, 8 - %.not1202 = icmp eq i64 %153, 0 - br i1 %.not1202, label %__barray_mask_borrow.exit1160.3, label %cond_exit_558.3 - -__barray_mask_borrow.exit1160.3: ; preds = %cond_exit_558.2 - %154 = or disjoint i64 %152, 8 - store i64 %154, ptr %1, align 4 - %155 = getelementptr inbounds nuw i8, ptr %0, i64 24 - %156 = load i64, ptr %155, align 4 - tail call void @___dec_future_refcount(i64 %156) - br label %cond_exit_558.3 - -cond_exit_558.3: ; preds = %__barray_mask_borrow.exit1160.3, %cond_exit_558.2 - %157 = load i64, ptr %1, align 4 - %158 = and i64 %157, 16 - %.not1203 = icmp eq i64 %158, 0 - br i1 %.not1203, label %__barray_mask_borrow.exit1160.4, label %cond_exit_558.4 - -__barray_mask_borrow.exit1160.4: ; preds = %cond_exit_558.3 - %159 = or disjoint i64 %157, 16 - store i64 %159, ptr %1, align 4 - %160 = getelementptr inbounds nuw i8, ptr %0, i64 32 - %161 = load i64, ptr %160, align 4 - tail call void @___dec_future_refcount(i64 %161) - br label %cond_exit_558.4 - -cond_exit_558.4: ; preds = %__barray_mask_borrow.exit1160.4, %cond_exit_558.3 - %162 = load i64, ptr %1, align 4 - %163 = or i64 %162, -32 - store i64 %163, ptr %1, align 4 - %164 = icmp eq i64 %163, -1 - br i1 %164, label %loop_out620, label %mask_block_err.i1152 - -loop_out620: ; preds = %cond_exit_558.4 - tail call void @heap_free(ptr nonnull %0) - tail call void @heap_free(ptr nonnull %1) - %read_bool = tail call i1 @___read_future_bool(i64 %106) - tail call void @___dec_future_refcount(i64 %106) - tail call void @print_bool(ptr nonnull @res_a.A4A74DAF.0, i64 11, i1 %read_bool) - %read_bool690 = tail call i1 @___read_future_bool(i64 %113) - tail call void @___dec_future_refcount(i64 %113) - tail call void @print_bool(ptr nonnull @res_b.3BD50C23.0, i64 11, i1 %read_bool690) - %read_bool705 = tail call i1 @___read_future_bool(i64 %120) - tail call void @___dec_future_refcount(i64 %120) - tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool705) - %read_bool720 = tail call i1 @___read_future_bool(i64 %127) - tail call void @___dec_future_refcount(i64 %127) - tail call void @print_bool(ptr nonnull @res_d.00B84DC7.0, i64 11, i1 %read_bool720) - %read_bool735 = tail call i1 @___read_future_bool(i64 %134) - tail call void @___dec_future_refcount(i64 %134) - tail call void @print_bool(ptr nonnull @res_e.B9A29CAF.0, i64 11, i1 %read_bool735) - tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot2) - %rint = tail call i32 @random_int() - %rfloat = tail call double @random_float() - %165 = sext i32 %rint to i64 - tail call void @print_int(ptr nonnull @res_random_int.805B8DD0.0, i64 19, i64 %165) - tail call void @print_float(ptr nonnull @res_random_flo.4EFA2734.0, i64 23, double %rfloat) - ret void -} - -declare ptr @heap_alloc(i64) local_unnamed_addr - -declare i64 @get_current_shot() local_unnamed_addr - -declare void @random_seed(i64) local_unnamed_addr - -; Function Attrs: noreturn -declare void @panic(i32, ptr) local_unnamed_addr #0 - -declare void @heap_free(ptr) local_unnamed_addr - -declare i64 @___lazy_measure(i64) local_unnamed_addr - -declare void @___qfree(i64) local_unnamed_addr - -declare void @___inc_future_refcount(i64) local_unnamed_addr - -declare void @___dec_future_refcount(i64) local_unnamed_addr - -declare i1 @___read_future_bool(i64) local_unnamed_addr - -declare void @print_bool(ptr, i64, i1) local_unnamed_addr - -declare void @print_int(ptr, i64, i64) local_unnamed_addr - -declare i32 @random_int() local_unnamed_addr - -declare double @random_float() local_unnamed_addr - -declare void @print_float(ptr, i64, double) local_unnamed_addr - -declare void @___rp(i64, double, double) local_unnamed_addr - -declare void @___rz(i64, double) local_unnamed_addr - -declare i64 @___qalloc() local_unnamed_addr - -declare void @___reset(i64) local_unnamed_addr - -define i64 @qmain(i64 %0) local_unnamed_addr { -entry: - tail call void @setup(i64 %0) - tail call void @__hugr__.__main__.main.1() - %1 = tail call i64 @teardown() - ret i64 %1 -} - -declare void @setup(i64) local_unnamed_addr - -declare i64 @teardown() local_unnamed_addr - -attributes #0 = { noreturn } - -!name = !{!0} - -!0 = !{!"mainlib"} diff --git a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition/determinism_repetition.sha256 b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition/determinism_repetition.sha256 deleted file mode 100644 index 8877cfac..00000000 --- a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition/determinism_repetition.sha256 +++ /dev/null @@ -1 +0,0 @@ -103ec00e5b0a8e0f7b9925bc435b2c0dfa1fe845f95d59d03b969c1fe634b70d \ No newline at end of file diff --git a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[default]/determinism_repetition-helios-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[default]/determinism_repetition-helios-aarch64-apple-darwin.ll index 0ecde1d0..cec0fb6c 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[default]/determinism_repetition-helios-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[default]/determinism_repetition-helios-aarch64-apple-darwin.ll @@ -22,8 +22,7 @@ cond_104_case_1: %1 = tail call ptr @heap_alloc(i64 8) store i64 -1, ptr %1, align 1 %shot = tail call i64 @get_current_shot() - tail call void @random_seed(i64 %shot) - %shot2 = tail call i64 @get_current_shot() + %shot1 = tail call i64 @get_current_shot() %2 = tail call ptr @heap_alloc(i64 40) %3 = tail call ptr @heap_alloc(i64 8) store i64 -1, ptr %3, align 1 @@ -231,7 +230,7 @@ panic.i1123: ; preds = %__barray_check_boun tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -loop_out318: ; preds = %cond_exit_298.4 +loop_out317: ; preds = %cond_exit_298.4 tail call void @heap_free(ptr nonnull %2) tail call void @heap_free(ptr nonnull %3) %63 = load i64, ptr %1, align 4 @@ -250,7 +249,7 @@ panic.i1127: ; preds = %__barray_check_boun %65 = or disjoint i64 %61, 1 store i64 %65, ptr %3, align 4 %66 = load i64, ptr %2, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %66) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %66) tail call void @___qfree(i64 %66) %67 = load i64, ptr %1, align 4 %68 = trunc i64 %67 to i1 @@ -259,7 +258,7 @@ panic.i1127: ; preds = %__barray_check_boun cond_exit_298: ; preds = %.thread %69 = and i64 %67, -2 store i64 %69, ptr %1, align 4 - store i64 %lazy_measure, ptr %0, align 4 + store i64 %___lazy_measure, ptr %0, align 4 %70 = load i64, ptr %3, align 4 %71 = and i64 %70, 2 %.not1190 = icmp eq i64 %71, 0 @@ -269,7 +268,7 @@ cond_exit_298: ; preds = %.thread %72 = or disjoint i64 %70, 2 store i64 %72, ptr %3, align 4 %73 = load i64, ptr %32, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %73) + %___lazy_measure.1 = tail call i64 @___lazy_measure(i64 %73) tail call void @___qfree(i64 %73) %74 = load i64, ptr %1, align 4 %75 = and i64 %74, 2 @@ -280,7 +279,7 @@ cond_exit_298.1: ; preds = %.thread.1 %76 = and i64 %74, -3 store i64 %76, ptr %1, align 4 %77 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %lazy_measure.1, ptr %77, align 4 + store i64 %___lazy_measure.1, ptr %77, align 4 %78 = load i64, ptr %3, align 4 %79 = and i64 %78, 4 %.not1192 = icmp eq i64 %79, 0 @@ -290,7 +289,7 @@ cond_exit_298.1: ; preds = %.thread.1 %80 = or disjoint i64 %78, 4 store i64 %80, ptr %3, align 4 %81 = load i64, ptr %40, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %81) + %___lazy_measure.2 = tail call i64 @___lazy_measure(i64 %81) tail call void @___qfree(i64 %81) %82 = load i64, ptr %1, align 4 %83 = and i64 %82, 4 @@ -301,7 +300,7 @@ cond_exit_298.2: ; preds = %.thread.2 %84 = and i64 %82, -5 store i64 %84, ptr %1, align 4 %85 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %lazy_measure.2, ptr %85, align 4 + store i64 %___lazy_measure.2, ptr %85, align 4 %86 = load i64, ptr %3, align 4 %87 = and i64 %86, 8 %.not1194 = icmp eq i64 %87, 0 @@ -311,7 +310,7 @@ cond_exit_298.2: ; preds = %.thread.2 %88 = or disjoint i64 %86, 8 store i64 %88, ptr %3, align 4 %89 = load i64, ptr %48, align 4 - %lazy_measure.3 = tail call i64 @___lazy_measure(i64 %89) + %___lazy_measure.3 = tail call i64 @___lazy_measure(i64 %89) tail call void @___qfree(i64 %89) %90 = load i64, ptr %1, align 4 %91 = and i64 %90, 8 @@ -322,7 +321,7 @@ __barray_check_bounds.exit1126.4: ; preds = %.thread.3 %92 = and i64 %90, -9 store i64 %92, ptr %1, align 4 %93 = getelementptr inbounds nuw i8, ptr %0, i64 24 - store i64 %lazy_measure.3, ptr %93, align 4 + store i64 %___lazy_measure.3, ptr %93, align 4 %94 = load i64, ptr %3, align 4 %95 = and i64 %94, 16 %.not1196 = icmp eq i64 %95, 0 @@ -332,7 +331,7 @@ __barray_check_bounds.exit1122.4: ; preds = %__barray_check_boun %96 = or disjoint i64 %94, 16 store i64 %96, ptr %3, align 4 %97 = load i64, ptr %56, align 4 - %lazy_measure.4 = tail call i64 @___lazy_measure(i64 %97) + %___lazy_measure.4 = tail call i64 @___lazy_measure(i64 %97) tail call void @___qfree(i64 %97) %98 = load i64, ptr %1, align 4 %99 = and i64 %98, 16 @@ -343,18 +342,18 @@ cond_exit_298.4: ; preds = %__barray_check_boun %100 = and i64 %98, -17 store i64 %100, ptr %1, align 4 %101 = getelementptr inbounds nuw i8, ptr %0, i64 32 - store i64 %lazy_measure.4, ptr %101, align 4 + store i64 %___lazy_measure.4, ptr %101, align 4 %102 = load i64, ptr %3, align 4 %103 = or i64 %102, -32 store i64 %103, ptr %3, align 4 %104 = icmp eq i64 %103, -1 - br i1 %104, label %loop_out318, label %mask_block_err.i + br i1 %104, label %loop_out317, label %mask_block_err.i -panic.i1129: ; preds = %loop_out318 +panic.i1129: ; preds = %loop_out317 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_mask_borrow.exit1130: ; preds = %loop_out318 +__barray_mask_borrow.exit1130: ; preds = %loop_out317 %105 = or disjoint i64 %63, 1 store i64 %105, ptr %1, align 4 %106 = load i64, ptr %0, align 4 @@ -555,27 +554,28 @@ cond_exit_558.4: ; preds = %__barray_mask_borro %163 = or i64 %162, -32 store i64 %163, ptr %1, align 4 %164 = icmp eq i64 %163, -1 - br i1 %164, label %loop_out620, label %mask_block_err.i1152 + br i1 %164, label %loop_out619, label %mask_block_err.i1152 -loop_out620: ; preds = %cond_exit_558.4 +loop_out619: ; preds = %cond_exit_558.4 tail call void @heap_free(ptr nonnull %0) tail call void @heap_free(ptr nonnull %1) %read_bool = tail call i1 @___read_future_bool(i64 %106) tail call void @___dec_future_refcount(i64 %106) tail call void @print_bool(ptr nonnull @res_a.A4A74DAF.0, i64 11, i1 %read_bool) - %read_bool690 = tail call i1 @___read_future_bool(i64 %113) + %read_bool689 = tail call i1 @___read_future_bool(i64 %113) tail call void @___dec_future_refcount(i64 %113) - tail call void @print_bool(ptr nonnull @res_b.3BD50C23.0, i64 11, i1 %read_bool690) - %read_bool705 = tail call i1 @___read_future_bool(i64 %120) + tail call void @print_bool(ptr nonnull @res_b.3BD50C23.0, i64 11, i1 %read_bool689) + %read_bool704 = tail call i1 @___read_future_bool(i64 %120) tail call void @___dec_future_refcount(i64 %120) - tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool705) - %read_bool720 = tail call i1 @___read_future_bool(i64 %127) + tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool704) + %read_bool719 = tail call i1 @___read_future_bool(i64 %127) tail call void @___dec_future_refcount(i64 %127) - tail call void @print_bool(ptr nonnull @res_d.00B84DC7.0, i64 11, i1 %read_bool720) - %read_bool735 = tail call i1 @___read_future_bool(i64 %134) + tail call void @print_bool(ptr nonnull @res_d.00B84DC7.0, i64 11, i1 %read_bool719) + %read_bool734 = tail call i1 @___read_future_bool(i64 %134) tail call void @___dec_future_refcount(i64 %134) - tail call void @print_bool(ptr nonnull @res_e.B9A29CAF.0, i64 11, i1 %read_bool735) - tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot2) + tail call void @print_bool(ptr nonnull @res_e.B9A29CAF.0, i64 11, i1 %read_bool734) + tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot1) + tail call void @random_seed(i64 %shot) %rint = tail call i32 @random_int() %rfloat = tail call double @random_float() %165 = sext i32 %rint to i64 @@ -588,8 +588,6 @@ declare ptr @heap_alloc(i64) local_unnamed_addr declare i64 @get_current_shot() local_unnamed_addr -declare void @random_seed(i64) local_unnamed_addr - ; Function Attrs: noreturn declare void @panic(i32, ptr) local_unnamed_addr #0 @@ -609,6 +607,8 @@ declare void @print_bool(ptr, i64, i1) local_unnamed_addr declare void @print_int(ptr, i64, i64) local_unnamed_addr +declare void @random_seed(i64) local_unnamed_addr + declare i32 @random_int() local_unnamed_addr declare double @random_float() local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[default]/determinism_repetition-helios-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[default]/determinism_repetition-helios-aarch64-unknown-linux-gnu.ll index eac072dc..4f74fb6c 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[default]/determinism_repetition-helios-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[default]/determinism_repetition-helios-aarch64-unknown-linux-gnu.ll @@ -22,8 +22,7 @@ cond_104_case_1: %1 = tail call ptr @heap_alloc(i64 8) store i64 -1, ptr %1, align 1 %shot = tail call i64 @get_current_shot() - tail call void @random_seed(i64 %shot) - %shot2 = tail call i64 @get_current_shot() + %shot1 = tail call i64 @get_current_shot() %2 = tail call ptr @heap_alloc(i64 40) %3 = tail call ptr @heap_alloc(i64 8) store i64 -1, ptr %3, align 1 @@ -231,7 +230,7 @@ panic.i1123: ; preds = %__barray_check_boun tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -loop_out318: ; preds = %cond_exit_298.4 +loop_out317: ; preds = %cond_exit_298.4 tail call void @heap_free(ptr nonnull %2) tail call void @heap_free(ptr nonnull %3) %63 = load i64, ptr %1, align 4 @@ -250,7 +249,7 @@ panic.i1127: ; preds = %__barray_check_boun %65 = or disjoint i64 %61, 1 store i64 %65, ptr %3, align 4 %66 = load i64, ptr %2, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %66) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %66) tail call void @___qfree(i64 %66) %67 = load i64, ptr %1, align 4 %68 = trunc i64 %67 to i1 @@ -259,7 +258,7 @@ panic.i1127: ; preds = %__barray_check_boun cond_exit_298: ; preds = %.thread %69 = and i64 %67, -2 store i64 %69, ptr %1, align 4 - store i64 %lazy_measure, ptr %0, align 4 + store i64 %___lazy_measure, ptr %0, align 4 %70 = load i64, ptr %3, align 4 %71 = and i64 %70, 2 %.not1190 = icmp eq i64 %71, 0 @@ -269,7 +268,7 @@ cond_exit_298: ; preds = %.thread %72 = or disjoint i64 %70, 2 store i64 %72, ptr %3, align 4 %73 = load i64, ptr %32, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %73) + %___lazy_measure.1 = tail call i64 @___lazy_measure(i64 %73) tail call void @___qfree(i64 %73) %74 = load i64, ptr %1, align 4 %75 = and i64 %74, 2 @@ -280,7 +279,7 @@ cond_exit_298.1: ; preds = %.thread.1 %76 = and i64 %74, -3 store i64 %76, ptr %1, align 4 %77 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %lazy_measure.1, ptr %77, align 4 + store i64 %___lazy_measure.1, ptr %77, align 4 %78 = load i64, ptr %3, align 4 %79 = and i64 %78, 4 %.not1192 = icmp eq i64 %79, 0 @@ -290,7 +289,7 @@ cond_exit_298.1: ; preds = %.thread.1 %80 = or disjoint i64 %78, 4 store i64 %80, ptr %3, align 4 %81 = load i64, ptr %40, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %81) + %___lazy_measure.2 = tail call i64 @___lazy_measure(i64 %81) tail call void @___qfree(i64 %81) %82 = load i64, ptr %1, align 4 %83 = and i64 %82, 4 @@ -301,7 +300,7 @@ cond_exit_298.2: ; preds = %.thread.2 %84 = and i64 %82, -5 store i64 %84, ptr %1, align 4 %85 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %lazy_measure.2, ptr %85, align 4 + store i64 %___lazy_measure.2, ptr %85, align 4 %86 = load i64, ptr %3, align 4 %87 = and i64 %86, 8 %.not1194 = icmp eq i64 %87, 0 @@ -311,7 +310,7 @@ cond_exit_298.2: ; preds = %.thread.2 %88 = or disjoint i64 %86, 8 store i64 %88, ptr %3, align 4 %89 = load i64, ptr %48, align 4 - %lazy_measure.3 = tail call i64 @___lazy_measure(i64 %89) + %___lazy_measure.3 = tail call i64 @___lazy_measure(i64 %89) tail call void @___qfree(i64 %89) %90 = load i64, ptr %1, align 4 %91 = and i64 %90, 8 @@ -322,7 +321,7 @@ __barray_check_bounds.exit1126.4: ; preds = %.thread.3 %92 = and i64 %90, -9 store i64 %92, ptr %1, align 4 %93 = getelementptr inbounds nuw i8, ptr %0, i64 24 - store i64 %lazy_measure.3, ptr %93, align 4 + store i64 %___lazy_measure.3, ptr %93, align 4 %94 = load i64, ptr %3, align 4 %95 = and i64 %94, 16 %.not1196 = icmp eq i64 %95, 0 @@ -332,7 +331,7 @@ __barray_check_bounds.exit1122.4: ; preds = %__barray_check_boun %96 = or disjoint i64 %94, 16 store i64 %96, ptr %3, align 4 %97 = load i64, ptr %56, align 4 - %lazy_measure.4 = tail call i64 @___lazy_measure(i64 %97) + %___lazy_measure.4 = tail call i64 @___lazy_measure(i64 %97) tail call void @___qfree(i64 %97) %98 = load i64, ptr %1, align 4 %99 = and i64 %98, 16 @@ -343,18 +342,18 @@ cond_exit_298.4: ; preds = %__barray_check_boun %100 = and i64 %98, -17 store i64 %100, ptr %1, align 4 %101 = getelementptr inbounds nuw i8, ptr %0, i64 32 - store i64 %lazy_measure.4, ptr %101, align 4 + store i64 %___lazy_measure.4, ptr %101, align 4 %102 = load i64, ptr %3, align 4 %103 = or i64 %102, -32 store i64 %103, ptr %3, align 4 %104 = icmp eq i64 %103, -1 - br i1 %104, label %loop_out318, label %mask_block_err.i + br i1 %104, label %loop_out317, label %mask_block_err.i -panic.i1129: ; preds = %loop_out318 +panic.i1129: ; preds = %loop_out317 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_mask_borrow.exit1130: ; preds = %loop_out318 +__barray_mask_borrow.exit1130: ; preds = %loop_out317 %105 = or disjoint i64 %63, 1 store i64 %105, ptr %1, align 4 %106 = load i64, ptr %0, align 4 @@ -555,27 +554,28 @@ cond_exit_558.4: ; preds = %__barray_mask_borro %163 = or i64 %162, -32 store i64 %163, ptr %1, align 4 %164 = icmp eq i64 %163, -1 - br i1 %164, label %loop_out620, label %mask_block_err.i1152 + br i1 %164, label %loop_out619, label %mask_block_err.i1152 -loop_out620: ; preds = %cond_exit_558.4 +loop_out619: ; preds = %cond_exit_558.4 tail call void @heap_free(ptr nonnull %0) tail call void @heap_free(ptr nonnull %1) %read_bool = tail call i1 @___read_future_bool(i64 %106) tail call void @___dec_future_refcount(i64 %106) tail call void @print_bool(ptr nonnull @res_a.A4A74DAF.0, i64 11, i1 %read_bool) - %read_bool690 = tail call i1 @___read_future_bool(i64 %113) + %read_bool689 = tail call i1 @___read_future_bool(i64 %113) tail call void @___dec_future_refcount(i64 %113) - tail call void @print_bool(ptr nonnull @res_b.3BD50C23.0, i64 11, i1 %read_bool690) - %read_bool705 = tail call i1 @___read_future_bool(i64 %120) + tail call void @print_bool(ptr nonnull @res_b.3BD50C23.0, i64 11, i1 %read_bool689) + %read_bool704 = tail call i1 @___read_future_bool(i64 %120) tail call void @___dec_future_refcount(i64 %120) - tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool705) - %read_bool720 = tail call i1 @___read_future_bool(i64 %127) + tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool704) + %read_bool719 = tail call i1 @___read_future_bool(i64 %127) tail call void @___dec_future_refcount(i64 %127) - tail call void @print_bool(ptr nonnull @res_d.00B84DC7.0, i64 11, i1 %read_bool720) - %read_bool735 = tail call i1 @___read_future_bool(i64 %134) + tail call void @print_bool(ptr nonnull @res_d.00B84DC7.0, i64 11, i1 %read_bool719) + %read_bool734 = tail call i1 @___read_future_bool(i64 %134) tail call void @___dec_future_refcount(i64 %134) - tail call void @print_bool(ptr nonnull @res_e.B9A29CAF.0, i64 11, i1 %read_bool735) - tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot2) + tail call void @print_bool(ptr nonnull @res_e.B9A29CAF.0, i64 11, i1 %read_bool734) + tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot1) + tail call void @random_seed(i64 %shot) %rint = tail call i32 @random_int() %rfloat = tail call double @random_float() %165 = sext i32 %rint to i64 @@ -588,8 +588,6 @@ declare ptr @heap_alloc(i64) local_unnamed_addr declare i64 @get_current_shot() local_unnamed_addr -declare void @random_seed(i64) local_unnamed_addr - ; Function Attrs: noreturn declare void @panic(i32, ptr) local_unnamed_addr #0 @@ -609,6 +607,8 @@ declare void @print_bool(ptr, i64, i1) local_unnamed_addr declare void @print_int(ptr, i64, i64) local_unnamed_addr +declare void @random_seed(i64) local_unnamed_addr + declare i32 @random_int() local_unnamed_addr declare double @random_float() local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[default]/determinism_repetition-helios-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[default]/determinism_repetition-helios-x86_64-apple-darwin.ll index a7b5f348..8dfcd9e6 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[default]/determinism_repetition-helios-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[default]/determinism_repetition-helios-x86_64-apple-darwin.ll @@ -22,8 +22,7 @@ cond_104_case_1: %1 = tail call ptr @heap_alloc(i64 8) store i64 -1, ptr %1, align 1 %shot = tail call i64 @get_current_shot() - tail call void @random_seed(i64 %shot) - %shot2 = tail call i64 @get_current_shot() + %shot1 = tail call i64 @get_current_shot() %2 = tail call ptr @heap_alloc(i64 40) %3 = tail call ptr @heap_alloc(i64 8) store i64 -1, ptr %3, align 1 @@ -231,7 +230,7 @@ panic.i1123: ; preds = %__barray_check_boun tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -loop_out318: ; preds = %cond_exit_298.4 +loop_out317: ; preds = %cond_exit_298.4 tail call void @heap_free(ptr nonnull %2) tail call void @heap_free(ptr nonnull %3) %63 = load i64, ptr %1, align 4 @@ -250,7 +249,7 @@ panic.i1127: ; preds = %__barray_check_boun %65 = or disjoint i64 %61, 1 store i64 %65, ptr %3, align 4 %66 = load i64, ptr %2, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %66) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %66) tail call void @___qfree(i64 %66) %67 = load i64, ptr %1, align 4 %68 = trunc i64 %67 to i1 @@ -259,7 +258,7 @@ panic.i1127: ; preds = %__barray_check_boun cond_exit_298: ; preds = %.thread %69 = and i64 %67, -2 store i64 %69, ptr %1, align 4 - store i64 %lazy_measure, ptr %0, align 4 + store i64 %___lazy_measure, ptr %0, align 4 %70 = load i64, ptr %3, align 4 %71 = and i64 %70, 2 %.not1190 = icmp eq i64 %71, 0 @@ -269,7 +268,7 @@ cond_exit_298: ; preds = %.thread %72 = or disjoint i64 %70, 2 store i64 %72, ptr %3, align 4 %73 = load i64, ptr %32, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %73) + %___lazy_measure.1 = tail call i64 @___lazy_measure(i64 %73) tail call void @___qfree(i64 %73) %74 = load i64, ptr %1, align 4 %75 = and i64 %74, 2 @@ -280,7 +279,7 @@ cond_exit_298.1: ; preds = %.thread.1 %76 = and i64 %74, -3 store i64 %76, ptr %1, align 4 %77 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %lazy_measure.1, ptr %77, align 4 + store i64 %___lazy_measure.1, ptr %77, align 4 %78 = load i64, ptr %3, align 4 %79 = and i64 %78, 4 %.not1192 = icmp eq i64 %79, 0 @@ -290,7 +289,7 @@ cond_exit_298.1: ; preds = %.thread.1 %80 = or disjoint i64 %78, 4 store i64 %80, ptr %3, align 4 %81 = load i64, ptr %40, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %81) + %___lazy_measure.2 = tail call i64 @___lazy_measure(i64 %81) tail call void @___qfree(i64 %81) %82 = load i64, ptr %1, align 4 %83 = and i64 %82, 4 @@ -301,7 +300,7 @@ cond_exit_298.2: ; preds = %.thread.2 %84 = and i64 %82, -5 store i64 %84, ptr %1, align 4 %85 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %lazy_measure.2, ptr %85, align 4 + store i64 %___lazy_measure.2, ptr %85, align 4 %86 = load i64, ptr %3, align 4 %87 = and i64 %86, 8 %.not1194 = icmp eq i64 %87, 0 @@ -311,7 +310,7 @@ cond_exit_298.2: ; preds = %.thread.2 %88 = or disjoint i64 %86, 8 store i64 %88, ptr %3, align 4 %89 = load i64, ptr %48, align 4 - %lazy_measure.3 = tail call i64 @___lazy_measure(i64 %89) + %___lazy_measure.3 = tail call i64 @___lazy_measure(i64 %89) tail call void @___qfree(i64 %89) %90 = load i64, ptr %1, align 4 %91 = and i64 %90, 8 @@ -322,7 +321,7 @@ __barray_check_bounds.exit1126.4: ; preds = %.thread.3 %92 = and i64 %90, -9 store i64 %92, ptr %1, align 4 %93 = getelementptr inbounds nuw i8, ptr %0, i64 24 - store i64 %lazy_measure.3, ptr %93, align 4 + store i64 %___lazy_measure.3, ptr %93, align 4 %94 = load i64, ptr %3, align 4 %95 = and i64 %94, 16 %.not1196 = icmp eq i64 %95, 0 @@ -332,7 +331,7 @@ __barray_check_bounds.exit1122.4: ; preds = %__barray_check_boun %96 = or disjoint i64 %94, 16 store i64 %96, ptr %3, align 4 %97 = load i64, ptr %56, align 4 - %lazy_measure.4 = tail call i64 @___lazy_measure(i64 %97) + %___lazy_measure.4 = tail call i64 @___lazy_measure(i64 %97) tail call void @___qfree(i64 %97) %98 = load i64, ptr %1, align 4 %99 = and i64 %98, 16 @@ -343,18 +342,18 @@ cond_exit_298.4: ; preds = %__barray_check_boun %100 = and i64 %98, -17 store i64 %100, ptr %1, align 4 %101 = getelementptr inbounds nuw i8, ptr %0, i64 32 - store i64 %lazy_measure.4, ptr %101, align 4 + store i64 %___lazy_measure.4, ptr %101, align 4 %102 = load i64, ptr %3, align 4 %103 = or i64 %102, -32 store i64 %103, ptr %3, align 4 %104 = icmp eq i64 %103, -1 - br i1 %104, label %loop_out318, label %mask_block_err.i + br i1 %104, label %loop_out317, label %mask_block_err.i -panic.i1129: ; preds = %loop_out318 +panic.i1129: ; preds = %loop_out317 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_mask_borrow.exit1130: ; preds = %loop_out318 +__barray_mask_borrow.exit1130: ; preds = %loop_out317 %105 = or disjoint i64 %63, 1 store i64 %105, ptr %1, align 4 %106 = load i64, ptr %0, align 4 @@ -555,27 +554,28 @@ cond_exit_558.4: ; preds = %__barray_mask_borro %163 = or i64 %162, -32 store i64 %163, ptr %1, align 4 %164 = icmp eq i64 %163, -1 - br i1 %164, label %loop_out620, label %mask_block_err.i1152 + br i1 %164, label %loop_out619, label %mask_block_err.i1152 -loop_out620: ; preds = %cond_exit_558.4 +loop_out619: ; preds = %cond_exit_558.4 tail call void @heap_free(ptr nonnull %0) tail call void @heap_free(ptr nonnull %1) %read_bool = tail call i1 @___read_future_bool(i64 %106) tail call void @___dec_future_refcount(i64 %106) tail call void @print_bool(ptr nonnull @res_a.A4A74DAF.0, i64 11, i1 %read_bool) - %read_bool690 = tail call i1 @___read_future_bool(i64 %113) + %read_bool689 = tail call i1 @___read_future_bool(i64 %113) tail call void @___dec_future_refcount(i64 %113) - tail call void @print_bool(ptr nonnull @res_b.3BD50C23.0, i64 11, i1 %read_bool690) - %read_bool705 = tail call i1 @___read_future_bool(i64 %120) + tail call void @print_bool(ptr nonnull @res_b.3BD50C23.0, i64 11, i1 %read_bool689) + %read_bool704 = tail call i1 @___read_future_bool(i64 %120) tail call void @___dec_future_refcount(i64 %120) - tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool705) - %read_bool720 = tail call i1 @___read_future_bool(i64 %127) + tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool704) + %read_bool719 = tail call i1 @___read_future_bool(i64 %127) tail call void @___dec_future_refcount(i64 %127) - tail call void @print_bool(ptr nonnull @res_d.00B84DC7.0, i64 11, i1 %read_bool720) - %read_bool735 = tail call i1 @___read_future_bool(i64 %134) + tail call void @print_bool(ptr nonnull @res_d.00B84DC7.0, i64 11, i1 %read_bool719) + %read_bool734 = tail call i1 @___read_future_bool(i64 %134) tail call void @___dec_future_refcount(i64 %134) - tail call void @print_bool(ptr nonnull @res_e.B9A29CAF.0, i64 11, i1 %read_bool735) - tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot2) + tail call void @print_bool(ptr nonnull @res_e.B9A29CAF.0, i64 11, i1 %read_bool734) + tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot1) + tail call void @random_seed(i64 %shot) %rint = tail call i32 @random_int() %rfloat = tail call double @random_float() %165 = sext i32 %rint to i64 @@ -588,8 +588,6 @@ declare ptr @heap_alloc(i64) local_unnamed_addr declare i64 @get_current_shot() local_unnamed_addr -declare void @random_seed(i64) local_unnamed_addr - ; Function Attrs: noreturn declare void @panic(i32, ptr) local_unnamed_addr #0 @@ -609,6 +607,8 @@ declare void @print_bool(ptr, i64, i1) local_unnamed_addr declare void @print_int(ptr, i64, i64) local_unnamed_addr +declare void @random_seed(i64) local_unnamed_addr + declare i32 @random_int() local_unnamed_addr declare double @random_float() local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[default]/determinism_repetition-helios-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[default]/determinism_repetition-helios-x86_64-unknown-linux-gnu.ll index 2b6935e1..1517df12 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[default]/determinism_repetition-helios-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[default]/determinism_repetition-helios-x86_64-unknown-linux-gnu.ll @@ -22,8 +22,7 @@ cond_104_case_1: %1 = tail call ptr @heap_alloc(i64 8) store i64 -1, ptr %1, align 1 %shot = tail call i64 @get_current_shot() - tail call void @random_seed(i64 %shot) - %shot2 = tail call i64 @get_current_shot() + %shot1 = tail call i64 @get_current_shot() %2 = tail call ptr @heap_alloc(i64 40) %3 = tail call ptr @heap_alloc(i64 8) store i64 -1, ptr %3, align 1 @@ -231,7 +230,7 @@ panic.i1123: ; preds = %__barray_check_boun tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -loop_out318: ; preds = %cond_exit_298.4 +loop_out317: ; preds = %cond_exit_298.4 tail call void @heap_free(ptr nonnull %2) tail call void @heap_free(ptr nonnull %3) %63 = load i64, ptr %1, align 4 @@ -250,7 +249,7 @@ panic.i1127: ; preds = %__barray_check_boun %65 = or disjoint i64 %61, 1 store i64 %65, ptr %3, align 4 %66 = load i64, ptr %2, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %66) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %66) tail call void @___qfree(i64 %66) %67 = load i64, ptr %1, align 4 %68 = trunc i64 %67 to i1 @@ -259,7 +258,7 @@ panic.i1127: ; preds = %__barray_check_boun cond_exit_298: ; preds = %.thread %69 = and i64 %67, -2 store i64 %69, ptr %1, align 4 - store i64 %lazy_measure, ptr %0, align 4 + store i64 %___lazy_measure, ptr %0, align 4 %70 = load i64, ptr %3, align 4 %71 = and i64 %70, 2 %.not1190 = icmp eq i64 %71, 0 @@ -269,7 +268,7 @@ cond_exit_298: ; preds = %.thread %72 = or disjoint i64 %70, 2 store i64 %72, ptr %3, align 4 %73 = load i64, ptr %32, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %73) + %___lazy_measure.1 = tail call i64 @___lazy_measure(i64 %73) tail call void @___qfree(i64 %73) %74 = load i64, ptr %1, align 4 %75 = and i64 %74, 2 @@ -280,7 +279,7 @@ cond_exit_298.1: ; preds = %.thread.1 %76 = and i64 %74, -3 store i64 %76, ptr %1, align 4 %77 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %lazy_measure.1, ptr %77, align 4 + store i64 %___lazy_measure.1, ptr %77, align 4 %78 = load i64, ptr %3, align 4 %79 = and i64 %78, 4 %.not1192 = icmp eq i64 %79, 0 @@ -290,7 +289,7 @@ cond_exit_298.1: ; preds = %.thread.1 %80 = or disjoint i64 %78, 4 store i64 %80, ptr %3, align 4 %81 = load i64, ptr %40, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %81) + %___lazy_measure.2 = tail call i64 @___lazy_measure(i64 %81) tail call void @___qfree(i64 %81) %82 = load i64, ptr %1, align 4 %83 = and i64 %82, 4 @@ -301,7 +300,7 @@ cond_exit_298.2: ; preds = %.thread.2 %84 = and i64 %82, -5 store i64 %84, ptr %1, align 4 %85 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %lazy_measure.2, ptr %85, align 4 + store i64 %___lazy_measure.2, ptr %85, align 4 %86 = load i64, ptr %3, align 4 %87 = and i64 %86, 8 %.not1194 = icmp eq i64 %87, 0 @@ -311,7 +310,7 @@ cond_exit_298.2: ; preds = %.thread.2 %88 = or disjoint i64 %86, 8 store i64 %88, ptr %3, align 4 %89 = load i64, ptr %48, align 4 - %lazy_measure.3 = tail call i64 @___lazy_measure(i64 %89) + %___lazy_measure.3 = tail call i64 @___lazy_measure(i64 %89) tail call void @___qfree(i64 %89) %90 = load i64, ptr %1, align 4 %91 = and i64 %90, 8 @@ -322,7 +321,7 @@ __barray_check_bounds.exit1126.4: ; preds = %.thread.3 %92 = and i64 %90, -9 store i64 %92, ptr %1, align 4 %93 = getelementptr inbounds nuw i8, ptr %0, i64 24 - store i64 %lazy_measure.3, ptr %93, align 4 + store i64 %___lazy_measure.3, ptr %93, align 4 %94 = load i64, ptr %3, align 4 %95 = and i64 %94, 16 %.not1196 = icmp eq i64 %95, 0 @@ -332,7 +331,7 @@ __barray_check_bounds.exit1122.4: ; preds = %__barray_check_boun %96 = or disjoint i64 %94, 16 store i64 %96, ptr %3, align 4 %97 = load i64, ptr %56, align 4 - %lazy_measure.4 = tail call i64 @___lazy_measure(i64 %97) + %___lazy_measure.4 = tail call i64 @___lazy_measure(i64 %97) tail call void @___qfree(i64 %97) %98 = load i64, ptr %1, align 4 %99 = and i64 %98, 16 @@ -343,18 +342,18 @@ cond_exit_298.4: ; preds = %__barray_check_boun %100 = and i64 %98, -17 store i64 %100, ptr %1, align 4 %101 = getelementptr inbounds nuw i8, ptr %0, i64 32 - store i64 %lazy_measure.4, ptr %101, align 4 + store i64 %___lazy_measure.4, ptr %101, align 4 %102 = load i64, ptr %3, align 4 %103 = or i64 %102, -32 store i64 %103, ptr %3, align 4 %104 = icmp eq i64 %103, -1 - br i1 %104, label %loop_out318, label %mask_block_err.i + br i1 %104, label %loop_out317, label %mask_block_err.i -panic.i1129: ; preds = %loop_out318 +panic.i1129: ; preds = %loop_out317 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_mask_borrow.exit1130: ; preds = %loop_out318 +__barray_mask_borrow.exit1130: ; preds = %loop_out317 %105 = or disjoint i64 %63, 1 store i64 %105, ptr %1, align 4 %106 = load i64, ptr %0, align 4 @@ -555,27 +554,28 @@ cond_exit_558.4: ; preds = %__barray_mask_borro %163 = or i64 %162, -32 store i64 %163, ptr %1, align 4 %164 = icmp eq i64 %163, -1 - br i1 %164, label %loop_out620, label %mask_block_err.i1152 + br i1 %164, label %loop_out619, label %mask_block_err.i1152 -loop_out620: ; preds = %cond_exit_558.4 +loop_out619: ; preds = %cond_exit_558.4 tail call void @heap_free(ptr nonnull %0) tail call void @heap_free(ptr nonnull %1) %read_bool = tail call i1 @___read_future_bool(i64 %106) tail call void @___dec_future_refcount(i64 %106) tail call void @print_bool(ptr nonnull @res_a.A4A74DAF.0, i64 11, i1 %read_bool) - %read_bool690 = tail call i1 @___read_future_bool(i64 %113) + %read_bool689 = tail call i1 @___read_future_bool(i64 %113) tail call void @___dec_future_refcount(i64 %113) - tail call void @print_bool(ptr nonnull @res_b.3BD50C23.0, i64 11, i1 %read_bool690) - %read_bool705 = tail call i1 @___read_future_bool(i64 %120) + tail call void @print_bool(ptr nonnull @res_b.3BD50C23.0, i64 11, i1 %read_bool689) + %read_bool704 = tail call i1 @___read_future_bool(i64 %120) tail call void @___dec_future_refcount(i64 %120) - tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool705) - %read_bool720 = tail call i1 @___read_future_bool(i64 %127) + tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool704) + %read_bool719 = tail call i1 @___read_future_bool(i64 %127) tail call void @___dec_future_refcount(i64 %127) - tail call void @print_bool(ptr nonnull @res_d.00B84DC7.0, i64 11, i1 %read_bool720) - %read_bool735 = tail call i1 @___read_future_bool(i64 %134) + tail call void @print_bool(ptr nonnull @res_d.00B84DC7.0, i64 11, i1 %read_bool719) + %read_bool734 = tail call i1 @___read_future_bool(i64 %134) tail call void @___dec_future_refcount(i64 %134) - tail call void @print_bool(ptr nonnull @res_e.B9A29CAF.0, i64 11, i1 %read_bool735) - tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot2) + tail call void @print_bool(ptr nonnull @res_e.B9A29CAF.0, i64 11, i1 %read_bool734) + tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot1) + tail call void @random_seed(i64 %shot) %rint = tail call i32 @random_int() %rfloat = tail call double @random_float() %165 = sext i32 %rint to i64 @@ -588,8 +588,6 @@ declare ptr @heap_alloc(i64) local_unnamed_addr declare i64 @get_current_shot() local_unnamed_addr -declare void @random_seed(i64) local_unnamed_addr - ; Function Attrs: noreturn declare void @panic(i32, ptr) local_unnamed_addr #0 @@ -609,6 +607,8 @@ declare void @print_bool(ptr, i64, i1) local_unnamed_addr declare void @print_int(ptr, i64, i64) local_unnamed_addr +declare void @random_seed(i64) local_unnamed_addr + declare i32 @random_int() local_unnamed_addr declare double @random_float() local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[default]/determinism_repetition-helios-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[default]/determinism_repetition-helios-x86_64-windows-gnu.ll index b021aa27..7477796b 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[default]/determinism_repetition-helios-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[default]/determinism_repetition-helios-x86_64-windows-gnu.ll @@ -22,8 +22,7 @@ cond_104_case_1: %1 = tail call ptr @heap_alloc(i64 8) store i64 -1, ptr %1, align 1 %shot = tail call i64 @get_current_shot() - tail call void @random_seed(i64 %shot) - %shot2 = tail call i64 @get_current_shot() + %shot1 = tail call i64 @get_current_shot() %2 = tail call ptr @heap_alloc(i64 40) %3 = tail call ptr @heap_alloc(i64 8) store i64 -1, ptr %3, align 1 @@ -231,7 +230,7 @@ panic.i1123: ; preds = %__barray_check_boun tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -loop_out318: ; preds = %cond_exit_298.4 +loop_out317: ; preds = %cond_exit_298.4 tail call void @heap_free(ptr nonnull %2) tail call void @heap_free(ptr nonnull %3) %63 = load i64, ptr %1, align 4 @@ -250,7 +249,7 @@ panic.i1127: ; preds = %__barray_check_boun %65 = or disjoint i64 %61, 1 store i64 %65, ptr %3, align 4 %66 = load i64, ptr %2, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %66) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %66) tail call void @___qfree(i64 %66) %67 = load i64, ptr %1, align 4 %68 = trunc i64 %67 to i1 @@ -259,7 +258,7 @@ panic.i1127: ; preds = %__barray_check_boun cond_exit_298: ; preds = %.thread %69 = and i64 %67, -2 store i64 %69, ptr %1, align 4 - store i64 %lazy_measure, ptr %0, align 4 + store i64 %___lazy_measure, ptr %0, align 4 %70 = load i64, ptr %3, align 4 %71 = and i64 %70, 2 %.not1190 = icmp eq i64 %71, 0 @@ -269,7 +268,7 @@ cond_exit_298: ; preds = %.thread %72 = or disjoint i64 %70, 2 store i64 %72, ptr %3, align 4 %73 = load i64, ptr %32, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %73) + %___lazy_measure.1 = tail call i64 @___lazy_measure(i64 %73) tail call void @___qfree(i64 %73) %74 = load i64, ptr %1, align 4 %75 = and i64 %74, 2 @@ -280,7 +279,7 @@ cond_exit_298.1: ; preds = %.thread.1 %76 = and i64 %74, -3 store i64 %76, ptr %1, align 4 %77 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %lazy_measure.1, ptr %77, align 4 + store i64 %___lazy_measure.1, ptr %77, align 4 %78 = load i64, ptr %3, align 4 %79 = and i64 %78, 4 %.not1192 = icmp eq i64 %79, 0 @@ -290,7 +289,7 @@ cond_exit_298.1: ; preds = %.thread.1 %80 = or disjoint i64 %78, 4 store i64 %80, ptr %3, align 4 %81 = load i64, ptr %40, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %81) + %___lazy_measure.2 = tail call i64 @___lazy_measure(i64 %81) tail call void @___qfree(i64 %81) %82 = load i64, ptr %1, align 4 %83 = and i64 %82, 4 @@ -301,7 +300,7 @@ cond_exit_298.2: ; preds = %.thread.2 %84 = and i64 %82, -5 store i64 %84, ptr %1, align 4 %85 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %lazy_measure.2, ptr %85, align 4 + store i64 %___lazy_measure.2, ptr %85, align 4 %86 = load i64, ptr %3, align 4 %87 = and i64 %86, 8 %.not1194 = icmp eq i64 %87, 0 @@ -311,7 +310,7 @@ cond_exit_298.2: ; preds = %.thread.2 %88 = or disjoint i64 %86, 8 store i64 %88, ptr %3, align 4 %89 = load i64, ptr %48, align 4 - %lazy_measure.3 = tail call i64 @___lazy_measure(i64 %89) + %___lazy_measure.3 = tail call i64 @___lazy_measure(i64 %89) tail call void @___qfree(i64 %89) %90 = load i64, ptr %1, align 4 %91 = and i64 %90, 8 @@ -322,7 +321,7 @@ __barray_check_bounds.exit1126.4: ; preds = %.thread.3 %92 = and i64 %90, -9 store i64 %92, ptr %1, align 4 %93 = getelementptr inbounds nuw i8, ptr %0, i64 24 - store i64 %lazy_measure.3, ptr %93, align 4 + store i64 %___lazy_measure.3, ptr %93, align 4 %94 = load i64, ptr %3, align 4 %95 = and i64 %94, 16 %.not1196 = icmp eq i64 %95, 0 @@ -332,7 +331,7 @@ __barray_check_bounds.exit1122.4: ; preds = %__barray_check_boun %96 = or disjoint i64 %94, 16 store i64 %96, ptr %3, align 4 %97 = load i64, ptr %56, align 4 - %lazy_measure.4 = tail call i64 @___lazy_measure(i64 %97) + %___lazy_measure.4 = tail call i64 @___lazy_measure(i64 %97) tail call void @___qfree(i64 %97) %98 = load i64, ptr %1, align 4 %99 = and i64 %98, 16 @@ -343,18 +342,18 @@ cond_exit_298.4: ; preds = %__barray_check_boun %100 = and i64 %98, -17 store i64 %100, ptr %1, align 4 %101 = getelementptr inbounds nuw i8, ptr %0, i64 32 - store i64 %lazy_measure.4, ptr %101, align 4 + store i64 %___lazy_measure.4, ptr %101, align 4 %102 = load i64, ptr %3, align 4 %103 = or i64 %102, -32 store i64 %103, ptr %3, align 4 %104 = icmp eq i64 %103, -1 - br i1 %104, label %loop_out318, label %mask_block_err.i + br i1 %104, label %loop_out317, label %mask_block_err.i -panic.i1129: ; preds = %loop_out318 +panic.i1129: ; preds = %loop_out317 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_mask_borrow.exit1130: ; preds = %loop_out318 +__barray_mask_borrow.exit1130: ; preds = %loop_out317 %105 = or disjoint i64 %63, 1 store i64 %105, ptr %1, align 4 %106 = load i64, ptr %0, align 4 @@ -555,27 +554,28 @@ cond_exit_558.4: ; preds = %__barray_mask_borro %163 = or i64 %162, -32 store i64 %163, ptr %1, align 4 %164 = icmp eq i64 %163, -1 - br i1 %164, label %loop_out620, label %mask_block_err.i1152 + br i1 %164, label %loop_out619, label %mask_block_err.i1152 -loop_out620: ; preds = %cond_exit_558.4 +loop_out619: ; preds = %cond_exit_558.4 tail call void @heap_free(ptr nonnull %0) tail call void @heap_free(ptr nonnull %1) %read_bool = tail call i1 @___read_future_bool(i64 %106) tail call void @___dec_future_refcount(i64 %106) tail call void @print_bool(ptr nonnull @res_a.A4A74DAF.0, i64 11, i1 %read_bool) - %read_bool690 = tail call i1 @___read_future_bool(i64 %113) + %read_bool689 = tail call i1 @___read_future_bool(i64 %113) tail call void @___dec_future_refcount(i64 %113) - tail call void @print_bool(ptr nonnull @res_b.3BD50C23.0, i64 11, i1 %read_bool690) - %read_bool705 = tail call i1 @___read_future_bool(i64 %120) + tail call void @print_bool(ptr nonnull @res_b.3BD50C23.0, i64 11, i1 %read_bool689) + %read_bool704 = tail call i1 @___read_future_bool(i64 %120) tail call void @___dec_future_refcount(i64 %120) - tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool705) - %read_bool720 = tail call i1 @___read_future_bool(i64 %127) + tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool704) + %read_bool719 = tail call i1 @___read_future_bool(i64 %127) tail call void @___dec_future_refcount(i64 %127) - tail call void @print_bool(ptr nonnull @res_d.00B84DC7.0, i64 11, i1 %read_bool720) - %read_bool735 = tail call i1 @___read_future_bool(i64 %134) + tail call void @print_bool(ptr nonnull @res_d.00B84DC7.0, i64 11, i1 %read_bool719) + %read_bool734 = tail call i1 @___read_future_bool(i64 %134) tail call void @___dec_future_refcount(i64 %134) - tail call void @print_bool(ptr nonnull @res_e.B9A29CAF.0, i64 11, i1 %read_bool735) - tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot2) + tail call void @print_bool(ptr nonnull @res_e.B9A29CAF.0, i64 11, i1 %read_bool734) + tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot1) + tail call void @random_seed(i64 %shot) %rint = tail call i32 @random_int() %rfloat = tail call double @random_float() %165 = sext i32 %rint to i64 @@ -588,8 +588,6 @@ declare ptr @heap_alloc(i64) local_unnamed_addr declare i64 @get_current_shot() local_unnamed_addr -declare void @random_seed(i64) local_unnamed_addr - ; Function Attrs: noreturn declare void @panic(i32, ptr) local_unnamed_addr #0 @@ -609,6 +607,8 @@ declare void @print_bool(ptr, i64, i1) local_unnamed_addr declare void @print_int(ptr, i64, i64) local_unnamed_addr +declare void @random_seed(i64) local_unnamed_addr + declare i32 @random_int() local_unnamed_addr declare double @random_float() local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[default]/determinism_repetition-sol-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[default]/determinism_repetition-sol-aarch64-apple-darwin.ll index a87be65a..8e85ab33 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[default]/determinism_repetition-sol-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[default]/determinism_repetition-sol-aarch64-apple-darwin.ll @@ -22,8 +22,7 @@ cond_104_case_1: %1 = tail call ptr @heap_alloc(i64 8) store i64 -1, ptr %1, align 1 %shot = tail call i64 @get_current_shot() - tail call void @random_seed(i64 %shot) - %shot2 = tail call i64 @get_current_shot() + %shot1 = tail call i64 @get_current_shot() %2 = tail call ptr @heap_alloc(i64 40) %3 = tail call ptr @heap_alloc(i64 8) store i64 -1, ptr %3, align 1 @@ -231,7 +230,7 @@ panic.i1123: ; preds = %__barray_check_boun tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -loop_out318: ; preds = %cond_exit_298.4 +loop_out317: ; preds = %cond_exit_298.4 tail call void @heap_free(ptr nonnull %2) tail call void @heap_free(ptr nonnull %3) %63 = load i64, ptr %1, align 4 @@ -250,7 +249,7 @@ panic.i1127: ; preds = %__barray_check_boun %65 = or disjoint i64 %61, 1 store i64 %65, ptr %3, align 4 %66 = load i64, ptr %2, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %66) + %___future_measure = tail call i64 @___future_measure(i64 %66, i64 0) tail call void @___qfree(i64 %66) %67 = load i64, ptr %1, align 4 %68 = trunc i64 %67 to i1 @@ -259,7 +258,7 @@ panic.i1127: ; preds = %__barray_check_boun cond_exit_298: ; preds = %.thread %69 = and i64 %67, -2 store i64 %69, ptr %1, align 4 - store i64 %lazy_measure, ptr %0, align 4 + store i64 %___future_measure, ptr %0, align 4 %70 = load i64, ptr %3, align 4 %71 = and i64 %70, 2 %.not1190 = icmp eq i64 %71, 0 @@ -269,7 +268,7 @@ cond_exit_298: ; preds = %.thread %72 = or disjoint i64 %70, 2 store i64 %72, ptr %3, align 4 %73 = load i64, ptr %32, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %73) + %___future_measure.1 = tail call i64 @___future_measure(i64 %73, i64 0) tail call void @___qfree(i64 %73) %74 = load i64, ptr %1, align 4 %75 = and i64 %74, 2 @@ -280,7 +279,7 @@ cond_exit_298.1: ; preds = %.thread.1 %76 = and i64 %74, -3 store i64 %76, ptr %1, align 4 %77 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %lazy_measure.1, ptr %77, align 4 + store i64 %___future_measure.1, ptr %77, align 4 %78 = load i64, ptr %3, align 4 %79 = and i64 %78, 4 %.not1192 = icmp eq i64 %79, 0 @@ -290,7 +289,7 @@ cond_exit_298.1: ; preds = %.thread.1 %80 = or disjoint i64 %78, 4 store i64 %80, ptr %3, align 4 %81 = load i64, ptr %40, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %81) + %___future_measure.2 = tail call i64 @___future_measure(i64 %81, i64 0) tail call void @___qfree(i64 %81) %82 = load i64, ptr %1, align 4 %83 = and i64 %82, 4 @@ -301,7 +300,7 @@ cond_exit_298.2: ; preds = %.thread.2 %84 = and i64 %82, -5 store i64 %84, ptr %1, align 4 %85 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %lazy_measure.2, ptr %85, align 4 + store i64 %___future_measure.2, ptr %85, align 4 %86 = load i64, ptr %3, align 4 %87 = and i64 %86, 8 %.not1194 = icmp eq i64 %87, 0 @@ -311,7 +310,7 @@ cond_exit_298.2: ; preds = %.thread.2 %88 = or disjoint i64 %86, 8 store i64 %88, ptr %3, align 4 %89 = load i64, ptr %48, align 4 - %lazy_measure.3 = tail call i64 @___lazy_measure(i64 %89) + %___future_measure.3 = tail call i64 @___future_measure(i64 %89, i64 0) tail call void @___qfree(i64 %89) %90 = load i64, ptr %1, align 4 %91 = and i64 %90, 8 @@ -322,7 +321,7 @@ __barray_check_bounds.exit1126.4: ; preds = %.thread.3 %92 = and i64 %90, -9 store i64 %92, ptr %1, align 4 %93 = getelementptr inbounds nuw i8, ptr %0, i64 24 - store i64 %lazy_measure.3, ptr %93, align 4 + store i64 %___future_measure.3, ptr %93, align 4 %94 = load i64, ptr %3, align 4 %95 = and i64 %94, 16 %.not1196 = icmp eq i64 %95, 0 @@ -332,7 +331,7 @@ __barray_check_bounds.exit1122.4: ; preds = %__barray_check_boun %96 = or disjoint i64 %94, 16 store i64 %96, ptr %3, align 4 %97 = load i64, ptr %56, align 4 - %lazy_measure.4 = tail call i64 @___lazy_measure(i64 %97) + %___future_measure.4 = tail call i64 @___future_measure(i64 %97, i64 0) tail call void @___qfree(i64 %97) %98 = load i64, ptr %1, align 4 %99 = and i64 %98, 16 @@ -343,18 +342,18 @@ cond_exit_298.4: ; preds = %__barray_check_boun %100 = and i64 %98, -17 store i64 %100, ptr %1, align 4 %101 = getelementptr inbounds nuw i8, ptr %0, i64 32 - store i64 %lazy_measure.4, ptr %101, align 4 + store i64 %___future_measure.4, ptr %101, align 4 %102 = load i64, ptr %3, align 4 %103 = or i64 %102, -32 store i64 %103, ptr %3, align 4 %104 = icmp eq i64 %103, -1 - br i1 %104, label %loop_out318, label %mask_block_err.i + br i1 %104, label %loop_out317, label %mask_block_err.i -panic.i1129: ; preds = %loop_out318 +panic.i1129: ; preds = %loop_out317 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_mask_borrow.exit1130: ; preds = %loop_out318 +__barray_mask_borrow.exit1130: ; preds = %loop_out317 %105 = or disjoint i64 %63, 1 store i64 %105, ptr %1, align 4 %106 = load i64, ptr %0, align 4 @@ -555,27 +554,28 @@ cond_exit_558.4: ; preds = %__barray_mask_borro %163 = or i64 %162, -32 store i64 %163, ptr %1, align 4 %164 = icmp eq i64 %163, -1 - br i1 %164, label %loop_out620, label %mask_block_err.i1152 + br i1 %164, label %loop_out619, label %mask_block_err.i1152 -loop_out620: ; preds = %cond_exit_558.4 +loop_out619: ; preds = %cond_exit_558.4 tail call void @heap_free(ptr nonnull %0) tail call void @heap_free(ptr nonnull %1) %read_bool = tail call i1 @___read_future_bool(i64 %106) tail call void @___dec_future_refcount(i64 %106) tail call void @print_bool(ptr nonnull @res_a.A4A74DAF.0, i64 11, i1 %read_bool) - %read_bool690 = tail call i1 @___read_future_bool(i64 %113) + %read_bool689 = tail call i1 @___read_future_bool(i64 %113) tail call void @___dec_future_refcount(i64 %113) - tail call void @print_bool(ptr nonnull @res_b.3BD50C23.0, i64 11, i1 %read_bool690) - %read_bool705 = tail call i1 @___read_future_bool(i64 %120) + tail call void @print_bool(ptr nonnull @res_b.3BD50C23.0, i64 11, i1 %read_bool689) + %read_bool704 = tail call i1 @___read_future_bool(i64 %120) tail call void @___dec_future_refcount(i64 %120) - tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool705) - %read_bool720 = tail call i1 @___read_future_bool(i64 %127) + tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool704) + %read_bool719 = tail call i1 @___read_future_bool(i64 %127) tail call void @___dec_future_refcount(i64 %127) - tail call void @print_bool(ptr nonnull @res_d.00B84DC7.0, i64 11, i1 %read_bool720) - %read_bool735 = tail call i1 @___read_future_bool(i64 %134) + tail call void @print_bool(ptr nonnull @res_d.00B84DC7.0, i64 11, i1 %read_bool719) + %read_bool734 = tail call i1 @___read_future_bool(i64 %134) tail call void @___dec_future_refcount(i64 %134) - tail call void @print_bool(ptr nonnull @res_e.B9A29CAF.0, i64 11, i1 %read_bool735) - tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot2) + tail call void @print_bool(ptr nonnull @res_e.B9A29CAF.0, i64 11, i1 %read_bool734) + tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot1) + tail call void @random_seed(i64 %shot) %rint = tail call i32 @random_int() %rfloat = tail call double @random_float() %165 = sext i32 %rint to i64 @@ -588,14 +588,12 @@ declare ptr @heap_alloc(i64) local_unnamed_addr declare i64 @get_current_shot() local_unnamed_addr -declare void @random_seed(i64) local_unnamed_addr - ; Function Attrs: noreturn declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -609,6 +607,8 @@ declare void @print_bool(ptr, i64, i1) local_unnamed_addr declare void @print_int(ptr, i64, i64) local_unnamed_addr +declare void @random_seed(i64) local_unnamed_addr + declare i32 @random_int() local_unnamed_addr declare double @random_float() local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[default]/determinism_repetition-sol-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[default]/determinism_repetition-sol-aarch64-unknown-linux-gnu.ll index 25da2c5a..ae0d1752 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[default]/determinism_repetition-sol-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[default]/determinism_repetition-sol-aarch64-unknown-linux-gnu.ll @@ -22,8 +22,7 @@ cond_104_case_1: %1 = tail call ptr @heap_alloc(i64 8) store i64 -1, ptr %1, align 1 %shot = tail call i64 @get_current_shot() - tail call void @random_seed(i64 %shot) - %shot2 = tail call i64 @get_current_shot() + %shot1 = tail call i64 @get_current_shot() %2 = tail call ptr @heap_alloc(i64 40) %3 = tail call ptr @heap_alloc(i64 8) store i64 -1, ptr %3, align 1 @@ -231,7 +230,7 @@ panic.i1123: ; preds = %__barray_check_boun tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -loop_out318: ; preds = %cond_exit_298.4 +loop_out317: ; preds = %cond_exit_298.4 tail call void @heap_free(ptr nonnull %2) tail call void @heap_free(ptr nonnull %3) %63 = load i64, ptr %1, align 4 @@ -250,7 +249,7 @@ panic.i1127: ; preds = %__barray_check_boun %65 = or disjoint i64 %61, 1 store i64 %65, ptr %3, align 4 %66 = load i64, ptr %2, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %66) + %___future_measure = tail call i64 @___future_measure(i64 %66, i64 0) tail call void @___qfree(i64 %66) %67 = load i64, ptr %1, align 4 %68 = trunc i64 %67 to i1 @@ -259,7 +258,7 @@ panic.i1127: ; preds = %__barray_check_boun cond_exit_298: ; preds = %.thread %69 = and i64 %67, -2 store i64 %69, ptr %1, align 4 - store i64 %lazy_measure, ptr %0, align 4 + store i64 %___future_measure, ptr %0, align 4 %70 = load i64, ptr %3, align 4 %71 = and i64 %70, 2 %.not1190 = icmp eq i64 %71, 0 @@ -269,7 +268,7 @@ cond_exit_298: ; preds = %.thread %72 = or disjoint i64 %70, 2 store i64 %72, ptr %3, align 4 %73 = load i64, ptr %32, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %73) + %___future_measure.1 = tail call i64 @___future_measure(i64 %73, i64 0) tail call void @___qfree(i64 %73) %74 = load i64, ptr %1, align 4 %75 = and i64 %74, 2 @@ -280,7 +279,7 @@ cond_exit_298.1: ; preds = %.thread.1 %76 = and i64 %74, -3 store i64 %76, ptr %1, align 4 %77 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %lazy_measure.1, ptr %77, align 4 + store i64 %___future_measure.1, ptr %77, align 4 %78 = load i64, ptr %3, align 4 %79 = and i64 %78, 4 %.not1192 = icmp eq i64 %79, 0 @@ -290,7 +289,7 @@ cond_exit_298.1: ; preds = %.thread.1 %80 = or disjoint i64 %78, 4 store i64 %80, ptr %3, align 4 %81 = load i64, ptr %40, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %81) + %___future_measure.2 = tail call i64 @___future_measure(i64 %81, i64 0) tail call void @___qfree(i64 %81) %82 = load i64, ptr %1, align 4 %83 = and i64 %82, 4 @@ -301,7 +300,7 @@ cond_exit_298.2: ; preds = %.thread.2 %84 = and i64 %82, -5 store i64 %84, ptr %1, align 4 %85 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %lazy_measure.2, ptr %85, align 4 + store i64 %___future_measure.2, ptr %85, align 4 %86 = load i64, ptr %3, align 4 %87 = and i64 %86, 8 %.not1194 = icmp eq i64 %87, 0 @@ -311,7 +310,7 @@ cond_exit_298.2: ; preds = %.thread.2 %88 = or disjoint i64 %86, 8 store i64 %88, ptr %3, align 4 %89 = load i64, ptr %48, align 4 - %lazy_measure.3 = tail call i64 @___lazy_measure(i64 %89) + %___future_measure.3 = tail call i64 @___future_measure(i64 %89, i64 0) tail call void @___qfree(i64 %89) %90 = load i64, ptr %1, align 4 %91 = and i64 %90, 8 @@ -322,7 +321,7 @@ __barray_check_bounds.exit1126.4: ; preds = %.thread.3 %92 = and i64 %90, -9 store i64 %92, ptr %1, align 4 %93 = getelementptr inbounds nuw i8, ptr %0, i64 24 - store i64 %lazy_measure.3, ptr %93, align 4 + store i64 %___future_measure.3, ptr %93, align 4 %94 = load i64, ptr %3, align 4 %95 = and i64 %94, 16 %.not1196 = icmp eq i64 %95, 0 @@ -332,7 +331,7 @@ __barray_check_bounds.exit1122.4: ; preds = %__barray_check_boun %96 = or disjoint i64 %94, 16 store i64 %96, ptr %3, align 4 %97 = load i64, ptr %56, align 4 - %lazy_measure.4 = tail call i64 @___lazy_measure(i64 %97) + %___future_measure.4 = tail call i64 @___future_measure(i64 %97, i64 0) tail call void @___qfree(i64 %97) %98 = load i64, ptr %1, align 4 %99 = and i64 %98, 16 @@ -343,18 +342,18 @@ cond_exit_298.4: ; preds = %__barray_check_boun %100 = and i64 %98, -17 store i64 %100, ptr %1, align 4 %101 = getelementptr inbounds nuw i8, ptr %0, i64 32 - store i64 %lazy_measure.4, ptr %101, align 4 + store i64 %___future_measure.4, ptr %101, align 4 %102 = load i64, ptr %3, align 4 %103 = or i64 %102, -32 store i64 %103, ptr %3, align 4 %104 = icmp eq i64 %103, -1 - br i1 %104, label %loop_out318, label %mask_block_err.i + br i1 %104, label %loop_out317, label %mask_block_err.i -panic.i1129: ; preds = %loop_out318 +panic.i1129: ; preds = %loop_out317 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_mask_borrow.exit1130: ; preds = %loop_out318 +__barray_mask_borrow.exit1130: ; preds = %loop_out317 %105 = or disjoint i64 %63, 1 store i64 %105, ptr %1, align 4 %106 = load i64, ptr %0, align 4 @@ -555,27 +554,28 @@ cond_exit_558.4: ; preds = %__barray_mask_borro %163 = or i64 %162, -32 store i64 %163, ptr %1, align 4 %164 = icmp eq i64 %163, -1 - br i1 %164, label %loop_out620, label %mask_block_err.i1152 + br i1 %164, label %loop_out619, label %mask_block_err.i1152 -loop_out620: ; preds = %cond_exit_558.4 +loop_out619: ; preds = %cond_exit_558.4 tail call void @heap_free(ptr nonnull %0) tail call void @heap_free(ptr nonnull %1) %read_bool = tail call i1 @___read_future_bool(i64 %106) tail call void @___dec_future_refcount(i64 %106) tail call void @print_bool(ptr nonnull @res_a.A4A74DAF.0, i64 11, i1 %read_bool) - %read_bool690 = tail call i1 @___read_future_bool(i64 %113) + %read_bool689 = tail call i1 @___read_future_bool(i64 %113) tail call void @___dec_future_refcount(i64 %113) - tail call void @print_bool(ptr nonnull @res_b.3BD50C23.0, i64 11, i1 %read_bool690) - %read_bool705 = tail call i1 @___read_future_bool(i64 %120) + tail call void @print_bool(ptr nonnull @res_b.3BD50C23.0, i64 11, i1 %read_bool689) + %read_bool704 = tail call i1 @___read_future_bool(i64 %120) tail call void @___dec_future_refcount(i64 %120) - tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool705) - %read_bool720 = tail call i1 @___read_future_bool(i64 %127) + tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool704) + %read_bool719 = tail call i1 @___read_future_bool(i64 %127) tail call void @___dec_future_refcount(i64 %127) - tail call void @print_bool(ptr nonnull @res_d.00B84DC7.0, i64 11, i1 %read_bool720) - %read_bool735 = tail call i1 @___read_future_bool(i64 %134) + tail call void @print_bool(ptr nonnull @res_d.00B84DC7.0, i64 11, i1 %read_bool719) + %read_bool734 = tail call i1 @___read_future_bool(i64 %134) tail call void @___dec_future_refcount(i64 %134) - tail call void @print_bool(ptr nonnull @res_e.B9A29CAF.0, i64 11, i1 %read_bool735) - tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot2) + tail call void @print_bool(ptr nonnull @res_e.B9A29CAF.0, i64 11, i1 %read_bool734) + tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot1) + tail call void @random_seed(i64 %shot) %rint = tail call i32 @random_int() %rfloat = tail call double @random_float() %165 = sext i32 %rint to i64 @@ -588,14 +588,12 @@ declare ptr @heap_alloc(i64) local_unnamed_addr declare i64 @get_current_shot() local_unnamed_addr -declare void @random_seed(i64) local_unnamed_addr - ; Function Attrs: noreturn declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -609,6 +607,8 @@ declare void @print_bool(ptr, i64, i1) local_unnamed_addr declare void @print_int(ptr, i64, i64) local_unnamed_addr +declare void @random_seed(i64) local_unnamed_addr + declare i32 @random_int() local_unnamed_addr declare double @random_float() local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[default]/determinism_repetition-sol-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[default]/determinism_repetition-sol-x86_64-apple-darwin.ll index 75844187..0e20dbd4 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[default]/determinism_repetition-sol-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[default]/determinism_repetition-sol-x86_64-apple-darwin.ll @@ -22,8 +22,7 @@ cond_104_case_1: %1 = tail call ptr @heap_alloc(i64 8) store i64 -1, ptr %1, align 1 %shot = tail call i64 @get_current_shot() - tail call void @random_seed(i64 %shot) - %shot2 = tail call i64 @get_current_shot() + %shot1 = tail call i64 @get_current_shot() %2 = tail call ptr @heap_alloc(i64 40) %3 = tail call ptr @heap_alloc(i64 8) store i64 -1, ptr %3, align 1 @@ -231,7 +230,7 @@ panic.i1123: ; preds = %__barray_check_boun tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -loop_out318: ; preds = %cond_exit_298.4 +loop_out317: ; preds = %cond_exit_298.4 tail call void @heap_free(ptr nonnull %2) tail call void @heap_free(ptr nonnull %3) %63 = load i64, ptr %1, align 4 @@ -250,7 +249,7 @@ panic.i1127: ; preds = %__barray_check_boun %65 = or disjoint i64 %61, 1 store i64 %65, ptr %3, align 4 %66 = load i64, ptr %2, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %66) + %___future_measure = tail call i64 @___future_measure(i64 %66, i64 0) tail call void @___qfree(i64 %66) %67 = load i64, ptr %1, align 4 %68 = trunc i64 %67 to i1 @@ -259,7 +258,7 @@ panic.i1127: ; preds = %__barray_check_boun cond_exit_298: ; preds = %.thread %69 = and i64 %67, -2 store i64 %69, ptr %1, align 4 - store i64 %lazy_measure, ptr %0, align 4 + store i64 %___future_measure, ptr %0, align 4 %70 = load i64, ptr %3, align 4 %71 = and i64 %70, 2 %.not1190 = icmp eq i64 %71, 0 @@ -269,7 +268,7 @@ cond_exit_298: ; preds = %.thread %72 = or disjoint i64 %70, 2 store i64 %72, ptr %3, align 4 %73 = load i64, ptr %32, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %73) + %___future_measure.1 = tail call i64 @___future_measure(i64 %73, i64 0) tail call void @___qfree(i64 %73) %74 = load i64, ptr %1, align 4 %75 = and i64 %74, 2 @@ -280,7 +279,7 @@ cond_exit_298.1: ; preds = %.thread.1 %76 = and i64 %74, -3 store i64 %76, ptr %1, align 4 %77 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %lazy_measure.1, ptr %77, align 4 + store i64 %___future_measure.1, ptr %77, align 4 %78 = load i64, ptr %3, align 4 %79 = and i64 %78, 4 %.not1192 = icmp eq i64 %79, 0 @@ -290,7 +289,7 @@ cond_exit_298.1: ; preds = %.thread.1 %80 = or disjoint i64 %78, 4 store i64 %80, ptr %3, align 4 %81 = load i64, ptr %40, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %81) + %___future_measure.2 = tail call i64 @___future_measure(i64 %81, i64 0) tail call void @___qfree(i64 %81) %82 = load i64, ptr %1, align 4 %83 = and i64 %82, 4 @@ -301,7 +300,7 @@ cond_exit_298.2: ; preds = %.thread.2 %84 = and i64 %82, -5 store i64 %84, ptr %1, align 4 %85 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %lazy_measure.2, ptr %85, align 4 + store i64 %___future_measure.2, ptr %85, align 4 %86 = load i64, ptr %3, align 4 %87 = and i64 %86, 8 %.not1194 = icmp eq i64 %87, 0 @@ -311,7 +310,7 @@ cond_exit_298.2: ; preds = %.thread.2 %88 = or disjoint i64 %86, 8 store i64 %88, ptr %3, align 4 %89 = load i64, ptr %48, align 4 - %lazy_measure.3 = tail call i64 @___lazy_measure(i64 %89) + %___future_measure.3 = tail call i64 @___future_measure(i64 %89, i64 0) tail call void @___qfree(i64 %89) %90 = load i64, ptr %1, align 4 %91 = and i64 %90, 8 @@ -322,7 +321,7 @@ __barray_check_bounds.exit1126.4: ; preds = %.thread.3 %92 = and i64 %90, -9 store i64 %92, ptr %1, align 4 %93 = getelementptr inbounds nuw i8, ptr %0, i64 24 - store i64 %lazy_measure.3, ptr %93, align 4 + store i64 %___future_measure.3, ptr %93, align 4 %94 = load i64, ptr %3, align 4 %95 = and i64 %94, 16 %.not1196 = icmp eq i64 %95, 0 @@ -332,7 +331,7 @@ __barray_check_bounds.exit1122.4: ; preds = %__barray_check_boun %96 = or disjoint i64 %94, 16 store i64 %96, ptr %3, align 4 %97 = load i64, ptr %56, align 4 - %lazy_measure.4 = tail call i64 @___lazy_measure(i64 %97) + %___future_measure.4 = tail call i64 @___future_measure(i64 %97, i64 0) tail call void @___qfree(i64 %97) %98 = load i64, ptr %1, align 4 %99 = and i64 %98, 16 @@ -343,18 +342,18 @@ cond_exit_298.4: ; preds = %__barray_check_boun %100 = and i64 %98, -17 store i64 %100, ptr %1, align 4 %101 = getelementptr inbounds nuw i8, ptr %0, i64 32 - store i64 %lazy_measure.4, ptr %101, align 4 + store i64 %___future_measure.4, ptr %101, align 4 %102 = load i64, ptr %3, align 4 %103 = or i64 %102, -32 store i64 %103, ptr %3, align 4 %104 = icmp eq i64 %103, -1 - br i1 %104, label %loop_out318, label %mask_block_err.i + br i1 %104, label %loop_out317, label %mask_block_err.i -panic.i1129: ; preds = %loop_out318 +panic.i1129: ; preds = %loop_out317 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_mask_borrow.exit1130: ; preds = %loop_out318 +__barray_mask_borrow.exit1130: ; preds = %loop_out317 %105 = or disjoint i64 %63, 1 store i64 %105, ptr %1, align 4 %106 = load i64, ptr %0, align 4 @@ -555,27 +554,28 @@ cond_exit_558.4: ; preds = %__barray_mask_borro %163 = or i64 %162, -32 store i64 %163, ptr %1, align 4 %164 = icmp eq i64 %163, -1 - br i1 %164, label %loop_out620, label %mask_block_err.i1152 + br i1 %164, label %loop_out619, label %mask_block_err.i1152 -loop_out620: ; preds = %cond_exit_558.4 +loop_out619: ; preds = %cond_exit_558.4 tail call void @heap_free(ptr nonnull %0) tail call void @heap_free(ptr nonnull %1) %read_bool = tail call i1 @___read_future_bool(i64 %106) tail call void @___dec_future_refcount(i64 %106) tail call void @print_bool(ptr nonnull @res_a.A4A74DAF.0, i64 11, i1 %read_bool) - %read_bool690 = tail call i1 @___read_future_bool(i64 %113) + %read_bool689 = tail call i1 @___read_future_bool(i64 %113) tail call void @___dec_future_refcount(i64 %113) - tail call void @print_bool(ptr nonnull @res_b.3BD50C23.0, i64 11, i1 %read_bool690) - %read_bool705 = tail call i1 @___read_future_bool(i64 %120) + tail call void @print_bool(ptr nonnull @res_b.3BD50C23.0, i64 11, i1 %read_bool689) + %read_bool704 = tail call i1 @___read_future_bool(i64 %120) tail call void @___dec_future_refcount(i64 %120) - tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool705) - %read_bool720 = tail call i1 @___read_future_bool(i64 %127) + tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool704) + %read_bool719 = tail call i1 @___read_future_bool(i64 %127) tail call void @___dec_future_refcount(i64 %127) - tail call void @print_bool(ptr nonnull @res_d.00B84DC7.0, i64 11, i1 %read_bool720) - %read_bool735 = tail call i1 @___read_future_bool(i64 %134) + tail call void @print_bool(ptr nonnull @res_d.00B84DC7.0, i64 11, i1 %read_bool719) + %read_bool734 = tail call i1 @___read_future_bool(i64 %134) tail call void @___dec_future_refcount(i64 %134) - tail call void @print_bool(ptr nonnull @res_e.B9A29CAF.0, i64 11, i1 %read_bool735) - tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot2) + tail call void @print_bool(ptr nonnull @res_e.B9A29CAF.0, i64 11, i1 %read_bool734) + tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot1) + tail call void @random_seed(i64 %shot) %rint = tail call i32 @random_int() %rfloat = tail call double @random_float() %165 = sext i32 %rint to i64 @@ -588,14 +588,12 @@ declare ptr @heap_alloc(i64) local_unnamed_addr declare i64 @get_current_shot() local_unnamed_addr -declare void @random_seed(i64) local_unnamed_addr - ; Function Attrs: noreturn declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -609,6 +607,8 @@ declare void @print_bool(ptr, i64, i1) local_unnamed_addr declare void @print_int(ptr, i64, i64) local_unnamed_addr +declare void @random_seed(i64) local_unnamed_addr + declare i32 @random_int() local_unnamed_addr declare double @random_float() local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[default]/determinism_repetition-sol-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[default]/determinism_repetition-sol-x86_64-unknown-linux-gnu.ll index 57145ec1..9ba24a24 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[default]/determinism_repetition-sol-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[default]/determinism_repetition-sol-x86_64-unknown-linux-gnu.ll @@ -22,8 +22,7 @@ cond_104_case_1: %1 = tail call ptr @heap_alloc(i64 8) store i64 -1, ptr %1, align 1 %shot = tail call i64 @get_current_shot() - tail call void @random_seed(i64 %shot) - %shot2 = tail call i64 @get_current_shot() + %shot1 = tail call i64 @get_current_shot() %2 = tail call ptr @heap_alloc(i64 40) %3 = tail call ptr @heap_alloc(i64 8) store i64 -1, ptr %3, align 1 @@ -231,7 +230,7 @@ panic.i1123: ; preds = %__barray_check_boun tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -loop_out318: ; preds = %cond_exit_298.4 +loop_out317: ; preds = %cond_exit_298.4 tail call void @heap_free(ptr nonnull %2) tail call void @heap_free(ptr nonnull %3) %63 = load i64, ptr %1, align 4 @@ -250,7 +249,7 @@ panic.i1127: ; preds = %__barray_check_boun %65 = or disjoint i64 %61, 1 store i64 %65, ptr %3, align 4 %66 = load i64, ptr %2, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %66) + %___future_measure = tail call i64 @___future_measure(i64 %66, i64 0) tail call void @___qfree(i64 %66) %67 = load i64, ptr %1, align 4 %68 = trunc i64 %67 to i1 @@ -259,7 +258,7 @@ panic.i1127: ; preds = %__barray_check_boun cond_exit_298: ; preds = %.thread %69 = and i64 %67, -2 store i64 %69, ptr %1, align 4 - store i64 %lazy_measure, ptr %0, align 4 + store i64 %___future_measure, ptr %0, align 4 %70 = load i64, ptr %3, align 4 %71 = and i64 %70, 2 %.not1190 = icmp eq i64 %71, 0 @@ -269,7 +268,7 @@ cond_exit_298: ; preds = %.thread %72 = or disjoint i64 %70, 2 store i64 %72, ptr %3, align 4 %73 = load i64, ptr %32, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %73) + %___future_measure.1 = tail call i64 @___future_measure(i64 %73, i64 0) tail call void @___qfree(i64 %73) %74 = load i64, ptr %1, align 4 %75 = and i64 %74, 2 @@ -280,7 +279,7 @@ cond_exit_298.1: ; preds = %.thread.1 %76 = and i64 %74, -3 store i64 %76, ptr %1, align 4 %77 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %lazy_measure.1, ptr %77, align 4 + store i64 %___future_measure.1, ptr %77, align 4 %78 = load i64, ptr %3, align 4 %79 = and i64 %78, 4 %.not1192 = icmp eq i64 %79, 0 @@ -290,7 +289,7 @@ cond_exit_298.1: ; preds = %.thread.1 %80 = or disjoint i64 %78, 4 store i64 %80, ptr %3, align 4 %81 = load i64, ptr %40, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %81) + %___future_measure.2 = tail call i64 @___future_measure(i64 %81, i64 0) tail call void @___qfree(i64 %81) %82 = load i64, ptr %1, align 4 %83 = and i64 %82, 4 @@ -301,7 +300,7 @@ cond_exit_298.2: ; preds = %.thread.2 %84 = and i64 %82, -5 store i64 %84, ptr %1, align 4 %85 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %lazy_measure.2, ptr %85, align 4 + store i64 %___future_measure.2, ptr %85, align 4 %86 = load i64, ptr %3, align 4 %87 = and i64 %86, 8 %.not1194 = icmp eq i64 %87, 0 @@ -311,7 +310,7 @@ cond_exit_298.2: ; preds = %.thread.2 %88 = or disjoint i64 %86, 8 store i64 %88, ptr %3, align 4 %89 = load i64, ptr %48, align 4 - %lazy_measure.3 = tail call i64 @___lazy_measure(i64 %89) + %___future_measure.3 = tail call i64 @___future_measure(i64 %89, i64 0) tail call void @___qfree(i64 %89) %90 = load i64, ptr %1, align 4 %91 = and i64 %90, 8 @@ -322,7 +321,7 @@ __barray_check_bounds.exit1126.4: ; preds = %.thread.3 %92 = and i64 %90, -9 store i64 %92, ptr %1, align 4 %93 = getelementptr inbounds nuw i8, ptr %0, i64 24 - store i64 %lazy_measure.3, ptr %93, align 4 + store i64 %___future_measure.3, ptr %93, align 4 %94 = load i64, ptr %3, align 4 %95 = and i64 %94, 16 %.not1196 = icmp eq i64 %95, 0 @@ -332,7 +331,7 @@ __barray_check_bounds.exit1122.4: ; preds = %__barray_check_boun %96 = or disjoint i64 %94, 16 store i64 %96, ptr %3, align 4 %97 = load i64, ptr %56, align 4 - %lazy_measure.4 = tail call i64 @___lazy_measure(i64 %97) + %___future_measure.4 = tail call i64 @___future_measure(i64 %97, i64 0) tail call void @___qfree(i64 %97) %98 = load i64, ptr %1, align 4 %99 = and i64 %98, 16 @@ -343,18 +342,18 @@ cond_exit_298.4: ; preds = %__barray_check_boun %100 = and i64 %98, -17 store i64 %100, ptr %1, align 4 %101 = getelementptr inbounds nuw i8, ptr %0, i64 32 - store i64 %lazy_measure.4, ptr %101, align 4 + store i64 %___future_measure.4, ptr %101, align 4 %102 = load i64, ptr %3, align 4 %103 = or i64 %102, -32 store i64 %103, ptr %3, align 4 %104 = icmp eq i64 %103, -1 - br i1 %104, label %loop_out318, label %mask_block_err.i + br i1 %104, label %loop_out317, label %mask_block_err.i -panic.i1129: ; preds = %loop_out318 +panic.i1129: ; preds = %loop_out317 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_mask_borrow.exit1130: ; preds = %loop_out318 +__barray_mask_borrow.exit1130: ; preds = %loop_out317 %105 = or disjoint i64 %63, 1 store i64 %105, ptr %1, align 4 %106 = load i64, ptr %0, align 4 @@ -555,27 +554,28 @@ cond_exit_558.4: ; preds = %__barray_mask_borro %163 = or i64 %162, -32 store i64 %163, ptr %1, align 4 %164 = icmp eq i64 %163, -1 - br i1 %164, label %loop_out620, label %mask_block_err.i1152 + br i1 %164, label %loop_out619, label %mask_block_err.i1152 -loop_out620: ; preds = %cond_exit_558.4 +loop_out619: ; preds = %cond_exit_558.4 tail call void @heap_free(ptr nonnull %0) tail call void @heap_free(ptr nonnull %1) %read_bool = tail call i1 @___read_future_bool(i64 %106) tail call void @___dec_future_refcount(i64 %106) tail call void @print_bool(ptr nonnull @res_a.A4A74DAF.0, i64 11, i1 %read_bool) - %read_bool690 = tail call i1 @___read_future_bool(i64 %113) + %read_bool689 = tail call i1 @___read_future_bool(i64 %113) tail call void @___dec_future_refcount(i64 %113) - tail call void @print_bool(ptr nonnull @res_b.3BD50C23.0, i64 11, i1 %read_bool690) - %read_bool705 = tail call i1 @___read_future_bool(i64 %120) + tail call void @print_bool(ptr nonnull @res_b.3BD50C23.0, i64 11, i1 %read_bool689) + %read_bool704 = tail call i1 @___read_future_bool(i64 %120) tail call void @___dec_future_refcount(i64 %120) - tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool705) - %read_bool720 = tail call i1 @___read_future_bool(i64 %127) + tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool704) + %read_bool719 = tail call i1 @___read_future_bool(i64 %127) tail call void @___dec_future_refcount(i64 %127) - tail call void @print_bool(ptr nonnull @res_d.00B84DC7.0, i64 11, i1 %read_bool720) - %read_bool735 = tail call i1 @___read_future_bool(i64 %134) + tail call void @print_bool(ptr nonnull @res_d.00B84DC7.0, i64 11, i1 %read_bool719) + %read_bool734 = tail call i1 @___read_future_bool(i64 %134) tail call void @___dec_future_refcount(i64 %134) - tail call void @print_bool(ptr nonnull @res_e.B9A29CAF.0, i64 11, i1 %read_bool735) - tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot2) + tail call void @print_bool(ptr nonnull @res_e.B9A29CAF.0, i64 11, i1 %read_bool734) + tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot1) + tail call void @random_seed(i64 %shot) %rint = tail call i32 @random_int() %rfloat = tail call double @random_float() %165 = sext i32 %rint to i64 @@ -588,14 +588,12 @@ declare ptr @heap_alloc(i64) local_unnamed_addr declare i64 @get_current_shot() local_unnamed_addr -declare void @random_seed(i64) local_unnamed_addr - ; Function Attrs: noreturn declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -609,6 +607,8 @@ declare void @print_bool(ptr, i64, i1) local_unnamed_addr declare void @print_int(ptr, i64, i64) local_unnamed_addr +declare void @random_seed(i64) local_unnamed_addr + declare i32 @random_int() local_unnamed_addr declare double @random_float() local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[default]/determinism_repetition-sol-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[default]/determinism_repetition-sol-x86_64-windows-gnu.ll index 3a96f1fd..388ae84b 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[default]/determinism_repetition-sol-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[default]/determinism_repetition-sol-x86_64-windows-gnu.ll @@ -22,8 +22,7 @@ cond_104_case_1: %1 = tail call ptr @heap_alloc(i64 8) store i64 -1, ptr %1, align 1 %shot = tail call i64 @get_current_shot() - tail call void @random_seed(i64 %shot) - %shot2 = tail call i64 @get_current_shot() + %shot1 = tail call i64 @get_current_shot() %2 = tail call ptr @heap_alloc(i64 40) %3 = tail call ptr @heap_alloc(i64 8) store i64 -1, ptr %3, align 1 @@ -231,7 +230,7 @@ panic.i1123: ; preds = %__barray_check_boun tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -loop_out318: ; preds = %cond_exit_298.4 +loop_out317: ; preds = %cond_exit_298.4 tail call void @heap_free(ptr nonnull %2) tail call void @heap_free(ptr nonnull %3) %63 = load i64, ptr %1, align 4 @@ -250,7 +249,7 @@ panic.i1127: ; preds = %__barray_check_boun %65 = or disjoint i64 %61, 1 store i64 %65, ptr %3, align 4 %66 = load i64, ptr %2, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %66) + %___future_measure = tail call i64 @___future_measure(i64 %66, i64 0) tail call void @___qfree(i64 %66) %67 = load i64, ptr %1, align 4 %68 = trunc i64 %67 to i1 @@ -259,7 +258,7 @@ panic.i1127: ; preds = %__barray_check_boun cond_exit_298: ; preds = %.thread %69 = and i64 %67, -2 store i64 %69, ptr %1, align 4 - store i64 %lazy_measure, ptr %0, align 4 + store i64 %___future_measure, ptr %0, align 4 %70 = load i64, ptr %3, align 4 %71 = and i64 %70, 2 %.not1190 = icmp eq i64 %71, 0 @@ -269,7 +268,7 @@ cond_exit_298: ; preds = %.thread %72 = or disjoint i64 %70, 2 store i64 %72, ptr %3, align 4 %73 = load i64, ptr %32, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %73) + %___future_measure.1 = tail call i64 @___future_measure(i64 %73, i64 0) tail call void @___qfree(i64 %73) %74 = load i64, ptr %1, align 4 %75 = and i64 %74, 2 @@ -280,7 +279,7 @@ cond_exit_298.1: ; preds = %.thread.1 %76 = and i64 %74, -3 store i64 %76, ptr %1, align 4 %77 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %lazy_measure.1, ptr %77, align 4 + store i64 %___future_measure.1, ptr %77, align 4 %78 = load i64, ptr %3, align 4 %79 = and i64 %78, 4 %.not1192 = icmp eq i64 %79, 0 @@ -290,7 +289,7 @@ cond_exit_298.1: ; preds = %.thread.1 %80 = or disjoint i64 %78, 4 store i64 %80, ptr %3, align 4 %81 = load i64, ptr %40, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %81) + %___future_measure.2 = tail call i64 @___future_measure(i64 %81, i64 0) tail call void @___qfree(i64 %81) %82 = load i64, ptr %1, align 4 %83 = and i64 %82, 4 @@ -301,7 +300,7 @@ cond_exit_298.2: ; preds = %.thread.2 %84 = and i64 %82, -5 store i64 %84, ptr %1, align 4 %85 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %lazy_measure.2, ptr %85, align 4 + store i64 %___future_measure.2, ptr %85, align 4 %86 = load i64, ptr %3, align 4 %87 = and i64 %86, 8 %.not1194 = icmp eq i64 %87, 0 @@ -311,7 +310,7 @@ cond_exit_298.2: ; preds = %.thread.2 %88 = or disjoint i64 %86, 8 store i64 %88, ptr %3, align 4 %89 = load i64, ptr %48, align 4 - %lazy_measure.3 = tail call i64 @___lazy_measure(i64 %89) + %___future_measure.3 = tail call i64 @___future_measure(i64 %89, i64 0) tail call void @___qfree(i64 %89) %90 = load i64, ptr %1, align 4 %91 = and i64 %90, 8 @@ -322,7 +321,7 @@ __barray_check_bounds.exit1126.4: ; preds = %.thread.3 %92 = and i64 %90, -9 store i64 %92, ptr %1, align 4 %93 = getelementptr inbounds nuw i8, ptr %0, i64 24 - store i64 %lazy_measure.3, ptr %93, align 4 + store i64 %___future_measure.3, ptr %93, align 4 %94 = load i64, ptr %3, align 4 %95 = and i64 %94, 16 %.not1196 = icmp eq i64 %95, 0 @@ -332,7 +331,7 @@ __barray_check_bounds.exit1122.4: ; preds = %__barray_check_boun %96 = or disjoint i64 %94, 16 store i64 %96, ptr %3, align 4 %97 = load i64, ptr %56, align 4 - %lazy_measure.4 = tail call i64 @___lazy_measure(i64 %97) + %___future_measure.4 = tail call i64 @___future_measure(i64 %97, i64 0) tail call void @___qfree(i64 %97) %98 = load i64, ptr %1, align 4 %99 = and i64 %98, 16 @@ -343,18 +342,18 @@ cond_exit_298.4: ; preds = %__barray_check_boun %100 = and i64 %98, -17 store i64 %100, ptr %1, align 4 %101 = getelementptr inbounds nuw i8, ptr %0, i64 32 - store i64 %lazy_measure.4, ptr %101, align 4 + store i64 %___future_measure.4, ptr %101, align 4 %102 = load i64, ptr %3, align 4 %103 = or i64 %102, -32 store i64 %103, ptr %3, align 4 %104 = icmp eq i64 %103, -1 - br i1 %104, label %loop_out318, label %mask_block_err.i + br i1 %104, label %loop_out317, label %mask_block_err.i -panic.i1129: ; preds = %loop_out318 +panic.i1129: ; preds = %loop_out317 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_mask_borrow.exit1130: ; preds = %loop_out318 +__barray_mask_borrow.exit1130: ; preds = %loop_out317 %105 = or disjoint i64 %63, 1 store i64 %105, ptr %1, align 4 %106 = load i64, ptr %0, align 4 @@ -555,27 +554,28 @@ cond_exit_558.4: ; preds = %__barray_mask_borro %163 = or i64 %162, -32 store i64 %163, ptr %1, align 4 %164 = icmp eq i64 %163, -1 - br i1 %164, label %loop_out620, label %mask_block_err.i1152 + br i1 %164, label %loop_out619, label %mask_block_err.i1152 -loop_out620: ; preds = %cond_exit_558.4 +loop_out619: ; preds = %cond_exit_558.4 tail call void @heap_free(ptr nonnull %0) tail call void @heap_free(ptr nonnull %1) %read_bool = tail call i1 @___read_future_bool(i64 %106) tail call void @___dec_future_refcount(i64 %106) tail call void @print_bool(ptr nonnull @res_a.A4A74DAF.0, i64 11, i1 %read_bool) - %read_bool690 = tail call i1 @___read_future_bool(i64 %113) + %read_bool689 = tail call i1 @___read_future_bool(i64 %113) tail call void @___dec_future_refcount(i64 %113) - tail call void @print_bool(ptr nonnull @res_b.3BD50C23.0, i64 11, i1 %read_bool690) - %read_bool705 = tail call i1 @___read_future_bool(i64 %120) + tail call void @print_bool(ptr nonnull @res_b.3BD50C23.0, i64 11, i1 %read_bool689) + %read_bool704 = tail call i1 @___read_future_bool(i64 %120) tail call void @___dec_future_refcount(i64 %120) - tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool705) - %read_bool720 = tail call i1 @___read_future_bool(i64 %127) + tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool704) + %read_bool719 = tail call i1 @___read_future_bool(i64 %127) tail call void @___dec_future_refcount(i64 %127) - tail call void @print_bool(ptr nonnull @res_d.00B84DC7.0, i64 11, i1 %read_bool720) - %read_bool735 = tail call i1 @___read_future_bool(i64 %134) + tail call void @print_bool(ptr nonnull @res_d.00B84DC7.0, i64 11, i1 %read_bool719) + %read_bool734 = tail call i1 @___read_future_bool(i64 %134) tail call void @___dec_future_refcount(i64 %134) - tail call void @print_bool(ptr nonnull @res_e.B9A29CAF.0, i64 11, i1 %read_bool735) - tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot2) + tail call void @print_bool(ptr nonnull @res_e.B9A29CAF.0, i64 11, i1 %read_bool734) + tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot1) + tail call void @random_seed(i64 %shot) %rint = tail call i32 @random_int() %rfloat = tail call double @random_float() %165 = sext i32 %rint to i64 @@ -588,14 +588,12 @@ declare ptr @heap_alloc(i64) local_unnamed_addr declare i64 @get_current_shot() local_unnamed_addr -declare void @random_seed(i64) local_unnamed_addr - ; Function Attrs: noreturn declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -609,6 +607,8 @@ declare void @print_bool(ptr, i64, i1) local_unnamed_addr declare void @print_int(ptr, i64, i64) local_unnamed_addr +declare void @random_seed(i64) local_unnamed_addr + declare i32 @random_int() local_unnamed_addr declare double @random_float() local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[legacy]/determinism_repetition-helios-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[legacy]/determinism_repetition-helios-aarch64-apple-darwin.ll index 0ecde1d0..cec0fb6c 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[legacy]/determinism_repetition-helios-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[legacy]/determinism_repetition-helios-aarch64-apple-darwin.ll @@ -22,8 +22,7 @@ cond_104_case_1: %1 = tail call ptr @heap_alloc(i64 8) store i64 -1, ptr %1, align 1 %shot = tail call i64 @get_current_shot() - tail call void @random_seed(i64 %shot) - %shot2 = tail call i64 @get_current_shot() + %shot1 = tail call i64 @get_current_shot() %2 = tail call ptr @heap_alloc(i64 40) %3 = tail call ptr @heap_alloc(i64 8) store i64 -1, ptr %3, align 1 @@ -231,7 +230,7 @@ panic.i1123: ; preds = %__barray_check_boun tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -loop_out318: ; preds = %cond_exit_298.4 +loop_out317: ; preds = %cond_exit_298.4 tail call void @heap_free(ptr nonnull %2) tail call void @heap_free(ptr nonnull %3) %63 = load i64, ptr %1, align 4 @@ -250,7 +249,7 @@ panic.i1127: ; preds = %__barray_check_boun %65 = or disjoint i64 %61, 1 store i64 %65, ptr %3, align 4 %66 = load i64, ptr %2, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %66) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %66) tail call void @___qfree(i64 %66) %67 = load i64, ptr %1, align 4 %68 = trunc i64 %67 to i1 @@ -259,7 +258,7 @@ panic.i1127: ; preds = %__barray_check_boun cond_exit_298: ; preds = %.thread %69 = and i64 %67, -2 store i64 %69, ptr %1, align 4 - store i64 %lazy_measure, ptr %0, align 4 + store i64 %___lazy_measure, ptr %0, align 4 %70 = load i64, ptr %3, align 4 %71 = and i64 %70, 2 %.not1190 = icmp eq i64 %71, 0 @@ -269,7 +268,7 @@ cond_exit_298: ; preds = %.thread %72 = or disjoint i64 %70, 2 store i64 %72, ptr %3, align 4 %73 = load i64, ptr %32, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %73) + %___lazy_measure.1 = tail call i64 @___lazy_measure(i64 %73) tail call void @___qfree(i64 %73) %74 = load i64, ptr %1, align 4 %75 = and i64 %74, 2 @@ -280,7 +279,7 @@ cond_exit_298.1: ; preds = %.thread.1 %76 = and i64 %74, -3 store i64 %76, ptr %1, align 4 %77 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %lazy_measure.1, ptr %77, align 4 + store i64 %___lazy_measure.1, ptr %77, align 4 %78 = load i64, ptr %3, align 4 %79 = and i64 %78, 4 %.not1192 = icmp eq i64 %79, 0 @@ -290,7 +289,7 @@ cond_exit_298.1: ; preds = %.thread.1 %80 = or disjoint i64 %78, 4 store i64 %80, ptr %3, align 4 %81 = load i64, ptr %40, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %81) + %___lazy_measure.2 = tail call i64 @___lazy_measure(i64 %81) tail call void @___qfree(i64 %81) %82 = load i64, ptr %1, align 4 %83 = and i64 %82, 4 @@ -301,7 +300,7 @@ cond_exit_298.2: ; preds = %.thread.2 %84 = and i64 %82, -5 store i64 %84, ptr %1, align 4 %85 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %lazy_measure.2, ptr %85, align 4 + store i64 %___lazy_measure.2, ptr %85, align 4 %86 = load i64, ptr %3, align 4 %87 = and i64 %86, 8 %.not1194 = icmp eq i64 %87, 0 @@ -311,7 +310,7 @@ cond_exit_298.2: ; preds = %.thread.2 %88 = or disjoint i64 %86, 8 store i64 %88, ptr %3, align 4 %89 = load i64, ptr %48, align 4 - %lazy_measure.3 = tail call i64 @___lazy_measure(i64 %89) + %___lazy_measure.3 = tail call i64 @___lazy_measure(i64 %89) tail call void @___qfree(i64 %89) %90 = load i64, ptr %1, align 4 %91 = and i64 %90, 8 @@ -322,7 +321,7 @@ __barray_check_bounds.exit1126.4: ; preds = %.thread.3 %92 = and i64 %90, -9 store i64 %92, ptr %1, align 4 %93 = getelementptr inbounds nuw i8, ptr %0, i64 24 - store i64 %lazy_measure.3, ptr %93, align 4 + store i64 %___lazy_measure.3, ptr %93, align 4 %94 = load i64, ptr %3, align 4 %95 = and i64 %94, 16 %.not1196 = icmp eq i64 %95, 0 @@ -332,7 +331,7 @@ __barray_check_bounds.exit1122.4: ; preds = %__barray_check_boun %96 = or disjoint i64 %94, 16 store i64 %96, ptr %3, align 4 %97 = load i64, ptr %56, align 4 - %lazy_measure.4 = tail call i64 @___lazy_measure(i64 %97) + %___lazy_measure.4 = tail call i64 @___lazy_measure(i64 %97) tail call void @___qfree(i64 %97) %98 = load i64, ptr %1, align 4 %99 = and i64 %98, 16 @@ -343,18 +342,18 @@ cond_exit_298.4: ; preds = %__barray_check_boun %100 = and i64 %98, -17 store i64 %100, ptr %1, align 4 %101 = getelementptr inbounds nuw i8, ptr %0, i64 32 - store i64 %lazy_measure.4, ptr %101, align 4 + store i64 %___lazy_measure.4, ptr %101, align 4 %102 = load i64, ptr %3, align 4 %103 = or i64 %102, -32 store i64 %103, ptr %3, align 4 %104 = icmp eq i64 %103, -1 - br i1 %104, label %loop_out318, label %mask_block_err.i + br i1 %104, label %loop_out317, label %mask_block_err.i -panic.i1129: ; preds = %loop_out318 +panic.i1129: ; preds = %loop_out317 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_mask_borrow.exit1130: ; preds = %loop_out318 +__barray_mask_borrow.exit1130: ; preds = %loop_out317 %105 = or disjoint i64 %63, 1 store i64 %105, ptr %1, align 4 %106 = load i64, ptr %0, align 4 @@ -555,27 +554,28 @@ cond_exit_558.4: ; preds = %__barray_mask_borro %163 = or i64 %162, -32 store i64 %163, ptr %1, align 4 %164 = icmp eq i64 %163, -1 - br i1 %164, label %loop_out620, label %mask_block_err.i1152 + br i1 %164, label %loop_out619, label %mask_block_err.i1152 -loop_out620: ; preds = %cond_exit_558.4 +loop_out619: ; preds = %cond_exit_558.4 tail call void @heap_free(ptr nonnull %0) tail call void @heap_free(ptr nonnull %1) %read_bool = tail call i1 @___read_future_bool(i64 %106) tail call void @___dec_future_refcount(i64 %106) tail call void @print_bool(ptr nonnull @res_a.A4A74DAF.0, i64 11, i1 %read_bool) - %read_bool690 = tail call i1 @___read_future_bool(i64 %113) + %read_bool689 = tail call i1 @___read_future_bool(i64 %113) tail call void @___dec_future_refcount(i64 %113) - tail call void @print_bool(ptr nonnull @res_b.3BD50C23.0, i64 11, i1 %read_bool690) - %read_bool705 = tail call i1 @___read_future_bool(i64 %120) + tail call void @print_bool(ptr nonnull @res_b.3BD50C23.0, i64 11, i1 %read_bool689) + %read_bool704 = tail call i1 @___read_future_bool(i64 %120) tail call void @___dec_future_refcount(i64 %120) - tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool705) - %read_bool720 = tail call i1 @___read_future_bool(i64 %127) + tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool704) + %read_bool719 = tail call i1 @___read_future_bool(i64 %127) tail call void @___dec_future_refcount(i64 %127) - tail call void @print_bool(ptr nonnull @res_d.00B84DC7.0, i64 11, i1 %read_bool720) - %read_bool735 = tail call i1 @___read_future_bool(i64 %134) + tail call void @print_bool(ptr nonnull @res_d.00B84DC7.0, i64 11, i1 %read_bool719) + %read_bool734 = tail call i1 @___read_future_bool(i64 %134) tail call void @___dec_future_refcount(i64 %134) - tail call void @print_bool(ptr nonnull @res_e.B9A29CAF.0, i64 11, i1 %read_bool735) - tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot2) + tail call void @print_bool(ptr nonnull @res_e.B9A29CAF.0, i64 11, i1 %read_bool734) + tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot1) + tail call void @random_seed(i64 %shot) %rint = tail call i32 @random_int() %rfloat = tail call double @random_float() %165 = sext i32 %rint to i64 @@ -588,8 +588,6 @@ declare ptr @heap_alloc(i64) local_unnamed_addr declare i64 @get_current_shot() local_unnamed_addr -declare void @random_seed(i64) local_unnamed_addr - ; Function Attrs: noreturn declare void @panic(i32, ptr) local_unnamed_addr #0 @@ -609,6 +607,8 @@ declare void @print_bool(ptr, i64, i1) local_unnamed_addr declare void @print_int(ptr, i64, i64) local_unnamed_addr +declare void @random_seed(i64) local_unnamed_addr + declare i32 @random_int() local_unnamed_addr declare double @random_float() local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[legacy]/determinism_repetition-helios-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[legacy]/determinism_repetition-helios-aarch64-unknown-linux-gnu.ll index eac072dc..4f74fb6c 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[legacy]/determinism_repetition-helios-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[legacy]/determinism_repetition-helios-aarch64-unknown-linux-gnu.ll @@ -22,8 +22,7 @@ cond_104_case_1: %1 = tail call ptr @heap_alloc(i64 8) store i64 -1, ptr %1, align 1 %shot = tail call i64 @get_current_shot() - tail call void @random_seed(i64 %shot) - %shot2 = tail call i64 @get_current_shot() + %shot1 = tail call i64 @get_current_shot() %2 = tail call ptr @heap_alloc(i64 40) %3 = tail call ptr @heap_alloc(i64 8) store i64 -1, ptr %3, align 1 @@ -231,7 +230,7 @@ panic.i1123: ; preds = %__barray_check_boun tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -loop_out318: ; preds = %cond_exit_298.4 +loop_out317: ; preds = %cond_exit_298.4 tail call void @heap_free(ptr nonnull %2) tail call void @heap_free(ptr nonnull %3) %63 = load i64, ptr %1, align 4 @@ -250,7 +249,7 @@ panic.i1127: ; preds = %__barray_check_boun %65 = or disjoint i64 %61, 1 store i64 %65, ptr %3, align 4 %66 = load i64, ptr %2, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %66) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %66) tail call void @___qfree(i64 %66) %67 = load i64, ptr %1, align 4 %68 = trunc i64 %67 to i1 @@ -259,7 +258,7 @@ panic.i1127: ; preds = %__barray_check_boun cond_exit_298: ; preds = %.thread %69 = and i64 %67, -2 store i64 %69, ptr %1, align 4 - store i64 %lazy_measure, ptr %0, align 4 + store i64 %___lazy_measure, ptr %0, align 4 %70 = load i64, ptr %3, align 4 %71 = and i64 %70, 2 %.not1190 = icmp eq i64 %71, 0 @@ -269,7 +268,7 @@ cond_exit_298: ; preds = %.thread %72 = or disjoint i64 %70, 2 store i64 %72, ptr %3, align 4 %73 = load i64, ptr %32, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %73) + %___lazy_measure.1 = tail call i64 @___lazy_measure(i64 %73) tail call void @___qfree(i64 %73) %74 = load i64, ptr %1, align 4 %75 = and i64 %74, 2 @@ -280,7 +279,7 @@ cond_exit_298.1: ; preds = %.thread.1 %76 = and i64 %74, -3 store i64 %76, ptr %1, align 4 %77 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %lazy_measure.1, ptr %77, align 4 + store i64 %___lazy_measure.1, ptr %77, align 4 %78 = load i64, ptr %3, align 4 %79 = and i64 %78, 4 %.not1192 = icmp eq i64 %79, 0 @@ -290,7 +289,7 @@ cond_exit_298.1: ; preds = %.thread.1 %80 = or disjoint i64 %78, 4 store i64 %80, ptr %3, align 4 %81 = load i64, ptr %40, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %81) + %___lazy_measure.2 = tail call i64 @___lazy_measure(i64 %81) tail call void @___qfree(i64 %81) %82 = load i64, ptr %1, align 4 %83 = and i64 %82, 4 @@ -301,7 +300,7 @@ cond_exit_298.2: ; preds = %.thread.2 %84 = and i64 %82, -5 store i64 %84, ptr %1, align 4 %85 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %lazy_measure.2, ptr %85, align 4 + store i64 %___lazy_measure.2, ptr %85, align 4 %86 = load i64, ptr %3, align 4 %87 = and i64 %86, 8 %.not1194 = icmp eq i64 %87, 0 @@ -311,7 +310,7 @@ cond_exit_298.2: ; preds = %.thread.2 %88 = or disjoint i64 %86, 8 store i64 %88, ptr %3, align 4 %89 = load i64, ptr %48, align 4 - %lazy_measure.3 = tail call i64 @___lazy_measure(i64 %89) + %___lazy_measure.3 = tail call i64 @___lazy_measure(i64 %89) tail call void @___qfree(i64 %89) %90 = load i64, ptr %1, align 4 %91 = and i64 %90, 8 @@ -322,7 +321,7 @@ __barray_check_bounds.exit1126.4: ; preds = %.thread.3 %92 = and i64 %90, -9 store i64 %92, ptr %1, align 4 %93 = getelementptr inbounds nuw i8, ptr %0, i64 24 - store i64 %lazy_measure.3, ptr %93, align 4 + store i64 %___lazy_measure.3, ptr %93, align 4 %94 = load i64, ptr %3, align 4 %95 = and i64 %94, 16 %.not1196 = icmp eq i64 %95, 0 @@ -332,7 +331,7 @@ __barray_check_bounds.exit1122.4: ; preds = %__barray_check_boun %96 = or disjoint i64 %94, 16 store i64 %96, ptr %3, align 4 %97 = load i64, ptr %56, align 4 - %lazy_measure.4 = tail call i64 @___lazy_measure(i64 %97) + %___lazy_measure.4 = tail call i64 @___lazy_measure(i64 %97) tail call void @___qfree(i64 %97) %98 = load i64, ptr %1, align 4 %99 = and i64 %98, 16 @@ -343,18 +342,18 @@ cond_exit_298.4: ; preds = %__barray_check_boun %100 = and i64 %98, -17 store i64 %100, ptr %1, align 4 %101 = getelementptr inbounds nuw i8, ptr %0, i64 32 - store i64 %lazy_measure.4, ptr %101, align 4 + store i64 %___lazy_measure.4, ptr %101, align 4 %102 = load i64, ptr %3, align 4 %103 = or i64 %102, -32 store i64 %103, ptr %3, align 4 %104 = icmp eq i64 %103, -1 - br i1 %104, label %loop_out318, label %mask_block_err.i + br i1 %104, label %loop_out317, label %mask_block_err.i -panic.i1129: ; preds = %loop_out318 +panic.i1129: ; preds = %loop_out317 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_mask_borrow.exit1130: ; preds = %loop_out318 +__barray_mask_borrow.exit1130: ; preds = %loop_out317 %105 = or disjoint i64 %63, 1 store i64 %105, ptr %1, align 4 %106 = load i64, ptr %0, align 4 @@ -555,27 +554,28 @@ cond_exit_558.4: ; preds = %__barray_mask_borro %163 = or i64 %162, -32 store i64 %163, ptr %1, align 4 %164 = icmp eq i64 %163, -1 - br i1 %164, label %loop_out620, label %mask_block_err.i1152 + br i1 %164, label %loop_out619, label %mask_block_err.i1152 -loop_out620: ; preds = %cond_exit_558.4 +loop_out619: ; preds = %cond_exit_558.4 tail call void @heap_free(ptr nonnull %0) tail call void @heap_free(ptr nonnull %1) %read_bool = tail call i1 @___read_future_bool(i64 %106) tail call void @___dec_future_refcount(i64 %106) tail call void @print_bool(ptr nonnull @res_a.A4A74DAF.0, i64 11, i1 %read_bool) - %read_bool690 = tail call i1 @___read_future_bool(i64 %113) + %read_bool689 = tail call i1 @___read_future_bool(i64 %113) tail call void @___dec_future_refcount(i64 %113) - tail call void @print_bool(ptr nonnull @res_b.3BD50C23.0, i64 11, i1 %read_bool690) - %read_bool705 = tail call i1 @___read_future_bool(i64 %120) + tail call void @print_bool(ptr nonnull @res_b.3BD50C23.0, i64 11, i1 %read_bool689) + %read_bool704 = tail call i1 @___read_future_bool(i64 %120) tail call void @___dec_future_refcount(i64 %120) - tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool705) - %read_bool720 = tail call i1 @___read_future_bool(i64 %127) + tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool704) + %read_bool719 = tail call i1 @___read_future_bool(i64 %127) tail call void @___dec_future_refcount(i64 %127) - tail call void @print_bool(ptr nonnull @res_d.00B84DC7.0, i64 11, i1 %read_bool720) - %read_bool735 = tail call i1 @___read_future_bool(i64 %134) + tail call void @print_bool(ptr nonnull @res_d.00B84DC7.0, i64 11, i1 %read_bool719) + %read_bool734 = tail call i1 @___read_future_bool(i64 %134) tail call void @___dec_future_refcount(i64 %134) - tail call void @print_bool(ptr nonnull @res_e.B9A29CAF.0, i64 11, i1 %read_bool735) - tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot2) + tail call void @print_bool(ptr nonnull @res_e.B9A29CAF.0, i64 11, i1 %read_bool734) + tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot1) + tail call void @random_seed(i64 %shot) %rint = tail call i32 @random_int() %rfloat = tail call double @random_float() %165 = sext i32 %rint to i64 @@ -588,8 +588,6 @@ declare ptr @heap_alloc(i64) local_unnamed_addr declare i64 @get_current_shot() local_unnamed_addr -declare void @random_seed(i64) local_unnamed_addr - ; Function Attrs: noreturn declare void @panic(i32, ptr) local_unnamed_addr #0 @@ -609,6 +607,8 @@ declare void @print_bool(ptr, i64, i1) local_unnamed_addr declare void @print_int(ptr, i64, i64) local_unnamed_addr +declare void @random_seed(i64) local_unnamed_addr + declare i32 @random_int() local_unnamed_addr declare double @random_float() local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[legacy]/determinism_repetition-helios-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[legacy]/determinism_repetition-helios-x86_64-apple-darwin.ll index a7b5f348..8dfcd9e6 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[legacy]/determinism_repetition-helios-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[legacy]/determinism_repetition-helios-x86_64-apple-darwin.ll @@ -22,8 +22,7 @@ cond_104_case_1: %1 = tail call ptr @heap_alloc(i64 8) store i64 -1, ptr %1, align 1 %shot = tail call i64 @get_current_shot() - tail call void @random_seed(i64 %shot) - %shot2 = tail call i64 @get_current_shot() + %shot1 = tail call i64 @get_current_shot() %2 = tail call ptr @heap_alloc(i64 40) %3 = tail call ptr @heap_alloc(i64 8) store i64 -1, ptr %3, align 1 @@ -231,7 +230,7 @@ panic.i1123: ; preds = %__barray_check_boun tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -loop_out318: ; preds = %cond_exit_298.4 +loop_out317: ; preds = %cond_exit_298.4 tail call void @heap_free(ptr nonnull %2) tail call void @heap_free(ptr nonnull %3) %63 = load i64, ptr %1, align 4 @@ -250,7 +249,7 @@ panic.i1127: ; preds = %__barray_check_boun %65 = or disjoint i64 %61, 1 store i64 %65, ptr %3, align 4 %66 = load i64, ptr %2, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %66) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %66) tail call void @___qfree(i64 %66) %67 = load i64, ptr %1, align 4 %68 = trunc i64 %67 to i1 @@ -259,7 +258,7 @@ panic.i1127: ; preds = %__barray_check_boun cond_exit_298: ; preds = %.thread %69 = and i64 %67, -2 store i64 %69, ptr %1, align 4 - store i64 %lazy_measure, ptr %0, align 4 + store i64 %___lazy_measure, ptr %0, align 4 %70 = load i64, ptr %3, align 4 %71 = and i64 %70, 2 %.not1190 = icmp eq i64 %71, 0 @@ -269,7 +268,7 @@ cond_exit_298: ; preds = %.thread %72 = or disjoint i64 %70, 2 store i64 %72, ptr %3, align 4 %73 = load i64, ptr %32, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %73) + %___lazy_measure.1 = tail call i64 @___lazy_measure(i64 %73) tail call void @___qfree(i64 %73) %74 = load i64, ptr %1, align 4 %75 = and i64 %74, 2 @@ -280,7 +279,7 @@ cond_exit_298.1: ; preds = %.thread.1 %76 = and i64 %74, -3 store i64 %76, ptr %1, align 4 %77 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %lazy_measure.1, ptr %77, align 4 + store i64 %___lazy_measure.1, ptr %77, align 4 %78 = load i64, ptr %3, align 4 %79 = and i64 %78, 4 %.not1192 = icmp eq i64 %79, 0 @@ -290,7 +289,7 @@ cond_exit_298.1: ; preds = %.thread.1 %80 = or disjoint i64 %78, 4 store i64 %80, ptr %3, align 4 %81 = load i64, ptr %40, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %81) + %___lazy_measure.2 = tail call i64 @___lazy_measure(i64 %81) tail call void @___qfree(i64 %81) %82 = load i64, ptr %1, align 4 %83 = and i64 %82, 4 @@ -301,7 +300,7 @@ cond_exit_298.2: ; preds = %.thread.2 %84 = and i64 %82, -5 store i64 %84, ptr %1, align 4 %85 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %lazy_measure.2, ptr %85, align 4 + store i64 %___lazy_measure.2, ptr %85, align 4 %86 = load i64, ptr %3, align 4 %87 = and i64 %86, 8 %.not1194 = icmp eq i64 %87, 0 @@ -311,7 +310,7 @@ cond_exit_298.2: ; preds = %.thread.2 %88 = or disjoint i64 %86, 8 store i64 %88, ptr %3, align 4 %89 = load i64, ptr %48, align 4 - %lazy_measure.3 = tail call i64 @___lazy_measure(i64 %89) + %___lazy_measure.3 = tail call i64 @___lazy_measure(i64 %89) tail call void @___qfree(i64 %89) %90 = load i64, ptr %1, align 4 %91 = and i64 %90, 8 @@ -322,7 +321,7 @@ __barray_check_bounds.exit1126.4: ; preds = %.thread.3 %92 = and i64 %90, -9 store i64 %92, ptr %1, align 4 %93 = getelementptr inbounds nuw i8, ptr %0, i64 24 - store i64 %lazy_measure.3, ptr %93, align 4 + store i64 %___lazy_measure.3, ptr %93, align 4 %94 = load i64, ptr %3, align 4 %95 = and i64 %94, 16 %.not1196 = icmp eq i64 %95, 0 @@ -332,7 +331,7 @@ __barray_check_bounds.exit1122.4: ; preds = %__barray_check_boun %96 = or disjoint i64 %94, 16 store i64 %96, ptr %3, align 4 %97 = load i64, ptr %56, align 4 - %lazy_measure.4 = tail call i64 @___lazy_measure(i64 %97) + %___lazy_measure.4 = tail call i64 @___lazy_measure(i64 %97) tail call void @___qfree(i64 %97) %98 = load i64, ptr %1, align 4 %99 = and i64 %98, 16 @@ -343,18 +342,18 @@ cond_exit_298.4: ; preds = %__barray_check_boun %100 = and i64 %98, -17 store i64 %100, ptr %1, align 4 %101 = getelementptr inbounds nuw i8, ptr %0, i64 32 - store i64 %lazy_measure.4, ptr %101, align 4 + store i64 %___lazy_measure.4, ptr %101, align 4 %102 = load i64, ptr %3, align 4 %103 = or i64 %102, -32 store i64 %103, ptr %3, align 4 %104 = icmp eq i64 %103, -1 - br i1 %104, label %loop_out318, label %mask_block_err.i + br i1 %104, label %loop_out317, label %mask_block_err.i -panic.i1129: ; preds = %loop_out318 +panic.i1129: ; preds = %loop_out317 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_mask_borrow.exit1130: ; preds = %loop_out318 +__barray_mask_borrow.exit1130: ; preds = %loop_out317 %105 = or disjoint i64 %63, 1 store i64 %105, ptr %1, align 4 %106 = load i64, ptr %0, align 4 @@ -555,27 +554,28 @@ cond_exit_558.4: ; preds = %__barray_mask_borro %163 = or i64 %162, -32 store i64 %163, ptr %1, align 4 %164 = icmp eq i64 %163, -1 - br i1 %164, label %loop_out620, label %mask_block_err.i1152 + br i1 %164, label %loop_out619, label %mask_block_err.i1152 -loop_out620: ; preds = %cond_exit_558.4 +loop_out619: ; preds = %cond_exit_558.4 tail call void @heap_free(ptr nonnull %0) tail call void @heap_free(ptr nonnull %1) %read_bool = tail call i1 @___read_future_bool(i64 %106) tail call void @___dec_future_refcount(i64 %106) tail call void @print_bool(ptr nonnull @res_a.A4A74DAF.0, i64 11, i1 %read_bool) - %read_bool690 = tail call i1 @___read_future_bool(i64 %113) + %read_bool689 = tail call i1 @___read_future_bool(i64 %113) tail call void @___dec_future_refcount(i64 %113) - tail call void @print_bool(ptr nonnull @res_b.3BD50C23.0, i64 11, i1 %read_bool690) - %read_bool705 = tail call i1 @___read_future_bool(i64 %120) + tail call void @print_bool(ptr nonnull @res_b.3BD50C23.0, i64 11, i1 %read_bool689) + %read_bool704 = tail call i1 @___read_future_bool(i64 %120) tail call void @___dec_future_refcount(i64 %120) - tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool705) - %read_bool720 = tail call i1 @___read_future_bool(i64 %127) + tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool704) + %read_bool719 = tail call i1 @___read_future_bool(i64 %127) tail call void @___dec_future_refcount(i64 %127) - tail call void @print_bool(ptr nonnull @res_d.00B84DC7.0, i64 11, i1 %read_bool720) - %read_bool735 = tail call i1 @___read_future_bool(i64 %134) + tail call void @print_bool(ptr nonnull @res_d.00B84DC7.0, i64 11, i1 %read_bool719) + %read_bool734 = tail call i1 @___read_future_bool(i64 %134) tail call void @___dec_future_refcount(i64 %134) - tail call void @print_bool(ptr nonnull @res_e.B9A29CAF.0, i64 11, i1 %read_bool735) - tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot2) + tail call void @print_bool(ptr nonnull @res_e.B9A29CAF.0, i64 11, i1 %read_bool734) + tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot1) + tail call void @random_seed(i64 %shot) %rint = tail call i32 @random_int() %rfloat = tail call double @random_float() %165 = sext i32 %rint to i64 @@ -588,8 +588,6 @@ declare ptr @heap_alloc(i64) local_unnamed_addr declare i64 @get_current_shot() local_unnamed_addr -declare void @random_seed(i64) local_unnamed_addr - ; Function Attrs: noreturn declare void @panic(i32, ptr) local_unnamed_addr #0 @@ -609,6 +607,8 @@ declare void @print_bool(ptr, i64, i1) local_unnamed_addr declare void @print_int(ptr, i64, i64) local_unnamed_addr +declare void @random_seed(i64) local_unnamed_addr + declare i32 @random_int() local_unnamed_addr declare double @random_float() local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[legacy]/determinism_repetition-helios-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[legacy]/determinism_repetition-helios-x86_64-unknown-linux-gnu.ll index 2b6935e1..1517df12 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[legacy]/determinism_repetition-helios-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[legacy]/determinism_repetition-helios-x86_64-unknown-linux-gnu.ll @@ -22,8 +22,7 @@ cond_104_case_1: %1 = tail call ptr @heap_alloc(i64 8) store i64 -1, ptr %1, align 1 %shot = tail call i64 @get_current_shot() - tail call void @random_seed(i64 %shot) - %shot2 = tail call i64 @get_current_shot() + %shot1 = tail call i64 @get_current_shot() %2 = tail call ptr @heap_alloc(i64 40) %3 = tail call ptr @heap_alloc(i64 8) store i64 -1, ptr %3, align 1 @@ -231,7 +230,7 @@ panic.i1123: ; preds = %__barray_check_boun tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -loop_out318: ; preds = %cond_exit_298.4 +loop_out317: ; preds = %cond_exit_298.4 tail call void @heap_free(ptr nonnull %2) tail call void @heap_free(ptr nonnull %3) %63 = load i64, ptr %1, align 4 @@ -250,7 +249,7 @@ panic.i1127: ; preds = %__barray_check_boun %65 = or disjoint i64 %61, 1 store i64 %65, ptr %3, align 4 %66 = load i64, ptr %2, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %66) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %66) tail call void @___qfree(i64 %66) %67 = load i64, ptr %1, align 4 %68 = trunc i64 %67 to i1 @@ -259,7 +258,7 @@ panic.i1127: ; preds = %__barray_check_boun cond_exit_298: ; preds = %.thread %69 = and i64 %67, -2 store i64 %69, ptr %1, align 4 - store i64 %lazy_measure, ptr %0, align 4 + store i64 %___lazy_measure, ptr %0, align 4 %70 = load i64, ptr %3, align 4 %71 = and i64 %70, 2 %.not1190 = icmp eq i64 %71, 0 @@ -269,7 +268,7 @@ cond_exit_298: ; preds = %.thread %72 = or disjoint i64 %70, 2 store i64 %72, ptr %3, align 4 %73 = load i64, ptr %32, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %73) + %___lazy_measure.1 = tail call i64 @___lazy_measure(i64 %73) tail call void @___qfree(i64 %73) %74 = load i64, ptr %1, align 4 %75 = and i64 %74, 2 @@ -280,7 +279,7 @@ cond_exit_298.1: ; preds = %.thread.1 %76 = and i64 %74, -3 store i64 %76, ptr %1, align 4 %77 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %lazy_measure.1, ptr %77, align 4 + store i64 %___lazy_measure.1, ptr %77, align 4 %78 = load i64, ptr %3, align 4 %79 = and i64 %78, 4 %.not1192 = icmp eq i64 %79, 0 @@ -290,7 +289,7 @@ cond_exit_298.1: ; preds = %.thread.1 %80 = or disjoint i64 %78, 4 store i64 %80, ptr %3, align 4 %81 = load i64, ptr %40, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %81) + %___lazy_measure.2 = tail call i64 @___lazy_measure(i64 %81) tail call void @___qfree(i64 %81) %82 = load i64, ptr %1, align 4 %83 = and i64 %82, 4 @@ -301,7 +300,7 @@ cond_exit_298.2: ; preds = %.thread.2 %84 = and i64 %82, -5 store i64 %84, ptr %1, align 4 %85 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %lazy_measure.2, ptr %85, align 4 + store i64 %___lazy_measure.2, ptr %85, align 4 %86 = load i64, ptr %3, align 4 %87 = and i64 %86, 8 %.not1194 = icmp eq i64 %87, 0 @@ -311,7 +310,7 @@ cond_exit_298.2: ; preds = %.thread.2 %88 = or disjoint i64 %86, 8 store i64 %88, ptr %3, align 4 %89 = load i64, ptr %48, align 4 - %lazy_measure.3 = tail call i64 @___lazy_measure(i64 %89) + %___lazy_measure.3 = tail call i64 @___lazy_measure(i64 %89) tail call void @___qfree(i64 %89) %90 = load i64, ptr %1, align 4 %91 = and i64 %90, 8 @@ -322,7 +321,7 @@ __barray_check_bounds.exit1126.4: ; preds = %.thread.3 %92 = and i64 %90, -9 store i64 %92, ptr %1, align 4 %93 = getelementptr inbounds nuw i8, ptr %0, i64 24 - store i64 %lazy_measure.3, ptr %93, align 4 + store i64 %___lazy_measure.3, ptr %93, align 4 %94 = load i64, ptr %3, align 4 %95 = and i64 %94, 16 %.not1196 = icmp eq i64 %95, 0 @@ -332,7 +331,7 @@ __barray_check_bounds.exit1122.4: ; preds = %__barray_check_boun %96 = or disjoint i64 %94, 16 store i64 %96, ptr %3, align 4 %97 = load i64, ptr %56, align 4 - %lazy_measure.4 = tail call i64 @___lazy_measure(i64 %97) + %___lazy_measure.4 = tail call i64 @___lazy_measure(i64 %97) tail call void @___qfree(i64 %97) %98 = load i64, ptr %1, align 4 %99 = and i64 %98, 16 @@ -343,18 +342,18 @@ cond_exit_298.4: ; preds = %__barray_check_boun %100 = and i64 %98, -17 store i64 %100, ptr %1, align 4 %101 = getelementptr inbounds nuw i8, ptr %0, i64 32 - store i64 %lazy_measure.4, ptr %101, align 4 + store i64 %___lazy_measure.4, ptr %101, align 4 %102 = load i64, ptr %3, align 4 %103 = or i64 %102, -32 store i64 %103, ptr %3, align 4 %104 = icmp eq i64 %103, -1 - br i1 %104, label %loop_out318, label %mask_block_err.i + br i1 %104, label %loop_out317, label %mask_block_err.i -panic.i1129: ; preds = %loop_out318 +panic.i1129: ; preds = %loop_out317 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_mask_borrow.exit1130: ; preds = %loop_out318 +__barray_mask_borrow.exit1130: ; preds = %loop_out317 %105 = or disjoint i64 %63, 1 store i64 %105, ptr %1, align 4 %106 = load i64, ptr %0, align 4 @@ -555,27 +554,28 @@ cond_exit_558.4: ; preds = %__barray_mask_borro %163 = or i64 %162, -32 store i64 %163, ptr %1, align 4 %164 = icmp eq i64 %163, -1 - br i1 %164, label %loop_out620, label %mask_block_err.i1152 + br i1 %164, label %loop_out619, label %mask_block_err.i1152 -loop_out620: ; preds = %cond_exit_558.4 +loop_out619: ; preds = %cond_exit_558.4 tail call void @heap_free(ptr nonnull %0) tail call void @heap_free(ptr nonnull %1) %read_bool = tail call i1 @___read_future_bool(i64 %106) tail call void @___dec_future_refcount(i64 %106) tail call void @print_bool(ptr nonnull @res_a.A4A74DAF.0, i64 11, i1 %read_bool) - %read_bool690 = tail call i1 @___read_future_bool(i64 %113) + %read_bool689 = tail call i1 @___read_future_bool(i64 %113) tail call void @___dec_future_refcount(i64 %113) - tail call void @print_bool(ptr nonnull @res_b.3BD50C23.0, i64 11, i1 %read_bool690) - %read_bool705 = tail call i1 @___read_future_bool(i64 %120) + tail call void @print_bool(ptr nonnull @res_b.3BD50C23.0, i64 11, i1 %read_bool689) + %read_bool704 = tail call i1 @___read_future_bool(i64 %120) tail call void @___dec_future_refcount(i64 %120) - tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool705) - %read_bool720 = tail call i1 @___read_future_bool(i64 %127) + tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool704) + %read_bool719 = tail call i1 @___read_future_bool(i64 %127) tail call void @___dec_future_refcount(i64 %127) - tail call void @print_bool(ptr nonnull @res_d.00B84DC7.0, i64 11, i1 %read_bool720) - %read_bool735 = tail call i1 @___read_future_bool(i64 %134) + tail call void @print_bool(ptr nonnull @res_d.00B84DC7.0, i64 11, i1 %read_bool719) + %read_bool734 = tail call i1 @___read_future_bool(i64 %134) tail call void @___dec_future_refcount(i64 %134) - tail call void @print_bool(ptr nonnull @res_e.B9A29CAF.0, i64 11, i1 %read_bool735) - tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot2) + tail call void @print_bool(ptr nonnull @res_e.B9A29CAF.0, i64 11, i1 %read_bool734) + tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot1) + tail call void @random_seed(i64 %shot) %rint = tail call i32 @random_int() %rfloat = tail call double @random_float() %165 = sext i32 %rint to i64 @@ -588,8 +588,6 @@ declare ptr @heap_alloc(i64) local_unnamed_addr declare i64 @get_current_shot() local_unnamed_addr -declare void @random_seed(i64) local_unnamed_addr - ; Function Attrs: noreturn declare void @panic(i32, ptr) local_unnamed_addr #0 @@ -609,6 +607,8 @@ declare void @print_bool(ptr, i64, i1) local_unnamed_addr declare void @print_int(ptr, i64, i64) local_unnamed_addr +declare void @random_seed(i64) local_unnamed_addr + declare i32 @random_int() local_unnamed_addr declare double @random_float() local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[legacy]/determinism_repetition-helios-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[legacy]/determinism_repetition-helios-x86_64-windows-gnu.ll index b021aa27..7477796b 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[legacy]/determinism_repetition-helios-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[legacy]/determinism_repetition-helios-x86_64-windows-gnu.ll @@ -22,8 +22,7 @@ cond_104_case_1: %1 = tail call ptr @heap_alloc(i64 8) store i64 -1, ptr %1, align 1 %shot = tail call i64 @get_current_shot() - tail call void @random_seed(i64 %shot) - %shot2 = tail call i64 @get_current_shot() + %shot1 = tail call i64 @get_current_shot() %2 = tail call ptr @heap_alloc(i64 40) %3 = tail call ptr @heap_alloc(i64 8) store i64 -1, ptr %3, align 1 @@ -231,7 +230,7 @@ panic.i1123: ; preds = %__barray_check_boun tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -loop_out318: ; preds = %cond_exit_298.4 +loop_out317: ; preds = %cond_exit_298.4 tail call void @heap_free(ptr nonnull %2) tail call void @heap_free(ptr nonnull %3) %63 = load i64, ptr %1, align 4 @@ -250,7 +249,7 @@ panic.i1127: ; preds = %__barray_check_boun %65 = or disjoint i64 %61, 1 store i64 %65, ptr %3, align 4 %66 = load i64, ptr %2, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %66) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %66) tail call void @___qfree(i64 %66) %67 = load i64, ptr %1, align 4 %68 = trunc i64 %67 to i1 @@ -259,7 +258,7 @@ panic.i1127: ; preds = %__barray_check_boun cond_exit_298: ; preds = %.thread %69 = and i64 %67, -2 store i64 %69, ptr %1, align 4 - store i64 %lazy_measure, ptr %0, align 4 + store i64 %___lazy_measure, ptr %0, align 4 %70 = load i64, ptr %3, align 4 %71 = and i64 %70, 2 %.not1190 = icmp eq i64 %71, 0 @@ -269,7 +268,7 @@ cond_exit_298: ; preds = %.thread %72 = or disjoint i64 %70, 2 store i64 %72, ptr %3, align 4 %73 = load i64, ptr %32, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %73) + %___lazy_measure.1 = tail call i64 @___lazy_measure(i64 %73) tail call void @___qfree(i64 %73) %74 = load i64, ptr %1, align 4 %75 = and i64 %74, 2 @@ -280,7 +279,7 @@ cond_exit_298.1: ; preds = %.thread.1 %76 = and i64 %74, -3 store i64 %76, ptr %1, align 4 %77 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %lazy_measure.1, ptr %77, align 4 + store i64 %___lazy_measure.1, ptr %77, align 4 %78 = load i64, ptr %3, align 4 %79 = and i64 %78, 4 %.not1192 = icmp eq i64 %79, 0 @@ -290,7 +289,7 @@ cond_exit_298.1: ; preds = %.thread.1 %80 = or disjoint i64 %78, 4 store i64 %80, ptr %3, align 4 %81 = load i64, ptr %40, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %81) + %___lazy_measure.2 = tail call i64 @___lazy_measure(i64 %81) tail call void @___qfree(i64 %81) %82 = load i64, ptr %1, align 4 %83 = and i64 %82, 4 @@ -301,7 +300,7 @@ cond_exit_298.2: ; preds = %.thread.2 %84 = and i64 %82, -5 store i64 %84, ptr %1, align 4 %85 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %lazy_measure.2, ptr %85, align 4 + store i64 %___lazy_measure.2, ptr %85, align 4 %86 = load i64, ptr %3, align 4 %87 = and i64 %86, 8 %.not1194 = icmp eq i64 %87, 0 @@ -311,7 +310,7 @@ cond_exit_298.2: ; preds = %.thread.2 %88 = or disjoint i64 %86, 8 store i64 %88, ptr %3, align 4 %89 = load i64, ptr %48, align 4 - %lazy_measure.3 = tail call i64 @___lazy_measure(i64 %89) + %___lazy_measure.3 = tail call i64 @___lazy_measure(i64 %89) tail call void @___qfree(i64 %89) %90 = load i64, ptr %1, align 4 %91 = and i64 %90, 8 @@ -322,7 +321,7 @@ __barray_check_bounds.exit1126.4: ; preds = %.thread.3 %92 = and i64 %90, -9 store i64 %92, ptr %1, align 4 %93 = getelementptr inbounds nuw i8, ptr %0, i64 24 - store i64 %lazy_measure.3, ptr %93, align 4 + store i64 %___lazy_measure.3, ptr %93, align 4 %94 = load i64, ptr %3, align 4 %95 = and i64 %94, 16 %.not1196 = icmp eq i64 %95, 0 @@ -332,7 +331,7 @@ __barray_check_bounds.exit1122.4: ; preds = %__barray_check_boun %96 = or disjoint i64 %94, 16 store i64 %96, ptr %3, align 4 %97 = load i64, ptr %56, align 4 - %lazy_measure.4 = tail call i64 @___lazy_measure(i64 %97) + %___lazy_measure.4 = tail call i64 @___lazy_measure(i64 %97) tail call void @___qfree(i64 %97) %98 = load i64, ptr %1, align 4 %99 = and i64 %98, 16 @@ -343,18 +342,18 @@ cond_exit_298.4: ; preds = %__barray_check_boun %100 = and i64 %98, -17 store i64 %100, ptr %1, align 4 %101 = getelementptr inbounds nuw i8, ptr %0, i64 32 - store i64 %lazy_measure.4, ptr %101, align 4 + store i64 %___lazy_measure.4, ptr %101, align 4 %102 = load i64, ptr %3, align 4 %103 = or i64 %102, -32 store i64 %103, ptr %3, align 4 %104 = icmp eq i64 %103, -1 - br i1 %104, label %loop_out318, label %mask_block_err.i + br i1 %104, label %loop_out317, label %mask_block_err.i -panic.i1129: ; preds = %loop_out318 +panic.i1129: ; preds = %loop_out317 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_mask_borrow.exit1130: ; preds = %loop_out318 +__barray_mask_borrow.exit1130: ; preds = %loop_out317 %105 = or disjoint i64 %63, 1 store i64 %105, ptr %1, align 4 %106 = load i64, ptr %0, align 4 @@ -555,27 +554,28 @@ cond_exit_558.4: ; preds = %__barray_mask_borro %163 = or i64 %162, -32 store i64 %163, ptr %1, align 4 %164 = icmp eq i64 %163, -1 - br i1 %164, label %loop_out620, label %mask_block_err.i1152 + br i1 %164, label %loop_out619, label %mask_block_err.i1152 -loop_out620: ; preds = %cond_exit_558.4 +loop_out619: ; preds = %cond_exit_558.4 tail call void @heap_free(ptr nonnull %0) tail call void @heap_free(ptr nonnull %1) %read_bool = tail call i1 @___read_future_bool(i64 %106) tail call void @___dec_future_refcount(i64 %106) tail call void @print_bool(ptr nonnull @res_a.A4A74DAF.0, i64 11, i1 %read_bool) - %read_bool690 = tail call i1 @___read_future_bool(i64 %113) + %read_bool689 = tail call i1 @___read_future_bool(i64 %113) tail call void @___dec_future_refcount(i64 %113) - tail call void @print_bool(ptr nonnull @res_b.3BD50C23.0, i64 11, i1 %read_bool690) - %read_bool705 = tail call i1 @___read_future_bool(i64 %120) + tail call void @print_bool(ptr nonnull @res_b.3BD50C23.0, i64 11, i1 %read_bool689) + %read_bool704 = tail call i1 @___read_future_bool(i64 %120) tail call void @___dec_future_refcount(i64 %120) - tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool705) - %read_bool720 = tail call i1 @___read_future_bool(i64 %127) + tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool704) + %read_bool719 = tail call i1 @___read_future_bool(i64 %127) tail call void @___dec_future_refcount(i64 %127) - tail call void @print_bool(ptr nonnull @res_d.00B84DC7.0, i64 11, i1 %read_bool720) - %read_bool735 = tail call i1 @___read_future_bool(i64 %134) + tail call void @print_bool(ptr nonnull @res_d.00B84DC7.0, i64 11, i1 %read_bool719) + %read_bool734 = tail call i1 @___read_future_bool(i64 %134) tail call void @___dec_future_refcount(i64 %134) - tail call void @print_bool(ptr nonnull @res_e.B9A29CAF.0, i64 11, i1 %read_bool735) - tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot2) + tail call void @print_bool(ptr nonnull @res_e.B9A29CAF.0, i64 11, i1 %read_bool734) + tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot1) + tail call void @random_seed(i64 %shot) %rint = tail call i32 @random_int() %rfloat = tail call double @random_float() %165 = sext i32 %rint to i64 @@ -588,8 +588,6 @@ declare ptr @heap_alloc(i64) local_unnamed_addr declare i64 @get_current_shot() local_unnamed_addr -declare void @random_seed(i64) local_unnamed_addr - ; Function Attrs: noreturn declare void @panic(i32, ptr) local_unnamed_addr #0 @@ -609,6 +607,8 @@ declare void @print_bool(ptr, i64, i1) local_unnamed_addr declare void @print_int(ptr, i64, i64) local_unnamed_addr +declare void @random_seed(i64) local_unnamed_addr + declare i32 @random_int() local_unnamed_addr declare double @random_float() local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[legacy]/determinism_repetition-sol-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[legacy]/determinism_repetition-sol-aarch64-apple-darwin.ll index a87be65a..8e85ab33 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[legacy]/determinism_repetition-sol-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[legacy]/determinism_repetition-sol-aarch64-apple-darwin.ll @@ -22,8 +22,7 @@ cond_104_case_1: %1 = tail call ptr @heap_alloc(i64 8) store i64 -1, ptr %1, align 1 %shot = tail call i64 @get_current_shot() - tail call void @random_seed(i64 %shot) - %shot2 = tail call i64 @get_current_shot() + %shot1 = tail call i64 @get_current_shot() %2 = tail call ptr @heap_alloc(i64 40) %3 = tail call ptr @heap_alloc(i64 8) store i64 -1, ptr %3, align 1 @@ -231,7 +230,7 @@ panic.i1123: ; preds = %__barray_check_boun tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -loop_out318: ; preds = %cond_exit_298.4 +loop_out317: ; preds = %cond_exit_298.4 tail call void @heap_free(ptr nonnull %2) tail call void @heap_free(ptr nonnull %3) %63 = load i64, ptr %1, align 4 @@ -250,7 +249,7 @@ panic.i1127: ; preds = %__barray_check_boun %65 = or disjoint i64 %61, 1 store i64 %65, ptr %3, align 4 %66 = load i64, ptr %2, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %66) + %___future_measure = tail call i64 @___future_measure(i64 %66, i64 0) tail call void @___qfree(i64 %66) %67 = load i64, ptr %1, align 4 %68 = trunc i64 %67 to i1 @@ -259,7 +258,7 @@ panic.i1127: ; preds = %__barray_check_boun cond_exit_298: ; preds = %.thread %69 = and i64 %67, -2 store i64 %69, ptr %1, align 4 - store i64 %lazy_measure, ptr %0, align 4 + store i64 %___future_measure, ptr %0, align 4 %70 = load i64, ptr %3, align 4 %71 = and i64 %70, 2 %.not1190 = icmp eq i64 %71, 0 @@ -269,7 +268,7 @@ cond_exit_298: ; preds = %.thread %72 = or disjoint i64 %70, 2 store i64 %72, ptr %3, align 4 %73 = load i64, ptr %32, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %73) + %___future_measure.1 = tail call i64 @___future_measure(i64 %73, i64 0) tail call void @___qfree(i64 %73) %74 = load i64, ptr %1, align 4 %75 = and i64 %74, 2 @@ -280,7 +279,7 @@ cond_exit_298.1: ; preds = %.thread.1 %76 = and i64 %74, -3 store i64 %76, ptr %1, align 4 %77 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %lazy_measure.1, ptr %77, align 4 + store i64 %___future_measure.1, ptr %77, align 4 %78 = load i64, ptr %3, align 4 %79 = and i64 %78, 4 %.not1192 = icmp eq i64 %79, 0 @@ -290,7 +289,7 @@ cond_exit_298.1: ; preds = %.thread.1 %80 = or disjoint i64 %78, 4 store i64 %80, ptr %3, align 4 %81 = load i64, ptr %40, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %81) + %___future_measure.2 = tail call i64 @___future_measure(i64 %81, i64 0) tail call void @___qfree(i64 %81) %82 = load i64, ptr %1, align 4 %83 = and i64 %82, 4 @@ -301,7 +300,7 @@ cond_exit_298.2: ; preds = %.thread.2 %84 = and i64 %82, -5 store i64 %84, ptr %1, align 4 %85 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %lazy_measure.2, ptr %85, align 4 + store i64 %___future_measure.2, ptr %85, align 4 %86 = load i64, ptr %3, align 4 %87 = and i64 %86, 8 %.not1194 = icmp eq i64 %87, 0 @@ -311,7 +310,7 @@ cond_exit_298.2: ; preds = %.thread.2 %88 = or disjoint i64 %86, 8 store i64 %88, ptr %3, align 4 %89 = load i64, ptr %48, align 4 - %lazy_measure.3 = tail call i64 @___lazy_measure(i64 %89) + %___future_measure.3 = tail call i64 @___future_measure(i64 %89, i64 0) tail call void @___qfree(i64 %89) %90 = load i64, ptr %1, align 4 %91 = and i64 %90, 8 @@ -322,7 +321,7 @@ __barray_check_bounds.exit1126.4: ; preds = %.thread.3 %92 = and i64 %90, -9 store i64 %92, ptr %1, align 4 %93 = getelementptr inbounds nuw i8, ptr %0, i64 24 - store i64 %lazy_measure.3, ptr %93, align 4 + store i64 %___future_measure.3, ptr %93, align 4 %94 = load i64, ptr %3, align 4 %95 = and i64 %94, 16 %.not1196 = icmp eq i64 %95, 0 @@ -332,7 +331,7 @@ __barray_check_bounds.exit1122.4: ; preds = %__barray_check_boun %96 = or disjoint i64 %94, 16 store i64 %96, ptr %3, align 4 %97 = load i64, ptr %56, align 4 - %lazy_measure.4 = tail call i64 @___lazy_measure(i64 %97) + %___future_measure.4 = tail call i64 @___future_measure(i64 %97, i64 0) tail call void @___qfree(i64 %97) %98 = load i64, ptr %1, align 4 %99 = and i64 %98, 16 @@ -343,18 +342,18 @@ cond_exit_298.4: ; preds = %__barray_check_boun %100 = and i64 %98, -17 store i64 %100, ptr %1, align 4 %101 = getelementptr inbounds nuw i8, ptr %0, i64 32 - store i64 %lazy_measure.4, ptr %101, align 4 + store i64 %___future_measure.4, ptr %101, align 4 %102 = load i64, ptr %3, align 4 %103 = or i64 %102, -32 store i64 %103, ptr %3, align 4 %104 = icmp eq i64 %103, -1 - br i1 %104, label %loop_out318, label %mask_block_err.i + br i1 %104, label %loop_out317, label %mask_block_err.i -panic.i1129: ; preds = %loop_out318 +panic.i1129: ; preds = %loop_out317 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_mask_borrow.exit1130: ; preds = %loop_out318 +__barray_mask_borrow.exit1130: ; preds = %loop_out317 %105 = or disjoint i64 %63, 1 store i64 %105, ptr %1, align 4 %106 = load i64, ptr %0, align 4 @@ -555,27 +554,28 @@ cond_exit_558.4: ; preds = %__barray_mask_borro %163 = or i64 %162, -32 store i64 %163, ptr %1, align 4 %164 = icmp eq i64 %163, -1 - br i1 %164, label %loop_out620, label %mask_block_err.i1152 + br i1 %164, label %loop_out619, label %mask_block_err.i1152 -loop_out620: ; preds = %cond_exit_558.4 +loop_out619: ; preds = %cond_exit_558.4 tail call void @heap_free(ptr nonnull %0) tail call void @heap_free(ptr nonnull %1) %read_bool = tail call i1 @___read_future_bool(i64 %106) tail call void @___dec_future_refcount(i64 %106) tail call void @print_bool(ptr nonnull @res_a.A4A74DAF.0, i64 11, i1 %read_bool) - %read_bool690 = tail call i1 @___read_future_bool(i64 %113) + %read_bool689 = tail call i1 @___read_future_bool(i64 %113) tail call void @___dec_future_refcount(i64 %113) - tail call void @print_bool(ptr nonnull @res_b.3BD50C23.0, i64 11, i1 %read_bool690) - %read_bool705 = tail call i1 @___read_future_bool(i64 %120) + tail call void @print_bool(ptr nonnull @res_b.3BD50C23.0, i64 11, i1 %read_bool689) + %read_bool704 = tail call i1 @___read_future_bool(i64 %120) tail call void @___dec_future_refcount(i64 %120) - tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool705) - %read_bool720 = tail call i1 @___read_future_bool(i64 %127) + tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool704) + %read_bool719 = tail call i1 @___read_future_bool(i64 %127) tail call void @___dec_future_refcount(i64 %127) - tail call void @print_bool(ptr nonnull @res_d.00B84DC7.0, i64 11, i1 %read_bool720) - %read_bool735 = tail call i1 @___read_future_bool(i64 %134) + tail call void @print_bool(ptr nonnull @res_d.00B84DC7.0, i64 11, i1 %read_bool719) + %read_bool734 = tail call i1 @___read_future_bool(i64 %134) tail call void @___dec_future_refcount(i64 %134) - tail call void @print_bool(ptr nonnull @res_e.B9A29CAF.0, i64 11, i1 %read_bool735) - tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot2) + tail call void @print_bool(ptr nonnull @res_e.B9A29CAF.0, i64 11, i1 %read_bool734) + tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot1) + tail call void @random_seed(i64 %shot) %rint = tail call i32 @random_int() %rfloat = tail call double @random_float() %165 = sext i32 %rint to i64 @@ -588,14 +588,12 @@ declare ptr @heap_alloc(i64) local_unnamed_addr declare i64 @get_current_shot() local_unnamed_addr -declare void @random_seed(i64) local_unnamed_addr - ; Function Attrs: noreturn declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -609,6 +607,8 @@ declare void @print_bool(ptr, i64, i1) local_unnamed_addr declare void @print_int(ptr, i64, i64) local_unnamed_addr +declare void @random_seed(i64) local_unnamed_addr + declare i32 @random_int() local_unnamed_addr declare double @random_float() local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[legacy]/determinism_repetition-sol-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[legacy]/determinism_repetition-sol-aarch64-unknown-linux-gnu.ll index 25da2c5a..ae0d1752 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[legacy]/determinism_repetition-sol-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[legacy]/determinism_repetition-sol-aarch64-unknown-linux-gnu.ll @@ -22,8 +22,7 @@ cond_104_case_1: %1 = tail call ptr @heap_alloc(i64 8) store i64 -1, ptr %1, align 1 %shot = tail call i64 @get_current_shot() - tail call void @random_seed(i64 %shot) - %shot2 = tail call i64 @get_current_shot() + %shot1 = tail call i64 @get_current_shot() %2 = tail call ptr @heap_alloc(i64 40) %3 = tail call ptr @heap_alloc(i64 8) store i64 -1, ptr %3, align 1 @@ -231,7 +230,7 @@ panic.i1123: ; preds = %__barray_check_boun tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -loop_out318: ; preds = %cond_exit_298.4 +loop_out317: ; preds = %cond_exit_298.4 tail call void @heap_free(ptr nonnull %2) tail call void @heap_free(ptr nonnull %3) %63 = load i64, ptr %1, align 4 @@ -250,7 +249,7 @@ panic.i1127: ; preds = %__barray_check_boun %65 = or disjoint i64 %61, 1 store i64 %65, ptr %3, align 4 %66 = load i64, ptr %2, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %66) + %___future_measure = tail call i64 @___future_measure(i64 %66, i64 0) tail call void @___qfree(i64 %66) %67 = load i64, ptr %1, align 4 %68 = trunc i64 %67 to i1 @@ -259,7 +258,7 @@ panic.i1127: ; preds = %__barray_check_boun cond_exit_298: ; preds = %.thread %69 = and i64 %67, -2 store i64 %69, ptr %1, align 4 - store i64 %lazy_measure, ptr %0, align 4 + store i64 %___future_measure, ptr %0, align 4 %70 = load i64, ptr %3, align 4 %71 = and i64 %70, 2 %.not1190 = icmp eq i64 %71, 0 @@ -269,7 +268,7 @@ cond_exit_298: ; preds = %.thread %72 = or disjoint i64 %70, 2 store i64 %72, ptr %3, align 4 %73 = load i64, ptr %32, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %73) + %___future_measure.1 = tail call i64 @___future_measure(i64 %73, i64 0) tail call void @___qfree(i64 %73) %74 = load i64, ptr %1, align 4 %75 = and i64 %74, 2 @@ -280,7 +279,7 @@ cond_exit_298.1: ; preds = %.thread.1 %76 = and i64 %74, -3 store i64 %76, ptr %1, align 4 %77 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %lazy_measure.1, ptr %77, align 4 + store i64 %___future_measure.1, ptr %77, align 4 %78 = load i64, ptr %3, align 4 %79 = and i64 %78, 4 %.not1192 = icmp eq i64 %79, 0 @@ -290,7 +289,7 @@ cond_exit_298.1: ; preds = %.thread.1 %80 = or disjoint i64 %78, 4 store i64 %80, ptr %3, align 4 %81 = load i64, ptr %40, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %81) + %___future_measure.2 = tail call i64 @___future_measure(i64 %81, i64 0) tail call void @___qfree(i64 %81) %82 = load i64, ptr %1, align 4 %83 = and i64 %82, 4 @@ -301,7 +300,7 @@ cond_exit_298.2: ; preds = %.thread.2 %84 = and i64 %82, -5 store i64 %84, ptr %1, align 4 %85 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %lazy_measure.2, ptr %85, align 4 + store i64 %___future_measure.2, ptr %85, align 4 %86 = load i64, ptr %3, align 4 %87 = and i64 %86, 8 %.not1194 = icmp eq i64 %87, 0 @@ -311,7 +310,7 @@ cond_exit_298.2: ; preds = %.thread.2 %88 = or disjoint i64 %86, 8 store i64 %88, ptr %3, align 4 %89 = load i64, ptr %48, align 4 - %lazy_measure.3 = tail call i64 @___lazy_measure(i64 %89) + %___future_measure.3 = tail call i64 @___future_measure(i64 %89, i64 0) tail call void @___qfree(i64 %89) %90 = load i64, ptr %1, align 4 %91 = and i64 %90, 8 @@ -322,7 +321,7 @@ __barray_check_bounds.exit1126.4: ; preds = %.thread.3 %92 = and i64 %90, -9 store i64 %92, ptr %1, align 4 %93 = getelementptr inbounds nuw i8, ptr %0, i64 24 - store i64 %lazy_measure.3, ptr %93, align 4 + store i64 %___future_measure.3, ptr %93, align 4 %94 = load i64, ptr %3, align 4 %95 = and i64 %94, 16 %.not1196 = icmp eq i64 %95, 0 @@ -332,7 +331,7 @@ __barray_check_bounds.exit1122.4: ; preds = %__barray_check_boun %96 = or disjoint i64 %94, 16 store i64 %96, ptr %3, align 4 %97 = load i64, ptr %56, align 4 - %lazy_measure.4 = tail call i64 @___lazy_measure(i64 %97) + %___future_measure.4 = tail call i64 @___future_measure(i64 %97, i64 0) tail call void @___qfree(i64 %97) %98 = load i64, ptr %1, align 4 %99 = and i64 %98, 16 @@ -343,18 +342,18 @@ cond_exit_298.4: ; preds = %__barray_check_boun %100 = and i64 %98, -17 store i64 %100, ptr %1, align 4 %101 = getelementptr inbounds nuw i8, ptr %0, i64 32 - store i64 %lazy_measure.4, ptr %101, align 4 + store i64 %___future_measure.4, ptr %101, align 4 %102 = load i64, ptr %3, align 4 %103 = or i64 %102, -32 store i64 %103, ptr %3, align 4 %104 = icmp eq i64 %103, -1 - br i1 %104, label %loop_out318, label %mask_block_err.i + br i1 %104, label %loop_out317, label %mask_block_err.i -panic.i1129: ; preds = %loop_out318 +panic.i1129: ; preds = %loop_out317 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_mask_borrow.exit1130: ; preds = %loop_out318 +__barray_mask_borrow.exit1130: ; preds = %loop_out317 %105 = or disjoint i64 %63, 1 store i64 %105, ptr %1, align 4 %106 = load i64, ptr %0, align 4 @@ -555,27 +554,28 @@ cond_exit_558.4: ; preds = %__barray_mask_borro %163 = or i64 %162, -32 store i64 %163, ptr %1, align 4 %164 = icmp eq i64 %163, -1 - br i1 %164, label %loop_out620, label %mask_block_err.i1152 + br i1 %164, label %loop_out619, label %mask_block_err.i1152 -loop_out620: ; preds = %cond_exit_558.4 +loop_out619: ; preds = %cond_exit_558.4 tail call void @heap_free(ptr nonnull %0) tail call void @heap_free(ptr nonnull %1) %read_bool = tail call i1 @___read_future_bool(i64 %106) tail call void @___dec_future_refcount(i64 %106) tail call void @print_bool(ptr nonnull @res_a.A4A74DAF.0, i64 11, i1 %read_bool) - %read_bool690 = tail call i1 @___read_future_bool(i64 %113) + %read_bool689 = tail call i1 @___read_future_bool(i64 %113) tail call void @___dec_future_refcount(i64 %113) - tail call void @print_bool(ptr nonnull @res_b.3BD50C23.0, i64 11, i1 %read_bool690) - %read_bool705 = tail call i1 @___read_future_bool(i64 %120) + tail call void @print_bool(ptr nonnull @res_b.3BD50C23.0, i64 11, i1 %read_bool689) + %read_bool704 = tail call i1 @___read_future_bool(i64 %120) tail call void @___dec_future_refcount(i64 %120) - tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool705) - %read_bool720 = tail call i1 @___read_future_bool(i64 %127) + tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool704) + %read_bool719 = tail call i1 @___read_future_bool(i64 %127) tail call void @___dec_future_refcount(i64 %127) - tail call void @print_bool(ptr nonnull @res_d.00B84DC7.0, i64 11, i1 %read_bool720) - %read_bool735 = tail call i1 @___read_future_bool(i64 %134) + tail call void @print_bool(ptr nonnull @res_d.00B84DC7.0, i64 11, i1 %read_bool719) + %read_bool734 = tail call i1 @___read_future_bool(i64 %134) tail call void @___dec_future_refcount(i64 %134) - tail call void @print_bool(ptr nonnull @res_e.B9A29CAF.0, i64 11, i1 %read_bool735) - tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot2) + tail call void @print_bool(ptr nonnull @res_e.B9A29CAF.0, i64 11, i1 %read_bool734) + tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot1) + tail call void @random_seed(i64 %shot) %rint = tail call i32 @random_int() %rfloat = tail call double @random_float() %165 = sext i32 %rint to i64 @@ -588,14 +588,12 @@ declare ptr @heap_alloc(i64) local_unnamed_addr declare i64 @get_current_shot() local_unnamed_addr -declare void @random_seed(i64) local_unnamed_addr - ; Function Attrs: noreturn declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -609,6 +607,8 @@ declare void @print_bool(ptr, i64, i1) local_unnamed_addr declare void @print_int(ptr, i64, i64) local_unnamed_addr +declare void @random_seed(i64) local_unnamed_addr + declare i32 @random_int() local_unnamed_addr declare double @random_float() local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[legacy]/determinism_repetition-sol-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[legacy]/determinism_repetition-sol-x86_64-apple-darwin.ll index 75844187..0e20dbd4 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[legacy]/determinism_repetition-sol-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[legacy]/determinism_repetition-sol-x86_64-apple-darwin.ll @@ -22,8 +22,7 @@ cond_104_case_1: %1 = tail call ptr @heap_alloc(i64 8) store i64 -1, ptr %1, align 1 %shot = tail call i64 @get_current_shot() - tail call void @random_seed(i64 %shot) - %shot2 = tail call i64 @get_current_shot() + %shot1 = tail call i64 @get_current_shot() %2 = tail call ptr @heap_alloc(i64 40) %3 = tail call ptr @heap_alloc(i64 8) store i64 -1, ptr %3, align 1 @@ -231,7 +230,7 @@ panic.i1123: ; preds = %__barray_check_boun tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -loop_out318: ; preds = %cond_exit_298.4 +loop_out317: ; preds = %cond_exit_298.4 tail call void @heap_free(ptr nonnull %2) tail call void @heap_free(ptr nonnull %3) %63 = load i64, ptr %1, align 4 @@ -250,7 +249,7 @@ panic.i1127: ; preds = %__barray_check_boun %65 = or disjoint i64 %61, 1 store i64 %65, ptr %3, align 4 %66 = load i64, ptr %2, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %66) + %___future_measure = tail call i64 @___future_measure(i64 %66, i64 0) tail call void @___qfree(i64 %66) %67 = load i64, ptr %1, align 4 %68 = trunc i64 %67 to i1 @@ -259,7 +258,7 @@ panic.i1127: ; preds = %__barray_check_boun cond_exit_298: ; preds = %.thread %69 = and i64 %67, -2 store i64 %69, ptr %1, align 4 - store i64 %lazy_measure, ptr %0, align 4 + store i64 %___future_measure, ptr %0, align 4 %70 = load i64, ptr %3, align 4 %71 = and i64 %70, 2 %.not1190 = icmp eq i64 %71, 0 @@ -269,7 +268,7 @@ cond_exit_298: ; preds = %.thread %72 = or disjoint i64 %70, 2 store i64 %72, ptr %3, align 4 %73 = load i64, ptr %32, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %73) + %___future_measure.1 = tail call i64 @___future_measure(i64 %73, i64 0) tail call void @___qfree(i64 %73) %74 = load i64, ptr %1, align 4 %75 = and i64 %74, 2 @@ -280,7 +279,7 @@ cond_exit_298.1: ; preds = %.thread.1 %76 = and i64 %74, -3 store i64 %76, ptr %1, align 4 %77 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %lazy_measure.1, ptr %77, align 4 + store i64 %___future_measure.1, ptr %77, align 4 %78 = load i64, ptr %3, align 4 %79 = and i64 %78, 4 %.not1192 = icmp eq i64 %79, 0 @@ -290,7 +289,7 @@ cond_exit_298.1: ; preds = %.thread.1 %80 = or disjoint i64 %78, 4 store i64 %80, ptr %3, align 4 %81 = load i64, ptr %40, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %81) + %___future_measure.2 = tail call i64 @___future_measure(i64 %81, i64 0) tail call void @___qfree(i64 %81) %82 = load i64, ptr %1, align 4 %83 = and i64 %82, 4 @@ -301,7 +300,7 @@ cond_exit_298.2: ; preds = %.thread.2 %84 = and i64 %82, -5 store i64 %84, ptr %1, align 4 %85 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %lazy_measure.2, ptr %85, align 4 + store i64 %___future_measure.2, ptr %85, align 4 %86 = load i64, ptr %3, align 4 %87 = and i64 %86, 8 %.not1194 = icmp eq i64 %87, 0 @@ -311,7 +310,7 @@ cond_exit_298.2: ; preds = %.thread.2 %88 = or disjoint i64 %86, 8 store i64 %88, ptr %3, align 4 %89 = load i64, ptr %48, align 4 - %lazy_measure.3 = tail call i64 @___lazy_measure(i64 %89) + %___future_measure.3 = tail call i64 @___future_measure(i64 %89, i64 0) tail call void @___qfree(i64 %89) %90 = load i64, ptr %1, align 4 %91 = and i64 %90, 8 @@ -322,7 +321,7 @@ __barray_check_bounds.exit1126.4: ; preds = %.thread.3 %92 = and i64 %90, -9 store i64 %92, ptr %1, align 4 %93 = getelementptr inbounds nuw i8, ptr %0, i64 24 - store i64 %lazy_measure.3, ptr %93, align 4 + store i64 %___future_measure.3, ptr %93, align 4 %94 = load i64, ptr %3, align 4 %95 = and i64 %94, 16 %.not1196 = icmp eq i64 %95, 0 @@ -332,7 +331,7 @@ __barray_check_bounds.exit1122.4: ; preds = %__barray_check_boun %96 = or disjoint i64 %94, 16 store i64 %96, ptr %3, align 4 %97 = load i64, ptr %56, align 4 - %lazy_measure.4 = tail call i64 @___lazy_measure(i64 %97) + %___future_measure.4 = tail call i64 @___future_measure(i64 %97, i64 0) tail call void @___qfree(i64 %97) %98 = load i64, ptr %1, align 4 %99 = and i64 %98, 16 @@ -343,18 +342,18 @@ cond_exit_298.4: ; preds = %__barray_check_boun %100 = and i64 %98, -17 store i64 %100, ptr %1, align 4 %101 = getelementptr inbounds nuw i8, ptr %0, i64 32 - store i64 %lazy_measure.4, ptr %101, align 4 + store i64 %___future_measure.4, ptr %101, align 4 %102 = load i64, ptr %3, align 4 %103 = or i64 %102, -32 store i64 %103, ptr %3, align 4 %104 = icmp eq i64 %103, -1 - br i1 %104, label %loop_out318, label %mask_block_err.i + br i1 %104, label %loop_out317, label %mask_block_err.i -panic.i1129: ; preds = %loop_out318 +panic.i1129: ; preds = %loop_out317 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_mask_borrow.exit1130: ; preds = %loop_out318 +__barray_mask_borrow.exit1130: ; preds = %loop_out317 %105 = or disjoint i64 %63, 1 store i64 %105, ptr %1, align 4 %106 = load i64, ptr %0, align 4 @@ -555,27 +554,28 @@ cond_exit_558.4: ; preds = %__barray_mask_borro %163 = or i64 %162, -32 store i64 %163, ptr %1, align 4 %164 = icmp eq i64 %163, -1 - br i1 %164, label %loop_out620, label %mask_block_err.i1152 + br i1 %164, label %loop_out619, label %mask_block_err.i1152 -loop_out620: ; preds = %cond_exit_558.4 +loop_out619: ; preds = %cond_exit_558.4 tail call void @heap_free(ptr nonnull %0) tail call void @heap_free(ptr nonnull %1) %read_bool = tail call i1 @___read_future_bool(i64 %106) tail call void @___dec_future_refcount(i64 %106) tail call void @print_bool(ptr nonnull @res_a.A4A74DAF.0, i64 11, i1 %read_bool) - %read_bool690 = tail call i1 @___read_future_bool(i64 %113) + %read_bool689 = tail call i1 @___read_future_bool(i64 %113) tail call void @___dec_future_refcount(i64 %113) - tail call void @print_bool(ptr nonnull @res_b.3BD50C23.0, i64 11, i1 %read_bool690) - %read_bool705 = tail call i1 @___read_future_bool(i64 %120) + tail call void @print_bool(ptr nonnull @res_b.3BD50C23.0, i64 11, i1 %read_bool689) + %read_bool704 = tail call i1 @___read_future_bool(i64 %120) tail call void @___dec_future_refcount(i64 %120) - tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool705) - %read_bool720 = tail call i1 @___read_future_bool(i64 %127) + tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool704) + %read_bool719 = tail call i1 @___read_future_bool(i64 %127) tail call void @___dec_future_refcount(i64 %127) - tail call void @print_bool(ptr nonnull @res_d.00B84DC7.0, i64 11, i1 %read_bool720) - %read_bool735 = tail call i1 @___read_future_bool(i64 %134) + tail call void @print_bool(ptr nonnull @res_d.00B84DC7.0, i64 11, i1 %read_bool719) + %read_bool734 = tail call i1 @___read_future_bool(i64 %134) tail call void @___dec_future_refcount(i64 %134) - tail call void @print_bool(ptr nonnull @res_e.B9A29CAF.0, i64 11, i1 %read_bool735) - tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot2) + tail call void @print_bool(ptr nonnull @res_e.B9A29CAF.0, i64 11, i1 %read_bool734) + tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot1) + tail call void @random_seed(i64 %shot) %rint = tail call i32 @random_int() %rfloat = tail call double @random_float() %165 = sext i32 %rint to i64 @@ -588,14 +588,12 @@ declare ptr @heap_alloc(i64) local_unnamed_addr declare i64 @get_current_shot() local_unnamed_addr -declare void @random_seed(i64) local_unnamed_addr - ; Function Attrs: noreturn declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -609,6 +607,8 @@ declare void @print_bool(ptr, i64, i1) local_unnamed_addr declare void @print_int(ptr, i64, i64) local_unnamed_addr +declare void @random_seed(i64) local_unnamed_addr + declare i32 @random_int() local_unnamed_addr declare double @random_float() local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[legacy]/determinism_repetition-sol-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[legacy]/determinism_repetition-sol-x86_64-unknown-linux-gnu.ll index 57145ec1..9ba24a24 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[legacy]/determinism_repetition-sol-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[legacy]/determinism_repetition-sol-x86_64-unknown-linux-gnu.ll @@ -22,8 +22,7 @@ cond_104_case_1: %1 = tail call ptr @heap_alloc(i64 8) store i64 -1, ptr %1, align 1 %shot = tail call i64 @get_current_shot() - tail call void @random_seed(i64 %shot) - %shot2 = tail call i64 @get_current_shot() + %shot1 = tail call i64 @get_current_shot() %2 = tail call ptr @heap_alloc(i64 40) %3 = tail call ptr @heap_alloc(i64 8) store i64 -1, ptr %3, align 1 @@ -231,7 +230,7 @@ panic.i1123: ; preds = %__barray_check_boun tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -loop_out318: ; preds = %cond_exit_298.4 +loop_out317: ; preds = %cond_exit_298.4 tail call void @heap_free(ptr nonnull %2) tail call void @heap_free(ptr nonnull %3) %63 = load i64, ptr %1, align 4 @@ -250,7 +249,7 @@ panic.i1127: ; preds = %__barray_check_boun %65 = or disjoint i64 %61, 1 store i64 %65, ptr %3, align 4 %66 = load i64, ptr %2, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %66) + %___future_measure = tail call i64 @___future_measure(i64 %66, i64 0) tail call void @___qfree(i64 %66) %67 = load i64, ptr %1, align 4 %68 = trunc i64 %67 to i1 @@ -259,7 +258,7 @@ panic.i1127: ; preds = %__barray_check_boun cond_exit_298: ; preds = %.thread %69 = and i64 %67, -2 store i64 %69, ptr %1, align 4 - store i64 %lazy_measure, ptr %0, align 4 + store i64 %___future_measure, ptr %0, align 4 %70 = load i64, ptr %3, align 4 %71 = and i64 %70, 2 %.not1190 = icmp eq i64 %71, 0 @@ -269,7 +268,7 @@ cond_exit_298: ; preds = %.thread %72 = or disjoint i64 %70, 2 store i64 %72, ptr %3, align 4 %73 = load i64, ptr %32, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %73) + %___future_measure.1 = tail call i64 @___future_measure(i64 %73, i64 0) tail call void @___qfree(i64 %73) %74 = load i64, ptr %1, align 4 %75 = and i64 %74, 2 @@ -280,7 +279,7 @@ cond_exit_298.1: ; preds = %.thread.1 %76 = and i64 %74, -3 store i64 %76, ptr %1, align 4 %77 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %lazy_measure.1, ptr %77, align 4 + store i64 %___future_measure.1, ptr %77, align 4 %78 = load i64, ptr %3, align 4 %79 = and i64 %78, 4 %.not1192 = icmp eq i64 %79, 0 @@ -290,7 +289,7 @@ cond_exit_298.1: ; preds = %.thread.1 %80 = or disjoint i64 %78, 4 store i64 %80, ptr %3, align 4 %81 = load i64, ptr %40, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %81) + %___future_measure.2 = tail call i64 @___future_measure(i64 %81, i64 0) tail call void @___qfree(i64 %81) %82 = load i64, ptr %1, align 4 %83 = and i64 %82, 4 @@ -301,7 +300,7 @@ cond_exit_298.2: ; preds = %.thread.2 %84 = and i64 %82, -5 store i64 %84, ptr %1, align 4 %85 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %lazy_measure.2, ptr %85, align 4 + store i64 %___future_measure.2, ptr %85, align 4 %86 = load i64, ptr %3, align 4 %87 = and i64 %86, 8 %.not1194 = icmp eq i64 %87, 0 @@ -311,7 +310,7 @@ cond_exit_298.2: ; preds = %.thread.2 %88 = or disjoint i64 %86, 8 store i64 %88, ptr %3, align 4 %89 = load i64, ptr %48, align 4 - %lazy_measure.3 = tail call i64 @___lazy_measure(i64 %89) + %___future_measure.3 = tail call i64 @___future_measure(i64 %89, i64 0) tail call void @___qfree(i64 %89) %90 = load i64, ptr %1, align 4 %91 = and i64 %90, 8 @@ -322,7 +321,7 @@ __barray_check_bounds.exit1126.4: ; preds = %.thread.3 %92 = and i64 %90, -9 store i64 %92, ptr %1, align 4 %93 = getelementptr inbounds nuw i8, ptr %0, i64 24 - store i64 %lazy_measure.3, ptr %93, align 4 + store i64 %___future_measure.3, ptr %93, align 4 %94 = load i64, ptr %3, align 4 %95 = and i64 %94, 16 %.not1196 = icmp eq i64 %95, 0 @@ -332,7 +331,7 @@ __barray_check_bounds.exit1122.4: ; preds = %__barray_check_boun %96 = or disjoint i64 %94, 16 store i64 %96, ptr %3, align 4 %97 = load i64, ptr %56, align 4 - %lazy_measure.4 = tail call i64 @___lazy_measure(i64 %97) + %___future_measure.4 = tail call i64 @___future_measure(i64 %97, i64 0) tail call void @___qfree(i64 %97) %98 = load i64, ptr %1, align 4 %99 = and i64 %98, 16 @@ -343,18 +342,18 @@ cond_exit_298.4: ; preds = %__barray_check_boun %100 = and i64 %98, -17 store i64 %100, ptr %1, align 4 %101 = getelementptr inbounds nuw i8, ptr %0, i64 32 - store i64 %lazy_measure.4, ptr %101, align 4 + store i64 %___future_measure.4, ptr %101, align 4 %102 = load i64, ptr %3, align 4 %103 = or i64 %102, -32 store i64 %103, ptr %3, align 4 %104 = icmp eq i64 %103, -1 - br i1 %104, label %loop_out318, label %mask_block_err.i + br i1 %104, label %loop_out317, label %mask_block_err.i -panic.i1129: ; preds = %loop_out318 +panic.i1129: ; preds = %loop_out317 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_mask_borrow.exit1130: ; preds = %loop_out318 +__barray_mask_borrow.exit1130: ; preds = %loop_out317 %105 = or disjoint i64 %63, 1 store i64 %105, ptr %1, align 4 %106 = load i64, ptr %0, align 4 @@ -555,27 +554,28 @@ cond_exit_558.4: ; preds = %__barray_mask_borro %163 = or i64 %162, -32 store i64 %163, ptr %1, align 4 %164 = icmp eq i64 %163, -1 - br i1 %164, label %loop_out620, label %mask_block_err.i1152 + br i1 %164, label %loop_out619, label %mask_block_err.i1152 -loop_out620: ; preds = %cond_exit_558.4 +loop_out619: ; preds = %cond_exit_558.4 tail call void @heap_free(ptr nonnull %0) tail call void @heap_free(ptr nonnull %1) %read_bool = tail call i1 @___read_future_bool(i64 %106) tail call void @___dec_future_refcount(i64 %106) tail call void @print_bool(ptr nonnull @res_a.A4A74DAF.0, i64 11, i1 %read_bool) - %read_bool690 = tail call i1 @___read_future_bool(i64 %113) + %read_bool689 = tail call i1 @___read_future_bool(i64 %113) tail call void @___dec_future_refcount(i64 %113) - tail call void @print_bool(ptr nonnull @res_b.3BD50C23.0, i64 11, i1 %read_bool690) - %read_bool705 = tail call i1 @___read_future_bool(i64 %120) + tail call void @print_bool(ptr nonnull @res_b.3BD50C23.0, i64 11, i1 %read_bool689) + %read_bool704 = tail call i1 @___read_future_bool(i64 %120) tail call void @___dec_future_refcount(i64 %120) - tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool705) - %read_bool720 = tail call i1 @___read_future_bool(i64 %127) + tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool704) + %read_bool719 = tail call i1 @___read_future_bool(i64 %127) tail call void @___dec_future_refcount(i64 %127) - tail call void @print_bool(ptr nonnull @res_d.00B84DC7.0, i64 11, i1 %read_bool720) - %read_bool735 = tail call i1 @___read_future_bool(i64 %134) + tail call void @print_bool(ptr nonnull @res_d.00B84DC7.0, i64 11, i1 %read_bool719) + %read_bool734 = tail call i1 @___read_future_bool(i64 %134) tail call void @___dec_future_refcount(i64 %134) - tail call void @print_bool(ptr nonnull @res_e.B9A29CAF.0, i64 11, i1 %read_bool735) - tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot2) + tail call void @print_bool(ptr nonnull @res_e.B9A29CAF.0, i64 11, i1 %read_bool734) + tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot1) + tail call void @random_seed(i64 %shot) %rint = tail call i32 @random_int() %rfloat = tail call double @random_float() %165 = sext i32 %rint to i64 @@ -588,14 +588,12 @@ declare ptr @heap_alloc(i64) local_unnamed_addr declare i64 @get_current_shot() local_unnamed_addr -declare void @random_seed(i64) local_unnamed_addr - ; Function Attrs: noreturn declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -609,6 +607,8 @@ declare void @print_bool(ptr, i64, i1) local_unnamed_addr declare void @print_int(ptr, i64, i64) local_unnamed_addr +declare void @random_seed(i64) local_unnamed_addr + declare i32 @random_int() local_unnamed_addr declare double @random_float() local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[legacy]/determinism_repetition-sol-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[legacy]/determinism_repetition-sol-x86_64-windows-gnu.ll index 3a96f1fd..388ae84b 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[legacy]/determinism_repetition-sol-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_repetition[legacy]/determinism_repetition-sol-x86_64-windows-gnu.ll @@ -22,8 +22,7 @@ cond_104_case_1: %1 = tail call ptr @heap_alloc(i64 8) store i64 -1, ptr %1, align 1 %shot = tail call i64 @get_current_shot() - tail call void @random_seed(i64 %shot) - %shot2 = tail call i64 @get_current_shot() + %shot1 = tail call i64 @get_current_shot() %2 = tail call ptr @heap_alloc(i64 40) %3 = tail call ptr @heap_alloc(i64 8) store i64 -1, ptr %3, align 1 @@ -231,7 +230,7 @@ panic.i1123: ; preds = %__barray_check_boun tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -loop_out318: ; preds = %cond_exit_298.4 +loop_out317: ; preds = %cond_exit_298.4 tail call void @heap_free(ptr nonnull %2) tail call void @heap_free(ptr nonnull %3) %63 = load i64, ptr %1, align 4 @@ -250,7 +249,7 @@ panic.i1127: ; preds = %__barray_check_boun %65 = or disjoint i64 %61, 1 store i64 %65, ptr %3, align 4 %66 = load i64, ptr %2, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %66) + %___future_measure = tail call i64 @___future_measure(i64 %66, i64 0) tail call void @___qfree(i64 %66) %67 = load i64, ptr %1, align 4 %68 = trunc i64 %67 to i1 @@ -259,7 +258,7 @@ panic.i1127: ; preds = %__barray_check_boun cond_exit_298: ; preds = %.thread %69 = and i64 %67, -2 store i64 %69, ptr %1, align 4 - store i64 %lazy_measure, ptr %0, align 4 + store i64 %___future_measure, ptr %0, align 4 %70 = load i64, ptr %3, align 4 %71 = and i64 %70, 2 %.not1190 = icmp eq i64 %71, 0 @@ -269,7 +268,7 @@ cond_exit_298: ; preds = %.thread %72 = or disjoint i64 %70, 2 store i64 %72, ptr %3, align 4 %73 = load i64, ptr %32, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %73) + %___future_measure.1 = tail call i64 @___future_measure(i64 %73, i64 0) tail call void @___qfree(i64 %73) %74 = load i64, ptr %1, align 4 %75 = and i64 %74, 2 @@ -280,7 +279,7 @@ cond_exit_298.1: ; preds = %.thread.1 %76 = and i64 %74, -3 store i64 %76, ptr %1, align 4 %77 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %lazy_measure.1, ptr %77, align 4 + store i64 %___future_measure.1, ptr %77, align 4 %78 = load i64, ptr %3, align 4 %79 = and i64 %78, 4 %.not1192 = icmp eq i64 %79, 0 @@ -290,7 +289,7 @@ cond_exit_298.1: ; preds = %.thread.1 %80 = or disjoint i64 %78, 4 store i64 %80, ptr %3, align 4 %81 = load i64, ptr %40, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %81) + %___future_measure.2 = tail call i64 @___future_measure(i64 %81, i64 0) tail call void @___qfree(i64 %81) %82 = load i64, ptr %1, align 4 %83 = and i64 %82, 4 @@ -301,7 +300,7 @@ cond_exit_298.2: ; preds = %.thread.2 %84 = and i64 %82, -5 store i64 %84, ptr %1, align 4 %85 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %lazy_measure.2, ptr %85, align 4 + store i64 %___future_measure.2, ptr %85, align 4 %86 = load i64, ptr %3, align 4 %87 = and i64 %86, 8 %.not1194 = icmp eq i64 %87, 0 @@ -311,7 +310,7 @@ cond_exit_298.2: ; preds = %.thread.2 %88 = or disjoint i64 %86, 8 store i64 %88, ptr %3, align 4 %89 = load i64, ptr %48, align 4 - %lazy_measure.3 = tail call i64 @___lazy_measure(i64 %89) + %___future_measure.3 = tail call i64 @___future_measure(i64 %89, i64 0) tail call void @___qfree(i64 %89) %90 = load i64, ptr %1, align 4 %91 = and i64 %90, 8 @@ -322,7 +321,7 @@ __barray_check_bounds.exit1126.4: ; preds = %.thread.3 %92 = and i64 %90, -9 store i64 %92, ptr %1, align 4 %93 = getelementptr inbounds nuw i8, ptr %0, i64 24 - store i64 %lazy_measure.3, ptr %93, align 4 + store i64 %___future_measure.3, ptr %93, align 4 %94 = load i64, ptr %3, align 4 %95 = and i64 %94, 16 %.not1196 = icmp eq i64 %95, 0 @@ -332,7 +331,7 @@ __barray_check_bounds.exit1122.4: ; preds = %__barray_check_boun %96 = or disjoint i64 %94, 16 store i64 %96, ptr %3, align 4 %97 = load i64, ptr %56, align 4 - %lazy_measure.4 = tail call i64 @___lazy_measure(i64 %97) + %___future_measure.4 = tail call i64 @___future_measure(i64 %97, i64 0) tail call void @___qfree(i64 %97) %98 = load i64, ptr %1, align 4 %99 = and i64 %98, 16 @@ -343,18 +342,18 @@ cond_exit_298.4: ; preds = %__barray_check_boun %100 = and i64 %98, -17 store i64 %100, ptr %1, align 4 %101 = getelementptr inbounds nuw i8, ptr %0, i64 32 - store i64 %lazy_measure.4, ptr %101, align 4 + store i64 %___future_measure.4, ptr %101, align 4 %102 = load i64, ptr %3, align 4 %103 = or i64 %102, -32 store i64 %103, ptr %3, align 4 %104 = icmp eq i64 %103, -1 - br i1 %104, label %loop_out318, label %mask_block_err.i + br i1 %104, label %loop_out317, label %mask_block_err.i -panic.i1129: ; preds = %loop_out318 +panic.i1129: ; preds = %loop_out317 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_mask_borrow.exit1130: ; preds = %loop_out318 +__barray_mask_borrow.exit1130: ; preds = %loop_out317 %105 = or disjoint i64 %63, 1 store i64 %105, ptr %1, align 4 %106 = load i64, ptr %0, align 4 @@ -555,27 +554,28 @@ cond_exit_558.4: ; preds = %__barray_mask_borro %163 = or i64 %162, -32 store i64 %163, ptr %1, align 4 %164 = icmp eq i64 %163, -1 - br i1 %164, label %loop_out620, label %mask_block_err.i1152 + br i1 %164, label %loop_out619, label %mask_block_err.i1152 -loop_out620: ; preds = %cond_exit_558.4 +loop_out619: ; preds = %cond_exit_558.4 tail call void @heap_free(ptr nonnull %0) tail call void @heap_free(ptr nonnull %1) %read_bool = tail call i1 @___read_future_bool(i64 %106) tail call void @___dec_future_refcount(i64 %106) tail call void @print_bool(ptr nonnull @res_a.A4A74DAF.0, i64 11, i1 %read_bool) - %read_bool690 = tail call i1 @___read_future_bool(i64 %113) + %read_bool689 = tail call i1 @___read_future_bool(i64 %113) tail call void @___dec_future_refcount(i64 %113) - tail call void @print_bool(ptr nonnull @res_b.3BD50C23.0, i64 11, i1 %read_bool690) - %read_bool705 = tail call i1 @___read_future_bool(i64 %120) + tail call void @print_bool(ptr nonnull @res_b.3BD50C23.0, i64 11, i1 %read_bool689) + %read_bool704 = tail call i1 @___read_future_bool(i64 %120) tail call void @___dec_future_refcount(i64 %120) - tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool705) - %read_bool720 = tail call i1 @___read_future_bool(i64 %127) + tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool704) + %read_bool719 = tail call i1 @___read_future_bool(i64 %127) tail call void @___dec_future_refcount(i64 %127) - tail call void @print_bool(ptr nonnull @res_d.00B84DC7.0, i64 11, i1 %read_bool720) - %read_bool735 = tail call i1 @___read_future_bool(i64 %134) + tail call void @print_bool(ptr nonnull @res_d.00B84DC7.0, i64 11, i1 %read_bool719) + %read_bool734 = tail call i1 @___read_future_bool(i64 %134) tail call void @___dec_future_refcount(i64 %134) - tail call void @print_bool(ptr nonnull @res_e.B9A29CAF.0, i64 11, i1 %read_bool735) - tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot2) + tail call void @print_bool(ptr nonnull @res_e.B9A29CAF.0, i64 11, i1 %read_bool734) + tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot1) + tail call void @random_seed(i64 %shot) %rint = tail call i32 @random_int() %rfloat = tail call double @random_float() %165 = sext i32 %rint to i64 @@ -588,14 +588,12 @@ declare ptr @heap_alloc(i64) local_unnamed_addr declare i64 @get_current_shot() local_unnamed_addr -declare void @random_seed(i64) local_unnamed_addr - ; Function Attrs: noreturn declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -609,6 +607,8 @@ declare void @print_bool(ptr, i64, i1) local_unnamed_addr declare void @print_int(ptr, i64, i64) local_unnamed_addr +declare void @random_seed(i64) local_unnamed_addr + declare i32 @random_int() local_unnamed_addr declare double @random_float() local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_seed_modes/determinism_repetition-helios-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_seed_modes/determinism_repetition-helios-aarch64-apple-darwin.ll index 652edc44..78b8e7fe 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_seed_modes/determinism_repetition-helios-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_seed_modes/determinism_repetition-helios-aarch64-apple-darwin.ll @@ -174,7 +174,7 @@ panic.i1194: ; preds = %__barray_check_boun %56 = getelementptr inbounds nuw i64, ptr %4, i64 %"223_0.sroa.15.01249" %57 = load i64, ptr %56, align 4 %58 = add i64 %"223_2.01248", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %57) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %57) tail call void @___qfree(i64 %57) %59 = icmp ult i64 %"223_2.01248", 100 br i1 %59, label %__barray_check_bounds.exit1189, label %out_of_bounds.i1188 @@ -184,7 +184,7 @@ cond_exit_227: ; preds = %__barray_check_boun %61 = xor i64 %38, %60 store i64 %61, ptr %37, align 4 %62 = getelementptr inbounds nuw i64, ptr %2, i64 %"223_2.01248" - store i64 %lazy_measure, ptr %62, align 4 + store i64 %___lazy_measure, ptr %62, align 4 %63 = icmp samesign ugt i64 %"223_0.sroa.15.01249", 98 br i1 %63, label %mask_block_ok.i, label %__barray_check_bounds.exit1193 diff --git a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_seed_modes/determinism_repetition-helios-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_seed_modes/determinism_repetition-helios-aarch64-unknown-linux-gnu.ll index 3a84f69a..ce3a6790 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_seed_modes/determinism_repetition-helios-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_seed_modes/determinism_repetition-helios-aarch64-unknown-linux-gnu.ll @@ -174,7 +174,7 @@ panic.i1194: ; preds = %__barray_check_boun %56 = getelementptr inbounds nuw i64, ptr %4, i64 %"223_0.sroa.15.01249" %57 = load i64, ptr %56, align 4 %58 = add i64 %"223_2.01248", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %57) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %57) tail call void @___qfree(i64 %57) %59 = icmp ult i64 %"223_2.01248", 100 br i1 %59, label %__barray_check_bounds.exit1189, label %out_of_bounds.i1188 @@ -184,7 +184,7 @@ cond_exit_227: ; preds = %__barray_check_boun %61 = xor i64 %38, %60 store i64 %61, ptr %37, align 4 %62 = getelementptr inbounds nuw i64, ptr %2, i64 %"223_2.01248" - store i64 %lazy_measure, ptr %62, align 4 + store i64 %___lazy_measure, ptr %62, align 4 %63 = icmp samesign ugt i64 %"223_0.sroa.15.01249", 98 br i1 %63, label %mask_block_ok.i, label %__barray_check_bounds.exit1193 diff --git a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_seed_modes/determinism_repetition-helios-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_seed_modes/determinism_repetition-helios-x86_64-apple-darwin.ll index 32a0ef8a..577e6e2b 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_seed_modes/determinism_repetition-helios-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_seed_modes/determinism_repetition-helios-x86_64-apple-darwin.ll @@ -174,7 +174,7 @@ panic.i1194: ; preds = %__barray_check_boun %56 = getelementptr inbounds nuw i64, ptr %4, i64 %"223_0.sroa.15.01249" %57 = load i64, ptr %56, align 4 %58 = add i64 %"223_2.01248", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %57) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %57) tail call void @___qfree(i64 %57) %59 = icmp ult i64 %"223_2.01248", 100 br i1 %59, label %__barray_check_bounds.exit1189, label %out_of_bounds.i1188 @@ -184,7 +184,7 @@ cond_exit_227: ; preds = %__barray_check_boun %61 = xor i64 %38, %60 store i64 %61, ptr %37, align 4 %62 = getelementptr inbounds nuw i64, ptr %2, i64 %"223_2.01248" - store i64 %lazy_measure, ptr %62, align 4 + store i64 %___lazy_measure, ptr %62, align 4 %63 = icmp samesign ugt i64 %"223_0.sroa.15.01249", 98 br i1 %63, label %mask_block_ok.i, label %__barray_check_bounds.exit1193 diff --git a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_seed_modes/determinism_repetition-helios-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_seed_modes/determinism_repetition-helios-x86_64-unknown-linux-gnu.ll index cc4670b0..1bd21f47 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_seed_modes/determinism_repetition-helios-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_seed_modes/determinism_repetition-helios-x86_64-unknown-linux-gnu.ll @@ -174,7 +174,7 @@ panic.i1194: ; preds = %__barray_check_boun %56 = getelementptr inbounds nuw i64, ptr %4, i64 %"223_0.sroa.15.01249" %57 = load i64, ptr %56, align 4 %58 = add i64 %"223_2.01248", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %57) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %57) tail call void @___qfree(i64 %57) %59 = icmp ult i64 %"223_2.01248", 100 br i1 %59, label %__barray_check_bounds.exit1189, label %out_of_bounds.i1188 @@ -184,7 +184,7 @@ cond_exit_227: ; preds = %__barray_check_boun %61 = xor i64 %38, %60 store i64 %61, ptr %37, align 4 %62 = getelementptr inbounds nuw i64, ptr %2, i64 %"223_2.01248" - store i64 %lazy_measure, ptr %62, align 4 + store i64 %___lazy_measure, ptr %62, align 4 %63 = icmp samesign ugt i64 %"223_0.sroa.15.01249", 98 br i1 %63, label %mask_block_ok.i, label %__barray_check_bounds.exit1193 diff --git a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_seed_modes/determinism_repetition-helios-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_seed_modes/determinism_repetition-helios-x86_64-windows-gnu.ll index 85925f5f..df3a3359 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_seed_modes/determinism_repetition-helios-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_seed_modes/determinism_repetition-helios-x86_64-windows-gnu.ll @@ -174,7 +174,7 @@ panic.i1194: ; preds = %__barray_check_boun %56 = getelementptr inbounds nuw i64, ptr %4, i64 %"223_0.sroa.15.01249" %57 = load i64, ptr %56, align 4 %58 = add i64 %"223_2.01248", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %57) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %57) tail call void @___qfree(i64 %57) %59 = icmp ult i64 %"223_2.01248", 100 br i1 %59, label %__barray_check_bounds.exit1189, label %out_of_bounds.i1188 @@ -184,7 +184,7 @@ cond_exit_227: ; preds = %__barray_check_boun %61 = xor i64 %38, %60 store i64 %61, ptr %37, align 4 %62 = getelementptr inbounds nuw i64, ptr %2, i64 %"223_2.01248" - store i64 %lazy_measure, ptr %62, align 4 + store i64 %___lazy_measure, ptr %62, align 4 %63 = icmp samesign ugt i64 %"223_0.sroa.15.01249", 98 br i1 %63, label %mask_block_ok.i, label %__barray_check_bounds.exit1193 diff --git a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_seed_modes/determinism_repetition-sol-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_seed_modes/determinism_repetition-sol-aarch64-apple-darwin.ll index 8f2f4f4a..4bf9e9c5 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_seed_modes/determinism_repetition-sol-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_seed_modes/determinism_repetition-sol-aarch64-apple-darwin.ll @@ -174,7 +174,7 @@ panic.i1194: ; preds = %__barray_check_boun %56 = getelementptr inbounds nuw i64, ptr %4, i64 %"223_0.sroa.15.01249" %57 = load i64, ptr %56, align 4 %58 = add i64 %"223_2.01248", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %57) + %___future_measure = tail call i64 @___future_measure(i64 %57, i64 0) tail call void @___qfree(i64 %57) %59 = icmp ult i64 %"223_2.01248", 100 br i1 %59, label %__barray_check_bounds.exit1189, label %out_of_bounds.i1188 @@ -184,7 +184,7 @@ cond_exit_227: ; preds = %__barray_check_boun %61 = xor i64 %38, %60 store i64 %61, ptr %37, align 4 %62 = getelementptr inbounds nuw i64, ptr %2, i64 %"223_2.01248" - store i64 %lazy_measure, ptr %62, align 4 + store i64 %___future_measure, ptr %62, align 4 %63 = icmp samesign ugt i64 %"223_0.sroa.15.01249", 98 br i1 %63, label %mask_block_ok.i, label %__barray_check_bounds.exit1193 @@ -351,7 +351,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #1 declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_seed_modes/determinism_repetition-sol-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_seed_modes/determinism_repetition-sol-aarch64-unknown-linux-gnu.ll index 66d30877..05bf42dd 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_seed_modes/determinism_repetition-sol-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_seed_modes/determinism_repetition-sol-aarch64-unknown-linux-gnu.ll @@ -174,7 +174,7 @@ panic.i1194: ; preds = %__barray_check_boun %56 = getelementptr inbounds nuw i64, ptr %4, i64 %"223_0.sroa.15.01249" %57 = load i64, ptr %56, align 4 %58 = add i64 %"223_2.01248", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %57) + %___future_measure = tail call i64 @___future_measure(i64 %57, i64 0) tail call void @___qfree(i64 %57) %59 = icmp ult i64 %"223_2.01248", 100 br i1 %59, label %__barray_check_bounds.exit1189, label %out_of_bounds.i1188 @@ -184,7 +184,7 @@ cond_exit_227: ; preds = %__barray_check_boun %61 = xor i64 %38, %60 store i64 %61, ptr %37, align 4 %62 = getelementptr inbounds nuw i64, ptr %2, i64 %"223_2.01248" - store i64 %lazy_measure, ptr %62, align 4 + store i64 %___future_measure, ptr %62, align 4 %63 = icmp samesign ugt i64 %"223_0.sroa.15.01249", 98 br i1 %63, label %mask_block_ok.i, label %__barray_check_bounds.exit1193 @@ -351,7 +351,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #1 declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_seed_modes/determinism_repetition-sol-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_seed_modes/determinism_repetition-sol-x86_64-apple-darwin.ll index cce8839d..a3608925 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_seed_modes/determinism_repetition-sol-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_seed_modes/determinism_repetition-sol-x86_64-apple-darwin.ll @@ -174,7 +174,7 @@ panic.i1194: ; preds = %__barray_check_boun %56 = getelementptr inbounds nuw i64, ptr %4, i64 %"223_0.sroa.15.01249" %57 = load i64, ptr %56, align 4 %58 = add i64 %"223_2.01248", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %57) + %___future_measure = tail call i64 @___future_measure(i64 %57, i64 0) tail call void @___qfree(i64 %57) %59 = icmp ult i64 %"223_2.01248", 100 br i1 %59, label %__barray_check_bounds.exit1189, label %out_of_bounds.i1188 @@ -184,7 +184,7 @@ cond_exit_227: ; preds = %__barray_check_boun %61 = xor i64 %38, %60 store i64 %61, ptr %37, align 4 %62 = getelementptr inbounds nuw i64, ptr %2, i64 %"223_2.01248" - store i64 %lazy_measure, ptr %62, align 4 + store i64 %___future_measure, ptr %62, align 4 %63 = icmp samesign ugt i64 %"223_0.sroa.15.01249", 98 br i1 %63, label %mask_block_ok.i, label %__barray_check_bounds.exit1193 @@ -351,7 +351,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #1 declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_seed_modes/determinism_repetition-sol-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_seed_modes/determinism_repetition-sol-x86_64-unknown-linux-gnu.ll index b32e567c..a372a35c 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_seed_modes/determinism_repetition-sol-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_seed_modes/determinism_repetition-sol-x86_64-unknown-linux-gnu.ll @@ -174,7 +174,7 @@ panic.i1194: ; preds = %__barray_check_boun %56 = getelementptr inbounds nuw i64, ptr %4, i64 %"223_0.sroa.15.01249" %57 = load i64, ptr %56, align 4 %58 = add i64 %"223_2.01248", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %57) + %___future_measure = tail call i64 @___future_measure(i64 %57, i64 0) tail call void @___qfree(i64 %57) %59 = icmp ult i64 %"223_2.01248", 100 br i1 %59, label %__barray_check_bounds.exit1189, label %out_of_bounds.i1188 @@ -184,7 +184,7 @@ cond_exit_227: ; preds = %__barray_check_boun %61 = xor i64 %38, %60 store i64 %61, ptr %37, align 4 %62 = getelementptr inbounds nuw i64, ptr %2, i64 %"223_2.01248" - store i64 %lazy_measure, ptr %62, align 4 + store i64 %___future_measure, ptr %62, align 4 %63 = icmp samesign ugt i64 %"223_0.sroa.15.01249", 98 br i1 %63, label %mask_block_ok.i, label %__barray_check_bounds.exit1193 @@ -351,7 +351,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #1 declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_seed_modes/determinism_repetition-sol-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_seed_modes/determinism_repetition-sol-x86_64-windows-gnu.ll index 525acff4..424e0ccb 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_determinism/test_seed_modes/determinism_repetition-sol-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_determinism/test_seed_modes/determinism_repetition-sol-x86_64-windows-gnu.ll @@ -174,7 +174,7 @@ panic.i1194: ; preds = %__barray_check_boun %56 = getelementptr inbounds nuw i64, ptr %4, i64 %"223_0.sroa.15.01249" %57 = load i64, ptr %56, align 4 %58 = add i64 %"223_2.01248", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %57) + %___future_measure = tail call i64 @___future_measure(i64 %57, i64 0) tail call void @___qfree(i64 %57) %59 = icmp ult i64 %"223_2.01248", 100 br i1 %59, label %__barray_check_bounds.exit1189, label %out_of_bounds.i1188 @@ -184,7 +184,7 @@ cond_exit_227: ; preds = %__barray_check_boun %61 = xor i64 %38, %60 store i64 %61, ptr %37, align 4 %62 = getelementptr inbounds nuw i64, ptr %2, i64 %"223_2.01248" - store i64 %lazy_measure, ptr %62, align 4 + store i64 %___future_measure, ptr %62, align 4 %63 = icmp samesign ugt i64 %"223_0.sroa.15.01249", 98 br i1 %63, label %mask_block_ok.i, label %__barray_check_bounds.exit1193 @@ -351,7 +351,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #1 declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_circuit_output/circuit_output-helios-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_circuit_output/circuit_output-helios-aarch64-apple-darwin.ll index 584e1550..794b5ee2 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_circuit_output/circuit_output-helios-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_circuit_output/circuit_output-helios-aarch64-apple-darwin.ll @@ -22,10 +22,10 @@ __hugr__.__tk2_helios_qalloc.52.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) br i1 %read_bool, label %0, label %2 @@ -42,13 +42,13 @@ __hugr__.__tk2_helios_qalloc.52.exit47: ; preds = %0 tail call void @___reset(i64 %qalloc.i44) tail call void @___rxy(i64 %qalloc.i44, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i44, double 0x400921FB54442D18) - %lazy_measure10 = tail call i64 @___lazy_measure(i64 %qalloc.i44) + %___lazy_measure10 = tail call i64 @___lazy_measure(i64 %qalloc.i44) tail call void @___qfree(i64 %qalloc.i44) - tail call void @___inc_future_refcount(i64 %lazy_measure10) - %read_bool16 = tail call i1 @___read_future_bool(i64 %lazy_measure10) - tail call void @___dec_future_refcount(i64 %lazy_measure10) - %read_bool19 = tail call i1 @___read_future_bool(i64 %lazy_measure10) - tail call void @___dec_future_refcount(i64 %lazy_measure10) + tail call void @___inc_future_refcount(i64 %___lazy_measure10) + %read_bool16 = tail call i1 @___read_future_bool(i64 %___lazy_measure10) + tail call void @___dec_future_refcount(i64 %___lazy_measure10) + %read_bool19 = tail call i1 @___read_future_bool(i64 %___lazy_measure10) + tail call void @___dec_future_refcount(i64 %___lazy_measure10) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool19) br i1 %read_bool16, label %1, label %2 @@ -65,10 +65,10 @@ __hugr__.__tk2_helios_qalloc.52.exit51: ; preds = %1 tail call void @___reset(i64 %qalloc.i48) tail call void @___rxy(i64 %qalloc.i48, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i48, double 0x400921FB54442D18) - %lazy_measure30 = tail call i64 @___lazy_measure(i64 %qalloc.i48) + %___lazy_measure30 = tail call i64 @___lazy_measure(i64 %qalloc.i48) tail call void @___qfree(i64 %qalloc.i48) - %read_bool32 = tail call i1 @___read_future_bool(i64 %lazy_measure30) - tail call void @___dec_future_refcount(i64 %lazy_measure30) + %read_bool32 = tail call i1 @___read_future_bool(i64 %___lazy_measure30) + tail call void @___dec_future_refcount(i64 %___lazy_measure30) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool32) br label %2 diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_circuit_output/circuit_output-helios-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_circuit_output/circuit_output-helios-aarch64-unknown-linux-gnu.ll index 11c533b6..274cff4f 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_circuit_output/circuit_output-helios-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_circuit_output/circuit_output-helios-aarch64-unknown-linux-gnu.ll @@ -22,10 +22,10 @@ __hugr__.__tk2_helios_qalloc.52.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) br i1 %read_bool, label %0, label %2 @@ -42,13 +42,13 @@ __hugr__.__tk2_helios_qalloc.52.exit47: ; preds = %0 tail call void @___reset(i64 %qalloc.i44) tail call void @___rxy(i64 %qalloc.i44, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i44, double 0x400921FB54442D18) - %lazy_measure10 = tail call i64 @___lazy_measure(i64 %qalloc.i44) + %___lazy_measure10 = tail call i64 @___lazy_measure(i64 %qalloc.i44) tail call void @___qfree(i64 %qalloc.i44) - tail call void @___inc_future_refcount(i64 %lazy_measure10) - %read_bool16 = tail call i1 @___read_future_bool(i64 %lazy_measure10) - tail call void @___dec_future_refcount(i64 %lazy_measure10) - %read_bool19 = tail call i1 @___read_future_bool(i64 %lazy_measure10) - tail call void @___dec_future_refcount(i64 %lazy_measure10) + tail call void @___inc_future_refcount(i64 %___lazy_measure10) + %read_bool16 = tail call i1 @___read_future_bool(i64 %___lazy_measure10) + tail call void @___dec_future_refcount(i64 %___lazy_measure10) + %read_bool19 = tail call i1 @___read_future_bool(i64 %___lazy_measure10) + tail call void @___dec_future_refcount(i64 %___lazy_measure10) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool19) br i1 %read_bool16, label %1, label %2 @@ -65,10 +65,10 @@ __hugr__.__tk2_helios_qalloc.52.exit51: ; preds = %1 tail call void @___reset(i64 %qalloc.i48) tail call void @___rxy(i64 %qalloc.i48, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i48, double 0x400921FB54442D18) - %lazy_measure30 = tail call i64 @___lazy_measure(i64 %qalloc.i48) + %___lazy_measure30 = tail call i64 @___lazy_measure(i64 %qalloc.i48) tail call void @___qfree(i64 %qalloc.i48) - %read_bool32 = tail call i1 @___read_future_bool(i64 %lazy_measure30) - tail call void @___dec_future_refcount(i64 %lazy_measure30) + %read_bool32 = tail call i1 @___read_future_bool(i64 %___lazy_measure30) + tail call void @___dec_future_refcount(i64 %___lazy_measure30) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool32) br label %2 diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_circuit_output/circuit_output-helios-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_circuit_output/circuit_output-helios-x86_64-apple-darwin.ll index f4734a31..171aa621 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_circuit_output/circuit_output-helios-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_circuit_output/circuit_output-helios-x86_64-apple-darwin.ll @@ -22,10 +22,10 @@ __hugr__.__tk2_helios_qalloc.52.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) br i1 %read_bool, label %0, label %2 @@ -42,13 +42,13 @@ __hugr__.__tk2_helios_qalloc.52.exit47: ; preds = %0 tail call void @___reset(i64 %qalloc.i44) tail call void @___rxy(i64 %qalloc.i44, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i44, double 0x400921FB54442D18) - %lazy_measure10 = tail call i64 @___lazy_measure(i64 %qalloc.i44) + %___lazy_measure10 = tail call i64 @___lazy_measure(i64 %qalloc.i44) tail call void @___qfree(i64 %qalloc.i44) - tail call void @___inc_future_refcount(i64 %lazy_measure10) - %read_bool16 = tail call i1 @___read_future_bool(i64 %lazy_measure10) - tail call void @___dec_future_refcount(i64 %lazy_measure10) - %read_bool19 = tail call i1 @___read_future_bool(i64 %lazy_measure10) - tail call void @___dec_future_refcount(i64 %lazy_measure10) + tail call void @___inc_future_refcount(i64 %___lazy_measure10) + %read_bool16 = tail call i1 @___read_future_bool(i64 %___lazy_measure10) + tail call void @___dec_future_refcount(i64 %___lazy_measure10) + %read_bool19 = tail call i1 @___read_future_bool(i64 %___lazy_measure10) + tail call void @___dec_future_refcount(i64 %___lazy_measure10) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool19) br i1 %read_bool16, label %1, label %2 @@ -65,10 +65,10 @@ __hugr__.__tk2_helios_qalloc.52.exit51: ; preds = %1 tail call void @___reset(i64 %qalloc.i48) tail call void @___rxy(i64 %qalloc.i48, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i48, double 0x400921FB54442D18) - %lazy_measure30 = tail call i64 @___lazy_measure(i64 %qalloc.i48) + %___lazy_measure30 = tail call i64 @___lazy_measure(i64 %qalloc.i48) tail call void @___qfree(i64 %qalloc.i48) - %read_bool32 = tail call i1 @___read_future_bool(i64 %lazy_measure30) - tail call void @___dec_future_refcount(i64 %lazy_measure30) + %read_bool32 = tail call i1 @___read_future_bool(i64 %___lazy_measure30) + tail call void @___dec_future_refcount(i64 %___lazy_measure30) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool32) br label %2 diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_circuit_output/circuit_output-helios-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_circuit_output/circuit_output-helios-x86_64-unknown-linux-gnu.ll index 9e46ed57..a12fdeb5 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_circuit_output/circuit_output-helios-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_circuit_output/circuit_output-helios-x86_64-unknown-linux-gnu.ll @@ -22,10 +22,10 @@ __hugr__.__tk2_helios_qalloc.52.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) br i1 %read_bool, label %0, label %2 @@ -42,13 +42,13 @@ __hugr__.__tk2_helios_qalloc.52.exit47: ; preds = %0 tail call void @___reset(i64 %qalloc.i44) tail call void @___rxy(i64 %qalloc.i44, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i44, double 0x400921FB54442D18) - %lazy_measure10 = tail call i64 @___lazy_measure(i64 %qalloc.i44) + %___lazy_measure10 = tail call i64 @___lazy_measure(i64 %qalloc.i44) tail call void @___qfree(i64 %qalloc.i44) - tail call void @___inc_future_refcount(i64 %lazy_measure10) - %read_bool16 = tail call i1 @___read_future_bool(i64 %lazy_measure10) - tail call void @___dec_future_refcount(i64 %lazy_measure10) - %read_bool19 = tail call i1 @___read_future_bool(i64 %lazy_measure10) - tail call void @___dec_future_refcount(i64 %lazy_measure10) + tail call void @___inc_future_refcount(i64 %___lazy_measure10) + %read_bool16 = tail call i1 @___read_future_bool(i64 %___lazy_measure10) + tail call void @___dec_future_refcount(i64 %___lazy_measure10) + %read_bool19 = tail call i1 @___read_future_bool(i64 %___lazy_measure10) + tail call void @___dec_future_refcount(i64 %___lazy_measure10) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool19) br i1 %read_bool16, label %1, label %2 @@ -65,10 +65,10 @@ __hugr__.__tk2_helios_qalloc.52.exit51: ; preds = %1 tail call void @___reset(i64 %qalloc.i48) tail call void @___rxy(i64 %qalloc.i48, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i48, double 0x400921FB54442D18) - %lazy_measure30 = tail call i64 @___lazy_measure(i64 %qalloc.i48) + %___lazy_measure30 = tail call i64 @___lazy_measure(i64 %qalloc.i48) tail call void @___qfree(i64 %qalloc.i48) - %read_bool32 = tail call i1 @___read_future_bool(i64 %lazy_measure30) - tail call void @___dec_future_refcount(i64 %lazy_measure30) + %read_bool32 = tail call i1 @___read_future_bool(i64 %___lazy_measure30) + tail call void @___dec_future_refcount(i64 %___lazy_measure30) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool32) br label %2 diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_circuit_output/circuit_output-helios-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_circuit_output/circuit_output-helios-x86_64-windows-gnu.ll index cc74b479..e0fd1427 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_circuit_output/circuit_output-helios-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_circuit_output/circuit_output-helios-x86_64-windows-gnu.ll @@ -22,10 +22,10 @@ __hugr__.__tk2_helios_qalloc.52.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) br i1 %read_bool, label %0, label %2 @@ -42,13 +42,13 @@ __hugr__.__tk2_helios_qalloc.52.exit47: ; preds = %0 tail call void @___reset(i64 %qalloc.i44) tail call void @___rxy(i64 %qalloc.i44, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i44, double 0x400921FB54442D18) - %lazy_measure10 = tail call i64 @___lazy_measure(i64 %qalloc.i44) + %___lazy_measure10 = tail call i64 @___lazy_measure(i64 %qalloc.i44) tail call void @___qfree(i64 %qalloc.i44) - tail call void @___inc_future_refcount(i64 %lazy_measure10) - %read_bool16 = tail call i1 @___read_future_bool(i64 %lazy_measure10) - tail call void @___dec_future_refcount(i64 %lazy_measure10) - %read_bool19 = tail call i1 @___read_future_bool(i64 %lazy_measure10) - tail call void @___dec_future_refcount(i64 %lazy_measure10) + tail call void @___inc_future_refcount(i64 %___lazy_measure10) + %read_bool16 = tail call i1 @___read_future_bool(i64 %___lazy_measure10) + tail call void @___dec_future_refcount(i64 %___lazy_measure10) + %read_bool19 = tail call i1 @___read_future_bool(i64 %___lazy_measure10) + tail call void @___dec_future_refcount(i64 %___lazy_measure10) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool19) br i1 %read_bool16, label %1, label %2 @@ -65,10 +65,10 @@ __hugr__.__tk2_helios_qalloc.52.exit51: ; preds = %1 tail call void @___reset(i64 %qalloc.i48) tail call void @___rxy(i64 %qalloc.i48, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i48, double 0x400921FB54442D18) - %lazy_measure30 = tail call i64 @___lazy_measure(i64 %qalloc.i48) + %___lazy_measure30 = tail call i64 @___lazy_measure(i64 %qalloc.i48) tail call void @___qfree(i64 %qalloc.i48) - %read_bool32 = tail call i1 @___read_future_bool(i64 %lazy_measure30) - tail call void @___dec_future_refcount(i64 %lazy_measure30) + %read_bool32 = tail call i1 @___read_future_bool(i64 %___lazy_measure30) + tail call void @___dec_future_refcount(i64 %___lazy_measure30) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool32) br label %2 diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_circuit_output/circuit_output-sol-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_circuit_output/circuit_output-sol-aarch64-apple-darwin.ll index ef130f09..c1f9f091 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_circuit_output/circuit_output-sol-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_circuit_output/circuit_output-sol-aarch64-apple-darwin.ll @@ -22,10 +22,10 @@ __hugr__.__tk2_sol_qalloc.52.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) br i1 %read_bool, label %0, label %2 @@ -42,13 +42,13 @@ __hugr__.__tk2_sol_qalloc.52.exit47: ; preds = %0 tail call void @___reset(i64 %qalloc.i44) tail call void @___rp(i64 %qalloc.i44, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i44, double 0x400921FB54442D18) - %lazy_measure10 = tail call i64 @___lazy_measure(i64 %qalloc.i44) + %___future_measure10 = tail call i64 @___future_measure(i64 %qalloc.i44, i64 0) tail call void @___qfree(i64 %qalloc.i44) - tail call void @___inc_future_refcount(i64 %lazy_measure10) - %read_bool16 = tail call i1 @___read_future_bool(i64 %lazy_measure10) - tail call void @___dec_future_refcount(i64 %lazy_measure10) - %read_bool19 = tail call i1 @___read_future_bool(i64 %lazy_measure10) - tail call void @___dec_future_refcount(i64 %lazy_measure10) + tail call void @___inc_future_refcount(i64 %___future_measure10) + %read_bool16 = tail call i1 @___read_future_bool(i64 %___future_measure10) + tail call void @___dec_future_refcount(i64 %___future_measure10) + %read_bool19 = tail call i1 @___read_future_bool(i64 %___future_measure10) + tail call void @___dec_future_refcount(i64 %___future_measure10) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool19) br i1 %read_bool16, label %1, label %2 @@ -65,10 +65,10 @@ __hugr__.__tk2_sol_qalloc.52.exit51: ; preds = %1 tail call void @___reset(i64 %qalloc.i48) tail call void @___rp(i64 %qalloc.i48, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i48, double 0x400921FB54442D18) - %lazy_measure30 = tail call i64 @___lazy_measure(i64 %qalloc.i48) + %___future_measure30 = tail call i64 @___future_measure(i64 %qalloc.i48, i64 0) tail call void @___qfree(i64 %qalloc.i48) - %read_bool32 = tail call i1 @___read_future_bool(i64 %lazy_measure30) - tail call void @___dec_future_refcount(i64 %lazy_measure30) + %read_bool32 = tail call i1 @___read_future_bool(i64 %___future_measure30) + tail call void @___dec_future_refcount(i64 %___future_measure30) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool32) br label %2 @@ -76,7 +76,7 @@ __hugr__.__tk2_sol_qalloc.52.exit51: ; preds = %1 ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_circuit_output/circuit_output-sol-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_circuit_output/circuit_output-sol-aarch64-unknown-linux-gnu.ll index 86c1ce3d..451e4272 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_circuit_output/circuit_output-sol-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_circuit_output/circuit_output-sol-aarch64-unknown-linux-gnu.ll @@ -22,10 +22,10 @@ __hugr__.__tk2_sol_qalloc.52.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) br i1 %read_bool, label %0, label %2 @@ -42,13 +42,13 @@ __hugr__.__tk2_sol_qalloc.52.exit47: ; preds = %0 tail call void @___reset(i64 %qalloc.i44) tail call void @___rp(i64 %qalloc.i44, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i44, double 0x400921FB54442D18) - %lazy_measure10 = tail call i64 @___lazy_measure(i64 %qalloc.i44) + %___future_measure10 = tail call i64 @___future_measure(i64 %qalloc.i44, i64 0) tail call void @___qfree(i64 %qalloc.i44) - tail call void @___inc_future_refcount(i64 %lazy_measure10) - %read_bool16 = tail call i1 @___read_future_bool(i64 %lazy_measure10) - tail call void @___dec_future_refcount(i64 %lazy_measure10) - %read_bool19 = tail call i1 @___read_future_bool(i64 %lazy_measure10) - tail call void @___dec_future_refcount(i64 %lazy_measure10) + tail call void @___inc_future_refcount(i64 %___future_measure10) + %read_bool16 = tail call i1 @___read_future_bool(i64 %___future_measure10) + tail call void @___dec_future_refcount(i64 %___future_measure10) + %read_bool19 = tail call i1 @___read_future_bool(i64 %___future_measure10) + tail call void @___dec_future_refcount(i64 %___future_measure10) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool19) br i1 %read_bool16, label %1, label %2 @@ -65,10 +65,10 @@ __hugr__.__tk2_sol_qalloc.52.exit51: ; preds = %1 tail call void @___reset(i64 %qalloc.i48) tail call void @___rp(i64 %qalloc.i48, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i48, double 0x400921FB54442D18) - %lazy_measure30 = tail call i64 @___lazy_measure(i64 %qalloc.i48) + %___future_measure30 = tail call i64 @___future_measure(i64 %qalloc.i48, i64 0) tail call void @___qfree(i64 %qalloc.i48) - %read_bool32 = tail call i1 @___read_future_bool(i64 %lazy_measure30) - tail call void @___dec_future_refcount(i64 %lazy_measure30) + %read_bool32 = tail call i1 @___read_future_bool(i64 %___future_measure30) + tail call void @___dec_future_refcount(i64 %___future_measure30) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool32) br label %2 @@ -76,7 +76,7 @@ __hugr__.__tk2_sol_qalloc.52.exit51: ; preds = %1 ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_circuit_output/circuit_output-sol-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_circuit_output/circuit_output-sol-x86_64-apple-darwin.ll index f877fc95..d6a998f8 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_circuit_output/circuit_output-sol-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_circuit_output/circuit_output-sol-x86_64-apple-darwin.ll @@ -22,10 +22,10 @@ __hugr__.__tk2_sol_qalloc.52.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) br i1 %read_bool, label %0, label %2 @@ -42,13 +42,13 @@ __hugr__.__tk2_sol_qalloc.52.exit47: ; preds = %0 tail call void @___reset(i64 %qalloc.i44) tail call void @___rp(i64 %qalloc.i44, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i44, double 0x400921FB54442D18) - %lazy_measure10 = tail call i64 @___lazy_measure(i64 %qalloc.i44) + %___future_measure10 = tail call i64 @___future_measure(i64 %qalloc.i44, i64 0) tail call void @___qfree(i64 %qalloc.i44) - tail call void @___inc_future_refcount(i64 %lazy_measure10) - %read_bool16 = tail call i1 @___read_future_bool(i64 %lazy_measure10) - tail call void @___dec_future_refcount(i64 %lazy_measure10) - %read_bool19 = tail call i1 @___read_future_bool(i64 %lazy_measure10) - tail call void @___dec_future_refcount(i64 %lazy_measure10) + tail call void @___inc_future_refcount(i64 %___future_measure10) + %read_bool16 = tail call i1 @___read_future_bool(i64 %___future_measure10) + tail call void @___dec_future_refcount(i64 %___future_measure10) + %read_bool19 = tail call i1 @___read_future_bool(i64 %___future_measure10) + tail call void @___dec_future_refcount(i64 %___future_measure10) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool19) br i1 %read_bool16, label %1, label %2 @@ -65,10 +65,10 @@ __hugr__.__tk2_sol_qalloc.52.exit51: ; preds = %1 tail call void @___reset(i64 %qalloc.i48) tail call void @___rp(i64 %qalloc.i48, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i48, double 0x400921FB54442D18) - %lazy_measure30 = tail call i64 @___lazy_measure(i64 %qalloc.i48) + %___future_measure30 = tail call i64 @___future_measure(i64 %qalloc.i48, i64 0) tail call void @___qfree(i64 %qalloc.i48) - %read_bool32 = tail call i1 @___read_future_bool(i64 %lazy_measure30) - tail call void @___dec_future_refcount(i64 %lazy_measure30) + %read_bool32 = tail call i1 @___read_future_bool(i64 %___future_measure30) + tail call void @___dec_future_refcount(i64 %___future_measure30) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool32) br label %2 @@ -76,7 +76,7 @@ __hugr__.__tk2_sol_qalloc.52.exit51: ; preds = %1 ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_circuit_output/circuit_output-sol-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_circuit_output/circuit_output-sol-x86_64-unknown-linux-gnu.ll index 1abcb19c..345ca910 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_circuit_output/circuit_output-sol-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_circuit_output/circuit_output-sol-x86_64-unknown-linux-gnu.ll @@ -22,10 +22,10 @@ __hugr__.__tk2_sol_qalloc.52.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) br i1 %read_bool, label %0, label %2 @@ -42,13 +42,13 @@ __hugr__.__tk2_sol_qalloc.52.exit47: ; preds = %0 tail call void @___reset(i64 %qalloc.i44) tail call void @___rp(i64 %qalloc.i44, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i44, double 0x400921FB54442D18) - %lazy_measure10 = tail call i64 @___lazy_measure(i64 %qalloc.i44) + %___future_measure10 = tail call i64 @___future_measure(i64 %qalloc.i44, i64 0) tail call void @___qfree(i64 %qalloc.i44) - tail call void @___inc_future_refcount(i64 %lazy_measure10) - %read_bool16 = tail call i1 @___read_future_bool(i64 %lazy_measure10) - tail call void @___dec_future_refcount(i64 %lazy_measure10) - %read_bool19 = tail call i1 @___read_future_bool(i64 %lazy_measure10) - tail call void @___dec_future_refcount(i64 %lazy_measure10) + tail call void @___inc_future_refcount(i64 %___future_measure10) + %read_bool16 = tail call i1 @___read_future_bool(i64 %___future_measure10) + tail call void @___dec_future_refcount(i64 %___future_measure10) + %read_bool19 = tail call i1 @___read_future_bool(i64 %___future_measure10) + tail call void @___dec_future_refcount(i64 %___future_measure10) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool19) br i1 %read_bool16, label %1, label %2 @@ -65,10 +65,10 @@ __hugr__.__tk2_sol_qalloc.52.exit51: ; preds = %1 tail call void @___reset(i64 %qalloc.i48) tail call void @___rp(i64 %qalloc.i48, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i48, double 0x400921FB54442D18) - %lazy_measure30 = tail call i64 @___lazy_measure(i64 %qalloc.i48) + %___future_measure30 = tail call i64 @___future_measure(i64 %qalloc.i48, i64 0) tail call void @___qfree(i64 %qalloc.i48) - %read_bool32 = tail call i1 @___read_future_bool(i64 %lazy_measure30) - tail call void @___dec_future_refcount(i64 %lazy_measure30) + %read_bool32 = tail call i1 @___read_future_bool(i64 %___future_measure30) + tail call void @___dec_future_refcount(i64 %___future_measure30) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool32) br label %2 @@ -76,7 +76,7 @@ __hugr__.__tk2_sol_qalloc.52.exit51: ; preds = %1 ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_circuit_output/circuit_output-sol-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_circuit_output/circuit_output-sol-x86_64-windows-gnu.ll index 6dd8e9ec..17e38a43 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_circuit_output/circuit_output-sol-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_circuit_output/circuit_output-sol-x86_64-windows-gnu.ll @@ -22,10 +22,10 @@ __hugr__.__tk2_sol_qalloc.52.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) br i1 %read_bool, label %0, label %2 @@ -42,13 +42,13 @@ __hugr__.__tk2_sol_qalloc.52.exit47: ; preds = %0 tail call void @___reset(i64 %qalloc.i44) tail call void @___rp(i64 %qalloc.i44, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i44, double 0x400921FB54442D18) - %lazy_measure10 = tail call i64 @___lazy_measure(i64 %qalloc.i44) + %___future_measure10 = tail call i64 @___future_measure(i64 %qalloc.i44, i64 0) tail call void @___qfree(i64 %qalloc.i44) - tail call void @___inc_future_refcount(i64 %lazy_measure10) - %read_bool16 = tail call i1 @___read_future_bool(i64 %lazy_measure10) - tail call void @___dec_future_refcount(i64 %lazy_measure10) - %read_bool19 = tail call i1 @___read_future_bool(i64 %lazy_measure10) - tail call void @___dec_future_refcount(i64 %lazy_measure10) + tail call void @___inc_future_refcount(i64 %___future_measure10) + %read_bool16 = tail call i1 @___read_future_bool(i64 %___future_measure10) + tail call void @___dec_future_refcount(i64 %___future_measure10) + %read_bool19 = tail call i1 @___read_future_bool(i64 %___future_measure10) + tail call void @___dec_future_refcount(i64 %___future_measure10) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool19) br i1 %read_bool16, label %1, label %2 @@ -65,10 +65,10 @@ __hugr__.__tk2_sol_qalloc.52.exit51: ; preds = %1 tail call void @___reset(i64 %qalloc.i48) tail call void @___rp(i64 %qalloc.i48, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i48, double 0x400921FB54442D18) - %lazy_measure30 = tail call i64 @___lazy_measure(i64 %qalloc.i48) + %___future_measure30 = tail call i64 @___future_measure(i64 %qalloc.i48, i64 0) tail call void @___qfree(i64 %qalloc.i48) - %read_bool32 = tail call i1 @___read_future_bool(i64 %lazy_measure30) - tail call void @___dec_future_refcount(i64 %lazy_measure30) + %read_bool32 = tail call i1 @___read_future_bool(i64 %___future_measure30) + tail call void @___dec_future_refcount(i64 %___future_measure30) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool32) br label %2 @@ -76,7 +76,7 @@ __hugr__.__tk2_sol_qalloc.52.exit51: ; preds = %1 ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_corrupted_plugin/broken_plugin-helios-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_corrupted_plugin/broken_plugin-helios-aarch64-apple-darwin.ll index 7844fc7d..d73bbf34 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_corrupted_plugin/broken_plugin-helios-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_corrupted_plugin/broken_plugin-helios-aarch64-apple-darwin.ll @@ -20,10 +20,10 @@ __hugr__.__tk2_helios_qalloc.9.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_corrupted_plugin/broken_plugin-helios-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_corrupted_plugin/broken_plugin-helios-aarch64-unknown-linux-gnu.ll index d8e65013..6c93f154 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_corrupted_plugin/broken_plugin-helios-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_corrupted_plugin/broken_plugin-helios-aarch64-unknown-linux-gnu.ll @@ -20,10 +20,10 @@ __hugr__.__tk2_helios_qalloc.9.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_corrupted_plugin/broken_plugin-helios-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_corrupted_plugin/broken_plugin-helios-x86_64-apple-darwin.ll index a1d32e84..40113e37 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_corrupted_plugin/broken_plugin-helios-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_corrupted_plugin/broken_plugin-helios-x86_64-apple-darwin.ll @@ -20,10 +20,10 @@ __hugr__.__tk2_helios_qalloc.9.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_corrupted_plugin/broken_plugin-helios-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_corrupted_plugin/broken_plugin-helios-x86_64-unknown-linux-gnu.ll index 503e50d9..f46cfd8f 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_corrupted_plugin/broken_plugin-helios-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_corrupted_plugin/broken_plugin-helios-x86_64-unknown-linux-gnu.ll @@ -20,10 +20,10 @@ __hugr__.__tk2_helios_qalloc.9.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_corrupted_plugin/broken_plugin-helios-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_corrupted_plugin/broken_plugin-helios-x86_64-windows-gnu.ll index 0040ad68..9238102e 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_corrupted_plugin/broken_plugin-helios-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_corrupted_plugin/broken_plugin-helios-x86_64-windows-gnu.ll @@ -20,10 +20,10 @@ __hugr__.__tk2_helios_qalloc.9.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_corrupted_plugin/broken_plugin-sol-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_corrupted_plugin/broken_plugin-sol-aarch64-apple-darwin.ll index 524c83da..b4208bb6 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_corrupted_plugin/broken_plugin-sol-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_corrupted_plugin/broken_plugin-sol-aarch64-apple-darwin.ll @@ -20,15 +20,15 @@ __hugr__.__tk2_sol_qalloc.9.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_corrupted_plugin/broken_plugin-sol-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_corrupted_plugin/broken_plugin-sol-aarch64-unknown-linux-gnu.ll index d9a1c67d..df89ca3b 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_corrupted_plugin/broken_plugin-sol-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_corrupted_plugin/broken_plugin-sol-aarch64-unknown-linux-gnu.ll @@ -20,15 +20,15 @@ __hugr__.__tk2_sol_qalloc.9.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_corrupted_plugin/broken_plugin-sol-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_corrupted_plugin/broken_plugin-sol-x86_64-apple-darwin.ll index ca57cada..a5f0fb3f 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_corrupted_plugin/broken_plugin-sol-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_corrupted_plugin/broken_plugin-sol-x86_64-apple-darwin.ll @@ -20,15 +20,15 @@ __hugr__.__tk2_sol_qalloc.9.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_corrupted_plugin/broken_plugin-sol-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_corrupted_plugin/broken_plugin-sol-x86_64-unknown-linux-gnu.ll index 0d7e519d..e271194c 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_corrupted_plugin/broken_plugin-sol-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_corrupted_plugin/broken_plugin-sol-x86_64-unknown-linux-gnu.ll @@ -20,15 +20,15 @@ __hugr__.__tk2_sol_qalloc.9.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_corrupted_plugin/broken_plugin-sol-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_corrupted_plugin/broken_plugin-sol-x86_64-windows-gnu.ll index 0dc9ebe7..17a7261b 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_corrupted_plugin/broken_plugin-sol-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_corrupted_plugin/broken_plugin-sol-x86_64-windows-gnu.ll @@ -20,15 +20,15 @@ __hugr__.__tk2_sol_qalloc.9.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cy/cy_test-helios-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cy/cy_test-helios-aarch64-apple-darwin.ll index b518d835..c6cf0015 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cy/cy_test-helios-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cy/cy_test-helios-aarch64-apple-darwin.ll @@ -40,15 +40,15 @@ __hugr__.__tk2_helios_qalloc.60.exit252: ; preds = %__hugr__.__tk2_heli tail call void @___rz(i64 %qalloc.i249, double 0x3FF921FB54442D18) tail call void @___rxy(i64 %qalloc.i, double 0x400921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i249, double 0x400921FB54442D18, double 0x3FF921FB54442D18) - %lazy_measure6 = tail call i64 @___lazy_measure(i64 %qalloc.i249) + %___lazy_measure6 = tail call i64 @___lazy_measure(i64 %qalloc.i249) tail call void @___qfree(i64 %qalloc.i249) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure6) - tail call void @___dec_future_refcount(i64 %lazy_measure6) - %read_bool9 = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure6) + tail call void @___dec_future_refcount(i64 %___lazy_measure6) + %read_bool9 = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) %0 = tail call ptr @heap_alloc(i64 2) %1 = tail call ptr @heap_alloc(i64 8) store i64 0, ptr %1, align 1 @@ -141,15 +141,15 @@ __hugr__.__tk2_helios_qalloc.60.exit264: ; preds = %__hugr__.__tk2_heli call void @___rz(i64 %qalloc.i261, double 0x3FF921FB54442D18) call void @___rxy(i64 %qalloc.i257, double 0x400921FB54442D18, double 0x3FF921FB54442D18) call void @___rz(i64 %qalloc.i257, double 0xBFF921FB54442D18) - %lazy_measure31 = call i64 @___lazy_measure(i64 %qalloc.i257) + %___lazy_measure31 = call i64 @___lazy_measure(i64 %qalloc.i257) call void @___qfree(i64 %qalloc.i257) call void @___rxy(i64 %qalloc.i261, double 0x400921FB54442D18, double 0x3FF921FB54442D18) - %lazy_measure34 = call i64 @___lazy_measure(i64 %qalloc.i261) + %___lazy_measure34 = call i64 @___lazy_measure(i64 %qalloc.i261) call void @___qfree(i64 %qalloc.i261) - %read_bool36 = call i1 @___read_future_bool(i64 %lazy_measure34) - call void @___dec_future_refcount(i64 %lazy_measure34) - %read_bool39 = call i1 @___read_future_bool(i64 %lazy_measure31) - call void @___dec_future_refcount(i64 %lazy_measure31) + %read_bool36 = call i1 @___read_future_bool(i64 %___lazy_measure34) + call void @___dec_future_refcount(i64 %___lazy_measure34) + %read_bool39 = call i1 @___read_future_bool(i64 %___lazy_measure31) + call void @___dec_future_refcount(i64 %___lazy_measure31) %16 = call ptr @heap_alloc(i64 2) %17 = call ptr @heap_alloc(i64 8) store i64 0, ptr %17, align 1 @@ -242,15 +242,15 @@ __hugr__.__tk2_helios_qalloc.60.exit282: ; preds = %__hugr__.__tk2_heli call void @___rz(i64 %qalloc.i279, double 0x3FF921FB54442D18) call void @___rxy(i64 %qalloc.i275, double 0x400921FB54442D18, double 0x3FF921FB54442D18) call void @___rz(i64 %qalloc.i275, double 0xBFF921FB54442D18) - %lazy_measure71 = call i64 @___lazy_measure(i64 %qalloc.i275) + %___lazy_measure71 = call i64 @___lazy_measure(i64 %qalloc.i275) call void @___qfree(i64 %qalloc.i275) call void @___rxy(i64 %qalloc.i279, double 0x400921FB54442D18, double 0x3FF921FB54442D18) - %lazy_measure74 = call i64 @___lazy_measure(i64 %qalloc.i279) + %___lazy_measure74 = call i64 @___lazy_measure(i64 %qalloc.i279) call void @___qfree(i64 %qalloc.i279) - %read_bool76 = call i1 @___read_future_bool(i64 %lazy_measure74) - call void @___dec_future_refcount(i64 %lazy_measure74) - %read_bool79 = call i1 @___read_future_bool(i64 %lazy_measure71) - call void @___dec_future_refcount(i64 %lazy_measure71) + %read_bool76 = call i1 @___read_future_bool(i64 %___lazy_measure74) + call void @___dec_future_refcount(i64 %___lazy_measure74) + %read_bool79 = call i1 @___read_future_bool(i64 %___lazy_measure71) + call void @___dec_future_refcount(i64 %___lazy_measure71) %32 = call ptr @heap_alloc(i64 2) %33 = call ptr @heap_alloc(i64 8) store i64 0, ptr %33, align 1 @@ -344,15 +344,15 @@ __hugr__.__tk2_helios_qalloc.60.exit300: ; preds = %__hugr__.__tk2_heli call void @___rz(i64 %qalloc.i297, double 0x3FF921FB54442D18) call void @___rxy(i64 %qalloc.i293, double 0x400921FB54442D18, double 0x3FF921FB54442D18) call void @___rz(i64 %qalloc.i293, double 0xBFF921FB54442D18) - %lazy_measure112 = call i64 @___lazy_measure(i64 %qalloc.i293) + %___lazy_measure112 = call i64 @___lazy_measure(i64 %qalloc.i293) call void @___qfree(i64 %qalloc.i293) call void @___rxy(i64 %qalloc.i297, double 0x400921FB54442D18, double 0x3FF921FB54442D18) - %lazy_measure115 = call i64 @___lazy_measure(i64 %qalloc.i297) + %___lazy_measure115 = call i64 @___lazy_measure(i64 %qalloc.i297) call void @___qfree(i64 %qalloc.i297) - %read_bool117 = call i1 @___read_future_bool(i64 %lazy_measure115) - call void @___dec_future_refcount(i64 %lazy_measure115) - %read_bool120 = call i1 @___read_future_bool(i64 %lazy_measure112) - call void @___dec_future_refcount(i64 %lazy_measure112) + %read_bool117 = call i1 @___read_future_bool(i64 %___lazy_measure115) + call void @___dec_future_refcount(i64 %___lazy_measure115) + %read_bool120 = call i1 @___read_future_bool(i64 %___lazy_measure112) + call void @___dec_future_refcount(i64 %___lazy_measure112) %48 = call ptr @heap_alloc(i64 2) %49 = call ptr @heap_alloc(i64 8) store i64 0, ptr %49, align 1 diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cy/cy_test-helios-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cy/cy_test-helios-aarch64-unknown-linux-gnu.ll index c2909c46..4c79ad97 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cy/cy_test-helios-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cy/cy_test-helios-aarch64-unknown-linux-gnu.ll @@ -40,15 +40,15 @@ __hugr__.__tk2_helios_qalloc.60.exit252: ; preds = %__hugr__.__tk2_heli tail call void @___rz(i64 %qalloc.i249, double 0x3FF921FB54442D18) tail call void @___rxy(i64 %qalloc.i, double 0x400921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i249, double 0x400921FB54442D18, double 0x3FF921FB54442D18) - %lazy_measure6 = tail call i64 @___lazy_measure(i64 %qalloc.i249) + %___lazy_measure6 = tail call i64 @___lazy_measure(i64 %qalloc.i249) tail call void @___qfree(i64 %qalloc.i249) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure6) - tail call void @___dec_future_refcount(i64 %lazy_measure6) - %read_bool9 = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure6) + tail call void @___dec_future_refcount(i64 %___lazy_measure6) + %read_bool9 = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) %0 = tail call ptr @heap_alloc(i64 2) %1 = tail call ptr @heap_alloc(i64 8) store i64 0, ptr %1, align 1 @@ -141,15 +141,15 @@ __hugr__.__tk2_helios_qalloc.60.exit264: ; preds = %__hugr__.__tk2_heli call void @___rz(i64 %qalloc.i261, double 0x3FF921FB54442D18) call void @___rxy(i64 %qalloc.i257, double 0x400921FB54442D18, double 0x3FF921FB54442D18) call void @___rz(i64 %qalloc.i257, double 0xBFF921FB54442D18) - %lazy_measure31 = call i64 @___lazy_measure(i64 %qalloc.i257) + %___lazy_measure31 = call i64 @___lazy_measure(i64 %qalloc.i257) call void @___qfree(i64 %qalloc.i257) call void @___rxy(i64 %qalloc.i261, double 0x400921FB54442D18, double 0x3FF921FB54442D18) - %lazy_measure34 = call i64 @___lazy_measure(i64 %qalloc.i261) + %___lazy_measure34 = call i64 @___lazy_measure(i64 %qalloc.i261) call void @___qfree(i64 %qalloc.i261) - %read_bool36 = call i1 @___read_future_bool(i64 %lazy_measure34) - call void @___dec_future_refcount(i64 %lazy_measure34) - %read_bool39 = call i1 @___read_future_bool(i64 %lazy_measure31) - call void @___dec_future_refcount(i64 %lazy_measure31) + %read_bool36 = call i1 @___read_future_bool(i64 %___lazy_measure34) + call void @___dec_future_refcount(i64 %___lazy_measure34) + %read_bool39 = call i1 @___read_future_bool(i64 %___lazy_measure31) + call void @___dec_future_refcount(i64 %___lazy_measure31) %16 = call ptr @heap_alloc(i64 2) %17 = call ptr @heap_alloc(i64 8) store i64 0, ptr %17, align 1 @@ -242,15 +242,15 @@ __hugr__.__tk2_helios_qalloc.60.exit282: ; preds = %__hugr__.__tk2_heli call void @___rz(i64 %qalloc.i279, double 0x3FF921FB54442D18) call void @___rxy(i64 %qalloc.i275, double 0x400921FB54442D18, double 0x3FF921FB54442D18) call void @___rz(i64 %qalloc.i275, double 0xBFF921FB54442D18) - %lazy_measure71 = call i64 @___lazy_measure(i64 %qalloc.i275) + %___lazy_measure71 = call i64 @___lazy_measure(i64 %qalloc.i275) call void @___qfree(i64 %qalloc.i275) call void @___rxy(i64 %qalloc.i279, double 0x400921FB54442D18, double 0x3FF921FB54442D18) - %lazy_measure74 = call i64 @___lazy_measure(i64 %qalloc.i279) + %___lazy_measure74 = call i64 @___lazy_measure(i64 %qalloc.i279) call void @___qfree(i64 %qalloc.i279) - %read_bool76 = call i1 @___read_future_bool(i64 %lazy_measure74) - call void @___dec_future_refcount(i64 %lazy_measure74) - %read_bool79 = call i1 @___read_future_bool(i64 %lazy_measure71) - call void @___dec_future_refcount(i64 %lazy_measure71) + %read_bool76 = call i1 @___read_future_bool(i64 %___lazy_measure74) + call void @___dec_future_refcount(i64 %___lazy_measure74) + %read_bool79 = call i1 @___read_future_bool(i64 %___lazy_measure71) + call void @___dec_future_refcount(i64 %___lazy_measure71) %32 = call ptr @heap_alloc(i64 2) %33 = call ptr @heap_alloc(i64 8) store i64 0, ptr %33, align 1 @@ -344,15 +344,15 @@ __hugr__.__tk2_helios_qalloc.60.exit300: ; preds = %__hugr__.__tk2_heli call void @___rz(i64 %qalloc.i297, double 0x3FF921FB54442D18) call void @___rxy(i64 %qalloc.i293, double 0x400921FB54442D18, double 0x3FF921FB54442D18) call void @___rz(i64 %qalloc.i293, double 0xBFF921FB54442D18) - %lazy_measure112 = call i64 @___lazy_measure(i64 %qalloc.i293) + %___lazy_measure112 = call i64 @___lazy_measure(i64 %qalloc.i293) call void @___qfree(i64 %qalloc.i293) call void @___rxy(i64 %qalloc.i297, double 0x400921FB54442D18, double 0x3FF921FB54442D18) - %lazy_measure115 = call i64 @___lazy_measure(i64 %qalloc.i297) + %___lazy_measure115 = call i64 @___lazy_measure(i64 %qalloc.i297) call void @___qfree(i64 %qalloc.i297) - %read_bool117 = call i1 @___read_future_bool(i64 %lazy_measure115) - call void @___dec_future_refcount(i64 %lazy_measure115) - %read_bool120 = call i1 @___read_future_bool(i64 %lazy_measure112) - call void @___dec_future_refcount(i64 %lazy_measure112) + %read_bool117 = call i1 @___read_future_bool(i64 %___lazy_measure115) + call void @___dec_future_refcount(i64 %___lazy_measure115) + %read_bool120 = call i1 @___read_future_bool(i64 %___lazy_measure112) + call void @___dec_future_refcount(i64 %___lazy_measure112) %48 = call ptr @heap_alloc(i64 2) %49 = call ptr @heap_alloc(i64 8) store i64 0, ptr %49, align 1 diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cy/cy_test-helios-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cy/cy_test-helios-x86_64-apple-darwin.ll index 1e94f46a..995b7cf4 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cy/cy_test-helios-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cy/cy_test-helios-x86_64-apple-darwin.ll @@ -40,15 +40,15 @@ __hugr__.__tk2_helios_qalloc.60.exit252: ; preds = %__hugr__.__tk2_heli tail call void @___rz(i64 %qalloc.i249, double 0x3FF921FB54442D18) tail call void @___rxy(i64 %qalloc.i, double 0x400921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i249, double 0x400921FB54442D18, double 0x3FF921FB54442D18) - %lazy_measure6 = tail call i64 @___lazy_measure(i64 %qalloc.i249) + %___lazy_measure6 = tail call i64 @___lazy_measure(i64 %qalloc.i249) tail call void @___qfree(i64 %qalloc.i249) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure6) - tail call void @___dec_future_refcount(i64 %lazy_measure6) - %read_bool9 = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure6) + tail call void @___dec_future_refcount(i64 %___lazy_measure6) + %read_bool9 = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) %0 = tail call ptr @heap_alloc(i64 2) %1 = tail call ptr @heap_alloc(i64 8) store i64 0, ptr %1, align 1 @@ -141,15 +141,15 @@ __hugr__.__tk2_helios_qalloc.60.exit264: ; preds = %__hugr__.__tk2_heli call void @___rz(i64 %qalloc.i261, double 0x3FF921FB54442D18) call void @___rxy(i64 %qalloc.i257, double 0x400921FB54442D18, double 0x3FF921FB54442D18) call void @___rz(i64 %qalloc.i257, double 0xBFF921FB54442D18) - %lazy_measure31 = call i64 @___lazy_measure(i64 %qalloc.i257) + %___lazy_measure31 = call i64 @___lazy_measure(i64 %qalloc.i257) call void @___qfree(i64 %qalloc.i257) call void @___rxy(i64 %qalloc.i261, double 0x400921FB54442D18, double 0x3FF921FB54442D18) - %lazy_measure34 = call i64 @___lazy_measure(i64 %qalloc.i261) + %___lazy_measure34 = call i64 @___lazy_measure(i64 %qalloc.i261) call void @___qfree(i64 %qalloc.i261) - %read_bool36 = call i1 @___read_future_bool(i64 %lazy_measure34) - call void @___dec_future_refcount(i64 %lazy_measure34) - %read_bool39 = call i1 @___read_future_bool(i64 %lazy_measure31) - call void @___dec_future_refcount(i64 %lazy_measure31) + %read_bool36 = call i1 @___read_future_bool(i64 %___lazy_measure34) + call void @___dec_future_refcount(i64 %___lazy_measure34) + %read_bool39 = call i1 @___read_future_bool(i64 %___lazy_measure31) + call void @___dec_future_refcount(i64 %___lazy_measure31) %16 = call ptr @heap_alloc(i64 2) %17 = call ptr @heap_alloc(i64 8) store i64 0, ptr %17, align 1 @@ -242,15 +242,15 @@ __hugr__.__tk2_helios_qalloc.60.exit282: ; preds = %__hugr__.__tk2_heli call void @___rz(i64 %qalloc.i279, double 0x3FF921FB54442D18) call void @___rxy(i64 %qalloc.i275, double 0x400921FB54442D18, double 0x3FF921FB54442D18) call void @___rz(i64 %qalloc.i275, double 0xBFF921FB54442D18) - %lazy_measure71 = call i64 @___lazy_measure(i64 %qalloc.i275) + %___lazy_measure71 = call i64 @___lazy_measure(i64 %qalloc.i275) call void @___qfree(i64 %qalloc.i275) call void @___rxy(i64 %qalloc.i279, double 0x400921FB54442D18, double 0x3FF921FB54442D18) - %lazy_measure74 = call i64 @___lazy_measure(i64 %qalloc.i279) + %___lazy_measure74 = call i64 @___lazy_measure(i64 %qalloc.i279) call void @___qfree(i64 %qalloc.i279) - %read_bool76 = call i1 @___read_future_bool(i64 %lazy_measure74) - call void @___dec_future_refcount(i64 %lazy_measure74) - %read_bool79 = call i1 @___read_future_bool(i64 %lazy_measure71) - call void @___dec_future_refcount(i64 %lazy_measure71) + %read_bool76 = call i1 @___read_future_bool(i64 %___lazy_measure74) + call void @___dec_future_refcount(i64 %___lazy_measure74) + %read_bool79 = call i1 @___read_future_bool(i64 %___lazy_measure71) + call void @___dec_future_refcount(i64 %___lazy_measure71) %32 = call ptr @heap_alloc(i64 2) %33 = call ptr @heap_alloc(i64 8) store i64 0, ptr %33, align 1 @@ -344,15 +344,15 @@ __hugr__.__tk2_helios_qalloc.60.exit300: ; preds = %__hugr__.__tk2_heli call void @___rz(i64 %qalloc.i297, double 0x3FF921FB54442D18) call void @___rxy(i64 %qalloc.i293, double 0x400921FB54442D18, double 0x3FF921FB54442D18) call void @___rz(i64 %qalloc.i293, double 0xBFF921FB54442D18) - %lazy_measure112 = call i64 @___lazy_measure(i64 %qalloc.i293) + %___lazy_measure112 = call i64 @___lazy_measure(i64 %qalloc.i293) call void @___qfree(i64 %qalloc.i293) call void @___rxy(i64 %qalloc.i297, double 0x400921FB54442D18, double 0x3FF921FB54442D18) - %lazy_measure115 = call i64 @___lazy_measure(i64 %qalloc.i297) + %___lazy_measure115 = call i64 @___lazy_measure(i64 %qalloc.i297) call void @___qfree(i64 %qalloc.i297) - %read_bool117 = call i1 @___read_future_bool(i64 %lazy_measure115) - call void @___dec_future_refcount(i64 %lazy_measure115) - %read_bool120 = call i1 @___read_future_bool(i64 %lazy_measure112) - call void @___dec_future_refcount(i64 %lazy_measure112) + %read_bool117 = call i1 @___read_future_bool(i64 %___lazy_measure115) + call void @___dec_future_refcount(i64 %___lazy_measure115) + %read_bool120 = call i1 @___read_future_bool(i64 %___lazy_measure112) + call void @___dec_future_refcount(i64 %___lazy_measure112) %48 = call ptr @heap_alloc(i64 2) %49 = call ptr @heap_alloc(i64 8) store i64 0, ptr %49, align 1 diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cy/cy_test-helios-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cy/cy_test-helios-x86_64-unknown-linux-gnu.ll index 09edcc5d..75906a15 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cy/cy_test-helios-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cy/cy_test-helios-x86_64-unknown-linux-gnu.ll @@ -40,15 +40,15 @@ __hugr__.__tk2_helios_qalloc.60.exit252: ; preds = %__hugr__.__tk2_heli tail call void @___rz(i64 %qalloc.i249, double 0x3FF921FB54442D18) tail call void @___rxy(i64 %qalloc.i, double 0x400921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i249, double 0x400921FB54442D18, double 0x3FF921FB54442D18) - %lazy_measure6 = tail call i64 @___lazy_measure(i64 %qalloc.i249) + %___lazy_measure6 = tail call i64 @___lazy_measure(i64 %qalloc.i249) tail call void @___qfree(i64 %qalloc.i249) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure6) - tail call void @___dec_future_refcount(i64 %lazy_measure6) - %read_bool9 = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure6) + tail call void @___dec_future_refcount(i64 %___lazy_measure6) + %read_bool9 = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) %0 = tail call ptr @heap_alloc(i64 2) %1 = tail call ptr @heap_alloc(i64 8) store i64 0, ptr %1, align 1 @@ -141,15 +141,15 @@ __hugr__.__tk2_helios_qalloc.60.exit264: ; preds = %__hugr__.__tk2_heli call void @___rz(i64 %qalloc.i261, double 0x3FF921FB54442D18) call void @___rxy(i64 %qalloc.i257, double 0x400921FB54442D18, double 0x3FF921FB54442D18) call void @___rz(i64 %qalloc.i257, double 0xBFF921FB54442D18) - %lazy_measure31 = call i64 @___lazy_measure(i64 %qalloc.i257) + %___lazy_measure31 = call i64 @___lazy_measure(i64 %qalloc.i257) call void @___qfree(i64 %qalloc.i257) call void @___rxy(i64 %qalloc.i261, double 0x400921FB54442D18, double 0x3FF921FB54442D18) - %lazy_measure34 = call i64 @___lazy_measure(i64 %qalloc.i261) + %___lazy_measure34 = call i64 @___lazy_measure(i64 %qalloc.i261) call void @___qfree(i64 %qalloc.i261) - %read_bool36 = call i1 @___read_future_bool(i64 %lazy_measure34) - call void @___dec_future_refcount(i64 %lazy_measure34) - %read_bool39 = call i1 @___read_future_bool(i64 %lazy_measure31) - call void @___dec_future_refcount(i64 %lazy_measure31) + %read_bool36 = call i1 @___read_future_bool(i64 %___lazy_measure34) + call void @___dec_future_refcount(i64 %___lazy_measure34) + %read_bool39 = call i1 @___read_future_bool(i64 %___lazy_measure31) + call void @___dec_future_refcount(i64 %___lazy_measure31) %16 = call ptr @heap_alloc(i64 2) %17 = call ptr @heap_alloc(i64 8) store i64 0, ptr %17, align 1 @@ -242,15 +242,15 @@ __hugr__.__tk2_helios_qalloc.60.exit282: ; preds = %__hugr__.__tk2_heli call void @___rz(i64 %qalloc.i279, double 0x3FF921FB54442D18) call void @___rxy(i64 %qalloc.i275, double 0x400921FB54442D18, double 0x3FF921FB54442D18) call void @___rz(i64 %qalloc.i275, double 0xBFF921FB54442D18) - %lazy_measure71 = call i64 @___lazy_measure(i64 %qalloc.i275) + %___lazy_measure71 = call i64 @___lazy_measure(i64 %qalloc.i275) call void @___qfree(i64 %qalloc.i275) call void @___rxy(i64 %qalloc.i279, double 0x400921FB54442D18, double 0x3FF921FB54442D18) - %lazy_measure74 = call i64 @___lazy_measure(i64 %qalloc.i279) + %___lazy_measure74 = call i64 @___lazy_measure(i64 %qalloc.i279) call void @___qfree(i64 %qalloc.i279) - %read_bool76 = call i1 @___read_future_bool(i64 %lazy_measure74) - call void @___dec_future_refcount(i64 %lazy_measure74) - %read_bool79 = call i1 @___read_future_bool(i64 %lazy_measure71) - call void @___dec_future_refcount(i64 %lazy_measure71) + %read_bool76 = call i1 @___read_future_bool(i64 %___lazy_measure74) + call void @___dec_future_refcount(i64 %___lazy_measure74) + %read_bool79 = call i1 @___read_future_bool(i64 %___lazy_measure71) + call void @___dec_future_refcount(i64 %___lazy_measure71) %32 = call ptr @heap_alloc(i64 2) %33 = call ptr @heap_alloc(i64 8) store i64 0, ptr %33, align 1 @@ -344,15 +344,15 @@ __hugr__.__tk2_helios_qalloc.60.exit300: ; preds = %__hugr__.__tk2_heli call void @___rz(i64 %qalloc.i297, double 0x3FF921FB54442D18) call void @___rxy(i64 %qalloc.i293, double 0x400921FB54442D18, double 0x3FF921FB54442D18) call void @___rz(i64 %qalloc.i293, double 0xBFF921FB54442D18) - %lazy_measure112 = call i64 @___lazy_measure(i64 %qalloc.i293) + %___lazy_measure112 = call i64 @___lazy_measure(i64 %qalloc.i293) call void @___qfree(i64 %qalloc.i293) call void @___rxy(i64 %qalloc.i297, double 0x400921FB54442D18, double 0x3FF921FB54442D18) - %lazy_measure115 = call i64 @___lazy_measure(i64 %qalloc.i297) + %___lazy_measure115 = call i64 @___lazy_measure(i64 %qalloc.i297) call void @___qfree(i64 %qalloc.i297) - %read_bool117 = call i1 @___read_future_bool(i64 %lazy_measure115) - call void @___dec_future_refcount(i64 %lazy_measure115) - %read_bool120 = call i1 @___read_future_bool(i64 %lazy_measure112) - call void @___dec_future_refcount(i64 %lazy_measure112) + %read_bool117 = call i1 @___read_future_bool(i64 %___lazy_measure115) + call void @___dec_future_refcount(i64 %___lazy_measure115) + %read_bool120 = call i1 @___read_future_bool(i64 %___lazy_measure112) + call void @___dec_future_refcount(i64 %___lazy_measure112) %48 = call ptr @heap_alloc(i64 2) %49 = call ptr @heap_alloc(i64 8) store i64 0, ptr %49, align 1 diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cy/cy_test-helios-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cy/cy_test-helios-x86_64-windows-gnu.ll index 1833980a..68a2e9ab 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cy/cy_test-helios-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cy/cy_test-helios-x86_64-windows-gnu.ll @@ -40,15 +40,15 @@ __hugr__.__tk2_helios_qalloc.60.exit252: ; preds = %__hugr__.__tk2_heli tail call void @___rz(i64 %qalloc.i249, double 0x3FF921FB54442D18) tail call void @___rxy(i64 %qalloc.i, double 0x400921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i249, double 0x400921FB54442D18, double 0x3FF921FB54442D18) - %lazy_measure6 = tail call i64 @___lazy_measure(i64 %qalloc.i249) + %___lazy_measure6 = tail call i64 @___lazy_measure(i64 %qalloc.i249) tail call void @___qfree(i64 %qalloc.i249) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure6) - tail call void @___dec_future_refcount(i64 %lazy_measure6) - %read_bool9 = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure6) + tail call void @___dec_future_refcount(i64 %___lazy_measure6) + %read_bool9 = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) %0 = tail call ptr @heap_alloc(i64 2) %1 = tail call ptr @heap_alloc(i64 8) store i64 0, ptr %1, align 1 @@ -141,15 +141,15 @@ __hugr__.__tk2_helios_qalloc.60.exit264: ; preds = %__hugr__.__tk2_heli call void @___rz(i64 %qalloc.i261, double 0x3FF921FB54442D18) call void @___rxy(i64 %qalloc.i257, double 0x400921FB54442D18, double 0x3FF921FB54442D18) call void @___rz(i64 %qalloc.i257, double 0xBFF921FB54442D18) - %lazy_measure31 = call i64 @___lazy_measure(i64 %qalloc.i257) + %___lazy_measure31 = call i64 @___lazy_measure(i64 %qalloc.i257) call void @___qfree(i64 %qalloc.i257) call void @___rxy(i64 %qalloc.i261, double 0x400921FB54442D18, double 0x3FF921FB54442D18) - %lazy_measure34 = call i64 @___lazy_measure(i64 %qalloc.i261) + %___lazy_measure34 = call i64 @___lazy_measure(i64 %qalloc.i261) call void @___qfree(i64 %qalloc.i261) - %read_bool36 = call i1 @___read_future_bool(i64 %lazy_measure34) - call void @___dec_future_refcount(i64 %lazy_measure34) - %read_bool39 = call i1 @___read_future_bool(i64 %lazy_measure31) - call void @___dec_future_refcount(i64 %lazy_measure31) + %read_bool36 = call i1 @___read_future_bool(i64 %___lazy_measure34) + call void @___dec_future_refcount(i64 %___lazy_measure34) + %read_bool39 = call i1 @___read_future_bool(i64 %___lazy_measure31) + call void @___dec_future_refcount(i64 %___lazy_measure31) %16 = call ptr @heap_alloc(i64 2) %17 = call ptr @heap_alloc(i64 8) store i64 0, ptr %17, align 1 @@ -242,15 +242,15 @@ __hugr__.__tk2_helios_qalloc.60.exit282: ; preds = %__hugr__.__tk2_heli call void @___rz(i64 %qalloc.i279, double 0x3FF921FB54442D18) call void @___rxy(i64 %qalloc.i275, double 0x400921FB54442D18, double 0x3FF921FB54442D18) call void @___rz(i64 %qalloc.i275, double 0xBFF921FB54442D18) - %lazy_measure71 = call i64 @___lazy_measure(i64 %qalloc.i275) + %___lazy_measure71 = call i64 @___lazy_measure(i64 %qalloc.i275) call void @___qfree(i64 %qalloc.i275) call void @___rxy(i64 %qalloc.i279, double 0x400921FB54442D18, double 0x3FF921FB54442D18) - %lazy_measure74 = call i64 @___lazy_measure(i64 %qalloc.i279) + %___lazy_measure74 = call i64 @___lazy_measure(i64 %qalloc.i279) call void @___qfree(i64 %qalloc.i279) - %read_bool76 = call i1 @___read_future_bool(i64 %lazy_measure74) - call void @___dec_future_refcount(i64 %lazy_measure74) - %read_bool79 = call i1 @___read_future_bool(i64 %lazy_measure71) - call void @___dec_future_refcount(i64 %lazy_measure71) + %read_bool76 = call i1 @___read_future_bool(i64 %___lazy_measure74) + call void @___dec_future_refcount(i64 %___lazy_measure74) + %read_bool79 = call i1 @___read_future_bool(i64 %___lazy_measure71) + call void @___dec_future_refcount(i64 %___lazy_measure71) %32 = call ptr @heap_alloc(i64 2) %33 = call ptr @heap_alloc(i64 8) store i64 0, ptr %33, align 1 @@ -344,15 +344,15 @@ __hugr__.__tk2_helios_qalloc.60.exit300: ; preds = %__hugr__.__tk2_heli call void @___rz(i64 %qalloc.i297, double 0x3FF921FB54442D18) call void @___rxy(i64 %qalloc.i293, double 0x400921FB54442D18, double 0x3FF921FB54442D18) call void @___rz(i64 %qalloc.i293, double 0xBFF921FB54442D18) - %lazy_measure112 = call i64 @___lazy_measure(i64 %qalloc.i293) + %___lazy_measure112 = call i64 @___lazy_measure(i64 %qalloc.i293) call void @___qfree(i64 %qalloc.i293) call void @___rxy(i64 %qalloc.i297, double 0x400921FB54442D18, double 0x3FF921FB54442D18) - %lazy_measure115 = call i64 @___lazy_measure(i64 %qalloc.i297) + %___lazy_measure115 = call i64 @___lazy_measure(i64 %qalloc.i297) call void @___qfree(i64 %qalloc.i297) - %read_bool117 = call i1 @___read_future_bool(i64 %lazy_measure115) - call void @___dec_future_refcount(i64 %lazy_measure115) - %read_bool120 = call i1 @___read_future_bool(i64 %lazy_measure112) - call void @___dec_future_refcount(i64 %lazy_measure112) + %read_bool117 = call i1 @___read_future_bool(i64 %___lazy_measure115) + call void @___dec_future_refcount(i64 %___lazy_measure115) + %read_bool120 = call i1 @___read_future_bool(i64 %___lazy_measure112) + call void @___dec_future_refcount(i64 %___lazy_measure112) %48 = call ptr @heap_alloc(i64 2) %49 = call ptr @heap_alloc(i64 8) store i64 0, ptr %49, align 1 diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cy/cy_test-sol-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cy/cy_test-sol-aarch64-apple-darwin.ll index fc0b23d8..1af326f3 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cy/cy_test-sol-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cy/cy_test-sol-aarch64-apple-darwin.ll @@ -40,15 +40,15 @@ __hugr__.__tk2_sol_qalloc.60.exit252: ; preds = %__hugr__.__tk2_sol_ tail call void @___rz(i64 %qalloc.i249, double 0x3FF921FB54442D18) tail call void @___rp(i64 %qalloc.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i249, double 0x400921FB54442D18, double 0x3FF921FB54442D18) - %lazy_measure6 = tail call i64 @___lazy_measure(i64 %qalloc.i249) + %___future_measure6 = tail call i64 @___future_measure(i64 %qalloc.i249, i64 0) tail call void @___qfree(i64 %qalloc.i249) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure6) - tail call void @___dec_future_refcount(i64 %lazy_measure6) - %read_bool9 = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure6) + tail call void @___dec_future_refcount(i64 %___future_measure6) + %read_bool9 = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) %0 = tail call ptr @heap_alloc(i64 2) %1 = tail call ptr @heap_alloc(i64 8) store i64 0, ptr %1, align 1 @@ -141,15 +141,15 @@ __hugr__.__tk2_sol_qalloc.60.exit264: ; preds = %__hugr__.__tk2_sol_ call void @___rz(i64 %qalloc.i261, double 0x3FF921FB54442D18) call void @___rp(i64 %qalloc.i257, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) call void @___rz(i64 %qalloc.i257, double 0xBFF921FB54442D18) - %lazy_measure31 = call i64 @___lazy_measure(i64 %qalloc.i257) + %___future_measure31 = call i64 @___future_measure(i64 %qalloc.i257, i64 0) call void @___qfree(i64 %qalloc.i257) call void @___rp(i64 %qalloc.i261, double 0x400921FB54442D18, double 0x3FF921FB54442D18) - %lazy_measure34 = call i64 @___lazy_measure(i64 %qalloc.i261) + %___future_measure34 = call i64 @___future_measure(i64 %qalloc.i261, i64 0) call void @___qfree(i64 %qalloc.i261) - %read_bool36 = call i1 @___read_future_bool(i64 %lazy_measure34) - call void @___dec_future_refcount(i64 %lazy_measure34) - %read_bool39 = call i1 @___read_future_bool(i64 %lazy_measure31) - call void @___dec_future_refcount(i64 %lazy_measure31) + %read_bool36 = call i1 @___read_future_bool(i64 %___future_measure34) + call void @___dec_future_refcount(i64 %___future_measure34) + %read_bool39 = call i1 @___read_future_bool(i64 %___future_measure31) + call void @___dec_future_refcount(i64 %___future_measure31) %16 = call ptr @heap_alloc(i64 2) %17 = call ptr @heap_alloc(i64 8) store i64 0, ptr %17, align 1 @@ -242,15 +242,15 @@ __hugr__.__tk2_sol_qalloc.60.exit282: ; preds = %__hugr__.__tk2_sol_ call void @___rz(i64 %qalloc.i279, double 0x3FF921FB54442D18) call void @___rp(i64 %qalloc.i275, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) call void @___rz(i64 %qalloc.i275, double 0xBFF921FB54442D18) - %lazy_measure71 = call i64 @___lazy_measure(i64 %qalloc.i275) + %___future_measure71 = call i64 @___future_measure(i64 %qalloc.i275, i64 0) call void @___qfree(i64 %qalloc.i275) call void @___rp(i64 %qalloc.i279, double 0x400921FB54442D18, double 0x3FF921FB54442D18) - %lazy_measure74 = call i64 @___lazy_measure(i64 %qalloc.i279) + %___future_measure74 = call i64 @___future_measure(i64 %qalloc.i279, i64 0) call void @___qfree(i64 %qalloc.i279) - %read_bool76 = call i1 @___read_future_bool(i64 %lazy_measure74) - call void @___dec_future_refcount(i64 %lazy_measure74) - %read_bool79 = call i1 @___read_future_bool(i64 %lazy_measure71) - call void @___dec_future_refcount(i64 %lazy_measure71) + %read_bool76 = call i1 @___read_future_bool(i64 %___future_measure74) + call void @___dec_future_refcount(i64 %___future_measure74) + %read_bool79 = call i1 @___read_future_bool(i64 %___future_measure71) + call void @___dec_future_refcount(i64 %___future_measure71) %32 = call ptr @heap_alloc(i64 2) %33 = call ptr @heap_alloc(i64 8) store i64 0, ptr %33, align 1 @@ -344,15 +344,15 @@ __hugr__.__tk2_sol_qalloc.60.exit300: ; preds = %__hugr__.__tk2_sol_ call void @___rz(i64 %qalloc.i297, double 0x3FF921FB54442D18) call void @___rp(i64 %qalloc.i293, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) call void @___rz(i64 %qalloc.i293, double 0xBFF921FB54442D18) - %lazy_measure112 = call i64 @___lazy_measure(i64 %qalloc.i293) + %___future_measure112 = call i64 @___future_measure(i64 %qalloc.i293, i64 0) call void @___qfree(i64 %qalloc.i293) call void @___rp(i64 %qalloc.i297, double 0x400921FB54442D18, double 0x3FF921FB54442D18) - %lazy_measure115 = call i64 @___lazy_measure(i64 %qalloc.i297) + %___future_measure115 = call i64 @___future_measure(i64 %qalloc.i297, i64 0) call void @___qfree(i64 %qalloc.i297) - %read_bool117 = call i1 @___read_future_bool(i64 %lazy_measure115) - call void @___dec_future_refcount(i64 %lazy_measure115) - %read_bool120 = call i1 @___read_future_bool(i64 %lazy_measure112) - call void @___dec_future_refcount(i64 %lazy_measure112) + %read_bool117 = call i1 @___read_future_bool(i64 %___future_measure115) + call void @___dec_future_refcount(i64 %___future_measure115) + %read_bool120 = call i1 @___read_future_bool(i64 %___future_measure112) + call void @___dec_future_refcount(i64 %___future_measure112) %48 = call ptr @heap_alloc(i64 2) %49 = call ptr @heap_alloc(i64 8) store i64 0, ptr %49, align 1 @@ -420,7 +420,7 @@ __barray_check_none_borrowed.exit310: ; preds = %__barray_mask_check ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cy/cy_test-sol-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cy/cy_test-sol-aarch64-unknown-linux-gnu.ll index 2f616ed3..67af12aa 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cy/cy_test-sol-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cy/cy_test-sol-aarch64-unknown-linux-gnu.ll @@ -40,15 +40,15 @@ __hugr__.__tk2_sol_qalloc.60.exit252: ; preds = %__hugr__.__tk2_sol_ tail call void @___rz(i64 %qalloc.i249, double 0x3FF921FB54442D18) tail call void @___rp(i64 %qalloc.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i249, double 0x400921FB54442D18, double 0x3FF921FB54442D18) - %lazy_measure6 = tail call i64 @___lazy_measure(i64 %qalloc.i249) + %___future_measure6 = tail call i64 @___future_measure(i64 %qalloc.i249, i64 0) tail call void @___qfree(i64 %qalloc.i249) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure6) - tail call void @___dec_future_refcount(i64 %lazy_measure6) - %read_bool9 = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure6) + tail call void @___dec_future_refcount(i64 %___future_measure6) + %read_bool9 = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) %0 = tail call ptr @heap_alloc(i64 2) %1 = tail call ptr @heap_alloc(i64 8) store i64 0, ptr %1, align 1 @@ -141,15 +141,15 @@ __hugr__.__tk2_sol_qalloc.60.exit264: ; preds = %__hugr__.__tk2_sol_ call void @___rz(i64 %qalloc.i261, double 0x3FF921FB54442D18) call void @___rp(i64 %qalloc.i257, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) call void @___rz(i64 %qalloc.i257, double 0xBFF921FB54442D18) - %lazy_measure31 = call i64 @___lazy_measure(i64 %qalloc.i257) + %___future_measure31 = call i64 @___future_measure(i64 %qalloc.i257, i64 0) call void @___qfree(i64 %qalloc.i257) call void @___rp(i64 %qalloc.i261, double 0x400921FB54442D18, double 0x3FF921FB54442D18) - %lazy_measure34 = call i64 @___lazy_measure(i64 %qalloc.i261) + %___future_measure34 = call i64 @___future_measure(i64 %qalloc.i261, i64 0) call void @___qfree(i64 %qalloc.i261) - %read_bool36 = call i1 @___read_future_bool(i64 %lazy_measure34) - call void @___dec_future_refcount(i64 %lazy_measure34) - %read_bool39 = call i1 @___read_future_bool(i64 %lazy_measure31) - call void @___dec_future_refcount(i64 %lazy_measure31) + %read_bool36 = call i1 @___read_future_bool(i64 %___future_measure34) + call void @___dec_future_refcount(i64 %___future_measure34) + %read_bool39 = call i1 @___read_future_bool(i64 %___future_measure31) + call void @___dec_future_refcount(i64 %___future_measure31) %16 = call ptr @heap_alloc(i64 2) %17 = call ptr @heap_alloc(i64 8) store i64 0, ptr %17, align 1 @@ -242,15 +242,15 @@ __hugr__.__tk2_sol_qalloc.60.exit282: ; preds = %__hugr__.__tk2_sol_ call void @___rz(i64 %qalloc.i279, double 0x3FF921FB54442D18) call void @___rp(i64 %qalloc.i275, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) call void @___rz(i64 %qalloc.i275, double 0xBFF921FB54442D18) - %lazy_measure71 = call i64 @___lazy_measure(i64 %qalloc.i275) + %___future_measure71 = call i64 @___future_measure(i64 %qalloc.i275, i64 0) call void @___qfree(i64 %qalloc.i275) call void @___rp(i64 %qalloc.i279, double 0x400921FB54442D18, double 0x3FF921FB54442D18) - %lazy_measure74 = call i64 @___lazy_measure(i64 %qalloc.i279) + %___future_measure74 = call i64 @___future_measure(i64 %qalloc.i279, i64 0) call void @___qfree(i64 %qalloc.i279) - %read_bool76 = call i1 @___read_future_bool(i64 %lazy_measure74) - call void @___dec_future_refcount(i64 %lazy_measure74) - %read_bool79 = call i1 @___read_future_bool(i64 %lazy_measure71) - call void @___dec_future_refcount(i64 %lazy_measure71) + %read_bool76 = call i1 @___read_future_bool(i64 %___future_measure74) + call void @___dec_future_refcount(i64 %___future_measure74) + %read_bool79 = call i1 @___read_future_bool(i64 %___future_measure71) + call void @___dec_future_refcount(i64 %___future_measure71) %32 = call ptr @heap_alloc(i64 2) %33 = call ptr @heap_alloc(i64 8) store i64 0, ptr %33, align 1 @@ -344,15 +344,15 @@ __hugr__.__tk2_sol_qalloc.60.exit300: ; preds = %__hugr__.__tk2_sol_ call void @___rz(i64 %qalloc.i297, double 0x3FF921FB54442D18) call void @___rp(i64 %qalloc.i293, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) call void @___rz(i64 %qalloc.i293, double 0xBFF921FB54442D18) - %lazy_measure112 = call i64 @___lazy_measure(i64 %qalloc.i293) + %___future_measure112 = call i64 @___future_measure(i64 %qalloc.i293, i64 0) call void @___qfree(i64 %qalloc.i293) call void @___rp(i64 %qalloc.i297, double 0x400921FB54442D18, double 0x3FF921FB54442D18) - %lazy_measure115 = call i64 @___lazy_measure(i64 %qalloc.i297) + %___future_measure115 = call i64 @___future_measure(i64 %qalloc.i297, i64 0) call void @___qfree(i64 %qalloc.i297) - %read_bool117 = call i1 @___read_future_bool(i64 %lazy_measure115) - call void @___dec_future_refcount(i64 %lazy_measure115) - %read_bool120 = call i1 @___read_future_bool(i64 %lazy_measure112) - call void @___dec_future_refcount(i64 %lazy_measure112) + %read_bool117 = call i1 @___read_future_bool(i64 %___future_measure115) + call void @___dec_future_refcount(i64 %___future_measure115) + %read_bool120 = call i1 @___read_future_bool(i64 %___future_measure112) + call void @___dec_future_refcount(i64 %___future_measure112) %48 = call ptr @heap_alloc(i64 2) %49 = call ptr @heap_alloc(i64 8) store i64 0, ptr %49, align 1 @@ -420,7 +420,7 @@ __barray_check_none_borrowed.exit310: ; preds = %__barray_mask_check ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cy/cy_test-sol-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cy/cy_test-sol-x86_64-apple-darwin.ll index 1c855a03..dccfd507 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cy/cy_test-sol-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cy/cy_test-sol-x86_64-apple-darwin.ll @@ -40,15 +40,15 @@ __hugr__.__tk2_sol_qalloc.60.exit252: ; preds = %__hugr__.__tk2_sol_ tail call void @___rz(i64 %qalloc.i249, double 0x3FF921FB54442D18) tail call void @___rp(i64 %qalloc.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i249, double 0x400921FB54442D18, double 0x3FF921FB54442D18) - %lazy_measure6 = tail call i64 @___lazy_measure(i64 %qalloc.i249) + %___future_measure6 = tail call i64 @___future_measure(i64 %qalloc.i249, i64 0) tail call void @___qfree(i64 %qalloc.i249) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure6) - tail call void @___dec_future_refcount(i64 %lazy_measure6) - %read_bool9 = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure6) + tail call void @___dec_future_refcount(i64 %___future_measure6) + %read_bool9 = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) %0 = tail call ptr @heap_alloc(i64 2) %1 = tail call ptr @heap_alloc(i64 8) store i64 0, ptr %1, align 1 @@ -141,15 +141,15 @@ __hugr__.__tk2_sol_qalloc.60.exit264: ; preds = %__hugr__.__tk2_sol_ call void @___rz(i64 %qalloc.i261, double 0x3FF921FB54442D18) call void @___rp(i64 %qalloc.i257, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) call void @___rz(i64 %qalloc.i257, double 0xBFF921FB54442D18) - %lazy_measure31 = call i64 @___lazy_measure(i64 %qalloc.i257) + %___future_measure31 = call i64 @___future_measure(i64 %qalloc.i257, i64 0) call void @___qfree(i64 %qalloc.i257) call void @___rp(i64 %qalloc.i261, double 0x400921FB54442D18, double 0x3FF921FB54442D18) - %lazy_measure34 = call i64 @___lazy_measure(i64 %qalloc.i261) + %___future_measure34 = call i64 @___future_measure(i64 %qalloc.i261, i64 0) call void @___qfree(i64 %qalloc.i261) - %read_bool36 = call i1 @___read_future_bool(i64 %lazy_measure34) - call void @___dec_future_refcount(i64 %lazy_measure34) - %read_bool39 = call i1 @___read_future_bool(i64 %lazy_measure31) - call void @___dec_future_refcount(i64 %lazy_measure31) + %read_bool36 = call i1 @___read_future_bool(i64 %___future_measure34) + call void @___dec_future_refcount(i64 %___future_measure34) + %read_bool39 = call i1 @___read_future_bool(i64 %___future_measure31) + call void @___dec_future_refcount(i64 %___future_measure31) %16 = call ptr @heap_alloc(i64 2) %17 = call ptr @heap_alloc(i64 8) store i64 0, ptr %17, align 1 @@ -242,15 +242,15 @@ __hugr__.__tk2_sol_qalloc.60.exit282: ; preds = %__hugr__.__tk2_sol_ call void @___rz(i64 %qalloc.i279, double 0x3FF921FB54442D18) call void @___rp(i64 %qalloc.i275, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) call void @___rz(i64 %qalloc.i275, double 0xBFF921FB54442D18) - %lazy_measure71 = call i64 @___lazy_measure(i64 %qalloc.i275) + %___future_measure71 = call i64 @___future_measure(i64 %qalloc.i275, i64 0) call void @___qfree(i64 %qalloc.i275) call void @___rp(i64 %qalloc.i279, double 0x400921FB54442D18, double 0x3FF921FB54442D18) - %lazy_measure74 = call i64 @___lazy_measure(i64 %qalloc.i279) + %___future_measure74 = call i64 @___future_measure(i64 %qalloc.i279, i64 0) call void @___qfree(i64 %qalloc.i279) - %read_bool76 = call i1 @___read_future_bool(i64 %lazy_measure74) - call void @___dec_future_refcount(i64 %lazy_measure74) - %read_bool79 = call i1 @___read_future_bool(i64 %lazy_measure71) - call void @___dec_future_refcount(i64 %lazy_measure71) + %read_bool76 = call i1 @___read_future_bool(i64 %___future_measure74) + call void @___dec_future_refcount(i64 %___future_measure74) + %read_bool79 = call i1 @___read_future_bool(i64 %___future_measure71) + call void @___dec_future_refcount(i64 %___future_measure71) %32 = call ptr @heap_alloc(i64 2) %33 = call ptr @heap_alloc(i64 8) store i64 0, ptr %33, align 1 @@ -344,15 +344,15 @@ __hugr__.__tk2_sol_qalloc.60.exit300: ; preds = %__hugr__.__tk2_sol_ call void @___rz(i64 %qalloc.i297, double 0x3FF921FB54442D18) call void @___rp(i64 %qalloc.i293, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) call void @___rz(i64 %qalloc.i293, double 0xBFF921FB54442D18) - %lazy_measure112 = call i64 @___lazy_measure(i64 %qalloc.i293) + %___future_measure112 = call i64 @___future_measure(i64 %qalloc.i293, i64 0) call void @___qfree(i64 %qalloc.i293) call void @___rp(i64 %qalloc.i297, double 0x400921FB54442D18, double 0x3FF921FB54442D18) - %lazy_measure115 = call i64 @___lazy_measure(i64 %qalloc.i297) + %___future_measure115 = call i64 @___future_measure(i64 %qalloc.i297, i64 0) call void @___qfree(i64 %qalloc.i297) - %read_bool117 = call i1 @___read_future_bool(i64 %lazy_measure115) - call void @___dec_future_refcount(i64 %lazy_measure115) - %read_bool120 = call i1 @___read_future_bool(i64 %lazy_measure112) - call void @___dec_future_refcount(i64 %lazy_measure112) + %read_bool117 = call i1 @___read_future_bool(i64 %___future_measure115) + call void @___dec_future_refcount(i64 %___future_measure115) + %read_bool120 = call i1 @___read_future_bool(i64 %___future_measure112) + call void @___dec_future_refcount(i64 %___future_measure112) %48 = call ptr @heap_alloc(i64 2) %49 = call ptr @heap_alloc(i64 8) store i64 0, ptr %49, align 1 @@ -420,7 +420,7 @@ __barray_check_none_borrowed.exit310: ; preds = %__barray_mask_check ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cy/cy_test-sol-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cy/cy_test-sol-x86_64-unknown-linux-gnu.ll index 8ecfa70d..5e2f2e8c 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cy/cy_test-sol-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cy/cy_test-sol-x86_64-unknown-linux-gnu.ll @@ -40,15 +40,15 @@ __hugr__.__tk2_sol_qalloc.60.exit252: ; preds = %__hugr__.__tk2_sol_ tail call void @___rz(i64 %qalloc.i249, double 0x3FF921FB54442D18) tail call void @___rp(i64 %qalloc.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i249, double 0x400921FB54442D18, double 0x3FF921FB54442D18) - %lazy_measure6 = tail call i64 @___lazy_measure(i64 %qalloc.i249) + %___future_measure6 = tail call i64 @___future_measure(i64 %qalloc.i249, i64 0) tail call void @___qfree(i64 %qalloc.i249) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure6) - tail call void @___dec_future_refcount(i64 %lazy_measure6) - %read_bool9 = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure6) + tail call void @___dec_future_refcount(i64 %___future_measure6) + %read_bool9 = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) %0 = tail call ptr @heap_alloc(i64 2) %1 = tail call ptr @heap_alloc(i64 8) store i64 0, ptr %1, align 1 @@ -141,15 +141,15 @@ __hugr__.__tk2_sol_qalloc.60.exit264: ; preds = %__hugr__.__tk2_sol_ call void @___rz(i64 %qalloc.i261, double 0x3FF921FB54442D18) call void @___rp(i64 %qalloc.i257, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) call void @___rz(i64 %qalloc.i257, double 0xBFF921FB54442D18) - %lazy_measure31 = call i64 @___lazy_measure(i64 %qalloc.i257) + %___future_measure31 = call i64 @___future_measure(i64 %qalloc.i257, i64 0) call void @___qfree(i64 %qalloc.i257) call void @___rp(i64 %qalloc.i261, double 0x400921FB54442D18, double 0x3FF921FB54442D18) - %lazy_measure34 = call i64 @___lazy_measure(i64 %qalloc.i261) + %___future_measure34 = call i64 @___future_measure(i64 %qalloc.i261, i64 0) call void @___qfree(i64 %qalloc.i261) - %read_bool36 = call i1 @___read_future_bool(i64 %lazy_measure34) - call void @___dec_future_refcount(i64 %lazy_measure34) - %read_bool39 = call i1 @___read_future_bool(i64 %lazy_measure31) - call void @___dec_future_refcount(i64 %lazy_measure31) + %read_bool36 = call i1 @___read_future_bool(i64 %___future_measure34) + call void @___dec_future_refcount(i64 %___future_measure34) + %read_bool39 = call i1 @___read_future_bool(i64 %___future_measure31) + call void @___dec_future_refcount(i64 %___future_measure31) %16 = call ptr @heap_alloc(i64 2) %17 = call ptr @heap_alloc(i64 8) store i64 0, ptr %17, align 1 @@ -242,15 +242,15 @@ __hugr__.__tk2_sol_qalloc.60.exit282: ; preds = %__hugr__.__tk2_sol_ call void @___rz(i64 %qalloc.i279, double 0x3FF921FB54442D18) call void @___rp(i64 %qalloc.i275, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) call void @___rz(i64 %qalloc.i275, double 0xBFF921FB54442D18) - %lazy_measure71 = call i64 @___lazy_measure(i64 %qalloc.i275) + %___future_measure71 = call i64 @___future_measure(i64 %qalloc.i275, i64 0) call void @___qfree(i64 %qalloc.i275) call void @___rp(i64 %qalloc.i279, double 0x400921FB54442D18, double 0x3FF921FB54442D18) - %lazy_measure74 = call i64 @___lazy_measure(i64 %qalloc.i279) + %___future_measure74 = call i64 @___future_measure(i64 %qalloc.i279, i64 0) call void @___qfree(i64 %qalloc.i279) - %read_bool76 = call i1 @___read_future_bool(i64 %lazy_measure74) - call void @___dec_future_refcount(i64 %lazy_measure74) - %read_bool79 = call i1 @___read_future_bool(i64 %lazy_measure71) - call void @___dec_future_refcount(i64 %lazy_measure71) + %read_bool76 = call i1 @___read_future_bool(i64 %___future_measure74) + call void @___dec_future_refcount(i64 %___future_measure74) + %read_bool79 = call i1 @___read_future_bool(i64 %___future_measure71) + call void @___dec_future_refcount(i64 %___future_measure71) %32 = call ptr @heap_alloc(i64 2) %33 = call ptr @heap_alloc(i64 8) store i64 0, ptr %33, align 1 @@ -344,15 +344,15 @@ __hugr__.__tk2_sol_qalloc.60.exit300: ; preds = %__hugr__.__tk2_sol_ call void @___rz(i64 %qalloc.i297, double 0x3FF921FB54442D18) call void @___rp(i64 %qalloc.i293, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) call void @___rz(i64 %qalloc.i293, double 0xBFF921FB54442D18) - %lazy_measure112 = call i64 @___lazy_measure(i64 %qalloc.i293) + %___future_measure112 = call i64 @___future_measure(i64 %qalloc.i293, i64 0) call void @___qfree(i64 %qalloc.i293) call void @___rp(i64 %qalloc.i297, double 0x400921FB54442D18, double 0x3FF921FB54442D18) - %lazy_measure115 = call i64 @___lazy_measure(i64 %qalloc.i297) + %___future_measure115 = call i64 @___future_measure(i64 %qalloc.i297, i64 0) call void @___qfree(i64 %qalloc.i297) - %read_bool117 = call i1 @___read_future_bool(i64 %lazy_measure115) - call void @___dec_future_refcount(i64 %lazy_measure115) - %read_bool120 = call i1 @___read_future_bool(i64 %lazy_measure112) - call void @___dec_future_refcount(i64 %lazy_measure112) + %read_bool117 = call i1 @___read_future_bool(i64 %___future_measure115) + call void @___dec_future_refcount(i64 %___future_measure115) + %read_bool120 = call i1 @___read_future_bool(i64 %___future_measure112) + call void @___dec_future_refcount(i64 %___future_measure112) %48 = call ptr @heap_alloc(i64 2) %49 = call ptr @heap_alloc(i64 8) store i64 0, ptr %49, align 1 @@ -420,7 +420,7 @@ __barray_check_none_borrowed.exit310: ; preds = %__barray_mask_check ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cy/cy_test-sol-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cy/cy_test-sol-x86_64-windows-gnu.ll index ef6b5adb..bca89cda 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cy/cy_test-sol-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cy/cy_test-sol-x86_64-windows-gnu.ll @@ -40,15 +40,15 @@ __hugr__.__tk2_sol_qalloc.60.exit252: ; preds = %__hugr__.__tk2_sol_ tail call void @___rz(i64 %qalloc.i249, double 0x3FF921FB54442D18) tail call void @___rp(i64 %qalloc.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i249, double 0x400921FB54442D18, double 0x3FF921FB54442D18) - %lazy_measure6 = tail call i64 @___lazy_measure(i64 %qalloc.i249) + %___future_measure6 = tail call i64 @___future_measure(i64 %qalloc.i249, i64 0) tail call void @___qfree(i64 %qalloc.i249) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure6) - tail call void @___dec_future_refcount(i64 %lazy_measure6) - %read_bool9 = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure6) + tail call void @___dec_future_refcount(i64 %___future_measure6) + %read_bool9 = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) %0 = tail call ptr @heap_alloc(i64 2) %1 = tail call ptr @heap_alloc(i64 8) store i64 0, ptr %1, align 1 @@ -141,15 +141,15 @@ __hugr__.__tk2_sol_qalloc.60.exit264: ; preds = %__hugr__.__tk2_sol_ call void @___rz(i64 %qalloc.i261, double 0x3FF921FB54442D18) call void @___rp(i64 %qalloc.i257, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) call void @___rz(i64 %qalloc.i257, double 0xBFF921FB54442D18) - %lazy_measure31 = call i64 @___lazy_measure(i64 %qalloc.i257) + %___future_measure31 = call i64 @___future_measure(i64 %qalloc.i257, i64 0) call void @___qfree(i64 %qalloc.i257) call void @___rp(i64 %qalloc.i261, double 0x400921FB54442D18, double 0x3FF921FB54442D18) - %lazy_measure34 = call i64 @___lazy_measure(i64 %qalloc.i261) + %___future_measure34 = call i64 @___future_measure(i64 %qalloc.i261, i64 0) call void @___qfree(i64 %qalloc.i261) - %read_bool36 = call i1 @___read_future_bool(i64 %lazy_measure34) - call void @___dec_future_refcount(i64 %lazy_measure34) - %read_bool39 = call i1 @___read_future_bool(i64 %lazy_measure31) - call void @___dec_future_refcount(i64 %lazy_measure31) + %read_bool36 = call i1 @___read_future_bool(i64 %___future_measure34) + call void @___dec_future_refcount(i64 %___future_measure34) + %read_bool39 = call i1 @___read_future_bool(i64 %___future_measure31) + call void @___dec_future_refcount(i64 %___future_measure31) %16 = call ptr @heap_alloc(i64 2) %17 = call ptr @heap_alloc(i64 8) store i64 0, ptr %17, align 1 @@ -242,15 +242,15 @@ __hugr__.__tk2_sol_qalloc.60.exit282: ; preds = %__hugr__.__tk2_sol_ call void @___rz(i64 %qalloc.i279, double 0x3FF921FB54442D18) call void @___rp(i64 %qalloc.i275, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) call void @___rz(i64 %qalloc.i275, double 0xBFF921FB54442D18) - %lazy_measure71 = call i64 @___lazy_measure(i64 %qalloc.i275) + %___future_measure71 = call i64 @___future_measure(i64 %qalloc.i275, i64 0) call void @___qfree(i64 %qalloc.i275) call void @___rp(i64 %qalloc.i279, double 0x400921FB54442D18, double 0x3FF921FB54442D18) - %lazy_measure74 = call i64 @___lazy_measure(i64 %qalloc.i279) + %___future_measure74 = call i64 @___future_measure(i64 %qalloc.i279, i64 0) call void @___qfree(i64 %qalloc.i279) - %read_bool76 = call i1 @___read_future_bool(i64 %lazy_measure74) - call void @___dec_future_refcount(i64 %lazy_measure74) - %read_bool79 = call i1 @___read_future_bool(i64 %lazy_measure71) - call void @___dec_future_refcount(i64 %lazy_measure71) + %read_bool76 = call i1 @___read_future_bool(i64 %___future_measure74) + call void @___dec_future_refcount(i64 %___future_measure74) + %read_bool79 = call i1 @___read_future_bool(i64 %___future_measure71) + call void @___dec_future_refcount(i64 %___future_measure71) %32 = call ptr @heap_alloc(i64 2) %33 = call ptr @heap_alloc(i64 8) store i64 0, ptr %33, align 1 @@ -344,15 +344,15 @@ __hugr__.__tk2_sol_qalloc.60.exit300: ; preds = %__hugr__.__tk2_sol_ call void @___rz(i64 %qalloc.i297, double 0x3FF921FB54442D18) call void @___rp(i64 %qalloc.i293, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) call void @___rz(i64 %qalloc.i293, double 0xBFF921FB54442D18) - %lazy_measure112 = call i64 @___lazy_measure(i64 %qalloc.i293) + %___future_measure112 = call i64 @___future_measure(i64 %qalloc.i293, i64 0) call void @___qfree(i64 %qalloc.i293) call void @___rp(i64 %qalloc.i297, double 0x400921FB54442D18, double 0x3FF921FB54442D18) - %lazy_measure115 = call i64 @___lazy_measure(i64 %qalloc.i297) + %___future_measure115 = call i64 @___future_measure(i64 %qalloc.i297, i64 0) call void @___qfree(i64 %qalloc.i297) - %read_bool117 = call i1 @___read_future_bool(i64 %lazy_measure115) - call void @___dec_future_refcount(i64 %lazy_measure115) - %read_bool120 = call i1 @___read_future_bool(i64 %lazy_measure112) - call void @___dec_future_refcount(i64 %lazy_measure112) + %read_bool117 = call i1 @___read_future_bool(i64 %___future_measure115) + call void @___dec_future_refcount(i64 %___future_measure115) + %read_bool120 = call i1 @___read_future_bool(i64 %___future_measure112) + call void @___dec_future_refcount(i64 %___future_measure112) %48 = call ptr @heap_alloc(i64 2) %49 = call ptr @heap_alloc(i64 8) store i64 0, ptr %49, align 1 @@ -420,7 +420,7 @@ __barray_check_none_borrowed.exit310: ; preds = %__barray_mask_check ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cz/cz_test-helios-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cz/cz_test-helios-aarch64-apple-darwin.ll index 877de2f1..48eec0bf 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cz/cz_test-helios-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cz/cz_test-helios-aarch64-apple-darwin.ll @@ -37,14 +37,14 @@ __hugr__.__tk2_helios_qalloc.23.exit47: ; preds = %__hugr__.__tk2_heli tail call void @___rzz(i64 %qalloc.i, i64 %qalloc.i44, double 0x3FF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i44, double 0xBFF921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %lazy_measure11 = tail call i64 @___lazy_measure(i64 %qalloc.i44) + %___lazy_measure11 = tail call i64 @___lazy_measure(i64 %qalloc.i44) tail call void @___qfree(i64 %qalloc.i44) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure11) - tail call void @___dec_future_refcount(i64 %lazy_measure11) - %read_bool14 = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure11) + tail call void @___dec_future_refcount(i64 %___lazy_measure11) + %read_bool14 = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) %0 = tail call ptr @heap_alloc(i64 2) %1 = tail call ptr @heap_alloc(i64 8) store i64 0, ptr %1, align 1 diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cz/cz_test-helios-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cz/cz_test-helios-aarch64-unknown-linux-gnu.ll index 56fd4471..7b8f9bcd 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cz/cz_test-helios-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cz/cz_test-helios-aarch64-unknown-linux-gnu.ll @@ -37,14 +37,14 @@ __hugr__.__tk2_helios_qalloc.23.exit47: ; preds = %__hugr__.__tk2_heli tail call void @___rzz(i64 %qalloc.i, i64 %qalloc.i44, double 0x3FF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i44, double 0xBFF921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %lazy_measure11 = tail call i64 @___lazy_measure(i64 %qalloc.i44) + %___lazy_measure11 = tail call i64 @___lazy_measure(i64 %qalloc.i44) tail call void @___qfree(i64 %qalloc.i44) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure11) - tail call void @___dec_future_refcount(i64 %lazy_measure11) - %read_bool14 = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure11) + tail call void @___dec_future_refcount(i64 %___lazy_measure11) + %read_bool14 = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) %0 = tail call ptr @heap_alloc(i64 2) %1 = tail call ptr @heap_alloc(i64 8) store i64 0, ptr %1, align 1 diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cz/cz_test-helios-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cz/cz_test-helios-x86_64-apple-darwin.ll index 54fc439f..7d554fb9 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cz/cz_test-helios-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cz/cz_test-helios-x86_64-apple-darwin.ll @@ -37,14 +37,14 @@ __hugr__.__tk2_helios_qalloc.23.exit47: ; preds = %__hugr__.__tk2_heli tail call void @___rzz(i64 %qalloc.i, i64 %qalloc.i44, double 0x3FF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i44, double 0xBFF921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %lazy_measure11 = tail call i64 @___lazy_measure(i64 %qalloc.i44) + %___lazy_measure11 = tail call i64 @___lazy_measure(i64 %qalloc.i44) tail call void @___qfree(i64 %qalloc.i44) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure11) - tail call void @___dec_future_refcount(i64 %lazy_measure11) - %read_bool14 = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure11) + tail call void @___dec_future_refcount(i64 %___lazy_measure11) + %read_bool14 = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) %0 = tail call ptr @heap_alloc(i64 2) %1 = tail call ptr @heap_alloc(i64 8) store i64 0, ptr %1, align 1 diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cz/cz_test-helios-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cz/cz_test-helios-x86_64-unknown-linux-gnu.ll index 85df48bb..12a86b4b 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cz/cz_test-helios-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cz/cz_test-helios-x86_64-unknown-linux-gnu.ll @@ -37,14 +37,14 @@ __hugr__.__tk2_helios_qalloc.23.exit47: ; preds = %__hugr__.__tk2_heli tail call void @___rzz(i64 %qalloc.i, i64 %qalloc.i44, double 0x3FF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i44, double 0xBFF921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %lazy_measure11 = tail call i64 @___lazy_measure(i64 %qalloc.i44) + %___lazy_measure11 = tail call i64 @___lazy_measure(i64 %qalloc.i44) tail call void @___qfree(i64 %qalloc.i44) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure11) - tail call void @___dec_future_refcount(i64 %lazy_measure11) - %read_bool14 = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure11) + tail call void @___dec_future_refcount(i64 %___lazy_measure11) + %read_bool14 = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) %0 = tail call ptr @heap_alloc(i64 2) %1 = tail call ptr @heap_alloc(i64 8) store i64 0, ptr %1, align 1 diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cz/cz_test-helios-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cz/cz_test-helios-x86_64-windows-gnu.ll index 7b7fd00c..25a465a0 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cz/cz_test-helios-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cz/cz_test-helios-x86_64-windows-gnu.ll @@ -37,14 +37,14 @@ __hugr__.__tk2_helios_qalloc.23.exit47: ; preds = %__hugr__.__tk2_heli tail call void @___rzz(i64 %qalloc.i, i64 %qalloc.i44, double 0x3FF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i44, double 0xBFF921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %lazy_measure11 = tail call i64 @___lazy_measure(i64 %qalloc.i44) + %___lazy_measure11 = tail call i64 @___lazy_measure(i64 %qalloc.i44) tail call void @___qfree(i64 %qalloc.i44) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure11) - tail call void @___dec_future_refcount(i64 %lazy_measure11) - %read_bool14 = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure11) + tail call void @___dec_future_refcount(i64 %___lazy_measure11) + %read_bool14 = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) %0 = tail call ptr @heap_alloc(i64 2) %1 = tail call ptr @heap_alloc(i64 8) store i64 0, ptr %1, align 1 diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cz/cz_test-sol-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cz/cz_test-sol-aarch64-apple-darwin.ll index 2b080d5d..25a0cfb9 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cz/cz_test-sol-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cz/cz_test-sol-aarch64-apple-darwin.ll @@ -45,14 +45,14 @@ __hugr__.__tk2_sol_qalloc.23.exit47: ; preds = %__hugr__.__tk2_sol_ tail call void @___rz(i64 %qalloc.i44, double 0xBFF921FB54442D18) tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %lazy_measure11 = tail call i64 @___lazy_measure(i64 %qalloc.i44) + %___future_measure11 = tail call i64 @___future_measure(i64 %qalloc.i44, i64 0) tail call void @___qfree(i64 %qalloc.i44) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure11) - tail call void @___dec_future_refcount(i64 %lazy_measure11) - %read_bool14 = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure11) + tail call void @___dec_future_refcount(i64 %___future_measure11) + %read_bool14 = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) %0 = tail call ptr @heap_alloc(i64 2) %1 = tail call ptr @heap_alloc(i64 8) store i64 0, ptr %1, align 1 @@ -103,7 +103,7 @@ __barray_check_none_borrowed.exit51: ; preds = %__barray_check_none ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cz/cz_test-sol-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cz/cz_test-sol-aarch64-unknown-linux-gnu.ll index 7c8ae0ef..bcd65648 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cz/cz_test-sol-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cz/cz_test-sol-aarch64-unknown-linux-gnu.ll @@ -45,14 +45,14 @@ __hugr__.__tk2_sol_qalloc.23.exit47: ; preds = %__hugr__.__tk2_sol_ tail call void @___rz(i64 %qalloc.i44, double 0xBFF921FB54442D18) tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %lazy_measure11 = tail call i64 @___lazy_measure(i64 %qalloc.i44) + %___future_measure11 = tail call i64 @___future_measure(i64 %qalloc.i44, i64 0) tail call void @___qfree(i64 %qalloc.i44) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure11) - tail call void @___dec_future_refcount(i64 %lazy_measure11) - %read_bool14 = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure11) + tail call void @___dec_future_refcount(i64 %___future_measure11) + %read_bool14 = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) %0 = tail call ptr @heap_alloc(i64 2) %1 = tail call ptr @heap_alloc(i64 8) store i64 0, ptr %1, align 1 @@ -103,7 +103,7 @@ __barray_check_none_borrowed.exit51: ; preds = %__barray_check_none ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cz/cz_test-sol-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cz/cz_test-sol-x86_64-apple-darwin.ll index 23926e8e..a60698a8 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cz/cz_test-sol-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cz/cz_test-sol-x86_64-apple-darwin.ll @@ -45,14 +45,14 @@ __hugr__.__tk2_sol_qalloc.23.exit47: ; preds = %__hugr__.__tk2_sol_ tail call void @___rz(i64 %qalloc.i44, double 0xBFF921FB54442D18) tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %lazy_measure11 = tail call i64 @___lazy_measure(i64 %qalloc.i44) + %___future_measure11 = tail call i64 @___future_measure(i64 %qalloc.i44, i64 0) tail call void @___qfree(i64 %qalloc.i44) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure11) - tail call void @___dec_future_refcount(i64 %lazy_measure11) - %read_bool14 = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure11) + tail call void @___dec_future_refcount(i64 %___future_measure11) + %read_bool14 = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) %0 = tail call ptr @heap_alloc(i64 2) %1 = tail call ptr @heap_alloc(i64 8) store i64 0, ptr %1, align 1 @@ -103,7 +103,7 @@ __barray_check_none_borrowed.exit51: ; preds = %__barray_check_none ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cz/cz_test-sol-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cz/cz_test-sol-x86_64-unknown-linux-gnu.ll index 7badda17..fd4d696b 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cz/cz_test-sol-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cz/cz_test-sol-x86_64-unknown-linux-gnu.ll @@ -45,14 +45,14 @@ __hugr__.__tk2_sol_qalloc.23.exit47: ; preds = %__hugr__.__tk2_sol_ tail call void @___rz(i64 %qalloc.i44, double 0xBFF921FB54442D18) tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %lazy_measure11 = tail call i64 @___lazy_measure(i64 %qalloc.i44) + %___future_measure11 = tail call i64 @___future_measure(i64 %qalloc.i44, i64 0) tail call void @___qfree(i64 %qalloc.i44) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure11) - tail call void @___dec_future_refcount(i64 %lazy_measure11) - %read_bool14 = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure11) + tail call void @___dec_future_refcount(i64 %___future_measure11) + %read_bool14 = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) %0 = tail call ptr @heap_alloc(i64 2) %1 = tail call ptr @heap_alloc(i64 8) store i64 0, ptr %1, align 1 @@ -103,7 +103,7 @@ __barray_check_none_borrowed.exit51: ; preds = %__barray_check_none ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cz/cz_test-sol-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cz/cz_test-sol-x86_64-windows-gnu.ll index 79ac8084..53072741 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cz/cz_test-sol-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_cz/cz_test-sol-x86_64-windows-gnu.ll @@ -45,14 +45,14 @@ __hugr__.__tk2_sol_qalloc.23.exit47: ; preds = %__hugr__.__tk2_sol_ tail call void @___rz(i64 %qalloc.i44, double 0xBFF921FB54442D18) tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %lazy_measure11 = tail call i64 @___lazy_measure(i64 %qalloc.i44) + %___future_measure11 = tail call i64 @___future_measure(i64 %qalloc.i44, i64 0) tail call void @___qfree(i64 %qalloc.i44) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure11) - tail call void @___dec_future_refcount(i64 %lazy_measure11) - %read_bool14 = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure11) + tail call void @___dec_future_refcount(i64 %___future_measure11) + %read_bool14 = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) %0 = tail call ptr @heap_alloc(i64 2) %1 = tail call ptr @heap_alloc(i64 8) store i64 0, ptr %1, align 1 @@ -103,7 +103,7 @@ __barray_check_none_borrowed.exit51: ; preds = %__barray_check_none ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_exit/exit-helios-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_exit/exit-helios-aarch64-apple-darwin.ll index 0bfeb1ef..5f6bfe1f 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_exit/exit-helios-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_exit/exit-helios-aarch64-apple-darwin.ll @@ -21,10 +21,10 @@ __hugr__.__tk2_helios_qalloc.34.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) br i1 %read_bool, label %1, label %0 0: ; preds = %__hugr__.__tk2_helios_qalloc.34.exit diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_exit/exit-helios-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_exit/exit-helios-aarch64-unknown-linux-gnu.ll index 883bf6a3..50949e86 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_exit/exit-helios-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_exit/exit-helios-aarch64-unknown-linux-gnu.ll @@ -21,10 +21,10 @@ __hugr__.__tk2_helios_qalloc.34.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) br i1 %read_bool, label %1, label %0 0: ; preds = %__hugr__.__tk2_helios_qalloc.34.exit diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_exit/exit-helios-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_exit/exit-helios-x86_64-apple-darwin.ll index 11673473..f70f9aa1 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_exit/exit-helios-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_exit/exit-helios-x86_64-apple-darwin.ll @@ -21,10 +21,10 @@ __hugr__.__tk2_helios_qalloc.34.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) br i1 %read_bool, label %1, label %0 0: ; preds = %__hugr__.__tk2_helios_qalloc.34.exit diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_exit/exit-helios-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_exit/exit-helios-x86_64-unknown-linux-gnu.ll index b4838677..d1233375 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_exit/exit-helios-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_exit/exit-helios-x86_64-unknown-linux-gnu.ll @@ -21,10 +21,10 @@ __hugr__.__tk2_helios_qalloc.34.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) br i1 %read_bool, label %1, label %0 0: ; preds = %__hugr__.__tk2_helios_qalloc.34.exit diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_exit/exit-helios-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_exit/exit-helios-x86_64-windows-gnu.ll index 68e712ff..15c808c8 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_exit/exit-helios-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_exit/exit-helios-x86_64-windows-gnu.ll @@ -21,10 +21,10 @@ __hugr__.__tk2_helios_qalloc.34.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) br i1 %read_bool, label %1, label %0 0: ; preds = %__hugr__.__tk2_helios_qalloc.34.exit diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_exit/exit-sol-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_exit/exit-sol-aarch64-apple-darwin.ll index 8be3d288..93e557c2 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_exit/exit-sol-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_exit/exit-sol-aarch64-apple-darwin.ll @@ -21,10 +21,10 @@ __hugr__.__tk2_sol_qalloc.34.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) br i1 %read_bool, label %1, label %0 0: ; preds = %__hugr__.__tk2_sol_qalloc.34.exit @@ -36,7 +36,7 @@ __hugr__.__tk2_sol_qalloc.34.exit: ; preds = %alloca_block unreachable } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_exit/exit-sol-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_exit/exit-sol-aarch64-unknown-linux-gnu.ll index 54bfdda0..a8c58003 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_exit/exit-sol-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_exit/exit-sol-aarch64-unknown-linux-gnu.ll @@ -21,10 +21,10 @@ __hugr__.__tk2_sol_qalloc.34.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) br i1 %read_bool, label %1, label %0 0: ; preds = %__hugr__.__tk2_sol_qalloc.34.exit @@ -36,7 +36,7 @@ __hugr__.__tk2_sol_qalloc.34.exit: ; preds = %alloca_block unreachable } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_exit/exit-sol-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_exit/exit-sol-x86_64-apple-darwin.ll index c40f1810..12283739 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_exit/exit-sol-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_exit/exit-sol-x86_64-apple-darwin.ll @@ -21,10 +21,10 @@ __hugr__.__tk2_sol_qalloc.34.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) br i1 %read_bool, label %1, label %0 0: ; preds = %__hugr__.__tk2_sol_qalloc.34.exit @@ -36,7 +36,7 @@ __hugr__.__tk2_sol_qalloc.34.exit: ; preds = %alloca_block unreachable } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_exit/exit-sol-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_exit/exit-sol-x86_64-unknown-linux-gnu.ll index 77600b40..cdf0dfce 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_exit/exit-sol-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_exit/exit-sol-x86_64-unknown-linux-gnu.ll @@ -21,10 +21,10 @@ __hugr__.__tk2_sol_qalloc.34.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) br i1 %read_bool, label %1, label %0 0: ; preds = %__hugr__.__tk2_sol_qalloc.34.exit @@ -36,7 +36,7 @@ __hugr__.__tk2_sol_qalloc.34.exit: ; preds = %alloca_block unreachable } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_exit/exit-sol-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_exit/exit-sol-x86_64-windows-gnu.ll index c4322251..2d881f16 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_exit/exit-sol-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_exit/exit-sol-x86_64-windows-gnu.ll @@ -21,10 +21,10 @@ __hugr__.__tk2_sol_qalloc.34.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) br i1 %read_bool, label %1, label %0 0: ; preds = %__hugr__.__tk2_sol_qalloc.34.exit @@ -36,7 +36,7 @@ __hugr__.__tk2_sol_qalloc.34.exit: ; preds = %alloca_block unreachable } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_flip_some/flip_n4-helios-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_flip_some/flip_n4-helios-aarch64-apple-darwin.ll index 87d3d821..7ccc5df4 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_flip_some/flip_n4-helios-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_flip_some/flip_n4-helios-aarch64-apple-darwin.ll @@ -190,7 +190,7 @@ panic.i850: ; preds = %cond_exit_142.2, %c %44 = or disjoint i64 %42, 1 store i64 %44, ptr %5, align 4 %45 = load i64, ptr %4, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %45) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %45) tail call void @___qfree(i64 %45) %46 = load i64, ptr %3, align 4 %47 = trunc i64 %46 to i1 @@ -199,7 +199,7 @@ panic.i850: ; preds = %cond_exit_142.2, %c cond_exit_142: ; preds = %.thread %48 = and i64 %46, -2 store i64 %48, ptr %3, align 4 - store i64 %lazy_measure, ptr %2, align 4 + store i64 %___lazy_measure, ptr %2, align 4 %49 = load i64, ptr %5, align 4 %50 = and i64 %49, 2 %.not920 = icmp eq i64 %50, 0 @@ -210,7 +210,7 @@ cond_exit_142: ; preds = %.thread store i64 %51, ptr %5, align 4 %52 = getelementptr inbounds nuw i8, ptr %4, i64 8 %53 = load i64, ptr %52, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %53) + %___lazy_measure.1 = tail call i64 @___lazy_measure(i64 %53) tail call void @___qfree(i64 %53) %54 = load i64, ptr %3, align 4 %55 = and i64 %54, 2 @@ -221,7 +221,7 @@ cond_exit_142.1: ; preds = %.thread.1 %56 = and i64 %54, -3 store i64 %56, ptr %3, align 4 %57 = getelementptr inbounds nuw i8, ptr %2, i64 8 - store i64 %lazy_measure.1, ptr %57, align 4 + store i64 %___lazy_measure.1, ptr %57, align 4 %58 = load i64, ptr %5, align 4 %59 = and i64 %58, 4 %.not922 = icmp eq i64 %59, 0 @@ -232,7 +232,7 @@ cond_exit_142.1: ; preds = %.thread.1 store i64 %60, ptr %5, align 4 %61 = getelementptr inbounds nuw i8, ptr %4, i64 16 %62 = load i64, ptr %61, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %62) + %___lazy_measure.2 = tail call i64 @___lazy_measure(i64 %62) tail call void @___qfree(i64 %62) %63 = load i64, ptr %3, align 4 %64 = and i64 %63, 4 @@ -243,7 +243,7 @@ cond_exit_142.2: ; preds = %.thread.2 %65 = and i64 %63, -5 store i64 %65, ptr %3, align 4 %66 = getelementptr inbounds nuw i8, ptr %2, i64 16 - store i64 %lazy_measure.2, ptr %66, align 4 + store i64 %___lazy_measure.2, ptr %66, align 4 %67 = load i64, ptr %5, align 4 %68 = and i64 %67, 8 %.not924 = icmp eq i64 %68, 0 @@ -254,7 +254,7 @@ cond_exit_142.2: ; preds = %.thread.2 store i64 %69, ptr %5, align 4 %70 = getelementptr inbounds nuw i8, ptr %4, i64 24 %71 = load i64, ptr %70, align 4 - %lazy_measure.3 = tail call i64 @___lazy_measure(i64 %71) + %___lazy_measure.3 = tail call i64 @___lazy_measure(i64 %71) tail call void @___qfree(i64 %71) %72 = load i64, ptr %3, align 4 %73 = and i64 %72, 8 @@ -265,7 +265,7 @@ cond_exit_142.3: ; preds = %.thread.3 %74 = and i64 %72, -9 store i64 %74, ptr %3, align 4 %75 = getelementptr inbounds nuw i8, ptr %2, i64 24 - store i64 %lazy_measure.3, ptr %75, align 4 + store i64 %___lazy_measure.3, ptr %75, align 4 %76 = load i64, ptr %5, align 4 %77 = or i64 %76, -16 store i64 %77, ptr %5, align 4 diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_flip_some/flip_n4-helios-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_flip_some/flip_n4-helios-aarch64-unknown-linux-gnu.ll index d691023f..d647d5ab 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_flip_some/flip_n4-helios-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_flip_some/flip_n4-helios-aarch64-unknown-linux-gnu.ll @@ -190,7 +190,7 @@ panic.i850: ; preds = %cond_exit_142.2, %c %44 = or disjoint i64 %42, 1 store i64 %44, ptr %5, align 4 %45 = load i64, ptr %4, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %45) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %45) tail call void @___qfree(i64 %45) %46 = load i64, ptr %3, align 4 %47 = trunc i64 %46 to i1 @@ -199,7 +199,7 @@ panic.i850: ; preds = %cond_exit_142.2, %c cond_exit_142: ; preds = %.thread %48 = and i64 %46, -2 store i64 %48, ptr %3, align 4 - store i64 %lazy_measure, ptr %2, align 4 + store i64 %___lazy_measure, ptr %2, align 4 %49 = load i64, ptr %5, align 4 %50 = and i64 %49, 2 %.not920 = icmp eq i64 %50, 0 @@ -210,7 +210,7 @@ cond_exit_142: ; preds = %.thread store i64 %51, ptr %5, align 4 %52 = getelementptr inbounds nuw i8, ptr %4, i64 8 %53 = load i64, ptr %52, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %53) + %___lazy_measure.1 = tail call i64 @___lazy_measure(i64 %53) tail call void @___qfree(i64 %53) %54 = load i64, ptr %3, align 4 %55 = and i64 %54, 2 @@ -221,7 +221,7 @@ cond_exit_142.1: ; preds = %.thread.1 %56 = and i64 %54, -3 store i64 %56, ptr %3, align 4 %57 = getelementptr inbounds nuw i8, ptr %2, i64 8 - store i64 %lazy_measure.1, ptr %57, align 4 + store i64 %___lazy_measure.1, ptr %57, align 4 %58 = load i64, ptr %5, align 4 %59 = and i64 %58, 4 %.not922 = icmp eq i64 %59, 0 @@ -232,7 +232,7 @@ cond_exit_142.1: ; preds = %.thread.1 store i64 %60, ptr %5, align 4 %61 = getelementptr inbounds nuw i8, ptr %4, i64 16 %62 = load i64, ptr %61, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %62) + %___lazy_measure.2 = tail call i64 @___lazy_measure(i64 %62) tail call void @___qfree(i64 %62) %63 = load i64, ptr %3, align 4 %64 = and i64 %63, 4 @@ -243,7 +243,7 @@ cond_exit_142.2: ; preds = %.thread.2 %65 = and i64 %63, -5 store i64 %65, ptr %3, align 4 %66 = getelementptr inbounds nuw i8, ptr %2, i64 16 - store i64 %lazy_measure.2, ptr %66, align 4 + store i64 %___lazy_measure.2, ptr %66, align 4 %67 = load i64, ptr %5, align 4 %68 = and i64 %67, 8 %.not924 = icmp eq i64 %68, 0 @@ -254,7 +254,7 @@ cond_exit_142.2: ; preds = %.thread.2 store i64 %69, ptr %5, align 4 %70 = getelementptr inbounds nuw i8, ptr %4, i64 24 %71 = load i64, ptr %70, align 4 - %lazy_measure.3 = tail call i64 @___lazy_measure(i64 %71) + %___lazy_measure.3 = tail call i64 @___lazy_measure(i64 %71) tail call void @___qfree(i64 %71) %72 = load i64, ptr %3, align 4 %73 = and i64 %72, 8 @@ -265,7 +265,7 @@ cond_exit_142.3: ; preds = %.thread.3 %74 = and i64 %72, -9 store i64 %74, ptr %3, align 4 %75 = getelementptr inbounds nuw i8, ptr %2, i64 24 - store i64 %lazy_measure.3, ptr %75, align 4 + store i64 %___lazy_measure.3, ptr %75, align 4 %76 = load i64, ptr %5, align 4 %77 = or i64 %76, -16 store i64 %77, ptr %5, align 4 diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_flip_some/flip_n4-helios-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_flip_some/flip_n4-helios-x86_64-apple-darwin.ll index 267db281..6b2c887b 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_flip_some/flip_n4-helios-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_flip_some/flip_n4-helios-x86_64-apple-darwin.ll @@ -190,7 +190,7 @@ panic.i850: ; preds = %cond_exit_142.2, %c %44 = or disjoint i64 %42, 1 store i64 %44, ptr %5, align 4 %45 = load i64, ptr %4, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %45) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %45) tail call void @___qfree(i64 %45) %46 = load i64, ptr %3, align 4 %47 = trunc i64 %46 to i1 @@ -199,7 +199,7 @@ panic.i850: ; preds = %cond_exit_142.2, %c cond_exit_142: ; preds = %.thread %48 = and i64 %46, -2 store i64 %48, ptr %3, align 4 - store i64 %lazy_measure, ptr %2, align 4 + store i64 %___lazy_measure, ptr %2, align 4 %49 = load i64, ptr %5, align 4 %50 = and i64 %49, 2 %.not920 = icmp eq i64 %50, 0 @@ -210,7 +210,7 @@ cond_exit_142: ; preds = %.thread store i64 %51, ptr %5, align 4 %52 = getelementptr inbounds nuw i8, ptr %4, i64 8 %53 = load i64, ptr %52, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %53) + %___lazy_measure.1 = tail call i64 @___lazy_measure(i64 %53) tail call void @___qfree(i64 %53) %54 = load i64, ptr %3, align 4 %55 = and i64 %54, 2 @@ -221,7 +221,7 @@ cond_exit_142.1: ; preds = %.thread.1 %56 = and i64 %54, -3 store i64 %56, ptr %3, align 4 %57 = getelementptr inbounds nuw i8, ptr %2, i64 8 - store i64 %lazy_measure.1, ptr %57, align 4 + store i64 %___lazy_measure.1, ptr %57, align 4 %58 = load i64, ptr %5, align 4 %59 = and i64 %58, 4 %.not922 = icmp eq i64 %59, 0 @@ -232,7 +232,7 @@ cond_exit_142.1: ; preds = %.thread.1 store i64 %60, ptr %5, align 4 %61 = getelementptr inbounds nuw i8, ptr %4, i64 16 %62 = load i64, ptr %61, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %62) + %___lazy_measure.2 = tail call i64 @___lazy_measure(i64 %62) tail call void @___qfree(i64 %62) %63 = load i64, ptr %3, align 4 %64 = and i64 %63, 4 @@ -243,7 +243,7 @@ cond_exit_142.2: ; preds = %.thread.2 %65 = and i64 %63, -5 store i64 %65, ptr %3, align 4 %66 = getelementptr inbounds nuw i8, ptr %2, i64 16 - store i64 %lazy_measure.2, ptr %66, align 4 + store i64 %___lazy_measure.2, ptr %66, align 4 %67 = load i64, ptr %5, align 4 %68 = and i64 %67, 8 %.not924 = icmp eq i64 %68, 0 @@ -254,7 +254,7 @@ cond_exit_142.2: ; preds = %.thread.2 store i64 %69, ptr %5, align 4 %70 = getelementptr inbounds nuw i8, ptr %4, i64 24 %71 = load i64, ptr %70, align 4 - %lazy_measure.3 = tail call i64 @___lazy_measure(i64 %71) + %___lazy_measure.3 = tail call i64 @___lazy_measure(i64 %71) tail call void @___qfree(i64 %71) %72 = load i64, ptr %3, align 4 %73 = and i64 %72, 8 @@ -265,7 +265,7 @@ cond_exit_142.3: ; preds = %.thread.3 %74 = and i64 %72, -9 store i64 %74, ptr %3, align 4 %75 = getelementptr inbounds nuw i8, ptr %2, i64 24 - store i64 %lazy_measure.3, ptr %75, align 4 + store i64 %___lazy_measure.3, ptr %75, align 4 %76 = load i64, ptr %5, align 4 %77 = or i64 %76, -16 store i64 %77, ptr %5, align 4 diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_flip_some/flip_n4-helios-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_flip_some/flip_n4-helios-x86_64-unknown-linux-gnu.ll index af06889d..e962ab06 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_flip_some/flip_n4-helios-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_flip_some/flip_n4-helios-x86_64-unknown-linux-gnu.ll @@ -190,7 +190,7 @@ panic.i850: ; preds = %cond_exit_142.2, %c %44 = or disjoint i64 %42, 1 store i64 %44, ptr %5, align 4 %45 = load i64, ptr %4, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %45) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %45) tail call void @___qfree(i64 %45) %46 = load i64, ptr %3, align 4 %47 = trunc i64 %46 to i1 @@ -199,7 +199,7 @@ panic.i850: ; preds = %cond_exit_142.2, %c cond_exit_142: ; preds = %.thread %48 = and i64 %46, -2 store i64 %48, ptr %3, align 4 - store i64 %lazy_measure, ptr %2, align 4 + store i64 %___lazy_measure, ptr %2, align 4 %49 = load i64, ptr %5, align 4 %50 = and i64 %49, 2 %.not920 = icmp eq i64 %50, 0 @@ -210,7 +210,7 @@ cond_exit_142: ; preds = %.thread store i64 %51, ptr %5, align 4 %52 = getelementptr inbounds nuw i8, ptr %4, i64 8 %53 = load i64, ptr %52, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %53) + %___lazy_measure.1 = tail call i64 @___lazy_measure(i64 %53) tail call void @___qfree(i64 %53) %54 = load i64, ptr %3, align 4 %55 = and i64 %54, 2 @@ -221,7 +221,7 @@ cond_exit_142.1: ; preds = %.thread.1 %56 = and i64 %54, -3 store i64 %56, ptr %3, align 4 %57 = getelementptr inbounds nuw i8, ptr %2, i64 8 - store i64 %lazy_measure.1, ptr %57, align 4 + store i64 %___lazy_measure.1, ptr %57, align 4 %58 = load i64, ptr %5, align 4 %59 = and i64 %58, 4 %.not922 = icmp eq i64 %59, 0 @@ -232,7 +232,7 @@ cond_exit_142.1: ; preds = %.thread.1 store i64 %60, ptr %5, align 4 %61 = getelementptr inbounds nuw i8, ptr %4, i64 16 %62 = load i64, ptr %61, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %62) + %___lazy_measure.2 = tail call i64 @___lazy_measure(i64 %62) tail call void @___qfree(i64 %62) %63 = load i64, ptr %3, align 4 %64 = and i64 %63, 4 @@ -243,7 +243,7 @@ cond_exit_142.2: ; preds = %.thread.2 %65 = and i64 %63, -5 store i64 %65, ptr %3, align 4 %66 = getelementptr inbounds nuw i8, ptr %2, i64 16 - store i64 %lazy_measure.2, ptr %66, align 4 + store i64 %___lazy_measure.2, ptr %66, align 4 %67 = load i64, ptr %5, align 4 %68 = and i64 %67, 8 %.not924 = icmp eq i64 %68, 0 @@ -254,7 +254,7 @@ cond_exit_142.2: ; preds = %.thread.2 store i64 %69, ptr %5, align 4 %70 = getelementptr inbounds nuw i8, ptr %4, i64 24 %71 = load i64, ptr %70, align 4 - %lazy_measure.3 = tail call i64 @___lazy_measure(i64 %71) + %___lazy_measure.3 = tail call i64 @___lazy_measure(i64 %71) tail call void @___qfree(i64 %71) %72 = load i64, ptr %3, align 4 %73 = and i64 %72, 8 @@ -265,7 +265,7 @@ cond_exit_142.3: ; preds = %.thread.3 %74 = and i64 %72, -9 store i64 %74, ptr %3, align 4 %75 = getelementptr inbounds nuw i8, ptr %2, i64 24 - store i64 %lazy_measure.3, ptr %75, align 4 + store i64 %___lazy_measure.3, ptr %75, align 4 %76 = load i64, ptr %5, align 4 %77 = or i64 %76, -16 store i64 %77, ptr %5, align 4 diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_flip_some/flip_n4-helios-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_flip_some/flip_n4-helios-x86_64-windows-gnu.ll index 17b792f3..f0b85c2c 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_flip_some/flip_n4-helios-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_flip_some/flip_n4-helios-x86_64-windows-gnu.ll @@ -190,7 +190,7 @@ panic.i850: ; preds = %cond_exit_142.2, %c %44 = or disjoint i64 %42, 1 store i64 %44, ptr %5, align 4 %45 = load i64, ptr %4, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %45) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %45) tail call void @___qfree(i64 %45) %46 = load i64, ptr %3, align 4 %47 = trunc i64 %46 to i1 @@ -199,7 +199,7 @@ panic.i850: ; preds = %cond_exit_142.2, %c cond_exit_142: ; preds = %.thread %48 = and i64 %46, -2 store i64 %48, ptr %3, align 4 - store i64 %lazy_measure, ptr %2, align 4 + store i64 %___lazy_measure, ptr %2, align 4 %49 = load i64, ptr %5, align 4 %50 = and i64 %49, 2 %.not920 = icmp eq i64 %50, 0 @@ -210,7 +210,7 @@ cond_exit_142: ; preds = %.thread store i64 %51, ptr %5, align 4 %52 = getelementptr inbounds nuw i8, ptr %4, i64 8 %53 = load i64, ptr %52, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %53) + %___lazy_measure.1 = tail call i64 @___lazy_measure(i64 %53) tail call void @___qfree(i64 %53) %54 = load i64, ptr %3, align 4 %55 = and i64 %54, 2 @@ -221,7 +221,7 @@ cond_exit_142.1: ; preds = %.thread.1 %56 = and i64 %54, -3 store i64 %56, ptr %3, align 4 %57 = getelementptr inbounds nuw i8, ptr %2, i64 8 - store i64 %lazy_measure.1, ptr %57, align 4 + store i64 %___lazy_measure.1, ptr %57, align 4 %58 = load i64, ptr %5, align 4 %59 = and i64 %58, 4 %.not922 = icmp eq i64 %59, 0 @@ -232,7 +232,7 @@ cond_exit_142.1: ; preds = %.thread.1 store i64 %60, ptr %5, align 4 %61 = getelementptr inbounds nuw i8, ptr %4, i64 16 %62 = load i64, ptr %61, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %62) + %___lazy_measure.2 = tail call i64 @___lazy_measure(i64 %62) tail call void @___qfree(i64 %62) %63 = load i64, ptr %3, align 4 %64 = and i64 %63, 4 @@ -243,7 +243,7 @@ cond_exit_142.2: ; preds = %.thread.2 %65 = and i64 %63, -5 store i64 %65, ptr %3, align 4 %66 = getelementptr inbounds nuw i8, ptr %2, i64 16 - store i64 %lazy_measure.2, ptr %66, align 4 + store i64 %___lazy_measure.2, ptr %66, align 4 %67 = load i64, ptr %5, align 4 %68 = and i64 %67, 8 %.not924 = icmp eq i64 %68, 0 @@ -254,7 +254,7 @@ cond_exit_142.2: ; preds = %.thread.2 store i64 %69, ptr %5, align 4 %70 = getelementptr inbounds nuw i8, ptr %4, i64 24 %71 = load i64, ptr %70, align 4 - %lazy_measure.3 = tail call i64 @___lazy_measure(i64 %71) + %___lazy_measure.3 = tail call i64 @___lazy_measure(i64 %71) tail call void @___qfree(i64 %71) %72 = load i64, ptr %3, align 4 %73 = and i64 %72, 8 @@ -265,7 +265,7 @@ cond_exit_142.3: ; preds = %.thread.3 %74 = and i64 %72, -9 store i64 %74, ptr %3, align 4 %75 = getelementptr inbounds nuw i8, ptr %2, i64 24 - store i64 %lazy_measure.3, ptr %75, align 4 + store i64 %___lazy_measure.3, ptr %75, align 4 %76 = load i64, ptr %5, align 4 %77 = or i64 %76, -16 store i64 %77, ptr %5, align 4 diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_flip_some/flip_n4-sol-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_flip_some/flip_n4-sol-aarch64-apple-darwin.ll index d0e94100..601c59bb 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_flip_some/flip_n4-sol-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_flip_some/flip_n4-sol-aarch64-apple-darwin.ll @@ -190,7 +190,7 @@ panic.i850: ; preds = %cond_exit_142.2, %c %44 = or disjoint i64 %42, 1 store i64 %44, ptr %5, align 4 %45 = load i64, ptr %4, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %45) + %___future_measure = tail call i64 @___future_measure(i64 %45, i64 0) tail call void @___qfree(i64 %45) %46 = load i64, ptr %3, align 4 %47 = trunc i64 %46 to i1 @@ -199,7 +199,7 @@ panic.i850: ; preds = %cond_exit_142.2, %c cond_exit_142: ; preds = %.thread %48 = and i64 %46, -2 store i64 %48, ptr %3, align 4 - store i64 %lazy_measure, ptr %2, align 4 + store i64 %___future_measure, ptr %2, align 4 %49 = load i64, ptr %5, align 4 %50 = and i64 %49, 2 %.not920 = icmp eq i64 %50, 0 @@ -210,7 +210,7 @@ cond_exit_142: ; preds = %.thread store i64 %51, ptr %5, align 4 %52 = getelementptr inbounds nuw i8, ptr %4, i64 8 %53 = load i64, ptr %52, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %53) + %___future_measure.1 = tail call i64 @___future_measure(i64 %53, i64 0) tail call void @___qfree(i64 %53) %54 = load i64, ptr %3, align 4 %55 = and i64 %54, 2 @@ -221,7 +221,7 @@ cond_exit_142.1: ; preds = %.thread.1 %56 = and i64 %54, -3 store i64 %56, ptr %3, align 4 %57 = getelementptr inbounds nuw i8, ptr %2, i64 8 - store i64 %lazy_measure.1, ptr %57, align 4 + store i64 %___future_measure.1, ptr %57, align 4 %58 = load i64, ptr %5, align 4 %59 = and i64 %58, 4 %.not922 = icmp eq i64 %59, 0 @@ -232,7 +232,7 @@ cond_exit_142.1: ; preds = %.thread.1 store i64 %60, ptr %5, align 4 %61 = getelementptr inbounds nuw i8, ptr %4, i64 16 %62 = load i64, ptr %61, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %62) + %___future_measure.2 = tail call i64 @___future_measure(i64 %62, i64 0) tail call void @___qfree(i64 %62) %63 = load i64, ptr %3, align 4 %64 = and i64 %63, 4 @@ -243,7 +243,7 @@ cond_exit_142.2: ; preds = %.thread.2 %65 = and i64 %63, -5 store i64 %65, ptr %3, align 4 %66 = getelementptr inbounds nuw i8, ptr %2, i64 16 - store i64 %lazy_measure.2, ptr %66, align 4 + store i64 %___future_measure.2, ptr %66, align 4 %67 = load i64, ptr %5, align 4 %68 = and i64 %67, 8 %.not924 = icmp eq i64 %68, 0 @@ -254,7 +254,7 @@ cond_exit_142.2: ; preds = %.thread.2 store i64 %69, ptr %5, align 4 %70 = getelementptr inbounds nuw i8, ptr %4, i64 24 %71 = load i64, ptr %70, align 4 - %lazy_measure.3 = tail call i64 @___lazy_measure(i64 %71) + %___future_measure.3 = tail call i64 @___future_measure(i64 %71, i64 0) tail call void @___qfree(i64 %71) %72 = load i64, ptr %3, align 4 %73 = and i64 %72, 8 @@ -265,7 +265,7 @@ cond_exit_142.3: ; preds = %.thread.3 %74 = and i64 %72, -9 store i64 %74, ptr %3, align 4 %75 = getelementptr inbounds nuw i8, ptr %2, i64 24 - store i64 %lazy_measure.3, ptr %75, align 4 + store i64 %___future_measure.3, ptr %75, align 4 %76 = load i64, ptr %5, align 4 %77 = or i64 %76, -16 store i64 %77, ptr %5, align 4 @@ -526,7 +526,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_flip_some/flip_n4-sol-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_flip_some/flip_n4-sol-aarch64-unknown-linux-gnu.ll index f1210e7b..ce9b1769 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_flip_some/flip_n4-sol-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_flip_some/flip_n4-sol-aarch64-unknown-linux-gnu.ll @@ -190,7 +190,7 @@ panic.i850: ; preds = %cond_exit_142.2, %c %44 = or disjoint i64 %42, 1 store i64 %44, ptr %5, align 4 %45 = load i64, ptr %4, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %45) + %___future_measure = tail call i64 @___future_measure(i64 %45, i64 0) tail call void @___qfree(i64 %45) %46 = load i64, ptr %3, align 4 %47 = trunc i64 %46 to i1 @@ -199,7 +199,7 @@ panic.i850: ; preds = %cond_exit_142.2, %c cond_exit_142: ; preds = %.thread %48 = and i64 %46, -2 store i64 %48, ptr %3, align 4 - store i64 %lazy_measure, ptr %2, align 4 + store i64 %___future_measure, ptr %2, align 4 %49 = load i64, ptr %5, align 4 %50 = and i64 %49, 2 %.not920 = icmp eq i64 %50, 0 @@ -210,7 +210,7 @@ cond_exit_142: ; preds = %.thread store i64 %51, ptr %5, align 4 %52 = getelementptr inbounds nuw i8, ptr %4, i64 8 %53 = load i64, ptr %52, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %53) + %___future_measure.1 = tail call i64 @___future_measure(i64 %53, i64 0) tail call void @___qfree(i64 %53) %54 = load i64, ptr %3, align 4 %55 = and i64 %54, 2 @@ -221,7 +221,7 @@ cond_exit_142.1: ; preds = %.thread.1 %56 = and i64 %54, -3 store i64 %56, ptr %3, align 4 %57 = getelementptr inbounds nuw i8, ptr %2, i64 8 - store i64 %lazy_measure.1, ptr %57, align 4 + store i64 %___future_measure.1, ptr %57, align 4 %58 = load i64, ptr %5, align 4 %59 = and i64 %58, 4 %.not922 = icmp eq i64 %59, 0 @@ -232,7 +232,7 @@ cond_exit_142.1: ; preds = %.thread.1 store i64 %60, ptr %5, align 4 %61 = getelementptr inbounds nuw i8, ptr %4, i64 16 %62 = load i64, ptr %61, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %62) + %___future_measure.2 = tail call i64 @___future_measure(i64 %62, i64 0) tail call void @___qfree(i64 %62) %63 = load i64, ptr %3, align 4 %64 = and i64 %63, 4 @@ -243,7 +243,7 @@ cond_exit_142.2: ; preds = %.thread.2 %65 = and i64 %63, -5 store i64 %65, ptr %3, align 4 %66 = getelementptr inbounds nuw i8, ptr %2, i64 16 - store i64 %lazy_measure.2, ptr %66, align 4 + store i64 %___future_measure.2, ptr %66, align 4 %67 = load i64, ptr %5, align 4 %68 = and i64 %67, 8 %.not924 = icmp eq i64 %68, 0 @@ -254,7 +254,7 @@ cond_exit_142.2: ; preds = %.thread.2 store i64 %69, ptr %5, align 4 %70 = getelementptr inbounds nuw i8, ptr %4, i64 24 %71 = load i64, ptr %70, align 4 - %lazy_measure.3 = tail call i64 @___lazy_measure(i64 %71) + %___future_measure.3 = tail call i64 @___future_measure(i64 %71, i64 0) tail call void @___qfree(i64 %71) %72 = load i64, ptr %3, align 4 %73 = and i64 %72, 8 @@ -265,7 +265,7 @@ cond_exit_142.3: ; preds = %.thread.3 %74 = and i64 %72, -9 store i64 %74, ptr %3, align 4 %75 = getelementptr inbounds nuw i8, ptr %2, i64 24 - store i64 %lazy_measure.3, ptr %75, align 4 + store i64 %___future_measure.3, ptr %75, align 4 %76 = load i64, ptr %5, align 4 %77 = or i64 %76, -16 store i64 %77, ptr %5, align 4 @@ -526,7 +526,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_flip_some/flip_n4-sol-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_flip_some/flip_n4-sol-x86_64-apple-darwin.ll index 19c71c6a..3ba38d21 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_flip_some/flip_n4-sol-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_flip_some/flip_n4-sol-x86_64-apple-darwin.ll @@ -190,7 +190,7 @@ panic.i850: ; preds = %cond_exit_142.2, %c %44 = or disjoint i64 %42, 1 store i64 %44, ptr %5, align 4 %45 = load i64, ptr %4, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %45) + %___future_measure = tail call i64 @___future_measure(i64 %45, i64 0) tail call void @___qfree(i64 %45) %46 = load i64, ptr %3, align 4 %47 = trunc i64 %46 to i1 @@ -199,7 +199,7 @@ panic.i850: ; preds = %cond_exit_142.2, %c cond_exit_142: ; preds = %.thread %48 = and i64 %46, -2 store i64 %48, ptr %3, align 4 - store i64 %lazy_measure, ptr %2, align 4 + store i64 %___future_measure, ptr %2, align 4 %49 = load i64, ptr %5, align 4 %50 = and i64 %49, 2 %.not920 = icmp eq i64 %50, 0 @@ -210,7 +210,7 @@ cond_exit_142: ; preds = %.thread store i64 %51, ptr %5, align 4 %52 = getelementptr inbounds nuw i8, ptr %4, i64 8 %53 = load i64, ptr %52, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %53) + %___future_measure.1 = tail call i64 @___future_measure(i64 %53, i64 0) tail call void @___qfree(i64 %53) %54 = load i64, ptr %3, align 4 %55 = and i64 %54, 2 @@ -221,7 +221,7 @@ cond_exit_142.1: ; preds = %.thread.1 %56 = and i64 %54, -3 store i64 %56, ptr %3, align 4 %57 = getelementptr inbounds nuw i8, ptr %2, i64 8 - store i64 %lazy_measure.1, ptr %57, align 4 + store i64 %___future_measure.1, ptr %57, align 4 %58 = load i64, ptr %5, align 4 %59 = and i64 %58, 4 %.not922 = icmp eq i64 %59, 0 @@ -232,7 +232,7 @@ cond_exit_142.1: ; preds = %.thread.1 store i64 %60, ptr %5, align 4 %61 = getelementptr inbounds nuw i8, ptr %4, i64 16 %62 = load i64, ptr %61, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %62) + %___future_measure.2 = tail call i64 @___future_measure(i64 %62, i64 0) tail call void @___qfree(i64 %62) %63 = load i64, ptr %3, align 4 %64 = and i64 %63, 4 @@ -243,7 +243,7 @@ cond_exit_142.2: ; preds = %.thread.2 %65 = and i64 %63, -5 store i64 %65, ptr %3, align 4 %66 = getelementptr inbounds nuw i8, ptr %2, i64 16 - store i64 %lazy_measure.2, ptr %66, align 4 + store i64 %___future_measure.2, ptr %66, align 4 %67 = load i64, ptr %5, align 4 %68 = and i64 %67, 8 %.not924 = icmp eq i64 %68, 0 @@ -254,7 +254,7 @@ cond_exit_142.2: ; preds = %.thread.2 store i64 %69, ptr %5, align 4 %70 = getelementptr inbounds nuw i8, ptr %4, i64 24 %71 = load i64, ptr %70, align 4 - %lazy_measure.3 = tail call i64 @___lazy_measure(i64 %71) + %___future_measure.3 = tail call i64 @___future_measure(i64 %71, i64 0) tail call void @___qfree(i64 %71) %72 = load i64, ptr %3, align 4 %73 = and i64 %72, 8 @@ -265,7 +265,7 @@ cond_exit_142.3: ; preds = %.thread.3 %74 = and i64 %72, -9 store i64 %74, ptr %3, align 4 %75 = getelementptr inbounds nuw i8, ptr %2, i64 24 - store i64 %lazy_measure.3, ptr %75, align 4 + store i64 %___future_measure.3, ptr %75, align 4 %76 = load i64, ptr %5, align 4 %77 = or i64 %76, -16 store i64 %77, ptr %5, align 4 @@ -526,7 +526,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_flip_some/flip_n4-sol-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_flip_some/flip_n4-sol-x86_64-unknown-linux-gnu.ll index a2ed3fd2..2d218415 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_flip_some/flip_n4-sol-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_flip_some/flip_n4-sol-x86_64-unknown-linux-gnu.ll @@ -190,7 +190,7 @@ panic.i850: ; preds = %cond_exit_142.2, %c %44 = or disjoint i64 %42, 1 store i64 %44, ptr %5, align 4 %45 = load i64, ptr %4, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %45) + %___future_measure = tail call i64 @___future_measure(i64 %45, i64 0) tail call void @___qfree(i64 %45) %46 = load i64, ptr %3, align 4 %47 = trunc i64 %46 to i1 @@ -199,7 +199,7 @@ panic.i850: ; preds = %cond_exit_142.2, %c cond_exit_142: ; preds = %.thread %48 = and i64 %46, -2 store i64 %48, ptr %3, align 4 - store i64 %lazy_measure, ptr %2, align 4 + store i64 %___future_measure, ptr %2, align 4 %49 = load i64, ptr %5, align 4 %50 = and i64 %49, 2 %.not920 = icmp eq i64 %50, 0 @@ -210,7 +210,7 @@ cond_exit_142: ; preds = %.thread store i64 %51, ptr %5, align 4 %52 = getelementptr inbounds nuw i8, ptr %4, i64 8 %53 = load i64, ptr %52, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %53) + %___future_measure.1 = tail call i64 @___future_measure(i64 %53, i64 0) tail call void @___qfree(i64 %53) %54 = load i64, ptr %3, align 4 %55 = and i64 %54, 2 @@ -221,7 +221,7 @@ cond_exit_142.1: ; preds = %.thread.1 %56 = and i64 %54, -3 store i64 %56, ptr %3, align 4 %57 = getelementptr inbounds nuw i8, ptr %2, i64 8 - store i64 %lazy_measure.1, ptr %57, align 4 + store i64 %___future_measure.1, ptr %57, align 4 %58 = load i64, ptr %5, align 4 %59 = and i64 %58, 4 %.not922 = icmp eq i64 %59, 0 @@ -232,7 +232,7 @@ cond_exit_142.1: ; preds = %.thread.1 store i64 %60, ptr %5, align 4 %61 = getelementptr inbounds nuw i8, ptr %4, i64 16 %62 = load i64, ptr %61, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %62) + %___future_measure.2 = tail call i64 @___future_measure(i64 %62, i64 0) tail call void @___qfree(i64 %62) %63 = load i64, ptr %3, align 4 %64 = and i64 %63, 4 @@ -243,7 +243,7 @@ cond_exit_142.2: ; preds = %.thread.2 %65 = and i64 %63, -5 store i64 %65, ptr %3, align 4 %66 = getelementptr inbounds nuw i8, ptr %2, i64 16 - store i64 %lazy_measure.2, ptr %66, align 4 + store i64 %___future_measure.2, ptr %66, align 4 %67 = load i64, ptr %5, align 4 %68 = and i64 %67, 8 %.not924 = icmp eq i64 %68, 0 @@ -254,7 +254,7 @@ cond_exit_142.2: ; preds = %.thread.2 store i64 %69, ptr %5, align 4 %70 = getelementptr inbounds nuw i8, ptr %4, i64 24 %71 = load i64, ptr %70, align 4 - %lazy_measure.3 = tail call i64 @___lazy_measure(i64 %71) + %___future_measure.3 = tail call i64 @___future_measure(i64 %71, i64 0) tail call void @___qfree(i64 %71) %72 = load i64, ptr %3, align 4 %73 = and i64 %72, 8 @@ -265,7 +265,7 @@ cond_exit_142.3: ; preds = %.thread.3 %74 = and i64 %72, -9 store i64 %74, ptr %3, align 4 %75 = getelementptr inbounds nuw i8, ptr %2, i64 24 - store i64 %lazy_measure.3, ptr %75, align 4 + store i64 %___future_measure.3, ptr %75, align 4 %76 = load i64, ptr %5, align 4 %77 = or i64 %76, -16 store i64 %77, ptr %5, align 4 @@ -526,7 +526,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_flip_some/flip_n4-sol-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_flip_some/flip_n4-sol-x86_64-windows-gnu.ll index 600050ff..23a8374a 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_flip_some/flip_n4-sol-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_flip_some/flip_n4-sol-x86_64-windows-gnu.ll @@ -190,7 +190,7 @@ panic.i850: ; preds = %cond_exit_142.2, %c %44 = or disjoint i64 %42, 1 store i64 %44, ptr %5, align 4 %45 = load i64, ptr %4, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %45) + %___future_measure = tail call i64 @___future_measure(i64 %45, i64 0) tail call void @___qfree(i64 %45) %46 = load i64, ptr %3, align 4 %47 = trunc i64 %46 to i1 @@ -199,7 +199,7 @@ panic.i850: ; preds = %cond_exit_142.2, %c cond_exit_142: ; preds = %.thread %48 = and i64 %46, -2 store i64 %48, ptr %3, align 4 - store i64 %lazy_measure, ptr %2, align 4 + store i64 %___future_measure, ptr %2, align 4 %49 = load i64, ptr %5, align 4 %50 = and i64 %49, 2 %.not920 = icmp eq i64 %50, 0 @@ -210,7 +210,7 @@ cond_exit_142: ; preds = %.thread store i64 %51, ptr %5, align 4 %52 = getelementptr inbounds nuw i8, ptr %4, i64 8 %53 = load i64, ptr %52, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %53) + %___future_measure.1 = tail call i64 @___future_measure(i64 %53, i64 0) tail call void @___qfree(i64 %53) %54 = load i64, ptr %3, align 4 %55 = and i64 %54, 2 @@ -221,7 +221,7 @@ cond_exit_142.1: ; preds = %.thread.1 %56 = and i64 %54, -3 store i64 %56, ptr %3, align 4 %57 = getelementptr inbounds nuw i8, ptr %2, i64 8 - store i64 %lazy_measure.1, ptr %57, align 4 + store i64 %___future_measure.1, ptr %57, align 4 %58 = load i64, ptr %5, align 4 %59 = and i64 %58, 4 %.not922 = icmp eq i64 %59, 0 @@ -232,7 +232,7 @@ cond_exit_142.1: ; preds = %.thread.1 store i64 %60, ptr %5, align 4 %61 = getelementptr inbounds nuw i8, ptr %4, i64 16 %62 = load i64, ptr %61, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %62) + %___future_measure.2 = tail call i64 @___future_measure(i64 %62, i64 0) tail call void @___qfree(i64 %62) %63 = load i64, ptr %3, align 4 %64 = and i64 %63, 4 @@ -243,7 +243,7 @@ cond_exit_142.2: ; preds = %.thread.2 %65 = and i64 %63, -5 store i64 %65, ptr %3, align 4 %66 = getelementptr inbounds nuw i8, ptr %2, i64 16 - store i64 %lazy_measure.2, ptr %66, align 4 + store i64 %___future_measure.2, ptr %66, align 4 %67 = load i64, ptr %5, align 4 %68 = and i64 %67, 8 %.not924 = icmp eq i64 %68, 0 @@ -254,7 +254,7 @@ cond_exit_142.2: ; preds = %.thread.2 store i64 %69, ptr %5, align 4 %70 = getelementptr inbounds nuw i8, ptr %4, i64 24 %71 = load i64, ptr %70, align 4 - %lazy_measure.3 = tail call i64 @___lazy_measure(i64 %71) + %___future_measure.3 = tail call i64 @___future_measure(i64 %71, i64 0) tail call void @___qfree(i64 %71) %72 = load i64, ptr %3, align 4 %73 = and i64 %72, 8 @@ -265,7 +265,7 @@ cond_exit_142.3: ; preds = %.thread.3 %74 = and i64 %72, -9 store i64 %74, ptr %3, align 4 %75 = getelementptr inbounds nuw i8, ptr %2, i64 24 - store i64 %lazy_measure.3, ptr %75, align 4 + store i64 %___future_measure.3, ptr %75, align 4 %76 = load i64, ptr %5, align 4 %77 = or i64 %76, -16 store i64 %77, ptr %5, align 4 @@ -526,7 +526,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_from_head-helios-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_from_head-helios-aarch64-apple-darwin.ll deleted file mode 100644 index 71bec774..00000000 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_from_head-helios-aarch64-apple-darwin.ll +++ /dev/null @@ -1,415 +0,0 @@ -; ModuleID = 'hugr' -source_filename = "hugr" -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_Index out .DD115165.0" = private constant [29 x i8] c"\1CEXIT:INT:Index out of bounds" -@"e_Array alre.5A300C2A.0" = private constant [57 x i8] c"8EXIT:INT:Array already contains an element at this index" -@e_Option.unw.32D4E82D.0 = private constant [43 x i8] c"*EXIT:INT:Option.unwrap: value is `Nothing`" -@"e_Array elem.E746B1A3.0" = private constant [43 x i8] c"*EXIT:INT:Array element is already borrowed" -@res_head_leake.F4F32972.0 = private constant [21 x i8] c"\14USER:INT:head_leaked" -@res_head.AFE8E005.0 = private constant [15 x i8] c"\0EUSER:BOOL:head" -@"e_Array cont.EFA5AC45.0" = private constant [70 x i8] c"EEXIT:INT:Array contains non-borrowed elements and cannot be discarded" -@"e_Some array.A77EF32E.0" = private constant [48 x i8] c"/EXIT:INT:Some array elements have been borrowed" -@res_tail.AD5A440E.0 = private constant [18 x i8] c"\11USER:BOOLARR:tail" -@"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." - -define void @__hugr__.__main__.main.1() local_unnamed_addr { -alloca_block: - %0 = tail call ptr @heap_alloc(i64 20) - %1 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %1, align 1 - %2 = tail call ptr @heap_alloc(i64 160) - %3 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %3, align 1 - %4 = tail call ptr @heap_alloc(i64 160) - %5 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %5, align 1 - %qalloc.i = tail call i64 @___qalloc() - %not_max.not.not.i = icmp eq i64 %qalloc.i, -1 - br i1 %not_max.not.not.i, label %cond_474_case_0.i, label %__hugr__.__tk2_helios_qalloc.470.exit - -cond_474_case_0.i: ; preds = %alloca_block - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_helios_qalloc.470.exit: ; preds = %alloca_block - tail call void @___reset(i64 %qalloc.i) - tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - br label %loop_body - -loop_body: ; preds = %cond_exit_13, %__hugr__.__tk2_helios_qalloc.470.exit - %"9_2.0" = phi i64 [ 0, %__hugr__.__tk2_helios_qalloc.470.exit ], [ %"2107.0", %cond_exit_13 ] - %"9_0.sroa.0.0" = phi i64 [ 0, %__hugr__.__tk2_helios_qalloc.470.exit ], [ %7, %cond_exit_13 ] - %6 = icmp samesign ugt i64 %"9_0.sroa.0.0", 19 - %7 = add nuw nsw i64 %"9_0.sroa.0.0", 1 - br i1 %6, label %cond_exit_13, label %cond_13_case_1 - -cond_13_case_1: ; preds = %loop_body - %8 = add i64 %"9_2.0", 1 - %qalloc.i1214 = tail call i64 @___qalloc() - %not_max.not.not.i1215 = icmp eq i64 %qalloc.i1214, -1 - br i1 %not_max.not.not.i1215, label %cond_474_case_0.i1216, label %__hugr__.__tk2_helios_qalloc.470.exit1217 - -cond_474_case_0.i1216: ; preds = %cond_13_case_1 - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_helios_qalloc.470.exit1217: ; preds = %cond_13_case_1 - tail call void @___reset(i64 %qalloc.i1214) - %9 = icmp ult i64 %"9_2.0", 20 - br i1 %9, label %__barray_check_bounds.exit, label %out_of_bounds.i - -out_of_bounds.i: ; preds = %__hugr__.__tk2_helios_qalloc.470.exit1217 - tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") - unreachable - -__barray_check_bounds.exit: ; preds = %__hugr__.__tk2_helios_qalloc.470.exit1217 - %10 = load i64, ptr %5, align 4 - %11 = lshr i64 %10, %"9_2.0" - %12 = trunc i64 %11 to i1 - br i1 %12, label %__barray_mask_return.exit, label %panic.i - -panic.i: ; preds = %__barray_check_bounds.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit: ; preds = %__barray_check_bounds.exit - %13 = shl nuw nsw i64 1, %"9_2.0" - %14 = xor i64 %10, %13 - store i64 %14, ptr %5, align 4 - %15 = getelementptr inbounds nuw i64, ptr %4, i64 %"9_2.0" - store i64 %qalloc.i1214, ptr %15, align 4 - br label %cond_exit_13 - -cond_exit_13: ; preds = %loop_body, %__barray_mask_return.exit - %"2107.0" = phi i64 [ %8, %__barray_mask_return.exit ], [ %"9_2.0", %loop_body ] - %exitcond = icmp eq i64 %7, 21 - br i1 %exitcond, label %__barray_check_bounds.exit1219, label %loop_body - -__barray_check_bounds.exit1219: ; preds = %cond_exit_13, %__barray_mask_return.exit1224 - %16 = phi i64 [ %28, %__barray_mask_return.exit1224 ], [ 1, %cond_exit_13 ] - %"114_0.01276" = phi i64 [ %16, %__barray_mask_return.exit1224 ], [ 0, %cond_exit_13 ] - %17 = load i64, ptr %5, align 4 - %18 = lshr i64 %17, %"114_0.01276" - %19 = trunc i64 %18 to i1 - br i1 %19, label %panic.i1220, label %__barray_check_bounds.exit1222 - -panic.i1220: ; preds = %__barray_check_bounds.exit1219 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1222: ; preds = %__barray_check_bounds.exit1219 - %20 = shl nuw nsw i64 1, %"114_0.01276" - %21 = xor i64 %17, %20 - store i64 %21, ptr %5, align 4 - %22 = getelementptr inbounds nuw i64, ptr %4, i64 %"114_0.01276" - %23 = load i64, ptr %22, align 4 - tail call void @___rxy(i64 %23, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rzz(i64 %qalloc.i, i64 %23, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18) - tail call void @___rxy(i64 %23, double 0x3FF921FB54442D18, double 0x400921FB54442D18) - tail call void @___rz(i64 %23, double 0xBFF921FB54442D18) - %24 = load i64, ptr %5, align 4 - %25 = lshr i64 %24, %"114_0.01276" - %26 = trunc i64 %25 to i1 - br i1 %26, label %__barray_mask_return.exit1224, label %panic.i1223 - -panic.i1223: ; preds = %__barray_check_bounds.exit1222 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1224: ; preds = %__barray_check_bounds.exit1222 - %27 = xor i64 %24, %20 - store i64 %27, ptr %5, align 4 - store i64 %23, ptr %22, align 4 - %28 = add nuw nsw i64 %16, 1 - %exitcond1279 = icmp eq i64 %28, 21 - br i1 %exitcond1279, label %cond_exit_185, label %__barray_check_bounds.exit1219 - -cond_exit_185: ; preds = %__barray_mask_return.exit1224 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) - tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure_leaked) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - %29 = icmp eq i64 %read_uint, 2 - br i1 %29, label %30, label %cond_exit_256 - -cond_exit_256: ; preds = %cond_exit_185 - %read_uint350 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - %.not = icmp eq i64 %read_uint350, 2 - br i1 %.not, label %cond_236_case_0, label %cond_236_case_1 - -30: ; preds = %cond_exit_185 - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - tail call void @print_int(ptr nonnull @res_head_leake.F4F32972.0, i64 20, i64 1) - br label %__barray_check_bounds.exit1230.preheader - -__barray_check_bounds.exit1230.preheader: ; preds = %cond_236_case_1, %30 - br label %__barray_check_bounds.exit1230 - -cond_236_case_1: ; preds = %cond_exit_256 - %31 = icmp eq i64 %read_uint350, 1 - tail call void @print_bool(ptr nonnull @res_head.AFE8E005.0, i64 14, i1 %31) - br label %__barray_check_bounds.exit1230.preheader - -cond_236_case_0: ; preds = %cond_exit_256 - tail call void @panic(i32 1001, ptr nonnull @e_Option.unw.32D4E82D.0) - unreachable - -out_of_bounds.i1225: ; preds = %.thread - tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") - unreachable - -__barray_check_bounds.exit1226: ; preds = %.thread - %32 = load i64, ptr %3, align 4 - %33 = lshr i64 %32, %"298_2.01283" - %34 = trunc i64 %33 to i1 - br i1 %34, label %cond_exit_302, label %panic.i1227 - -panic.i1227: ; preds = %__barray_check_bounds.exit1226 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -mask_block_ok.i: ; preds = %cond_exit_302 - %35 = load i64, ptr %5, align 4 - %36 = or i64 %35, -1048576 - store i64 %36, ptr %5, align 4 - %37 = icmp eq i64 %36, -1 - br i1 %37, label %loop_body510.preheader.preheader, label %mask_block_err.i - -mask_block_err.i: ; preds = %mask_block_ok.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_check_bounds.exit1230: ; preds = %__barray_check_bounds.exit1230.preheader, %cond_exit_302 - %"298_0.sroa.15.01284" = phi i64 [ %38, %cond_exit_302 ], [ 0, %__barray_check_bounds.exit1230.preheader ] - %"298_2.01283" = phi i64 [ %46, %cond_exit_302 ], [ 0, %__barray_check_bounds.exit1230.preheader ] - %38 = add nuw nsw i64 %"298_0.sroa.15.01284", 1 - %39 = load i64, ptr %5, align 4 - %40 = lshr i64 %39, %"298_0.sroa.15.01284" - %41 = trunc i64 %40 to i1 - br i1 %41, label %panic.i1231, label %.thread - -panic.i1231: ; preds = %__barray_check_bounds.exit1230 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -.thread: ; preds = %__barray_check_bounds.exit1230 - %42 = shl nuw nsw i64 1, %"298_0.sroa.15.01284" - %43 = xor i64 %39, %42 - store i64 %43, ptr %5, align 4 - %44 = getelementptr inbounds nuw i64, ptr %4, i64 %"298_0.sroa.15.01284" - %45 = load i64, ptr %44, align 4 - %46 = add i64 %"298_2.01283", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %45) - tail call void @___qfree(i64 %45) - %47 = icmp ult i64 %"298_2.01283", 20 - br i1 %47, label %__barray_check_bounds.exit1226, label %out_of_bounds.i1225 - -cond_exit_302: ; preds = %__barray_check_bounds.exit1226 - %48 = shl nuw nsw i64 1, %"298_2.01283" - %49 = xor i64 %32, %48 - store i64 %49, ptr %3, align 4 - %50 = getelementptr inbounds nuw i64, ptr %2, i64 %"298_2.01283" - store i64 %lazy_measure, ptr %50, align 4 - %51 = icmp samesign ugt i64 %"298_0.sroa.15.01284", 18 - br i1 %51, label %mask_block_ok.i, label %__barray_check_bounds.exit1230 - -loop_body510.preheader.preheader: ; preds = %mask_block_ok.i - tail call void @heap_free(ptr nonnull %4) - tail call void @heap_free(ptr nonnull %5) - br label %__barray_check_bounds.exit1234 - -__barray_check_bounds.exit1234: ; preds = %cond_exit_368, %loop_body510.preheader.preheader - %"364_0.sroa.15.01278" = phi i64 [ %52, %cond_exit_368 ], [ 0, %loop_body510.preheader.preheader ] - %52 = add nuw nsw i64 %"364_0.sroa.15.01278", 1 - %53 = load i64, ptr %3, align 4 - %54 = lshr i64 %53, %"364_0.sroa.15.01278" - %55 = trunc i64 %54 to i1 - br i1 %55, label %panic.i1235, label %__barray_check_bounds.exit1238 - -panic.i1235: ; preds = %__barray_check_bounds.exit1234 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1238: ; preds = %__barray_check_bounds.exit1234 - %56 = shl nuw nsw i64 1, %"364_0.sroa.15.01278" - %57 = xor i64 %53, %56 - store i64 %57, ptr %3, align 4 - %58 = getelementptr inbounds nuw i64, ptr %2, i64 %"364_0.sroa.15.01278" - %59 = load i64, ptr %58, align 4 - tail call void @___inc_future_refcount(i64 %59) - %60 = load i64, ptr %3, align 4 - %61 = lshr i64 %60, %"364_0.sroa.15.01278" - %62 = trunc i64 %61 to i1 - br i1 %62, label %__barray_check_bounds.exit1242, label %panic.i1239 - -panic.i1239: ; preds = %__barray_check_bounds.exit1238 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_check_bounds.exit1242: ; preds = %__barray_check_bounds.exit1238 - %63 = xor i64 %60, %56 - store i64 %63, ptr %3, align 4 - store i64 %59, ptr %58, align 4 - %read_bool = tail call i1 @___read_future_bool(i64 %59) - tail call void @___dec_future_refcount(i64 %59) - %64 = load i64, ptr %1, align 4 - %65 = lshr i64 %64, %"364_0.sroa.15.01278" - %66 = trunc i64 %65 to i1 - br i1 %66, label %cond_exit_368, label %panic.i1243 - -panic.i1243: ; preds = %__barray_check_bounds.exit1242 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -cond_550_case_0: ; preds = %cond_exit_550 - %67 = load i64, ptr %3, align 4 - %68 = or i64 %67, -1048576 - store i64 %68, ptr %3, align 4 - %69 = icmp eq i64 %68, -1 - br i1 %69, label %loop_out509, label %mask_block_err.i1248 - -mask_block_err.i1248: ; preds = %cond_550_case_0 - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_check_bounds.exit1252: ; preds = %cond_exit_368, %cond_exit_550 - %"547_0.01285" = phi i64 [ %70, %cond_exit_550 ], [ 0, %cond_exit_368 ] - %70 = add nuw nsw i64 %"547_0.01285", 1 - %71 = load i64, ptr %3, align 4 - %72 = lshr i64 %71, %"547_0.01285" - %73 = trunc i64 %72 to i1 - br i1 %73, label %cond_exit_550, label %__barray_mask_borrow.exit1256 - -__barray_mask_borrow.exit1256: ; preds = %__barray_check_bounds.exit1252 - %74 = shl nuw nsw i64 1, %"547_0.01285" - %75 = xor i64 %71, %74 - store i64 %75, ptr %3, align 4 - %76 = getelementptr inbounds nuw i64, ptr %2, i64 %"547_0.01285" - %77 = load i64, ptr %76, align 4 - tail call void @___dec_future_refcount(i64 %77) - br label %cond_exit_550 - -cond_exit_550: ; preds = %__barray_mask_borrow.exit1256, %__barray_check_bounds.exit1252 - %78 = icmp samesign ugt i64 %"547_0.01285", 18 - br i1 %78, label %cond_550_case_0, label %__barray_check_bounds.exit1252 - -cond_exit_368: ; preds = %__barray_check_bounds.exit1242 - %79 = xor i64 %64, %56 - store i64 %79, ptr %1, align 4 - %80 = getelementptr inbounds nuw i1, ptr %0, i64 %"364_0.sroa.15.01278" - store i1 %read_bool, ptr %80, align 1 - %81 = icmp eq i64 %"364_0.sroa.15.01278", 19 - br i1 %81, label %__barray_check_bounds.exit1252, label %__barray_check_bounds.exit1234 - -loop_out509: ; preds = %cond_550_case_0 - tail call void @heap_free(ptr %2) - tail call void @heap_free(ptr nonnull %3) - %82 = load i64, ptr %1, align 4 - %83 = and i64 %82, 1048575 - store i64 %83, ptr %1, align 4 - %84 = icmp eq i64 %83, 0 - br i1 %84, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1257 - -mask_block_err.i1257: ; preds = %loop_out509 - tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") - unreachable - -__barray_check_none_borrowed.exit: ; preds = %loop_out509 - %85 = tail call ptr @heap_alloc(i64 20) - %86 = tail call ptr @heap_alloc(i64 8) - store i64 0, ptr %86, align 1 - tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(20) %85, ptr noundef nonnull align 1 dereferenceable(20) %0, i64 20, i1 false) - tail call void @heap_free(ptr nonnull %85) - %87 = load i64, ptr %1, align 4 - %88 = and i64 %87, 1048575 - store i64 %88, ptr %1, align 4 - %89 = icmp eq i64 %88, 0 - br i1 %89, label %__barray_check_none_borrowed.exit1261, label %mask_block_err.i1259 - -mask_block_err.i1259: ; preds = %__barray_check_none_borrowed.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") - unreachable - -__barray_check_none_borrowed.exit1261: ; preds = %__barray_check_none_borrowed.exit - %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 - %y_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 4 - %arr_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 8 - %mask_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 16 - %90 = alloca [20 x i1], align 1 - call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(20) %90, i8 0, i64 20, i1 false) - store i32 20, ptr %out_arr_alloca, align 8 - store i32 1, ptr %y_ptr, align 4 - store ptr %0, ptr %arr_ptr, align 8 - store ptr %90, ptr %mask_ptr, align 8 - call void @print_bool_arr(ptr nonnull @res_tail.AD5A440E.0, i64 17, ptr nonnull %out_arr_alloca) - ret void -} - -declare ptr @heap_alloc(i64) local_unnamed_addr - -; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) -declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immarg) #0 - -; Function Attrs: noreturn -declare void @panic(i32, ptr) local_unnamed_addr #1 - -declare i64 @___lazy_measure_leaked(i64) local_unnamed_addr - -declare void @___qfree(i64) local_unnamed_addr - -declare void @___inc_future_refcount(i64) local_unnamed_addr - -declare i64 @___read_future_uint(i64) local_unnamed_addr - -declare void @___dec_future_refcount(i64) local_unnamed_addr - -declare void @print_int(ptr, i64, i64) local_unnamed_addr - -declare void @print_bool(ptr, i64, i1) local_unnamed_addr - -declare void @heap_free(ptr) local_unnamed_addr - -declare i64 @___lazy_measure(i64) local_unnamed_addr - -declare i1 @___read_future_bool(i64) local_unnamed_addr - -; Function Attrs: mustprogress 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) #2 - -declare void @print_bool_arr(ptr, i64, ptr) local_unnamed_addr - -declare i64 @___qalloc() local_unnamed_addr - -declare void @___reset(i64) local_unnamed_addr - -declare void @___rxy(i64, double, double) local_unnamed_addr - -declare void @___rz(i64, double) local_unnamed_addr - -declare void @___rzz(i64, i64, double) local_unnamed_addr - -define i64 @qmain(i64 %0) local_unnamed_addr { -entry: - tail call void @setup(i64 %0) - tail call void @__hugr__.__main__.main.1() - %1 = tail call i64 @teardown() - ret i64 %1 -} - -declare void @setup(i64) local_unnamed_addr - -declare i64 @teardown() local_unnamed_addr - -attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } -attributes #1 = { noreturn } -attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) } - -!name = !{!0} - -!0 = !{!"mainlib"} diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_from_head-helios-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_from_head-helios-aarch64-unknown-linux-gnu.ll deleted file mode 100644 index cdc73338..00000000 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_from_head-helios-aarch64-unknown-linux-gnu.ll +++ /dev/null @@ -1,415 +0,0 @@ -; ModuleID = 'hugr' -source_filename = "hugr" -target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32" -target triple = "aarch64-unknown-linux-gnu" - -@"e_Index out .DD115165.0" = private constant [29 x i8] c"\1CEXIT:INT:Index out of bounds" -@"e_Array alre.5A300C2A.0" = private constant [57 x i8] c"8EXIT:INT:Array already contains an element at this index" -@e_Option.unw.32D4E82D.0 = private constant [43 x i8] c"*EXIT:INT:Option.unwrap: value is `Nothing`" -@"e_Array elem.E746B1A3.0" = private constant [43 x i8] c"*EXIT:INT:Array element is already borrowed" -@res_head_leake.F4F32972.0 = private constant [21 x i8] c"\14USER:INT:head_leaked" -@res_head.AFE8E005.0 = private constant [15 x i8] c"\0EUSER:BOOL:head" -@"e_Array cont.EFA5AC45.0" = private constant [70 x i8] c"EEXIT:INT:Array contains non-borrowed elements and cannot be discarded" -@"e_Some array.A77EF32E.0" = private constant [48 x i8] c"/EXIT:INT:Some array elements have been borrowed" -@res_tail.AD5A440E.0 = private constant [18 x i8] c"\11USER:BOOLARR:tail" -@"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." - -define void @__hugr__.__main__.main.1() local_unnamed_addr { -alloca_block: - %0 = tail call ptr @heap_alloc(i64 20) - %1 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %1, align 1 - %2 = tail call ptr @heap_alloc(i64 160) - %3 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %3, align 1 - %4 = tail call ptr @heap_alloc(i64 160) - %5 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %5, align 1 - %qalloc.i = tail call i64 @___qalloc() - %not_max.not.not.i = icmp eq i64 %qalloc.i, -1 - br i1 %not_max.not.not.i, label %cond_474_case_0.i, label %__hugr__.__tk2_helios_qalloc.470.exit - -cond_474_case_0.i: ; preds = %alloca_block - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_helios_qalloc.470.exit: ; preds = %alloca_block - tail call void @___reset(i64 %qalloc.i) - tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - br label %loop_body - -loop_body: ; preds = %cond_exit_13, %__hugr__.__tk2_helios_qalloc.470.exit - %"9_2.0" = phi i64 [ 0, %__hugr__.__tk2_helios_qalloc.470.exit ], [ %"2107.0", %cond_exit_13 ] - %"9_0.sroa.0.0" = phi i64 [ 0, %__hugr__.__tk2_helios_qalloc.470.exit ], [ %7, %cond_exit_13 ] - %6 = icmp samesign ugt i64 %"9_0.sroa.0.0", 19 - %7 = add nuw nsw i64 %"9_0.sroa.0.0", 1 - br i1 %6, label %cond_exit_13, label %cond_13_case_1 - -cond_13_case_1: ; preds = %loop_body - %8 = add i64 %"9_2.0", 1 - %qalloc.i1214 = tail call i64 @___qalloc() - %not_max.not.not.i1215 = icmp eq i64 %qalloc.i1214, -1 - br i1 %not_max.not.not.i1215, label %cond_474_case_0.i1216, label %__hugr__.__tk2_helios_qalloc.470.exit1217 - -cond_474_case_0.i1216: ; preds = %cond_13_case_1 - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_helios_qalloc.470.exit1217: ; preds = %cond_13_case_1 - tail call void @___reset(i64 %qalloc.i1214) - %9 = icmp ult i64 %"9_2.0", 20 - br i1 %9, label %__barray_check_bounds.exit, label %out_of_bounds.i - -out_of_bounds.i: ; preds = %__hugr__.__tk2_helios_qalloc.470.exit1217 - tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") - unreachable - -__barray_check_bounds.exit: ; preds = %__hugr__.__tk2_helios_qalloc.470.exit1217 - %10 = load i64, ptr %5, align 4 - %11 = lshr i64 %10, %"9_2.0" - %12 = trunc i64 %11 to i1 - br i1 %12, label %__barray_mask_return.exit, label %panic.i - -panic.i: ; preds = %__barray_check_bounds.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit: ; preds = %__barray_check_bounds.exit - %13 = shl nuw nsw i64 1, %"9_2.0" - %14 = xor i64 %10, %13 - store i64 %14, ptr %5, align 4 - %15 = getelementptr inbounds nuw i64, ptr %4, i64 %"9_2.0" - store i64 %qalloc.i1214, ptr %15, align 4 - br label %cond_exit_13 - -cond_exit_13: ; preds = %loop_body, %__barray_mask_return.exit - %"2107.0" = phi i64 [ %8, %__barray_mask_return.exit ], [ %"9_2.0", %loop_body ] - %exitcond = icmp eq i64 %7, 21 - br i1 %exitcond, label %__barray_check_bounds.exit1219, label %loop_body - -__barray_check_bounds.exit1219: ; preds = %cond_exit_13, %__barray_mask_return.exit1224 - %16 = phi i64 [ %28, %__barray_mask_return.exit1224 ], [ 1, %cond_exit_13 ] - %"114_0.01276" = phi i64 [ %16, %__barray_mask_return.exit1224 ], [ 0, %cond_exit_13 ] - %17 = load i64, ptr %5, align 4 - %18 = lshr i64 %17, %"114_0.01276" - %19 = trunc i64 %18 to i1 - br i1 %19, label %panic.i1220, label %__barray_check_bounds.exit1222 - -panic.i1220: ; preds = %__barray_check_bounds.exit1219 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1222: ; preds = %__barray_check_bounds.exit1219 - %20 = shl nuw nsw i64 1, %"114_0.01276" - %21 = xor i64 %17, %20 - store i64 %21, ptr %5, align 4 - %22 = getelementptr inbounds nuw i64, ptr %4, i64 %"114_0.01276" - %23 = load i64, ptr %22, align 4 - tail call void @___rxy(i64 %23, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rzz(i64 %qalloc.i, i64 %23, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18) - tail call void @___rxy(i64 %23, double 0x3FF921FB54442D18, double 0x400921FB54442D18) - tail call void @___rz(i64 %23, double 0xBFF921FB54442D18) - %24 = load i64, ptr %5, align 4 - %25 = lshr i64 %24, %"114_0.01276" - %26 = trunc i64 %25 to i1 - br i1 %26, label %__barray_mask_return.exit1224, label %panic.i1223 - -panic.i1223: ; preds = %__barray_check_bounds.exit1222 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1224: ; preds = %__barray_check_bounds.exit1222 - %27 = xor i64 %24, %20 - store i64 %27, ptr %5, align 4 - store i64 %23, ptr %22, align 4 - %28 = add nuw nsw i64 %16, 1 - %exitcond1279 = icmp eq i64 %28, 21 - br i1 %exitcond1279, label %cond_exit_185, label %__barray_check_bounds.exit1219 - -cond_exit_185: ; preds = %__barray_mask_return.exit1224 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) - tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure_leaked) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - %29 = icmp eq i64 %read_uint, 2 - br i1 %29, label %30, label %cond_exit_256 - -cond_exit_256: ; preds = %cond_exit_185 - %read_uint350 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - %.not = icmp eq i64 %read_uint350, 2 - br i1 %.not, label %cond_236_case_0, label %cond_236_case_1 - -30: ; preds = %cond_exit_185 - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - tail call void @print_int(ptr nonnull @res_head_leake.F4F32972.0, i64 20, i64 1) - br label %__barray_check_bounds.exit1230.preheader - -__barray_check_bounds.exit1230.preheader: ; preds = %cond_236_case_1, %30 - br label %__barray_check_bounds.exit1230 - -cond_236_case_1: ; preds = %cond_exit_256 - %31 = icmp eq i64 %read_uint350, 1 - tail call void @print_bool(ptr nonnull @res_head.AFE8E005.0, i64 14, i1 %31) - br label %__barray_check_bounds.exit1230.preheader - -cond_236_case_0: ; preds = %cond_exit_256 - tail call void @panic(i32 1001, ptr nonnull @e_Option.unw.32D4E82D.0) - unreachable - -out_of_bounds.i1225: ; preds = %.thread - tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") - unreachable - -__barray_check_bounds.exit1226: ; preds = %.thread - %32 = load i64, ptr %3, align 4 - %33 = lshr i64 %32, %"298_2.01283" - %34 = trunc i64 %33 to i1 - br i1 %34, label %cond_exit_302, label %panic.i1227 - -panic.i1227: ; preds = %__barray_check_bounds.exit1226 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -mask_block_ok.i: ; preds = %cond_exit_302 - %35 = load i64, ptr %5, align 4 - %36 = or i64 %35, -1048576 - store i64 %36, ptr %5, align 4 - %37 = icmp eq i64 %36, -1 - br i1 %37, label %loop_body510.preheader.preheader, label %mask_block_err.i - -mask_block_err.i: ; preds = %mask_block_ok.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_check_bounds.exit1230: ; preds = %__barray_check_bounds.exit1230.preheader, %cond_exit_302 - %"298_0.sroa.15.01284" = phi i64 [ %38, %cond_exit_302 ], [ 0, %__barray_check_bounds.exit1230.preheader ] - %"298_2.01283" = phi i64 [ %46, %cond_exit_302 ], [ 0, %__barray_check_bounds.exit1230.preheader ] - %38 = add nuw nsw i64 %"298_0.sroa.15.01284", 1 - %39 = load i64, ptr %5, align 4 - %40 = lshr i64 %39, %"298_0.sroa.15.01284" - %41 = trunc i64 %40 to i1 - br i1 %41, label %panic.i1231, label %.thread - -panic.i1231: ; preds = %__barray_check_bounds.exit1230 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -.thread: ; preds = %__barray_check_bounds.exit1230 - %42 = shl nuw nsw i64 1, %"298_0.sroa.15.01284" - %43 = xor i64 %39, %42 - store i64 %43, ptr %5, align 4 - %44 = getelementptr inbounds nuw i64, ptr %4, i64 %"298_0.sroa.15.01284" - %45 = load i64, ptr %44, align 4 - %46 = add i64 %"298_2.01283", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %45) - tail call void @___qfree(i64 %45) - %47 = icmp ult i64 %"298_2.01283", 20 - br i1 %47, label %__barray_check_bounds.exit1226, label %out_of_bounds.i1225 - -cond_exit_302: ; preds = %__barray_check_bounds.exit1226 - %48 = shl nuw nsw i64 1, %"298_2.01283" - %49 = xor i64 %32, %48 - store i64 %49, ptr %3, align 4 - %50 = getelementptr inbounds nuw i64, ptr %2, i64 %"298_2.01283" - store i64 %lazy_measure, ptr %50, align 4 - %51 = icmp samesign ugt i64 %"298_0.sroa.15.01284", 18 - br i1 %51, label %mask_block_ok.i, label %__barray_check_bounds.exit1230 - -loop_body510.preheader.preheader: ; preds = %mask_block_ok.i - tail call void @heap_free(ptr nonnull %4) - tail call void @heap_free(ptr nonnull %5) - br label %__barray_check_bounds.exit1234 - -__barray_check_bounds.exit1234: ; preds = %cond_exit_368, %loop_body510.preheader.preheader - %"364_0.sroa.15.01278" = phi i64 [ %52, %cond_exit_368 ], [ 0, %loop_body510.preheader.preheader ] - %52 = add nuw nsw i64 %"364_0.sroa.15.01278", 1 - %53 = load i64, ptr %3, align 4 - %54 = lshr i64 %53, %"364_0.sroa.15.01278" - %55 = trunc i64 %54 to i1 - br i1 %55, label %panic.i1235, label %__barray_check_bounds.exit1238 - -panic.i1235: ; preds = %__barray_check_bounds.exit1234 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1238: ; preds = %__barray_check_bounds.exit1234 - %56 = shl nuw nsw i64 1, %"364_0.sroa.15.01278" - %57 = xor i64 %53, %56 - store i64 %57, ptr %3, align 4 - %58 = getelementptr inbounds nuw i64, ptr %2, i64 %"364_0.sroa.15.01278" - %59 = load i64, ptr %58, align 4 - tail call void @___inc_future_refcount(i64 %59) - %60 = load i64, ptr %3, align 4 - %61 = lshr i64 %60, %"364_0.sroa.15.01278" - %62 = trunc i64 %61 to i1 - br i1 %62, label %__barray_check_bounds.exit1242, label %panic.i1239 - -panic.i1239: ; preds = %__barray_check_bounds.exit1238 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_check_bounds.exit1242: ; preds = %__barray_check_bounds.exit1238 - %63 = xor i64 %60, %56 - store i64 %63, ptr %3, align 4 - store i64 %59, ptr %58, align 4 - %read_bool = tail call i1 @___read_future_bool(i64 %59) - tail call void @___dec_future_refcount(i64 %59) - %64 = load i64, ptr %1, align 4 - %65 = lshr i64 %64, %"364_0.sroa.15.01278" - %66 = trunc i64 %65 to i1 - br i1 %66, label %cond_exit_368, label %panic.i1243 - -panic.i1243: ; preds = %__barray_check_bounds.exit1242 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -cond_550_case_0: ; preds = %cond_exit_550 - %67 = load i64, ptr %3, align 4 - %68 = or i64 %67, -1048576 - store i64 %68, ptr %3, align 4 - %69 = icmp eq i64 %68, -1 - br i1 %69, label %loop_out509, label %mask_block_err.i1248 - -mask_block_err.i1248: ; preds = %cond_550_case_0 - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_check_bounds.exit1252: ; preds = %cond_exit_368, %cond_exit_550 - %"547_0.01285" = phi i64 [ %70, %cond_exit_550 ], [ 0, %cond_exit_368 ] - %70 = add nuw nsw i64 %"547_0.01285", 1 - %71 = load i64, ptr %3, align 4 - %72 = lshr i64 %71, %"547_0.01285" - %73 = trunc i64 %72 to i1 - br i1 %73, label %cond_exit_550, label %__barray_mask_borrow.exit1256 - -__barray_mask_borrow.exit1256: ; preds = %__barray_check_bounds.exit1252 - %74 = shl nuw nsw i64 1, %"547_0.01285" - %75 = xor i64 %71, %74 - store i64 %75, ptr %3, align 4 - %76 = getelementptr inbounds nuw i64, ptr %2, i64 %"547_0.01285" - %77 = load i64, ptr %76, align 4 - tail call void @___dec_future_refcount(i64 %77) - br label %cond_exit_550 - -cond_exit_550: ; preds = %__barray_mask_borrow.exit1256, %__barray_check_bounds.exit1252 - %78 = icmp samesign ugt i64 %"547_0.01285", 18 - br i1 %78, label %cond_550_case_0, label %__barray_check_bounds.exit1252 - -cond_exit_368: ; preds = %__barray_check_bounds.exit1242 - %79 = xor i64 %64, %56 - store i64 %79, ptr %1, align 4 - %80 = getelementptr inbounds nuw i1, ptr %0, i64 %"364_0.sroa.15.01278" - store i1 %read_bool, ptr %80, align 1 - %81 = icmp eq i64 %"364_0.sroa.15.01278", 19 - br i1 %81, label %__barray_check_bounds.exit1252, label %__barray_check_bounds.exit1234 - -loop_out509: ; preds = %cond_550_case_0 - tail call void @heap_free(ptr %2) - tail call void @heap_free(ptr nonnull %3) - %82 = load i64, ptr %1, align 4 - %83 = and i64 %82, 1048575 - store i64 %83, ptr %1, align 4 - %84 = icmp eq i64 %83, 0 - br i1 %84, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1257 - -mask_block_err.i1257: ; preds = %loop_out509 - tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") - unreachable - -__barray_check_none_borrowed.exit: ; preds = %loop_out509 - %85 = tail call ptr @heap_alloc(i64 20) - %86 = tail call ptr @heap_alloc(i64 8) - store i64 0, ptr %86, align 1 - tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(20) %85, ptr noundef nonnull align 1 dereferenceable(20) %0, i64 20, i1 false) - tail call void @heap_free(ptr nonnull %85) - %87 = load i64, ptr %1, align 4 - %88 = and i64 %87, 1048575 - store i64 %88, ptr %1, align 4 - %89 = icmp eq i64 %88, 0 - br i1 %89, label %__barray_check_none_borrowed.exit1261, label %mask_block_err.i1259 - -mask_block_err.i1259: ; preds = %__barray_check_none_borrowed.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") - unreachable - -__barray_check_none_borrowed.exit1261: ; preds = %__barray_check_none_borrowed.exit - %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 - %y_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 4 - %arr_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 8 - %mask_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 16 - %90 = alloca [20 x i1], align 1 - call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(20) %90, i8 0, i64 20, i1 false) - store i32 20, ptr %out_arr_alloca, align 8 - store i32 1, ptr %y_ptr, align 4 - store ptr %0, ptr %arr_ptr, align 8 - store ptr %90, ptr %mask_ptr, align 8 - call void @print_bool_arr(ptr nonnull @res_tail.AD5A440E.0, i64 17, ptr nonnull %out_arr_alloca) - ret void -} - -declare ptr @heap_alloc(i64) local_unnamed_addr - -; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) -declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immarg) #0 - -; Function Attrs: noreturn -declare void @panic(i32, ptr) local_unnamed_addr #1 - -declare i64 @___lazy_measure_leaked(i64) local_unnamed_addr - -declare void @___qfree(i64) local_unnamed_addr - -declare void @___inc_future_refcount(i64) local_unnamed_addr - -declare i64 @___read_future_uint(i64) local_unnamed_addr - -declare void @___dec_future_refcount(i64) local_unnamed_addr - -declare void @print_int(ptr, i64, i64) local_unnamed_addr - -declare void @print_bool(ptr, i64, i1) local_unnamed_addr - -declare void @heap_free(ptr) local_unnamed_addr - -declare i64 @___lazy_measure(i64) local_unnamed_addr - -declare i1 @___read_future_bool(i64) local_unnamed_addr - -; Function Attrs: mustprogress 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) #2 - -declare void @print_bool_arr(ptr, i64, ptr) local_unnamed_addr - -declare i64 @___qalloc() local_unnamed_addr - -declare void @___reset(i64) local_unnamed_addr - -declare void @___rxy(i64, double, double) local_unnamed_addr - -declare void @___rz(i64, double) local_unnamed_addr - -declare void @___rzz(i64, i64, double) local_unnamed_addr - -define i64 @qmain(i64 %0) local_unnamed_addr { -entry: - tail call void @setup(i64 %0) - tail call void @__hugr__.__main__.main.1() - %1 = tail call i64 @teardown() - ret i64 %1 -} - -declare void @setup(i64) local_unnamed_addr - -declare i64 @teardown() local_unnamed_addr - -attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } -attributes #1 = { noreturn } -attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) } - -!name = !{!0} - -!0 = !{!"mainlib"} diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_from_head-helios-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_from_head-helios-x86_64-apple-darwin.ll deleted file mode 100644 index 7252fad1..00000000 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_from_head-helios-x86_64-apple-darwin.ll +++ /dev/null @@ -1,415 +0,0 @@ -; ModuleID = 'hugr' -source_filename = "hugr" -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_Index out .DD115165.0" = private constant [29 x i8] c"\1CEXIT:INT:Index out of bounds" -@"e_Array alre.5A300C2A.0" = private constant [57 x i8] c"8EXIT:INT:Array already contains an element at this index" -@e_Option.unw.32D4E82D.0 = private constant [43 x i8] c"*EXIT:INT:Option.unwrap: value is `Nothing`" -@"e_Array elem.E746B1A3.0" = private constant [43 x i8] c"*EXIT:INT:Array element is already borrowed" -@res_head_leake.F4F32972.0 = private constant [21 x i8] c"\14USER:INT:head_leaked" -@res_head.AFE8E005.0 = private constant [15 x i8] c"\0EUSER:BOOL:head" -@"e_Array cont.EFA5AC45.0" = private constant [70 x i8] c"EEXIT:INT:Array contains non-borrowed elements and cannot be discarded" -@"e_Some array.A77EF32E.0" = private constant [48 x i8] c"/EXIT:INT:Some array elements have been borrowed" -@res_tail.AD5A440E.0 = private constant [18 x i8] c"\11USER:BOOLARR:tail" -@"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." - -define void @__hugr__.__main__.main.1() local_unnamed_addr { -alloca_block: - %0 = tail call ptr @heap_alloc(i64 20) - %1 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %1, align 1 - %2 = tail call ptr @heap_alloc(i64 160) - %3 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %3, align 1 - %4 = tail call ptr @heap_alloc(i64 160) - %5 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %5, align 1 - %qalloc.i = tail call i64 @___qalloc() - %not_max.not.not.i = icmp eq i64 %qalloc.i, -1 - br i1 %not_max.not.not.i, label %cond_474_case_0.i, label %__hugr__.__tk2_helios_qalloc.470.exit - -cond_474_case_0.i: ; preds = %alloca_block - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_helios_qalloc.470.exit: ; preds = %alloca_block - tail call void @___reset(i64 %qalloc.i) - tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - br label %loop_body - -loop_body: ; preds = %cond_exit_13, %__hugr__.__tk2_helios_qalloc.470.exit - %"9_2.0" = phi i64 [ 0, %__hugr__.__tk2_helios_qalloc.470.exit ], [ %"2107.0", %cond_exit_13 ] - %"9_0.sroa.0.0" = phi i64 [ 0, %__hugr__.__tk2_helios_qalloc.470.exit ], [ %7, %cond_exit_13 ] - %6 = icmp samesign ugt i64 %"9_0.sroa.0.0", 19 - %7 = add nuw nsw i64 %"9_0.sroa.0.0", 1 - br i1 %6, label %cond_exit_13, label %cond_13_case_1 - -cond_13_case_1: ; preds = %loop_body - %8 = add i64 %"9_2.0", 1 - %qalloc.i1214 = tail call i64 @___qalloc() - %not_max.not.not.i1215 = icmp eq i64 %qalloc.i1214, -1 - br i1 %not_max.not.not.i1215, label %cond_474_case_0.i1216, label %__hugr__.__tk2_helios_qalloc.470.exit1217 - -cond_474_case_0.i1216: ; preds = %cond_13_case_1 - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_helios_qalloc.470.exit1217: ; preds = %cond_13_case_1 - tail call void @___reset(i64 %qalloc.i1214) - %9 = icmp ult i64 %"9_2.0", 20 - br i1 %9, label %__barray_check_bounds.exit, label %out_of_bounds.i - -out_of_bounds.i: ; preds = %__hugr__.__tk2_helios_qalloc.470.exit1217 - tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") - unreachable - -__barray_check_bounds.exit: ; preds = %__hugr__.__tk2_helios_qalloc.470.exit1217 - %10 = load i64, ptr %5, align 4 - %11 = lshr i64 %10, %"9_2.0" - %12 = trunc i64 %11 to i1 - br i1 %12, label %__barray_mask_return.exit, label %panic.i - -panic.i: ; preds = %__barray_check_bounds.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit: ; preds = %__barray_check_bounds.exit - %13 = shl nuw nsw i64 1, %"9_2.0" - %14 = xor i64 %10, %13 - store i64 %14, ptr %5, align 4 - %15 = getelementptr inbounds nuw i64, ptr %4, i64 %"9_2.0" - store i64 %qalloc.i1214, ptr %15, align 4 - br label %cond_exit_13 - -cond_exit_13: ; preds = %loop_body, %__barray_mask_return.exit - %"2107.0" = phi i64 [ %8, %__barray_mask_return.exit ], [ %"9_2.0", %loop_body ] - %exitcond = icmp eq i64 %7, 21 - br i1 %exitcond, label %__barray_check_bounds.exit1219, label %loop_body - -__barray_check_bounds.exit1219: ; preds = %cond_exit_13, %__barray_mask_return.exit1224 - %16 = phi i64 [ %28, %__barray_mask_return.exit1224 ], [ 1, %cond_exit_13 ] - %"114_0.01276" = phi i64 [ %16, %__barray_mask_return.exit1224 ], [ 0, %cond_exit_13 ] - %17 = load i64, ptr %5, align 4 - %18 = lshr i64 %17, %"114_0.01276" - %19 = trunc i64 %18 to i1 - br i1 %19, label %panic.i1220, label %__barray_check_bounds.exit1222 - -panic.i1220: ; preds = %__barray_check_bounds.exit1219 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1222: ; preds = %__barray_check_bounds.exit1219 - %20 = shl nuw nsw i64 1, %"114_0.01276" - %21 = xor i64 %17, %20 - store i64 %21, ptr %5, align 4 - %22 = getelementptr inbounds nuw i64, ptr %4, i64 %"114_0.01276" - %23 = load i64, ptr %22, align 4 - tail call void @___rxy(i64 %23, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rzz(i64 %qalloc.i, i64 %23, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18) - tail call void @___rxy(i64 %23, double 0x3FF921FB54442D18, double 0x400921FB54442D18) - tail call void @___rz(i64 %23, double 0xBFF921FB54442D18) - %24 = load i64, ptr %5, align 4 - %25 = lshr i64 %24, %"114_0.01276" - %26 = trunc i64 %25 to i1 - br i1 %26, label %__barray_mask_return.exit1224, label %panic.i1223 - -panic.i1223: ; preds = %__barray_check_bounds.exit1222 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1224: ; preds = %__barray_check_bounds.exit1222 - %27 = xor i64 %24, %20 - store i64 %27, ptr %5, align 4 - store i64 %23, ptr %22, align 4 - %28 = add nuw nsw i64 %16, 1 - %exitcond1279 = icmp eq i64 %28, 21 - br i1 %exitcond1279, label %cond_exit_185, label %__barray_check_bounds.exit1219 - -cond_exit_185: ; preds = %__barray_mask_return.exit1224 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) - tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure_leaked) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - %29 = icmp eq i64 %read_uint, 2 - br i1 %29, label %30, label %cond_exit_256 - -cond_exit_256: ; preds = %cond_exit_185 - %read_uint350 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - %.not = icmp eq i64 %read_uint350, 2 - br i1 %.not, label %cond_236_case_0, label %cond_236_case_1 - -30: ; preds = %cond_exit_185 - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - tail call void @print_int(ptr nonnull @res_head_leake.F4F32972.0, i64 20, i64 1) - br label %__barray_check_bounds.exit1230.preheader - -__barray_check_bounds.exit1230.preheader: ; preds = %cond_236_case_1, %30 - br label %__barray_check_bounds.exit1230 - -cond_236_case_1: ; preds = %cond_exit_256 - %31 = icmp eq i64 %read_uint350, 1 - tail call void @print_bool(ptr nonnull @res_head.AFE8E005.0, i64 14, i1 %31) - br label %__barray_check_bounds.exit1230.preheader - -cond_236_case_0: ; preds = %cond_exit_256 - tail call void @panic(i32 1001, ptr nonnull @e_Option.unw.32D4E82D.0) - unreachable - -out_of_bounds.i1225: ; preds = %.thread - tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") - unreachable - -__barray_check_bounds.exit1226: ; preds = %.thread - %32 = load i64, ptr %3, align 4 - %33 = lshr i64 %32, %"298_2.01283" - %34 = trunc i64 %33 to i1 - br i1 %34, label %cond_exit_302, label %panic.i1227 - -panic.i1227: ; preds = %__barray_check_bounds.exit1226 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -mask_block_ok.i: ; preds = %cond_exit_302 - %35 = load i64, ptr %5, align 4 - %36 = or i64 %35, -1048576 - store i64 %36, ptr %5, align 4 - %37 = icmp eq i64 %36, -1 - br i1 %37, label %loop_body510.preheader.preheader, label %mask_block_err.i - -mask_block_err.i: ; preds = %mask_block_ok.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_check_bounds.exit1230: ; preds = %__barray_check_bounds.exit1230.preheader, %cond_exit_302 - %"298_0.sroa.15.01284" = phi i64 [ %38, %cond_exit_302 ], [ 0, %__barray_check_bounds.exit1230.preheader ] - %"298_2.01283" = phi i64 [ %46, %cond_exit_302 ], [ 0, %__barray_check_bounds.exit1230.preheader ] - %38 = add nuw nsw i64 %"298_0.sroa.15.01284", 1 - %39 = load i64, ptr %5, align 4 - %40 = lshr i64 %39, %"298_0.sroa.15.01284" - %41 = trunc i64 %40 to i1 - br i1 %41, label %panic.i1231, label %.thread - -panic.i1231: ; preds = %__barray_check_bounds.exit1230 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -.thread: ; preds = %__barray_check_bounds.exit1230 - %42 = shl nuw nsw i64 1, %"298_0.sroa.15.01284" - %43 = xor i64 %39, %42 - store i64 %43, ptr %5, align 4 - %44 = getelementptr inbounds nuw i64, ptr %4, i64 %"298_0.sroa.15.01284" - %45 = load i64, ptr %44, align 4 - %46 = add i64 %"298_2.01283", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %45) - tail call void @___qfree(i64 %45) - %47 = icmp ult i64 %"298_2.01283", 20 - br i1 %47, label %__barray_check_bounds.exit1226, label %out_of_bounds.i1225 - -cond_exit_302: ; preds = %__barray_check_bounds.exit1226 - %48 = shl nuw nsw i64 1, %"298_2.01283" - %49 = xor i64 %32, %48 - store i64 %49, ptr %3, align 4 - %50 = getelementptr inbounds nuw i64, ptr %2, i64 %"298_2.01283" - store i64 %lazy_measure, ptr %50, align 4 - %51 = icmp samesign ugt i64 %"298_0.sroa.15.01284", 18 - br i1 %51, label %mask_block_ok.i, label %__barray_check_bounds.exit1230 - -loop_body510.preheader.preheader: ; preds = %mask_block_ok.i - tail call void @heap_free(ptr nonnull %4) - tail call void @heap_free(ptr nonnull %5) - br label %__barray_check_bounds.exit1234 - -__barray_check_bounds.exit1234: ; preds = %cond_exit_368, %loop_body510.preheader.preheader - %"364_0.sroa.15.01278" = phi i64 [ %52, %cond_exit_368 ], [ 0, %loop_body510.preheader.preheader ] - %52 = add nuw nsw i64 %"364_0.sroa.15.01278", 1 - %53 = load i64, ptr %3, align 4 - %54 = lshr i64 %53, %"364_0.sroa.15.01278" - %55 = trunc i64 %54 to i1 - br i1 %55, label %panic.i1235, label %__barray_check_bounds.exit1238 - -panic.i1235: ; preds = %__barray_check_bounds.exit1234 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1238: ; preds = %__barray_check_bounds.exit1234 - %56 = shl nuw nsw i64 1, %"364_0.sroa.15.01278" - %57 = xor i64 %53, %56 - store i64 %57, ptr %3, align 4 - %58 = getelementptr inbounds nuw i64, ptr %2, i64 %"364_0.sroa.15.01278" - %59 = load i64, ptr %58, align 4 - tail call void @___inc_future_refcount(i64 %59) - %60 = load i64, ptr %3, align 4 - %61 = lshr i64 %60, %"364_0.sroa.15.01278" - %62 = trunc i64 %61 to i1 - br i1 %62, label %__barray_check_bounds.exit1242, label %panic.i1239 - -panic.i1239: ; preds = %__barray_check_bounds.exit1238 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_check_bounds.exit1242: ; preds = %__barray_check_bounds.exit1238 - %63 = xor i64 %60, %56 - store i64 %63, ptr %3, align 4 - store i64 %59, ptr %58, align 4 - %read_bool = tail call i1 @___read_future_bool(i64 %59) - tail call void @___dec_future_refcount(i64 %59) - %64 = load i64, ptr %1, align 4 - %65 = lshr i64 %64, %"364_0.sroa.15.01278" - %66 = trunc i64 %65 to i1 - br i1 %66, label %cond_exit_368, label %panic.i1243 - -panic.i1243: ; preds = %__barray_check_bounds.exit1242 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -cond_550_case_0: ; preds = %cond_exit_550 - %67 = load i64, ptr %3, align 4 - %68 = or i64 %67, -1048576 - store i64 %68, ptr %3, align 4 - %69 = icmp eq i64 %68, -1 - br i1 %69, label %loop_out509, label %mask_block_err.i1248 - -mask_block_err.i1248: ; preds = %cond_550_case_0 - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_check_bounds.exit1252: ; preds = %cond_exit_368, %cond_exit_550 - %"547_0.01285" = phi i64 [ %70, %cond_exit_550 ], [ 0, %cond_exit_368 ] - %70 = add nuw nsw i64 %"547_0.01285", 1 - %71 = load i64, ptr %3, align 4 - %72 = lshr i64 %71, %"547_0.01285" - %73 = trunc i64 %72 to i1 - br i1 %73, label %cond_exit_550, label %__barray_mask_borrow.exit1256 - -__barray_mask_borrow.exit1256: ; preds = %__barray_check_bounds.exit1252 - %74 = shl nuw nsw i64 1, %"547_0.01285" - %75 = xor i64 %71, %74 - store i64 %75, ptr %3, align 4 - %76 = getelementptr inbounds nuw i64, ptr %2, i64 %"547_0.01285" - %77 = load i64, ptr %76, align 4 - tail call void @___dec_future_refcount(i64 %77) - br label %cond_exit_550 - -cond_exit_550: ; preds = %__barray_mask_borrow.exit1256, %__barray_check_bounds.exit1252 - %78 = icmp samesign ugt i64 %"547_0.01285", 18 - br i1 %78, label %cond_550_case_0, label %__barray_check_bounds.exit1252 - -cond_exit_368: ; preds = %__barray_check_bounds.exit1242 - %79 = xor i64 %64, %56 - store i64 %79, ptr %1, align 4 - %80 = getelementptr inbounds nuw i1, ptr %0, i64 %"364_0.sroa.15.01278" - store i1 %read_bool, ptr %80, align 1 - %81 = icmp eq i64 %"364_0.sroa.15.01278", 19 - br i1 %81, label %__barray_check_bounds.exit1252, label %__barray_check_bounds.exit1234 - -loop_out509: ; preds = %cond_550_case_0 - tail call void @heap_free(ptr %2) - tail call void @heap_free(ptr nonnull %3) - %82 = load i64, ptr %1, align 4 - %83 = and i64 %82, 1048575 - store i64 %83, ptr %1, align 4 - %84 = icmp eq i64 %83, 0 - br i1 %84, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1257 - -mask_block_err.i1257: ; preds = %loop_out509 - tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") - unreachable - -__barray_check_none_borrowed.exit: ; preds = %loop_out509 - %85 = tail call ptr @heap_alloc(i64 20) - %86 = tail call ptr @heap_alloc(i64 8) - store i64 0, ptr %86, align 1 - tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(20) %85, ptr noundef nonnull align 1 dereferenceable(20) %0, i64 20, i1 false) - tail call void @heap_free(ptr nonnull %85) - %87 = load i64, ptr %1, align 4 - %88 = and i64 %87, 1048575 - store i64 %88, ptr %1, align 4 - %89 = icmp eq i64 %88, 0 - br i1 %89, label %__barray_check_none_borrowed.exit1261, label %mask_block_err.i1259 - -mask_block_err.i1259: ; preds = %__barray_check_none_borrowed.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") - unreachable - -__barray_check_none_borrowed.exit1261: ; preds = %__barray_check_none_borrowed.exit - %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 - %y_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 4 - %arr_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 8 - %mask_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 16 - %90 = alloca [20 x i1], align 1 - call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(20) %90, i8 0, i64 20, i1 false) - store i32 20, ptr %out_arr_alloca, align 8 - store i32 1, ptr %y_ptr, align 4 - store ptr %0, ptr %arr_ptr, align 8 - store ptr %90, ptr %mask_ptr, align 8 - call void @print_bool_arr(ptr nonnull @res_tail.AD5A440E.0, i64 17, ptr nonnull %out_arr_alloca) - ret void -} - -declare ptr @heap_alloc(i64) local_unnamed_addr - -; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) -declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immarg) #0 - -; Function Attrs: noreturn -declare void @panic(i32, ptr) local_unnamed_addr #1 - -declare i64 @___lazy_measure_leaked(i64) local_unnamed_addr - -declare void @___qfree(i64) local_unnamed_addr - -declare void @___inc_future_refcount(i64) local_unnamed_addr - -declare i64 @___read_future_uint(i64) local_unnamed_addr - -declare void @___dec_future_refcount(i64) local_unnamed_addr - -declare void @print_int(ptr, i64, i64) local_unnamed_addr - -declare void @print_bool(ptr, i64, i1) local_unnamed_addr - -declare void @heap_free(ptr) local_unnamed_addr - -declare i64 @___lazy_measure(i64) local_unnamed_addr - -declare i1 @___read_future_bool(i64) local_unnamed_addr - -; Function Attrs: mustprogress 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) #2 - -declare void @print_bool_arr(ptr, i64, ptr) local_unnamed_addr - -declare i64 @___qalloc() local_unnamed_addr - -declare void @___reset(i64) local_unnamed_addr - -declare void @___rxy(i64, double, double) local_unnamed_addr - -declare void @___rz(i64, double) local_unnamed_addr - -declare void @___rzz(i64, i64, double) local_unnamed_addr - -define i64 @qmain(i64 %0) local_unnamed_addr { -entry: - tail call void @setup(i64 %0) - tail call void @__hugr__.__main__.main.1() - %1 = tail call i64 @teardown() - ret i64 %1 -} - -declare void @setup(i64) local_unnamed_addr - -declare i64 @teardown() local_unnamed_addr - -attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } -attributes #1 = { noreturn } -attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) } - -!name = !{!0} - -!0 = !{!"mainlib"} diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_from_head-helios-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_from_head-helios-x86_64-unknown-linux-gnu.ll deleted file mode 100644 index 1ef881c5..00000000 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_from_head-helios-x86_64-unknown-linux-gnu.ll +++ /dev/null @@ -1,415 +0,0 @@ -; ModuleID = 'hugr' -source_filename = "hugr" -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_Index out .DD115165.0" = private constant [29 x i8] c"\1CEXIT:INT:Index out of bounds" -@"e_Array alre.5A300C2A.0" = private constant [57 x i8] c"8EXIT:INT:Array already contains an element at this index" -@e_Option.unw.32D4E82D.0 = private constant [43 x i8] c"*EXIT:INT:Option.unwrap: value is `Nothing`" -@"e_Array elem.E746B1A3.0" = private constant [43 x i8] c"*EXIT:INT:Array element is already borrowed" -@res_head_leake.F4F32972.0 = private constant [21 x i8] c"\14USER:INT:head_leaked" -@res_head.AFE8E005.0 = private constant [15 x i8] c"\0EUSER:BOOL:head" -@"e_Array cont.EFA5AC45.0" = private constant [70 x i8] c"EEXIT:INT:Array contains non-borrowed elements and cannot be discarded" -@"e_Some array.A77EF32E.0" = private constant [48 x i8] c"/EXIT:INT:Some array elements have been borrowed" -@res_tail.AD5A440E.0 = private constant [18 x i8] c"\11USER:BOOLARR:tail" -@"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." - -define void @__hugr__.__main__.main.1() local_unnamed_addr { -alloca_block: - %0 = tail call ptr @heap_alloc(i64 20) - %1 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %1, align 1 - %2 = tail call ptr @heap_alloc(i64 160) - %3 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %3, align 1 - %4 = tail call ptr @heap_alloc(i64 160) - %5 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %5, align 1 - %qalloc.i = tail call i64 @___qalloc() - %not_max.not.not.i = icmp eq i64 %qalloc.i, -1 - br i1 %not_max.not.not.i, label %cond_474_case_0.i, label %__hugr__.__tk2_helios_qalloc.470.exit - -cond_474_case_0.i: ; preds = %alloca_block - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_helios_qalloc.470.exit: ; preds = %alloca_block - tail call void @___reset(i64 %qalloc.i) - tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - br label %loop_body - -loop_body: ; preds = %cond_exit_13, %__hugr__.__tk2_helios_qalloc.470.exit - %"9_2.0" = phi i64 [ 0, %__hugr__.__tk2_helios_qalloc.470.exit ], [ %"2107.0", %cond_exit_13 ] - %"9_0.sroa.0.0" = phi i64 [ 0, %__hugr__.__tk2_helios_qalloc.470.exit ], [ %7, %cond_exit_13 ] - %6 = icmp samesign ugt i64 %"9_0.sroa.0.0", 19 - %7 = add nuw nsw i64 %"9_0.sroa.0.0", 1 - br i1 %6, label %cond_exit_13, label %cond_13_case_1 - -cond_13_case_1: ; preds = %loop_body - %8 = add i64 %"9_2.0", 1 - %qalloc.i1214 = tail call i64 @___qalloc() - %not_max.not.not.i1215 = icmp eq i64 %qalloc.i1214, -1 - br i1 %not_max.not.not.i1215, label %cond_474_case_0.i1216, label %__hugr__.__tk2_helios_qalloc.470.exit1217 - -cond_474_case_0.i1216: ; preds = %cond_13_case_1 - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_helios_qalloc.470.exit1217: ; preds = %cond_13_case_1 - tail call void @___reset(i64 %qalloc.i1214) - %9 = icmp ult i64 %"9_2.0", 20 - br i1 %9, label %__barray_check_bounds.exit, label %out_of_bounds.i - -out_of_bounds.i: ; preds = %__hugr__.__tk2_helios_qalloc.470.exit1217 - tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") - unreachable - -__barray_check_bounds.exit: ; preds = %__hugr__.__tk2_helios_qalloc.470.exit1217 - %10 = load i64, ptr %5, align 4 - %11 = lshr i64 %10, %"9_2.0" - %12 = trunc i64 %11 to i1 - br i1 %12, label %__barray_mask_return.exit, label %panic.i - -panic.i: ; preds = %__barray_check_bounds.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit: ; preds = %__barray_check_bounds.exit - %13 = shl nuw nsw i64 1, %"9_2.0" - %14 = xor i64 %10, %13 - store i64 %14, ptr %5, align 4 - %15 = getelementptr inbounds nuw i64, ptr %4, i64 %"9_2.0" - store i64 %qalloc.i1214, ptr %15, align 4 - br label %cond_exit_13 - -cond_exit_13: ; preds = %loop_body, %__barray_mask_return.exit - %"2107.0" = phi i64 [ %8, %__barray_mask_return.exit ], [ %"9_2.0", %loop_body ] - %exitcond = icmp eq i64 %7, 21 - br i1 %exitcond, label %__barray_check_bounds.exit1219, label %loop_body - -__barray_check_bounds.exit1219: ; preds = %cond_exit_13, %__barray_mask_return.exit1224 - %16 = phi i64 [ %28, %__barray_mask_return.exit1224 ], [ 1, %cond_exit_13 ] - %"114_0.01276" = phi i64 [ %16, %__barray_mask_return.exit1224 ], [ 0, %cond_exit_13 ] - %17 = load i64, ptr %5, align 4 - %18 = lshr i64 %17, %"114_0.01276" - %19 = trunc i64 %18 to i1 - br i1 %19, label %panic.i1220, label %__barray_check_bounds.exit1222 - -panic.i1220: ; preds = %__barray_check_bounds.exit1219 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1222: ; preds = %__barray_check_bounds.exit1219 - %20 = shl nuw nsw i64 1, %"114_0.01276" - %21 = xor i64 %17, %20 - store i64 %21, ptr %5, align 4 - %22 = getelementptr inbounds nuw i64, ptr %4, i64 %"114_0.01276" - %23 = load i64, ptr %22, align 4 - tail call void @___rxy(i64 %23, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rzz(i64 %qalloc.i, i64 %23, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18) - tail call void @___rxy(i64 %23, double 0x3FF921FB54442D18, double 0x400921FB54442D18) - tail call void @___rz(i64 %23, double 0xBFF921FB54442D18) - %24 = load i64, ptr %5, align 4 - %25 = lshr i64 %24, %"114_0.01276" - %26 = trunc i64 %25 to i1 - br i1 %26, label %__barray_mask_return.exit1224, label %panic.i1223 - -panic.i1223: ; preds = %__barray_check_bounds.exit1222 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1224: ; preds = %__barray_check_bounds.exit1222 - %27 = xor i64 %24, %20 - store i64 %27, ptr %5, align 4 - store i64 %23, ptr %22, align 4 - %28 = add nuw nsw i64 %16, 1 - %exitcond1279 = icmp eq i64 %28, 21 - br i1 %exitcond1279, label %cond_exit_185, label %__barray_check_bounds.exit1219 - -cond_exit_185: ; preds = %__barray_mask_return.exit1224 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) - tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure_leaked) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - %29 = icmp eq i64 %read_uint, 2 - br i1 %29, label %30, label %cond_exit_256 - -cond_exit_256: ; preds = %cond_exit_185 - %read_uint350 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - %.not = icmp eq i64 %read_uint350, 2 - br i1 %.not, label %cond_236_case_0, label %cond_236_case_1 - -30: ; preds = %cond_exit_185 - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - tail call void @print_int(ptr nonnull @res_head_leake.F4F32972.0, i64 20, i64 1) - br label %__barray_check_bounds.exit1230.preheader - -__barray_check_bounds.exit1230.preheader: ; preds = %cond_236_case_1, %30 - br label %__barray_check_bounds.exit1230 - -cond_236_case_1: ; preds = %cond_exit_256 - %31 = icmp eq i64 %read_uint350, 1 - tail call void @print_bool(ptr nonnull @res_head.AFE8E005.0, i64 14, i1 %31) - br label %__barray_check_bounds.exit1230.preheader - -cond_236_case_0: ; preds = %cond_exit_256 - tail call void @panic(i32 1001, ptr nonnull @e_Option.unw.32D4E82D.0) - unreachable - -out_of_bounds.i1225: ; preds = %.thread - tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") - unreachable - -__barray_check_bounds.exit1226: ; preds = %.thread - %32 = load i64, ptr %3, align 4 - %33 = lshr i64 %32, %"298_2.01283" - %34 = trunc i64 %33 to i1 - br i1 %34, label %cond_exit_302, label %panic.i1227 - -panic.i1227: ; preds = %__barray_check_bounds.exit1226 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -mask_block_ok.i: ; preds = %cond_exit_302 - %35 = load i64, ptr %5, align 4 - %36 = or i64 %35, -1048576 - store i64 %36, ptr %5, align 4 - %37 = icmp eq i64 %36, -1 - br i1 %37, label %loop_body510.preheader.preheader, label %mask_block_err.i - -mask_block_err.i: ; preds = %mask_block_ok.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_check_bounds.exit1230: ; preds = %__barray_check_bounds.exit1230.preheader, %cond_exit_302 - %"298_0.sroa.15.01284" = phi i64 [ %38, %cond_exit_302 ], [ 0, %__barray_check_bounds.exit1230.preheader ] - %"298_2.01283" = phi i64 [ %46, %cond_exit_302 ], [ 0, %__barray_check_bounds.exit1230.preheader ] - %38 = add nuw nsw i64 %"298_0.sroa.15.01284", 1 - %39 = load i64, ptr %5, align 4 - %40 = lshr i64 %39, %"298_0.sroa.15.01284" - %41 = trunc i64 %40 to i1 - br i1 %41, label %panic.i1231, label %.thread - -panic.i1231: ; preds = %__barray_check_bounds.exit1230 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -.thread: ; preds = %__barray_check_bounds.exit1230 - %42 = shl nuw nsw i64 1, %"298_0.sroa.15.01284" - %43 = xor i64 %39, %42 - store i64 %43, ptr %5, align 4 - %44 = getelementptr inbounds nuw i64, ptr %4, i64 %"298_0.sroa.15.01284" - %45 = load i64, ptr %44, align 4 - %46 = add i64 %"298_2.01283", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %45) - tail call void @___qfree(i64 %45) - %47 = icmp ult i64 %"298_2.01283", 20 - br i1 %47, label %__barray_check_bounds.exit1226, label %out_of_bounds.i1225 - -cond_exit_302: ; preds = %__barray_check_bounds.exit1226 - %48 = shl nuw nsw i64 1, %"298_2.01283" - %49 = xor i64 %32, %48 - store i64 %49, ptr %3, align 4 - %50 = getelementptr inbounds nuw i64, ptr %2, i64 %"298_2.01283" - store i64 %lazy_measure, ptr %50, align 4 - %51 = icmp samesign ugt i64 %"298_0.sroa.15.01284", 18 - br i1 %51, label %mask_block_ok.i, label %__barray_check_bounds.exit1230 - -loop_body510.preheader.preheader: ; preds = %mask_block_ok.i - tail call void @heap_free(ptr nonnull %4) - tail call void @heap_free(ptr nonnull %5) - br label %__barray_check_bounds.exit1234 - -__barray_check_bounds.exit1234: ; preds = %cond_exit_368, %loop_body510.preheader.preheader - %"364_0.sroa.15.01278" = phi i64 [ %52, %cond_exit_368 ], [ 0, %loop_body510.preheader.preheader ] - %52 = add nuw nsw i64 %"364_0.sroa.15.01278", 1 - %53 = load i64, ptr %3, align 4 - %54 = lshr i64 %53, %"364_0.sroa.15.01278" - %55 = trunc i64 %54 to i1 - br i1 %55, label %panic.i1235, label %__barray_check_bounds.exit1238 - -panic.i1235: ; preds = %__barray_check_bounds.exit1234 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1238: ; preds = %__barray_check_bounds.exit1234 - %56 = shl nuw nsw i64 1, %"364_0.sroa.15.01278" - %57 = xor i64 %53, %56 - store i64 %57, ptr %3, align 4 - %58 = getelementptr inbounds nuw i64, ptr %2, i64 %"364_0.sroa.15.01278" - %59 = load i64, ptr %58, align 4 - tail call void @___inc_future_refcount(i64 %59) - %60 = load i64, ptr %3, align 4 - %61 = lshr i64 %60, %"364_0.sroa.15.01278" - %62 = trunc i64 %61 to i1 - br i1 %62, label %__barray_check_bounds.exit1242, label %panic.i1239 - -panic.i1239: ; preds = %__barray_check_bounds.exit1238 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_check_bounds.exit1242: ; preds = %__barray_check_bounds.exit1238 - %63 = xor i64 %60, %56 - store i64 %63, ptr %3, align 4 - store i64 %59, ptr %58, align 4 - %read_bool = tail call i1 @___read_future_bool(i64 %59) - tail call void @___dec_future_refcount(i64 %59) - %64 = load i64, ptr %1, align 4 - %65 = lshr i64 %64, %"364_0.sroa.15.01278" - %66 = trunc i64 %65 to i1 - br i1 %66, label %cond_exit_368, label %panic.i1243 - -panic.i1243: ; preds = %__barray_check_bounds.exit1242 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -cond_550_case_0: ; preds = %cond_exit_550 - %67 = load i64, ptr %3, align 4 - %68 = or i64 %67, -1048576 - store i64 %68, ptr %3, align 4 - %69 = icmp eq i64 %68, -1 - br i1 %69, label %loop_out509, label %mask_block_err.i1248 - -mask_block_err.i1248: ; preds = %cond_550_case_0 - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_check_bounds.exit1252: ; preds = %cond_exit_368, %cond_exit_550 - %"547_0.01285" = phi i64 [ %70, %cond_exit_550 ], [ 0, %cond_exit_368 ] - %70 = add nuw nsw i64 %"547_0.01285", 1 - %71 = load i64, ptr %3, align 4 - %72 = lshr i64 %71, %"547_0.01285" - %73 = trunc i64 %72 to i1 - br i1 %73, label %cond_exit_550, label %__barray_mask_borrow.exit1256 - -__barray_mask_borrow.exit1256: ; preds = %__barray_check_bounds.exit1252 - %74 = shl nuw nsw i64 1, %"547_0.01285" - %75 = xor i64 %71, %74 - store i64 %75, ptr %3, align 4 - %76 = getelementptr inbounds nuw i64, ptr %2, i64 %"547_0.01285" - %77 = load i64, ptr %76, align 4 - tail call void @___dec_future_refcount(i64 %77) - br label %cond_exit_550 - -cond_exit_550: ; preds = %__barray_mask_borrow.exit1256, %__barray_check_bounds.exit1252 - %78 = icmp samesign ugt i64 %"547_0.01285", 18 - br i1 %78, label %cond_550_case_0, label %__barray_check_bounds.exit1252 - -cond_exit_368: ; preds = %__barray_check_bounds.exit1242 - %79 = xor i64 %64, %56 - store i64 %79, ptr %1, align 4 - %80 = getelementptr inbounds nuw i1, ptr %0, i64 %"364_0.sroa.15.01278" - store i1 %read_bool, ptr %80, align 1 - %81 = icmp eq i64 %"364_0.sroa.15.01278", 19 - br i1 %81, label %__barray_check_bounds.exit1252, label %__barray_check_bounds.exit1234 - -loop_out509: ; preds = %cond_550_case_0 - tail call void @heap_free(ptr %2) - tail call void @heap_free(ptr nonnull %3) - %82 = load i64, ptr %1, align 4 - %83 = and i64 %82, 1048575 - store i64 %83, ptr %1, align 4 - %84 = icmp eq i64 %83, 0 - br i1 %84, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1257 - -mask_block_err.i1257: ; preds = %loop_out509 - tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") - unreachable - -__barray_check_none_borrowed.exit: ; preds = %loop_out509 - %85 = tail call ptr @heap_alloc(i64 20) - %86 = tail call ptr @heap_alloc(i64 8) - store i64 0, ptr %86, align 1 - tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(20) %85, ptr noundef nonnull align 1 dereferenceable(20) %0, i64 20, i1 false) - tail call void @heap_free(ptr nonnull %85) - %87 = load i64, ptr %1, align 4 - %88 = and i64 %87, 1048575 - store i64 %88, ptr %1, align 4 - %89 = icmp eq i64 %88, 0 - br i1 %89, label %__barray_check_none_borrowed.exit1261, label %mask_block_err.i1259 - -mask_block_err.i1259: ; preds = %__barray_check_none_borrowed.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") - unreachable - -__barray_check_none_borrowed.exit1261: ; preds = %__barray_check_none_borrowed.exit - %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 - %y_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 4 - %arr_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 8 - %mask_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 16 - %90 = alloca [20 x i1], align 1 - call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(20) %90, i8 0, i64 20, i1 false) - store i32 20, ptr %out_arr_alloca, align 8 - store i32 1, ptr %y_ptr, align 4 - store ptr %0, ptr %arr_ptr, align 8 - store ptr %90, ptr %mask_ptr, align 8 - call void @print_bool_arr(ptr nonnull @res_tail.AD5A440E.0, i64 17, ptr nonnull %out_arr_alloca) - ret void -} - -declare ptr @heap_alloc(i64) local_unnamed_addr - -; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) -declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immarg) #0 - -; Function Attrs: noreturn -declare void @panic(i32, ptr) local_unnamed_addr #1 - -declare i64 @___lazy_measure_leaked(i64) local_unnamed_addr - -declare void @___qfree(i64) local_unnamed_addr - -declare void @___inc_future_refcount(i64) local_unnamed_addr - -declare i64 @___read_future_uint(i64) local_unnamed_addr - -declare void @___dec_future_refcount(i64) local_unnamed_addr - -declare void @print_int(ptr, i64, i64) local_unnamed_addr - -declare void @print_bool(ptr, i64, i1) local_unnamed_addr - -declare void @heap_free(ptr) local_unnamed_addr - -declare i64 @___lazy_measure(i64) local_unnamed_addr - -declare i1 @___read_future_bool(i64) local_unnamed_addr - -; Function Attrs: mustprogress 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) #2 - -declare void @print_bool_arr(ptr, i64, ptr) local_unnamed_addr - -declare i64 @___qalloc() local_unnamed_addr - -declare void @___reset(i64) local_unnamed_addr - -declare void @___rxy(i64, double, double) local_unnamed_addr - -declare void @___rz(i64, double) local_unnamed_addr - -declare void @___rzz(i64, i64, double) local_unnamed_addr - -define i64 @qmain(i64 %0) local_unnamed_addr { -entry: - tail call void @setup(i64 %0) - tail call void @__hugr__.__main__.main.1() - %1 = tail call i64 @teardown() - ret i64 %1 -} - -declare void @setup(i64) local_unnamed_addr - -declare i64 @teardown() local_unnamed_addr - -attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } -attributes #1 = { noreturn } -attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) } - -!name = !{!0} - -!0 = !{!"mainlib"} diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_from_head-helios-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_from_head-helios-x86_64-windows-gnu.ll deleted file mode 100644 index adae1b0f..00000000 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_from_head-helios-x86_64-windows-gnu.ll +++ /dev/null @@ -1,415 +0,0 @@ -; ModuleID = 'hugr' -source_filename = "hugr" -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-gnu" - -@"e_Index out .DD115165.0" = private constant [29 x i8] c"\1CEXIT:INT:Index out of bounds" -@"e_Array alre.5A300C2A.0" = private constant [57 x i8] c"8EXIT:INT:Array already contains an element at this index" -@e_Option.unw.32D4E82D.0 = private constant [43 x i8] c"*EXIT:INT:Option.unwrap: value is `Nothing`" -@"e_Array elem.E746B1A3.0" = private constant [43 x i8] c"*EXIT:INT:Array element is already borrowed" -@res_head_leake.F4F32972.0 = private constant [21 x i8] c"\14USER:INT:head_leaked" -@res_head.AFE8E005.0 = private constant [15 x i8] c"\0EUSER:BOOL:head" -@"e_Array cont.EFA5AC45.0" = private constant [70 x i8] c"EEXIT:INT:Array contains non-borrowed elements and cannot be discarded" -@"e_Some array.A77EF32E.0" = private constant [48 x i8] c"/EXIT:INT:Some array elements have been borrowed" -@res_tail.AD5A440E.0 = private constant [18 x i8] c"\11USER:BOOLARR:tail" -@"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." - -define void @__hugr__.__main__.main.1() local_unnamed_addr { -alloca_block: - %0 = tail call ptr @heap_alloc(i64 20) - %1 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %1, align 1 - %2 = tail call ptr @heap_alloc(i64 160) - %3 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %3, align 1 - %4 = tail call ptr @heap_alloc(i64 160) - %5 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %5, align 1 - %qalloc.i = tail call i64 @___qalloc() - %not_max.not.not.i = icmp eq i64 %qalloc.i, -1 - br i1 %not_max.not.not.i, label %cond_474_case_0.i, label %__hugr__.__tk2_helios_qalloc.470.exit - -cond_474_case_0.i: ; preds = %alloca_block - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_helios_qalloc.470.exit: ; preds = %alloca_block - tail call void @___reset(i64 %qalloc.i) - tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - br label %loop_body - -loop_body: ; preds = %cond_exit_13, %__hugr__.__tk2_helios_qalloc.470.exit - %"9_2.0" = phi i64 [ 0, %__hugr__.__tk2_helios_qalloc.470.exit ], [ %"2107.0", %cond_exit_13 ] - %"9_0.sroa.0.0" = phi i64 [ 0, %__hugr__.__tk2_helios_qalloc.470.exit ], [ %7, %cond_exit_13 ] - %6 = icmp samesign ugt i64 %"9_0.sroa.0.0", 19 - %7 = add nuw nsw i64 %"9_0.sroa.0.0", 1 - br i1 %6, label %cond_exit_13, label %cond_13_case_1 - -cond_13_case_1: ; preds = %loop_body - %8 = add i64 %"9_2.0", 1 - %qalloc.i1214 = tail call i64 @___qalloc() - %not_max.not.not.i1215 = icmp eq i64 %qalloc.i1214, -1 - br i1 %not_max.not.not.i1215, label %cond_474_case_0.i1216, label %__hugr__.__tk2_helios_qalloc.470.exit1217 - -cond_474_case_0.i1216: ; preds = %cond_13_case_1 - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_helios_qalloc.470.exit1217: ; preds = %cond_13_case_1 - tail call void @___reset(i64 %qalloc.i1214) - %9 = icmp ult i64 %"9_2.0", 20 - br i1 %9, label %__barray_check_bounds.exit, label %out_of_bounds.i - -out_of_bounds.i: ; preds = %__hugr__.__tk2_helios_qalloc.470.exit1217 - tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") - unreachable - -__barray_check_bounds.exit: ; preds = %__hugr__.__tk2_helios_qalloc.470.exit1217 - %10 = load i64, ptr %5, align 4 - %11 = lshr i64 %10, %"9_2.0" - %12 = trunc i64 %11 to i1 - br i1 %12, label %__barray_mask_return.exit, label %panic.i - -panic.i: ; preds = %__barray_check_bounds.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit: ; preds = %__barray_check_bounds.exit - %13 = shl nuw nsw i64 1, %"9_2.0" - %14 = xor i64 %10, %13 - store i64 %14, ptr %5, align 4 - %15 = getelementptr inbounds nuw i64, ptr %4, i64 %"9_2.0" - store i64 %qalloc.i1214, ptr %15, align 4 - br label %cond_exit_13 - -cond_exit_13: ; preds = %loop_body, %__barray_mask_return.exit - %"2107.0" = phi i64 [ %8, %__barray_mask_return.exit ], [ %"9_2.0", %loop_body ] - %exitcond = icmp eq i64 %7, 21 - br i1 %exitcond, label %__barray_check_bounds.exit1219, label %loop_body - -__barray_check_bounds.exit1219: ; preds = %cond_exit_13, %__barray_mask_return.exit1224 - %16 = phi i64 [ %28, %__barray_mask_return.exit1224 ], [ 1, %cond_exit_13 ] - %"114_0.01276" = phi i64 [ %16, %__barray_mask_return.exit1224 ], [ 0, %cond_exit_13 ] - %17 = load i64, ptr %5, align 4 - %18 = lshr i64 %17, %"114_0.01276" - %19 = trunc i64 %18 to i1 - br i1 %19, label %panic.i1220, label %__barray_check_bounds.exit1222 - -panic.i1220: ; preds = %__barray_check_bounds.exit1219 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1222: ; preds = %__barray_check_bounds.exit1219 - %20 = shl nuw nsw i64 1, %"114_0.01276" - %21 = xor i64 %17, %20 - store i64 %21, ptr %5, align 4 - %22 = getelementptr inbounds nuw i64, ptr %4, i64 %"114_0.01276" - %23 = load i64, ptr %22, align 4 - tail call void @___rxy(i64 %23, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rzz(i64 %qalloc.i, i64 %23, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18) - tail call void @___rxy(i64 %23, double 0x3FF921FB54442D18, double 0x400921FB54442D18) - tail call void @___rz(i64 %23, double 0xBFF921FB54442D18) - %24 = load i64, ptr %5, align 4 - %25 = lshr i64 %24, %"114_0.01276" - %26 = trunc i64 %25 to i1 - br i1 %26, label %__barray_mask_return.exit1224, label %panic.i1223 - -panic.i1223: ; preds = %__barray_check_bounds.exit1222 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1224: ; preds = %__barray_check_bounds.exit1222 - %27 = xor i64 %24, %20 - store i64 %27, ptr %5, align 4 - store i64 %23, ptr %22, align 4 - %28 = add nuw nsw i64 %16, 1 - %exitcond1279 = icmp eq i64 %28, 21 - br i1 %exitcond1279, label %cond_exit_185, label %__barray_check_bounds.exit1219 - -cond_exit_185: ; preds = %__barray_mask_return.exit1224 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) - tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure_leaked) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - %29 = icmp eq i64 %read_uint, 2 - br i1 %29, label %30, label %cond_exit_256 - -cond_exit_256: ; preds = %cond_exit_185 - %read_uint350 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - %.not = icmp eq i64 %read_uint350, 2 - br i1 %.not, label %cond_236_case_0, label %cond_236_case_1 - -30: ; preds = %cond_exit_185 - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - tail call void @print_int(ptr nonnull @res_head_leake.F4F32972.0, i64 20, i64 1) - br label %__barray_check_bounds.exit1230.preheader - -__barray_check_bounds.exit1230.preheader: ; preds = %cond_236_case_1, %30 - br label %__barray_check_bounds.exit1230 - -cond_236_case_1: ; preds = %cond_exit_256 - %31 = icmp eq i64 %read_uint350, 1 - tail call void @print_bool(ptr nonnull @res_head.AFE8E005.0, i64 14, i1 %31) - br label %__barray_check_bounds.exit1230.preheader - -cond_236_case_0: ; preds = %cond_exit_256 - tail call void @panic(i32 1001, ptr nonnull @e_Option.unw.32D4E82D.0) - unreachable - -out_of_bounds.i1225: ; preds = %.thread - tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") - unreachable - -__barray_check_bounds.exit1226: ; preds = %.thread - %32 = load i64, ptr %3, align 4 - %33 = lshr i64 %32, %"298_2.01283" - %34 = trunc i64 %33 to i1 - br i1 %34, label %cond_exit_302, label %panic.i1227 - -panic.i1227: ; preds = %__barray_check_bounds.exit1226 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -mask_block_ok.i: ; preds = %cond_exit_302 - %35 = load i64, ptr %5, align 4 - %36 = or i64 %35, -1048576 - store i64 %36, ptr %5, align 4 - %37 = icmp eq i64 %36, -1 - br i1 %37, label %loop_body510.preheader.preheader, label %mask_block_err.i - -mask_block_err.i: ; preds = %mask_block_ok.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_check_bounds.exit1230: ; preds = %__barray_check_bounds.exit1230.preheader, %cond_exit_302 - %"298_0.sroa.15.01284" = phi i64 [ %38, %cond_exit_302 ], [ 0, %__barray_check_bounds.exit1230.preheader ] - %"298_2.01283" = phi i64 [ %46, %cond_exit_302 ], [ 0, %__barray_check_bounds.exit1230.preheader ] - %38 = add nuw nsw i64 %"298_0.sroa.15.01284", 1 - %39 = load i64, ptr %5, align 4 - %40 = lshr i64 %39, %"298_0.sroa.15.01284" - %41 = trunc i64 %40 to i1 - br i1 %41, label %panic.i1231, label %.thread - -panic.i1231: ; preds = %__barray_check_bounds.exit1230 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -.thread: ; preds = %__barray_check_bounds.exit1230 - %42 = shl nuw nsw i64 1, %"298_0.sroa.15.01284" - %43 = xor i64 %39, %42 - store i64 %43, ptr %5, align 4 - %44 = getelementptr inbounds nuw i64, ptr %4, i64 %"298_0.sroa.15.01284" - %45 = load i64, ptr %44, align 4 - %46 = add i64 %"298_2.01283", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %45) - tail call void @___qfree(i64 %45) - %47 = icmp ult i64 %"298_2.01283", 20 - br i1 %47, label %__barray_check_bounds.exit1226, label %out_of_bounds.i1225 - -cond_exit_302: ; preds = %__barray_check_bounds.exit1226 - %48 = shl nuw nsw i64 1, %"298_2.01283" - %49 = xor i64 %32, %48 - store i64 %49, ptr %3, align 4 - %50 = getelementptr inbounds nuw i64, ptr %2, i64 %"298_2.01283" - store i64 %lazy_measure, ptr %50, align 4 - %51 = icmp samesign ugt i64 %"298_0.sroa.15.01284", 18 - br i1 %51, label %mask_block_ok.i, label %__barray_check_bounds.exit1230 - -loop_body510.preheader.preheader: ; preds = %mask_block_ok.i - tail call void @heap_free(ptr nonnull %4) - tail call void @heap_free(ptr nonnull %5) - br label %__barray_check_bounds.exit1234 - -__barray_check_bounds.exit1234: ; preds = %cond_exit_368, %loop_body510.preheader.preheader - %"364_0.sroa.15.01278" = phi i64 [ %52, %cond_exit_368 ], [ 0, %loop_body510.preheader.preheader ] - %52 = add nuw nsw i64 %"364_0.sroa.15.01278", 1 - %53 = load i64, ptr %3, align 4 - %54 = lshr i64 %53, %"364_0.sroa.15.01278" - %55 = trunc i64 %54 to i1 - br i1 %55, label %panic.i1235, label %__barray_check_bounds.exit1238 - -panic.i1235: ; preds = %__barray_check_bounds.exit1234 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1238: ; preds = %__barray_check_bounds.exit1234 - %56 = shl nuw nsw i64 1, %"364_0.sroa.15.01278" - %57 = xor i64 %53, %56 - store i64 %57, ptr %3, align 4 - %58 = getelementptr inbounds nuw i64, ptr %2, i64 %"364_0.sroa.15.01278" - %59 = load i64, ptr %58, align 4 - tail call void @___inc_future_refcount(i64 %59) - %60 = load i64, ptr %3, align 4 - %61 = lshr i64 %60, %"364_0.sroa.15.01278" - %62 = trunc i64 %61 to i1 - br i1 %62, label %__barray_check_bounds.exit1242, label %panic.i1239 - -panic.i1239: ; preds = %__barray_check_bounds.exit1238 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_check_bounds.exit1242: ; preds = %__barray_check_bounds.exit1238 - %63 = xor i64 %60, %56 - store i64 %63, ptr %3, align 4 - store i64 %59, ptr %58, align 4 - %read_bool = tail call i1 @___read_future_bool(i64 %59) - tail call void @___dec_future_refcount(i64 %59) - %64 = load i64, ptr %1, align 4 - %65 = lshr i64 %64, %"364_0.sroa.15.01278" - %66 = trunc i64 %65 to i1 - br i1 %66, label %cond_exit_368, label %panic.i1243 - -panic.i1243: ; preds = %__barray_check_bounds.exit1242 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -cond_550_case_0: ; preds = %cond_exit_550 - %67 = load i64, ptr %3, align 4 - %68 = or i64 %67, -1048576 - store i64 %68, ptr %3, align 4 - %69 = icmp eq i64 %68, -1 - br i1 %69, label %loop_out509, label %mask_block_err.i1248 - -mask_block_err.i1248: ; preds = %cond_550_case_0 - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_check_bounds.exit1252: ; preds = %cond_exit_368, %cond_exit_550 - %"547_0.01285" = phi i64 [ %70, %cond_exit_550 ], [ 0, %cond_exit_368 ] - %70 = add nuw nsw i64 %"547_0.01285", 1 - %71 = load i64, ptr %3, align 4 - %72 = lshr i64 %71, %"547_0.01285" - %73 = trunc i64 %72 to i1 - br i1 %73, label %cond_exit_550, label %__barray_mask_borrow.exit1256 - -__barray_mask_borrow.exit1256: ; preds = %__barray_check_bounds.exit1252 - %74 = shl nuw nsw i64 1, %"547_0.01285" - %75 = xor i64 %71, %74 - store i64 %75, ptr %3, align 4 - %76 = getelementptr inbounds nuw i64, ptr %2, i64 %"547_0.01285" - %77 = load i64, ptr %76, align 4 - tail call void @___dec_future_refcount(i64 %77) - br label %cond_exit_550 - -cond_exit_550: ; preds = %__barray_mask_borrow.exit1256, %__barray_check_bounds.exit1252 - %78 = icmp samesign ugt i64 %"547_0.01285", 18 - br i1 %78, label %cond_550_case_0, label %__barray_check_bounds.exit1252 - -cond_exit_368: ; preds = %__barray_check_bounds.exit1242 - %79 = xor i64 %64, %56 - store i64 %79, ptr %1, align 4 - %80 = getelementptr inbounds nuw i1, ptr %0, i64 %"364_0.sroa.15.01278" - store i1 %read_bool, ptr %80, align 1 - %81 = icmp eq i64 %"364_0.sroa.15.01278", 19 - br i1 %81, label %__barray_check_bounds.exit1252, label %__barray_check_bounds.exit1234 - -loop_out509: ; preds = %cond_550_case_0 - tail call void @heap_free(ptr %2) - tail call void @heap_free(ptr nonnull %3) - %82 = load i64, ptr %1, align 4 - %83 = and i64 %82, 1048575 - store i64 %83, ptr %1, align 4 - %84 = icmp eq i64 %83, 0 - br i1 %84, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1257 - -mask_block_err.i1257: ; preds = %loop_out509 - tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") - unreachable - -__barray_check_none_borrowed.exit: ; preds = %loop_out509 - %85 = tail call ptr @heap_alloc(i64 20) - %86 = tail call ptr @heap_alloc(i64 8) - store i64 0, ptr %86, align 1 - tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(20) %85, ptr noundef nonnull align 1 dereferenceable(20) %0, i64 20, i1 false) - tail call void @heap_free(ptr nonnull %85) - %87 = load i64, ptr %1, align 4 - %88 = and i64 %87, 1048575 - store i64 %88, ptr %1, align 4 - %89 = icmp eq i64 %88, 0 - br i1 %89, label %__barray_check_none_borrowed.exit1261, label %mask_block_err.i1259 - -mask_block_err.i1259: ; preds = %__barray_check_none_borrowed.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") - unreachable - -__barray_check_none_borrowed.exit1261: ; preds = %__barray_check_none_borrowed.exit - %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 - %y_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 4 - %arr_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 8 - %mask_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 16 - %90 = alloca [20 x i1], align 1 - call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(20) %90, i8 0, i64 20, i1 false) - store i32 20, ptr %out_arr_alloca, align 8 - store i32 1, ptr %y_ptr, align 4 - store ptr %0, ptr %arr_ptr, align 8 - store ptr %90, ptr %mask_ptr, align 8 - call void @print_bool_arr(ptr nonnull @res_tail.AD5A440E.0, i64 17, ptr nonnull %out_arr_alloca) - ret void -} - -declare ptr @heap_alloc(i64) local_unnamed_addr - -; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) -declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immarg) #0 - -; Function Attrs: noreturn -declare void @panic(i32, ptr) local_unnamed_addr #1 - -declare i64 @___lazy_measure_leaked(i64) local_unnamed_addr - -declare void @___qfree(i64) local_unnamed_addr - -declare void @___inc_future_refcount(i64) local_unnamed_addr - -declare i64 @___read_future_uint(i64) local_unnamed_addr - -declare void @___dec_future_refcount(i64) local_unnamed_addr - -declare void @print_int(ptr, i64, i64) local_unnamed_addr - -declare void @print_bool(ptr, i64, i1) local_unnamed_addr - -declare void @heap_free(ptr) local_unnamed_addr - -declare i64 @___lazy_measure(i64) local_unnamed_addr - -declare i1 @___read_future_bool(i64) local_unnamed_addr - -; Function Attrs: mustprogress 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) #2 - -declare void @print_bool_arr(ptr, i64, ptr) local_unnamed_addr - -declare i64 @___qalloc() local_unnamed_addr - -declare void @___reset(i64) local_unnamed_addr - -declare void @___rxy(i64, double, double) local_unnamed_addr - -declare void @___rz(i64, double) local_unnamed_addr - -declare void @___rzz(i64, i64, double) local_unnamed_addr - -define i64 @qmain(i64 %0) local_unnamed_addr { -entry: - tail call void @setup(i64 %0) - tail call void @__hugr__.__main__.main.1() - %1 = tail call i64 @teardown() - ret i64 %1 -} - -declare void @setup(i64) local_unnamed_addr - -declare i64 @teardown() local_unnamed_addr - -attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } -attributes #1 = { noreturn } -attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) } - -!name = !{!0} - -!0 = !{!"mainlib"} diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_from_head-sol-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_from_head-sol-aarch64-apple-darwin.ll deleted file mode 100644 index f9316b44..00000000 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_from_head-sol-aarch64-apple-darwin.ll +++ /dev/null @@ -1,415 +0,0 @@ -; ModuleID = 'hugr' -source_filename = "hugr" -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_Index out .DD115165.0" = private constant [29 x i8] c"\1CEXIT:INT:Index out of bounds" -@"e_Array alre.5A300C2A.0" = private constant [57 x i8] c"8EXIT:INT:Array already contains an element at this index" -@e_Option.unw.32D4E82D.0 = private constant [43 x i8] c"*EXIT:INT:Option.unwrap: value is `Nothing`" -@"e_Array elem.E746B1A3.0" = private constant [43 x i8] c"*EXIT:INT:Array element is already borrowed" -@res_head_leake.F4F32972.0 = private constant [21 x i8] c"\14USER:INT:head_leaked" -@res_head.AFE8E005.0 = private constant [15 x i8] c"\0EUSER:BOOL:head" -@"e_Array cont.EFA5AC45.0" = private constant [70 x i8] c"EEXIT:INT:Array contains non-borrowed elements and cannot be discarded" -@"e_Some array.A77EF32E.0" = private constant [48 x i8] c"/EXIT:INT:Some array elements have been borrowed" -@res_tail.AD5A440E.0 = private constant [18 x i8] c"\11USER:BOOLARR:tail" -@"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." - -define void @__hugr__.__main__.main.1() local_unnamed_addr { -alloca_block: - %0 = tail call ptr @heap_alloc(i64 20) - %1 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %1, align 1 - %2 = tail call ptr @heap_alloc(i64 160) - %3 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %3, align 1 - %4 = tail call ptr @heap_alloc(i64 160) - %5 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %5, align 1 - %qalloc.i = tail call i64 @___qalloc() - %not_max.not.not.i = icmp eq i64 %qalloc.i, -1 - br i1 %not_max.not.not.i, label %cond_474_case_0.i, label %__hugr__.__tk2_sol_qalloc.470.exit - -cond_474_case_0.i: ; preds = %alloca_block - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_sol_qalloc.470.exit: ; preds = %alloca_block - tail call void @___reset(i64 %qalloc.i) - tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - br label %loop_body - -loop_body: ; preds = %cond_exit_13, %__hugr__.__tk2_sol_qalloc.470.exit - %"9_2.0" = phi i64 [ 0, %__hugr__.__tk2_sol_qalloc.470.exit ], [ %"2107.0", %cond_exit_13 ] - %"9_0.sroa.0.0" = phi i64 [ 0, %__hugr__.__tk2_sol_qalloc.470.exit ], [ %7, %cond_exit_13 ] - %6 = icmp samesign ugt i64 %"9_0.sroa.0.0", 19 - %7 = add nuw nsw i64 %"9_0.sroa.0.0", 1 - br i1 %6, label %cond_exit_13, label %cond_13_case_1 - -cond_13_case_1: ; preds = %loop_body - %8 = add i64 %"9_2.0", 1 - %qalloc.i1214 = tail call i64 @___qalloc() - %not_max.not.not.i1215 = icmp eq i64 %qalloc.i1214, -1 - br i1 %not_max.not.not.i1215, label %cond_474_case_0.i1216, label %__hugr__.__tk2_sol_qalloc.470.exit1217 - -cond_474_case_0.i1216: ; preds = %cond_13_case_1 - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_sol_qalloc.470.exit1217: ; preds = %cond_13_case_1 - tail call void @___reset(i64 %qalloc.i1214) - %9 = icmp ult i64 %"9_2.0", 20 - br i1 %9, label %__barray_check_bounds.exit, label %out_of_bounds.i - -out_of_bounds.i: ; preds = %__hugr__.__tk2_sol_qalloc.470.exit1217 - tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") - unreachable - -__barray_check_bounds.exit: ; preds = %__hugr__.__tk2_sol_qalloc.470.exit1217 - %10 = load i64, ptr %5, align 4 - %11 = lshr i64 %10, %"9_2.0" - %12 = trunc i64 %11 to i1 - br i1 %12, label %__barray_mask_return.exit, label %panic.i - -panic.i: ; preds = %__barray_check_bounds.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit: ; preds = %__barray_check_bounds.exit - %13 = shl nuw nsw i64 1, %"9_2.0" - %14 = xor i64 %10, %13 - store i64 %14, ptr %5, align 4 - %15 = getelementptr inbounds nuw i64, ptr %4, i64 %"9_2.0" - store i64 %qalloc.i1214, ptr %15, align 4 - br label %cond_exit_13 - -cond_exit_13: ; preds = %loop_body, %__barray_mask_return.exit - %"2107.0" = phi i64 [ %8, %__barray_mask_return.exit ], [ %"9_2.0", %loop_body ] - %exitcond = icmp eq i64 %7, 21 - br i1 %exitcond, label %__barray_check_bounds.exit1219, label %loop_body - -__barray_check_bounds.exit1219: ; preds = %cond_exit_13, %__barray_mask_return.exit1224 - %16 = phi i64 [ %28, %__barray_mask_return.exit1224 ], [ 1, %cond_exit_13 ] - %"114_0.01276" = phi i64 [ %16, %__barray_mask_return.exit1224 ], [ 0, %cond_exit_13 ] - %17 = load i64, ptr %5, align 4 - %18 = lshr i64 %17, %"114_0.01276" - %19 = trunc i64 %18 to i1 - br i1 %19, label %panic.i1220, label %__barray_check_bounds.exit1222 - -panic.i1220: ; preds = %__barray_check_bounds.exit1219 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1222: ; preds = %__barray_check_bounds.exit1219 - %20 = shl nuw nsw i64 1, %"114_0.01276" - %21 = xor i64 %17, %20 - store i64 %21, ptr %5, align 4 - %22 = getelementptr inbounds nuw i64, ptr %4, i64 %"114_0.01276" - %23 = load i64, ptr %22, align 4 - tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rpp(i64 %qalloc.i, i64 %23, double 0x3FF921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %23, double 0xBFF921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %qalloc.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18) - %24 = load i64, ptr %5, align 4 - %25 = lshr i64 %24, %"114_0.01276" - %26 = trunc i64 %25 to i1 - br i1 %26, label %__barray_mask_return.exit1224, label %panic.i1223 - -panic.i1223: ; preds = %__barray_check_bounds.exit1222 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1224: ; preds = %__barray_check_bounds.exit1222 - %27 = xor i64 %24, %20 - store i64 %27, ptr %5, align 4 - store i64 %23, ptr %22, align 4 - %28 = add nuw nsw i64 %16, 1 - %exitcond1279 = icmp eq i64 %28, 21 - br i1 %exitcond1279, label %cond_exit_185, label %__barray_check_bounds.exit1219 - -cond_exit_185: ; preds = %__barray_mask_return.exit1224 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) - tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure_leaked) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - %29 = icmp eq i64 %read_uint, 2 - br i1 %29, label %30, label %cond_exit_256 - -cond_exit_256: ; preds = %cond_exit_185 - %read_uint350 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - %.not = icmp eq i64 %read_uint350, 2 - br i1 %.not, label %cond_236_case_0, label %cond_236_case_1 - -30: ; preds = %cond_exit_185 - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - tail call void @print_int(ptr nonnull @res_head_leake.F4F32972.0, i64 20, i64 1) - br label %__barray_check_bounds.exit1230.preheader - -__barray_check_bounds.exit1230.preheader: ; preds = %cond_236_case_1, %30 - br label %__barray_check_bounds.exit1230 - -cond_236_case_1: ; preds = %cond_exit_256 - %31 = icmp eq i64 %read_uint350, 1 - tail call void @print_bool(ptr nonnull @res_head.AFE8E005.0, i64 14, i1 %31) - br label %__barray_check_bounds.exit1230.preheader - -cond_236_case_0: ; preds = %cond_exit_256 - tail call void @panic(i32 1001, ptr nonnull @e_Option.unw.32D4E82D.0) - unreachable - -out_of_bounds.i1225: ; preds = %.thread - tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") - unreachable - -__barray_check_bounds.exit1226: ; preds = %.thread - %32 = load i64, ptr %3, align 4 - %33 = lshr i64 %32, %"298_2.01283" - %34 = trunc i64 %33 to i1 - br i1 %34, label %cond_exit_302, label %panic.i1227 - -panic.i1227: ; preds = %__barray_check_bounds.exit1226 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -mask_block_ok.i: ; preds = %cond_exit_302 - %35 = load i64, ptr %5, align 4 - %36 = or i64 %35, -1048576 - store i64 %36, ptr %5, align 4 - %37 = icmp eq i64 %36, -1 - br i1 %37, label %loop_body510.preheader.preheader, label %mask_block_err.i - -mask_block_err.i: ; preds = %mask_block_ok.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_check_bounds.exit1230: ; preds = %__barray_check_bounds.exit1230.preheader, %cond_exit_302 - %"298_0.sroa.15.01284" = phi i64 [ %38, %cond_exit_302 ], [ 0, %__barray_check_bounds.exit1230.preheader ] - %"298_2.01283" = phi i64 [ %46, %cond_exit_302 ], [ 0, %__barray_check_bounds.exit1230.preheader ] - %38 = add nuw nsw i64 %"298_0.sroa.15.01284", 1 - %39 = load i64, ptr %5, align 4 - %40 = lshr i64 %39, %"298_0.sroa.15.01284" - %41 = trunc i64 %40 to i1 - br i1 %41, label %panic.i1231, label %.thread - -panic.i1231: ; preds = %__barray_check_bounds.exit1230 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -.thread: ; preds = %__barray_check_bounds.exit1230 - %42 = shl nuw nsw i64 1, %"298_0.sroa.15.01284" - %43 = xor i64 %39, %42 - store i64 %43, ptr %5, align 4 - %44 = getelementptr inbounds nuw i64, ptr %4, i64 %"298_0.sroa.15.01284" - %45 = load i64, ptr %44, align 4 - %46 = add i64 %"298_2.01283", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %45) - tail call void @___qfree(i64 %45) - %47 = icmp ult i64 %"298_2.01283", 20 - br i1 %47, label %__barray_check_bounds.exit1226, label %out_of_bounds.i1225 - -cond_exit_302: ; preds = %__barray_check_bounds.exit1226 - %48 = shl nuw nsw i64 1, %"298_2.01283" - %49 = xor i64 %32, %48 - store i64 %49, ptr %3, align 4 - %50 = getelementptr inbounds nuw i64, ptr %2, i64 %"298_2.01283" - store i64 %lazy_measure, ptr %50, align 4 - %51 = icmp samesign ugt i64 %"298_0.sroa.15.01284", 18 - br i1 %51, label %mask_block_ok.i, label %__barray_check_bounds.exit1230 - -loop_body510.preheader.preheader: ; preds = %mask_block_ok.i - tail call void @heap_free(ptr nonnull %4) - tail call void @heap_free(ptr nonnull %5) - br label %__barray_check_bounds.exit1234 - -__barray_check_bounds.exit1234: ; preds = %cond_exit_368, %loop_body510.preheader.preheader - %"364_0.sroa.15.01278" = phi i64 [ %52, %cond_exit_368 ], [ 0, %loop_body510.preheader.preheader ] - %52 = add nuw nsw i64 %"364_0.sroa.15.01278", 1 - %53 = load i64, ptr %3, align 4 - %54 = lshr i64 %53, %"364_0.sroa.15.01278" - %55 = trunc i64 %54 to i1 - br i1 %55, label %panic.i1235, label %__barray_check_bounds.exit1238 - -panic.i1235: ; preds = %__barray_check_bounds.exit1234 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1238: ; preds = %__barray_check_bounds.exit1234 - %56 = shl nuw nsw i64 1, %"364_0.sroa.15.01278" - %57 = xor i64 %53, %56 - store i64 %57, ptr %3, align 4 - %58 = getelementptr inbounds nuw i64, ptr %2, i64 %"364_0.sroa.15.01278" - %59 = load i64, ptr %58, align 4 - tail call void @___inc_future_refcount(i64 %59) - %60 = load i64, ptr %3, align 4 - %61 = lshr i64 %60, %"364_0.sroa.15.01278" - %62 = trunc i64 %61 to i1 - br i1 %62, label %__barray_check_bounds.exit1242, label %panic.i1239 - -panic.i1239: ; preds = %__barray_check_bounds.exit1238 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_check_bounds.exit1242: ; preds = %__barray_check_bounds.exit1238 - %63 = xor i64 %60, %56 - store i64 %63, ptr %3, align 4 - store i64 %59, ptr %58, align 4 - %read_bool = tail call i1 @___read_future_bool(i64 %59) - tail call void @___dec_future_refcount(i64 %59) - %64 = load i64, ptr %1, align 4 - %65 = lshr i64 %64, %"364_0.sroa.15.01278" - %66 = trunc i64 %65 to i1 - br i1 %66, label %cond_exit_368, label %panic.i1243 - -panic.i1243: ; preds = %__barray_check_bounds.exit1242 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -cond_549_case_0: ; preds = %cond_exit_549 - %67 = load i64, ptr %3, align 4 - %68 = or i64 %67, -1048576 - store i64 %68, ptr %3, align 4 - %69 = icmp eq i64 %68, -1 - br i1 %69, label %loop_out509, label %mask_block_err.i1248 - -mask_block_err.i1248: ; preds = %cond_549_case_0 - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_check_bounds.exit1252: ; preds = %cond_exit_368, %cond_exit_549 - %"546_0.01285" = phi i64 [ %70, %cond_exit_549 ], [ 0, %cond_exit_368 ] - %70 = add nuw nsw i64 %"546_0.01285", 1 - %71 = load i64, ptr %3, align 4 - %72 = lshr i64 %71, %"546_0.01285" - %73 = trunc i64 %72 to i1 - br i1 %73, label %cond_exit_549, label %__barray_mask_borrow.exit1256 - -__barray_mask_borrow.exit1256: ; preds = %__barray_check_bounds.exit1252 - %74 = shl nuw nsw i64 1, %"546_0.01285" - %75 = xor i64 %71, %74 - store i64 %75, ptr %3, align 4 - %76 = getelementptr inbounds nuw i64, ptr %2, i64 %"546_0.01285" - %77 = load i64, ptr %76, align 4 - tail call void @___dec_future_refcount(i64 %77) - br label %cond_exit_549 - -cond_exit_549: ; preds = %__barray_mask_borrow.exit1256, %__barray_check_bounds.exit1252 - %78 = icmp samesign ugt i64 %"546_0.01285", 18 - br i1 %78, label %cond_549_case_0, label %__barray_check_bounds.exit1252 - -cond_exit_368: ; preds = %__barray_check_bounds.exit1242 - %79 = xor i64 %64, %56 - store i64 %79, ptr %1, align 4 - %80 = getelementptr inbounds nuw i1, ptr %0, i64 %"364_0.sroa.15.01278" - store i1 %read_bool, ptr %80, align 1 - %81 = icmp eq i64 %"364_0.sroa.15.01278", 19 - br i1 %81, label %__barray_check_bounds.exit1252, label %__barray_check_bounds.exit1234 - -loop_out509: ; preds = %cond_549_case_0 - tail call void @heap_free(ptr %2) - tail call void @heap_free(ptr nonnull %3) - %82 = load i64, ptr %1, align 4 - %83 = and i64 %82, 1048575 - store i64 %83, ptr %1, align 4 - %84 = icmp eq i64 %83, 0 - br i1 %84, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1257 - -mask_block_err.i1257: ; preds = %loop_out509 - tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") - unreachable - -__barray_check_none_borrowed.exit: ; preds = %loop_out509 - %85 = tail call ptr @heap_alloc(i64 20) - %86 = tail call ptr @heap_alloc(i64 8) - store i64 0, ptr %86, align 1 - tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(20) %85, ptr noundef nonnull align 1 dereferenceable(20) %0, i64 20, i1 false) - tail call void @heap_free(ptr nonnull %85) - %87 = load i64, ptr %1, align 4 - %88 = and i64 %87, 1048575 - store i64 %88, ptr %1, align 4 - %89 = icmp eq i64 %88, 0 - br i1 %89, label %__barray_check_none_borrowed.exit1261, label %mask_block_err.i1259 - -mask_block_err.i1259: ; preds = %__barray_check_none_borrowed.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") - unreachable - -__barray_check_none_borrowed.exit1261: ; preds = %__barray_check_none_borrowed.exit - %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 - %y_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 4 - %arr_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 8 - %mask_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 16 - %90 = alloca [20 x i1], align 1 - call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(20) %90, i8 0, i64 20, i1 false) - store i32 20, ptr %out_arr_alloca, align 8 - store i32 1, ptr %y_ptr, align 4 - store ptr %0, ptr %arr_ptr, align 8 - store ptr %90, ptr %mask_ptr, align 8 - call void @print_bool_arr(ptr nonnull @res_tail.AD5A440E.0, i64 17, ptr nonnull %out_arr_alloca) - ret void -} - -declare ptr @heap_alloc(i64) local_unnamed_addr - -; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) -declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immarg) #0 - -; Function Attrs: noreturn -declare void @panic(i32, ptr) local_unnamed_addr #1 - -declare i64 @___lazy_measure_leaked(i64) local_unnamed_addr - -declare void @___qfree(i64) local_unnamed_addr - -declare void @___inc_future_refcount(i64) local_unnamed_addr - -declare i64 @___read_future_uint(i64) local_unnamed_addr - -declare void @___dec_future_refcount(i64) local_unnamed_addr - -declare void @print_int(ptr, i64, i64) local_unnamed_addr - -declare void @print_bool(ptr, i64, i1) local_unnamed_addr - -declare void @heap_free(ptr) local_unnamed_addr - -declare i64 @___lazy_measure(i64) local_unnamed_addr - -declare i1 @___read_future_bool(i64) local_unnamed_addr - -; Function Attrs: mustprogress 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) #2 - -declare void @print_bool_arr(ptr, i64, ptr) local_unnamed_addr - -declare i64 @___qalloc() local_unnamed_addr - -declare void @___reset(i64) local_unnamed_addr - -declare void @___rp(i64, double, double) local_unnamed_addr - -declare void @___rz(i64, double) local_unnamed_addr - -declare void @___rpp(i64, i64, double, double) local_unnamed_addr - -define i64 @qmain(i64 %0) local_unnamed_addr { -entry: - tail call void @setup(i64 %0) - tail call void @__hugr__.__main__.main.1() - %1 = tail call i64 @teardown() - ret i64 %1 -} - -declare void @setup(i64) local_unnamed_addr - -declare i64 @teardown() local_unnamed_addr - -attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } -attributes #1 = { noreturn } -attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) } - -!name = !{!0} - -!0 = !{!"mainlib"} diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_from_head-sol-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_from_head-sol-aarch64-unknown-linux-gnu.ll deleted file mode 100644 index 070d0ec1..00000000 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_from_head-sol-aarch64-unknown-linux-gnu.ll +++ /dev/null @@ -1,415 +0,0 @@ -; ModuleID = 'hugr' -source_filename = "hugr" -target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32" -target triple = "aarch64-unknown-linux-gnu" - -@"e_Index out .DD115165.0" = private constant [29 x i8] c"\1CEXIT:INT:Index out of bounds" -@"e_Array alre.5A300C2A.0" = private constant [57 x i8] c"8EXIT:INT:Array already contains an element at this index" -@e_Option.unw.32D4E82D.0 = private constant [43 x i8] c"*EXIT:INT:Option.unwrap: value is `Nothing`" -@"e_Array elem.E746B1A3.0" = private constant [43 x i8] c"*EXIT:INT:Array element is already borrowed" -@res_head_leake.F4F32972.0 = private constant [21 x i8] c"\14USER:INT:head_leaked" -@res_head.AFE8E005.0 = private constant [15 x i8] c"\0EUSER:BOOL:head" -@"e_Array cont.EFA5AC45.0" = private constant [70 x i8] c"EEXIT:INT:Array contains non-borrowed elements and cannot be discarded" -@"e_Some array.A77EF32E.0" = private constant [48 x i8] c"/EXIT:INT:Some array elements have been borrowed" -@res_tail.AD5A440E.0 = private constant [18 x i8] c"\11USER:BOOLARR:tail" -@"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." - -define void @__hugr__.__main__.main.1() local_unnamed_addr { -alloca_block: - %0 = tail call ptr @heap_alloc(i64 20) - %1 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %1, align 1 - %2 = tail call ptr @heap_alloc(i64 160) - %3 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %3, align 1 - %4 = tail call ptr @heap_alloc(i64 160) - %5 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %5, align 1 - %qalloc.i = tail call i64 @___qalloc() - %not_max.not.not.i = icmp eq i64 %qalloc.i, -1 - br i1 %not_max.not.not.i, label %cond_474_case_0.i, label %__hugr__.__tk2_sol_qalloc.470.exit - -cond_474_case_0.i: ; preds = %alloca_block - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_sol_qalloc.470.exit: ; preds = %alloca_block - tail call void @___reset(i64 %qalloc.i) - tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - br label %loop_body - -loop_body: ; preds = %cond_exit_13, %__hugr__.__tk2_sol_qalloc.470.exit - %"9_2.0" = phi i64 [ 0, %__hugr__.__tk2_sol_qalloc.470.exit ], [ %"2107.0", %cond_exit_13 ] - %"9_0.sroa.0.0" = phi i64 [ 0, %__hugr__.__tk2_sol_qalloc.470.exit ], [ %7, %cond_exit_13 ] - %6 = icmp samesign ugt i64 %"9_0.sroa.0.0", 19 - %7 = add nuw nsw i64 %"9_0.sroa.0.0", 1 - br i1 %6, label %cond_exit_13, label %cond_13_case_1 - -cond_13_case_1: ; preds = %loop_body - %8 = add i64 %"9_2.0", 1 - %qalloc.i1214 = tail call i64 @___qalloc() - %not_max.not.not.i1215 = icmp eq i64 %qalloc.i1214, -1 - br i1 %not_max.not.not.i1215, label %cond_474_case_0.i1216, label %__hugr__.__tk2_sol_qalloc.470.exit1217 - -cond_474_case_0.i1216: ; preds = %cond_13_case_1 - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_sol_qalloc.470.exit1217: ; preds = %cond_13_case_1 - tail call void @___reset(i64 %qalloc.i1214) - %9 = icmp ult i64 %"9_2.0", 20 - br i1 %9, label %__barray_check_bounds.exit, label %out_of_bounds.i - -out_of_bounds.i: ; preds = %__hugr__.__tk2_sol_qalloc.470.exit1217 - tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") - unreachable - -__barray_check_bounds.exit: ; preds = %__hugr__.__tk2_sol_qalloc.470.exit1217 - %10 = load i64, ptr %5, align 4 - %11 = lshr i64 %10, %"9_2.0" - %12 = trunc i64 %11 to i1 - br i1 %12, label %__barray_mask_return.exit, label %panic.i - -panic.i: ; preds = %__barray_check_bounds.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit: ; preds = %__barray_check_bounds.exit - %13 = shl nuw nsw i64 1, %"9_2.0" - %14 = xor i64 %10, %13 - store i64 %14, ptr %5, align 4 - %15 = getelementptr inbounds nuw i64, ptr %4, i64 %"9_2.0" - store i64 %qalloc.i1214, ptr %15, align 4 - br label %cond_exit_13 - -cond_exit_13: ; preds = %loop_body, %__barray_mask_return.exit - %"2107.0" = phi i64 [ %8, %__barray_mask_return.exit ], [ %"9_2.0", %loop_body ] - %exitcond = icmp eq i64 %7, 21 - br i1 %exitcond, label %__barray_check_bounds.exit1219, label %loop_body - -__barray_check_bounds.exit1219: ; preds = %cond_exit_13, %__barray_mask_return.exit1224 - %16 = phi i64 [ %28, %__barray_mask_return.exit1224 ], [ 1, %cond_exit_13 ] - %"114_0.01276" = phi i64 [ %16, %__barray_mask_return.exit1224 ], [ 0, %cond_exit_13 ] - %17 = load i64, ptr %5, align 4 - %18 = lshr i64 %17, %"114_0.01276" - %19 = trunc i64 %18 to i1 - br i1 %19, label %panic.i1220, label %__barray_check_bounds.exit1222 - -panic.i1220: ; preds = %__barray_check_bounds.exit1219 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1222: ; preds = %__barray_check_bounds.exit1219 - %20 = shl nuw nsw i64 1, %"114_0.01276" - %21 = xor i64 %17, %20 - store i64 %21, ptr %5, align 4 - %22 = getelementptr inbounds nuw i64, ptr %4, i64 %"114_0.01276" - %23 = load i64, ptr %22, align 4 - tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rpp(i64 %qalloc.i, i64 %23, double 0x3FF921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %23, double 0xBFF921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %qalloc.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18) - %24 = load i64, ptr %5, align 4 - %25 = lshr i64 %24, %"114_0.01276" - %26 = trunc i64 %25 to i1 - br i1 %26, label %__barray_mask_return.exit1224, label %panic.i1223 - -panic.i1223: ; preds = %__barray_check_bounds.exit1222 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1224: ; preds = %__barray_check_bounds.exit1222 - %27 = xor i64 %24, %20 - store i64 %27, ptr %5, align 4 - store i64 %23, ptr %22, align 4 - %28 = add nuw nsw i64 %16, 1 - %exitcond1279 = icmp eq i64 %28, 21 - br i1 %exitcond1279, label %cond_exit_185, label %__barray_check_bounds.exit1219 - -cond_exit_185: ; preds = %__barray_mask_return.exit1224 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) - tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure_leaked) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - %29 = icmp eq i64 %read_uint, 2 - br i1 %29, label %30, label %cond_exit_256 - -cond_exit_256: ; preds = %cond_exit_185 - %read_uint350 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - %.not = icmp eq i64 %read_uint350, 2 - br i1 %.not, label %cond_236_case_0, label %cond_236_case_1 - -30: ; preds = %cond_exit_185 - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - tail call void @print_int(ptr nonnull @res_head_leake.F4F32972.0, i64 20, i64 1) - br label %__barray_check_bounds.exit1230.preheader - -__barray_check_bounds.exit1230.preheader: ; preds = %cond_236_case_1, %30 - br label %__barray_check_bounds.exit1230 - -cond_236_case_1: ; preds = %cond_exit_256 - %31 = icmp eq i64 %read_uint350, 1 - tail call void @print_bool(ptr nonnull @res_head.AFE8E005.0, i64 14, i1 %31) - br label %__barray_check_bounds.exit1230.preheader - -cond_236_case_0: ; preds = %cond_exit_256 - tail call void @panic(i32 1001, ptr nonnull @e_Option.unw.32D4E82D.0) - unreachable - -out_of_bounds.i1225: ; preds = %.thread - tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") - unreachable - -__barray_check_bounds.exit1226: ; preds = %.thread - %32 = load i64, ptr %3, align 4 - %33 = lshr i64 %32, %"298_2.01283" - %34 = trunc i64 %33 to i1 - br i1 %34, label %cond_exit_302, label %panic.i1227 - -panic.i1227: ; preds = %__barray_check_bounds.exit1226 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -mask_block_ok.i: ; preds = %cond_exit_302 - %35 = load i64, ptr %5, align 4 - %36 = or i64 %35, -1048576 - store i64 %36, ptr %5, align 4 - %37 = icmp eq i64 %36, -1 - br i1 %37, label %loop_body510.preheader.preheader, label %mask_block_err.i - -mask_block_err.i: ; preds = %mask_block_ok.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_check_bounds.exit1230: ; preds = %__barray_check_bounds.exit1230.preheader, %cond_exit_302 - %"298_0.sroa.15.01284" = phi i64 [ %38, %cond_exit_302 ], [ 0, %__barray_check_bounds.exit1230.preheader ] - %"298_2.01283" = phi i64 [ %46, %cond_exit_302 ], [ 0, %__barray_check_bounds.exit1230.preheader ] - %38 = add nuw nsw i64 %"298_0.sroa.15.01284", 1 - %39 = load i64, ptr %5, align 4 - %40 = lshr i64 %39, %"298_0.sroa.15.01284" - %41 = trunc i64 %40 to i1 - br i1 %41, label %panic.i1231, label %.thread - -panic.i1231: ; preds = %__barray_check_bounds.exit1230 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -.thread: ; preds = %__barray_check_bounds.exit1230 - %42 = shl nuw nsw i64 1, %"298_0.sroa.15.01284" - %43 = xor i64 %39, %42 - store i64 %43, ptr %5, align 4 - %44 = getelementptr inbounds nuw i64, ptr %4, i64 %"298_0.sroa.15.01284" - %45 = load i64, ptr %44, align 4 - %46 = add i64 %"298_2.01283", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %45) - tail call void @___qfree(i64 %45) - %47 = icmp ult i64 %"298_2.01283", 20 - br i1 %47, label %__barray_check_bounds.exit1226, label %out_of_bounds.i1225 - -cond_exit_302: ; preds = %__barray_check_bounds.exit1226 - %48 = shl nuw nsw i64 1, %"298_2.01283" - %49 = xor i64 %32, %48 - store i64 %49, ptr %3, align 4 - %50 = getelementptr inbounds nuw i64, ptr %2, i64 %"298_2.01283" - store i64 %lazy_measure, ptr %50, align 4 - %51 = icmp samesign ugt i64 %"298_0.sroa.15.01284", 18 - br i1 %51, label %mask_block_ok.i, label %__barray_check_bounds.exit1230 - -loop_body510.preheader.preheader: ; preds = %mask_block_ok.i - tail call void @heap_free(ptr nonnull %4) - tail call void @heap_free(ptr nonnull %5) - br label %__barray_check_bounds.exit1234 - -__barray_check_bounds.exit1234: ; preds = %cond_exit_368, %loop_body510.preheader.preheader - %"364_0.sroa.15.01278" = phi i64 [ %52, %cond_exit_368 ], [ 0, %loop_body510.preheader.preheader ] - %52 = add nuw nsw i64 %"364_0.sroa.15.01278", 1 - %53 = load i64, ptr %3, align 4 - %54 = lshr i64 %53, %"364_0.sroa.15.01278" - %55 = trunc i64 %54 to i1 - br i1 %55, label %panic.i1235, label %__barray_check_bounds.exit1238 - -panic.i1235: ; preds = %__barray_check_bounds.exit1234 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1238: ; preds = %__barray_check_bounds.exit1234 - %56 = shl nuw nsw i64 1, %"364_0.sroa.15.01278" - %57 = xor i64 %53, %56 - store i64 %57, ptr %3, align 4 - %58 = getelementptr inbounds nuw i64, ptr %2, i64 %"364_0.sroa.15.01278" - %59 = load i64, ptr %58, align 4 - tail call void @___inc_future_refcount(i64 %59) - %60 = load i64, ptr %3, align 4 - %61 = lshr i64 %60, %"364_0.sroa.15.01278" - %62 = trunc i64 %61 to i1 - br i1 %62, label %__barray_check_bounds.exit1242, label %panic.i1239 - -panic.i1239: ; preds = %__barray_check_bounds.exit1238 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_check_bounds.exit1242: ; preds = %__barray_check_bounds.exit1238 - %63 = xor i64 %60, %56 - store i64 %63, ptr %3, align 4 - store i64 %59, ptr %58, align 4 - %read_bool = tail call i1 @___read_future_bool(i64 %59) - tail call void @___dec_future_refcount(i64 %59) - %64 = load i64, ptr %1, align 4 - %65 = lshr i64 %64, %"364_0.sroa.15.01278" - %66 = trunc i64 %65 to i1 - br i1 %66, label %cond_exit_368, label %panic.i1243 - -panic.i1243: ; preds = %__barray_check_bounds.exit1242 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -cond_549_case_0: ; preds = %cond_exit_549 - %67 = load i64, ptr %3, align 4 - %68 = or i64 %67, -1048576 - store i64 %68, ptr %3, align 4 - %69 = icmp eq i64 %68, -1 - br i1 %69, label %loop_out509, label %mask_block_err.i1248 - -mask_block_err.i1248: ; preds = %cond_549_case_0 - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_check_bounds.exit1252: ; preds = %cond_exit_368, %cond_exit_549 - %"546_0.01285" = phi i64 [ %70, %cond_exit_549 ], [ 0, %cond_exit_368 ] - %70 = add nuw nsw i64 %"546_0.01285", 1 - %71 = load i64, ptr %3, align 4 - %72 = lshr i64 %71, %"546_0.01285" - %73 = trunc i64 %72 to i1 - br i1 %73, label %cond_exit_549, label %__barray_mask_borrow.exit1256 - -__barray_mask_borrow.exit1256: ; preds = %__barray_check_bounds.exit1252 - %74 = shl nuw nsw i64 1, %"546_0.01285" - %75 = xor i64 %71, %74 - store i64 %75, ptr %3, align 4 - %76 = getelementptr inbounds nuw i64, ptr %2, i64 %"546_0.01285" - %77 = load i64, ptr %76, align 4 - tail call void @___dec_future_refcount(i64 %77) - br label %cond_exit_549 - -cond_exit_549: ; preds = %__barray_mask_borrow.exit1256, %__barray_check_bounds.exit1252 - %78 = icmp samesign ugt i64 %"546_0.01285", 18 - br i1 %78, label %cond_549_case_0, label %__barray_check_bounds.exit1252 - -cond_exit_368: ; preds = %__barray_check_bounds.exit1242 - %79 = xor i64 %64, %56 - store i64 %79, ptr %1, align 4 - %80 = getelementptr inbounds nuw i1, ptr %0, i64 %"364_0.sroa.15.01278" - store i1 %read_bool, ptr %80, align 1 - %81 = icmp eq i64 %"364_0.sroa.15.01278", 19 - br i1 %81, label %__barray_check_bounds.exit1252, label %__barray_check_bounds.exit1234 - -loop_out509: ; preds = %cond_549_case_0 - tail call void @heap_free(ptr %2) - tail call void @heap_free(ptr nonnull %3) - %82 = load i64, ptr %1, align 4 - %83 = and i64 %82, 1048575 - store i64 %83, ptr %1, align 4 - %84 = icmp eq i64 %83, 0 - br i1 %84, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1257 - -mask_block_err.i1257: ; preds = %loop_out509 - tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") - unreachable - -__barray_check_none_borrowed.exit: ; preds = %loop_out509 - %85 = tail call ptr @heap_alloc(i64 20) - %86 = tail call ptr @heap_alloc(i64 8) - store i64 0, ptr %86, align 1 - tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(20) %85, ptr noundef nonnull align 1 dereferenceable(20) %0, i64 20, i1 false) - tail call void @heap_free(ptr nonnull %85) - %87 = load i64, ptr %1, align 4 - %88 = and i64 %87, 1048575 - store i64 %88, ptr %1, align 4 - %89 = icmp eq i64 %88, 0 - br i1 %89, label %__barray_check_none_borrowed.exit1261, label %mask_block_err.i1259 - -mask_block_err.i1259: ; preds = %__barray_check_none_borrowed.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") - unreachable - -__barray_check_none_borrowed.exit1261: ; preds = %__barray_check_none_borrowed.exit - %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 - %y_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 4 - %arr_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 8 - %mask_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 16 - %90 = alloca [20 x i1], align 1 - call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(20) %90, i8 0, i64 20, i1 false) - store i32 20, ptr %out_arr_alloca, align 8 - store i32 1, ptr %y_ptr, align 4 - store ptr %0, ptr %arr_ptr, align 8 - store ptr %90, ptr %mask_ptr, align 8 - call void @print_bool_arr(ptr nonnull @res_tail.AD5A440E.0, i64 17, ptr nonnull %out_arr_alloca) - ret void -} - -declare ptr @heap_alloc(i64) local_unnamed_addr - -; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) -declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immarg) #0 - -; Function Attrs: noreturn -declare void @panic(i32, ptr) local_unnamed_addr #1 - -declare i64 @___lazy_measure_leaked(i64) local_unnamed_addr - -declare void @___qfree(i64) local_unnamed_addr - -declare void @___inc_future_refcount(i64) local_unnamed_addr - -declare i64 @___read_future_uint(i64) local_unnamed_addr - -declare void @___dec_future_refcount(i64) local_unnamed_addr - -declare void @print_int(ptr, i64, i64) local_unnamed_addr - -declare void @print_bool(ptr, i64, i1) local_unnamed_addr - -declare void @heap_free(ptr) local_unnamed_addr - -declare i64 @___lazy_measure(i64) local_unnamed_addr - -declare i1 @___read_future_bool(i64) local_unnamed_addr - -; Function Attrs: mustprogress 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) #2 - -declare void @print_bool_arr(ptr, i64, ptr) local_unnamed_addr - -declare i64 @___qalloc() local_unnamed_addr - -declare void @___reset(i64) local_unnamed_addr - -declare void @___rp(i64, double, double) local_unnamed_addr - -declare void @___rz(i64, double) local_unnamed_addr - -declare void @___rpp(i64, i64, double, double) local_unnamed_addr - -define i64 @qmain(i64 %0) local_unnamed_addr { -entry: - tail call void @setup(i64 %0) - tail call void @__hugr__.__main__.main.1() - %1 = tail call i64 @teardown() - ret i64 %1 -} - -declare void @setup(i64) local_unnamed_addr - -declare i64 @teardown() local_unnamed_addr - -attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } -attributes #1 = { noreturn } -attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) } - -!name = !{!0} - -!0 = !{!"mainlib"} diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_from_head-sol-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_from_head-sol-x86_64-apple-darwin.ll deleted file mode 100644 index e0bf789a..00000000 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_from_head-sol-x86_64-apple-darwin.ll +++ /dev/null @@ -1,415 +0,0 @@ -; ModuleID = 'hugr' -source_filename = "hugr" -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_Index out .DD115165.0" = private constant [29 x i8] c"\1CEXIT:INT:Index out of bounds" -@"e_Array alre.5A300C2A.0" = private constant [57 x i8] c"8EXIT:INT:Array already contains an element at this index" -@e_Option.unw.32D4E82D.0 = private constant [43 x i8] c"*EXIT:INT:Option.unwrap: value is `Nothing`" -@"e_Array elem.E746B1A3.0" = private constant [43 x i8] c"*EXIT:INT:Array element is already borrowed" -@res_head_leake.F4F32972.0 = private constant [21 x i8] c"\14USER:INT:head_leaked" -@res_head.AFE8E005.0 = private constant [15 x i8] c"\0EUSER:BOOL:head" -@"e_Array cont.EFA5AC45.0" = private constant [70 x i8] c"EEXIT:INT:Array contains non-borrowed elements and cannot be discarded" -@"e_Some array.A77EF32E.0" = private constant [48 x i8] c"/EXIT:INT:Some array elements have been borrowed" -@res_tail.AD5A440E.0 = private constant [18 x i8] c"\11USER:BOOLARR:tail" -@"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." - -define void @__hugr__.__main__.main.1() local_unnamed_addr { -alloca_block: - %0 = tail call ptr @heap_alloc(i64 20) - %1 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %1, align 1 - %2 = tail call ptr @heap_alloc(i64 160) - %3 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %3, align 1 - %4 = tail call ptr @heap_alloc(i64 160) - %5 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %5, align 1 - %qalloc.i = tail call i64 @___qalloc() - %not_max.not.not.i = icmp eq i64 %qalloc.i, -1 - br i1 %not_max.not.not.i, label %cond_474_case_0.i, label %__hugr__.__tk2_sol_qalloc.470.exit - -cond_474_case_0.i: ; preds = %alloca_block - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_sol_qalloc.470.exit: ; preds = %alloca_block - tail call void @___reset(i64 %qalloc.i) - tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - br label %loop_body - -loop_body: ; preds = %cond_exit_13, %__hugr__.__tk2_sol_qalloc.470.exit - %"9_2.0" = phi i64 [ 0, %__hugr__.__tk2_sol_qalloc.470.exit ], [ %"2107.0", %cond_exit_13 ] - %"9_0.sroa.0.0" = phi i64 [ 0, %__hugr__.__tk2_sol_qalloc.470.exit ], [ %7, %cond_exit_13 ] - %6 = icmp samesign ugt i64 %"9_0.sroa.0.0", 19 - %7 = add nuw nsw i64 %"9_0.sroa.0.0", 1 - br i1 %6, label %cond_exit_13, label %cond_13_case_1 - -cond_13_case_1: ; preds = %loop_body - %8 = add i64 %"9_2.0", 1 - %qalloc.i1214 = tail call i64 @___qalloc() - %not_max.not.not.i1215 = icmp eq i64 %qalloc.i1214, -1 - br i1 %not_max.not.not.i1215, label %cond_474_case_0.i1216, label %__hugr__.__tk2_sol_qalloc.470.exit1217 - -cond_474_case_0.i1216: ; preds = %cond_13_case_1 - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_sol_qalloc.470.exit1217: ; preds = %cond_13_case_1 - tail call void @___reset(i64 %qalloc.i1214) - %9 = icmp ult i64 %"9_2.0", 20 - br i1 %9, label %__barray_check_bounds.exit, label %out_of_bounds.i - -out_of_bounds.i: ; preds = %__hugr__.__tk2_sol_qalloc.470.exit1217 - tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") - unreachable - -__barray_check_bounds.exit: ; preds = %__hugr__.__tk2_sol_qalloc.470.exit1217 - %10 = load i64, ptr %5, align 4 - %11 = lshr i64 %10, %"9_2.0" - %12 = trunc i64 %11 to i1 - br i1 %12, label %__barray_mask_return.exit, label %panic.i - -panic.i: ; preds = %__barray_check_bounds.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit: ; preds = %__barray_check_bounds.exit - %13 = shl nuw nsw i64 1, %"9_2.0" - %14 = xor i64 %10, %13 - store i64 %14, ptr %5, align 4 - %15 = getelementptr inbounds nuw i64, ptr %4, i64 %"9_2.0" - store i64 %qalloc.i1214, ptr %15, align 4 - br label %cond_exit_13 - -cond_exit_13: ; preds = %loop_body, %__barray_mask_return.exit - %"2107.0" = phi i64 [ %8, %__barray_mask_return.exit ], [ %"9_2.0", %loop_body ] - %exitcond = icmp eq i64 %7, 21 - br i1 %exitcond, label %__barray_check_bounds.exit1219, label %loop_body - -__barray_check_bounds.exit1219: ; preds = %cond_exit_13, %__barray_mask_return.exit1224 - %16 = phi i64 [ %28, %__barray_mask_return.exit1224 ], [ 1, %cond_exit_13 ] - %"114_0.01276" = phi i64 [ %16, %__barray_mask_return.exit1224 ], [ 0, %cond_exit_13 ] - %17 = load i64, ptr %5, align 4 - %18 = lshr i64 %17, %"114_0.01276" - %19 = trunc i64 %18 to i1 - br i1 %19, label %panic.i1220, label %__barray_check_bounds.exit1222 - -panic.i1220: ; preds = %__barray_check_bounds.exit1219 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1222: ; preds = %__barray_check_bounds.exit1219 - %20 = shl nuw nsw i64 1, %"114_0.01276" - %21 = xor i64 %17, %20 - store i64 %21, ptr %5, align 4 - %22 = getelementptr inbounds nuw i64, ptr %4, i64 %"114_0.01276" - %23 = load i64, ptr %22, align 4 - tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rpp(i64 %qalloc.i, i64 %23, double 0x3FF921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %23, double 0xBFF921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %qalloc.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18) - %24 = load i64, ptr %5, align 4 - %25 = lshr i64 %24, %"114_0.01276" - %26 = trunc i64 %25 to i1 - br i1 %26, label %__barray_mask_return.exit1224, label %panic.i1223 - -panic.i1223: ; preds = %__barray_check_bounds.exit1222 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1224: ; preds = %__barray_check_bounds.exit1222 - %27 = xor i64 %24, %20 - store i64 %27, ptr %5, align 4 - store i64 %23, ptr %22, align 4 - %28 = add nuw nsw i64 %16, 1 - %exitcond1279 = icmp eq i64 %28, 21 - br i1 %exitcond1279, label %cond_exit_185, label %__barray_check_bounds.exit1219 - -cond_exit_185: ; preds = %__barray_mask_return.exit1224 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) - tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure_leaked) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - %29 = icmp eq i64 %read_uint, 2 - br i1 %29, label %30, label %cond_exit_256 - -cond_exit_256: ; preds = %cond_exit_185 - %read_uint350 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - %.not = icmp eq i64 %read_uint350, 2 - br i1 %.not, label %cond_236_case_0, label %cond_236_case_1 - -30: ; preds = %cond_exit_185 - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - tail call void @print_int(ptr nonnull @res_head_leake.F4F32972.0, i64 20, i64 1) - br label %__barray_check_bounds.exit1230.preheader - -__barray_check_bounds.exit1230.preheader: ; preds = %cond_236_case_1, %30 - br label %__barray_check_bounds.exit1230 - -cond_236_case_1: ; preds = %cond_exit_256 - %31 = icmp eq i64 %read_uint350, 1 - tail call void @print_bool(ptr nonnull @res_head.AFE8E005.0, i64 14, i1 %31) - br label %__barray_check_bounds.exit1230.preheader - -cond_236_case_0: ; preds = %cond_exit_256 - tail call void @panic(i32 1001, ptr nonnull @e_Option.unw.32D4E82D.0) - unreachable - -out_of_bounds.i1225: ; preds = %.thread - tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") - unreachable - -__barray_check_bounds.exit1226: ; preds = %.thread - %32 = load i64, ptr %3, align 4 - %33 = lshr i64 %32, %"298_2.01283" - %34 = trunc i64 %33 to i1 - br i1 %34, label %cond_exit_302, label %panic.i1227 - -panic.i1227: ; preds = %__barray_check_bounds.exit1226 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -mask_block_ok.i: ; preds = %cond_exit_302 - %35 = load i64, ptr %5, align 4 - %36 = or i64 %35, -1048576 - store i64 %36, ptr %5, align 4 - %37 = icmp eq i64 %36, -1 - br i1 %37, label %loop_body510.preheader.preheader, label %mask_block_err.i - -mask_block_err.i: ; preds = %mask_block_ok.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_check_bounds.exit1230: ; preds = %__barray_check_bounds.exit1230.preheader, %cond_exit_302 - %"298_0.sroa.15.01284" = phi i64 [ %38, %cond_exit_302 ], [ 0, %__barray_check_bounds.exit1230.preheader ] - %"298_2.01283" = phi i64 [ %46, %cond_exit_302 ], [ 0, %__barray_check_bounds.exit1230.preheader ] - %38 = add nuw nsw i64 %"298_0.sroa.15.01284", 1 - %39 = load i64, ptr %5, align 4 - %40 = lshr i64 %39, %"298_0.sroa.15.01284" - %41 = trunc i64 %40 to i1 - br i1 %41, label %panic.i1231, label %.thread - -panic.i1231: ; preds = %__barray_check_bounds.exit1230 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -.thread: ; preds = %__barray_check_bounds.exit1230 - %42 = shl nuw nsw i64 1, %"298_0.sroa.15.01284" - %43 = xor i64 %39, %42 - store i64 %43, ptr %5, align 4 - %44 = getelementptr inbounds nuw i64, ptr %4, i64 %"298_0.sroa.15.01284" - %45 = load i64, ptr %44, align 4 - %46 = add i64 %"298_2.01283", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %45) - tail call void @___qfree(i64 %45) - %47 = icmp ult i64 %"298_2.01283", 20 - br i1 %47, label %__barray_check_bounds.exit1226, label %out_of_bounds.i1225 - -cond_exit_302: ; preds = %__barray_check_bounds.exit1226 - %48 = shl nuw nsw i64 1, %"298_2.01283" - %49 = xor i64 %32, %48 - store i64 %49, ptr %3, align 4 - %50 = getelementptr inbounds nuw i64, ptr %2, i64 %"298_2.01283" - store i64 %lazy_measure, ptr %50, align 4 - %51 = icmp samesign ugt i64 %"298_0.sroa.15.01284", 18 - br i1 %51, label %mask_block_ok.i, label %__barray_check_bounds.exit1230 - -loop_body510.preheader.preheader: ; preds = %mask_block_ok.i - tail call void @heap_free(ptr nonnull %4) - tail call void @heap_free(ptr nonnull %5) - br label %__barray_check_bounds.exit1234 - -__barray_check_bounds.exit1234: ; preds = %cond_exit_368, %loop_body510.preheader.preheader - %"364_0.sroa.15.01278" = phi i64 [ %52, %cond_exit_368 ], [ 0, %loop_body510.preheader.preheader ] - %52 = add nuw nsw i64 %"364_0.sroa.15.01278", 1 - %53 = load i64, ptr %3, align 4 - %54 = lshr i64 %53, %"364_0.sroa.15.01278" - %55 = trunc i64 %54 to i1 - br i1 %55, label %panic.i1235, label %__barray_check_bounds.exit1238 - -panic.i1235: ; preds = %__barray_check_bounds.exit1234 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1238: ; preds = %__barray_check_bounds.exit1234 - %56 = shl nuw nsw i64 1, %"364_0.sroa.15.01278" - %57 = xor i64 %53, %56 - store i64 %57, ptr %3, align 4 - %58 = getelementptr inbounds nuw i64, ptr %2, i64 %"364_0.sroa.15.01278" - %59 = load i64, ptr %58, align 4 - tail call void @___inc_future_refcount(i64 %59) - %60 = load i64, ptr %3, align 4 - %61 = lshr i64 %60, %"364_0.sroa.15.01278" - %62 = trunc i64 %61 to i1 - br i1 %62, label %__barray_check_bounds.exit1242, label %panic.i1239 - -panic.i1239: ; preds = %__barray_check_bounds.exit1238 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_check_bounds.exit1242: ; preds = %__barray_check_bounds.exit1238 - %63 = xor i64 %60, %56 - store i64 %63, ptr %3, align 4 - store i64 %59, ptr %58, align 4 - %read_bool = tail call i1 @___read_future_bool(i64 %59) - tail call void @___dec_future_refcount(i64 %59) - %64 = load i64, ptr %1, align 4 - %65 = lshr i64 %64, %"364_0.sroa.15.01278" - %66 = trunc i64 %65 to i1 - br i1 %66, label %cond_exit_368, label %panic.i1243 - -panic.i1243: ; preds = %__barray_check_bounds.exit1242 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -cond_549_case_0: ; preds = %cond_exit_549 - %67 = load i64, ptr %3, align 4 - %68 = or i64 %67, -1048576 - store i64 %68, ptr %3, align 4 - %69 = icmp eq i64 %68, -1 - br i1 %69, label %loop_out509, label %mask_block_err.i1248 - -mask_block_err.i1248: ; preds = %cond_549_case_0 - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_check_bounds.exit1252: ; preds = %cond_exit_368, %cond_exit_549 - %"546_0.01285" = phi i64 [ %70, %cond_exit_549 ], [ 0, %cond_exit_368 ] - %70 = add nuw nsw i64 %"546_0.01285", 1 - %71 = load i64, ptr %3, align 4 - %72 = lshr i64 %71, %"546_0.01285" - %73 = trunc i64 %72 to i1 - br i1 %73, label %cond_exit_549, label %__barray_mask_borrow.exit1256 - -__barray_mask_borrow.exit1256: ; preds = %__barray_check_bounds.exit1252 - %74 = shl nuw nsw i64 1, %"546_0.01285" - %75 = xor i64 %71, %74 - store i64 %75, ptr %3, align 4 - %76 = getelementptr inbounds nuw i64, ptr %2, i64 %"546_0.01285" - %77 = load i64, ptr %76, align 4 - tail call void @___dec_future_refcount(i64 %77) - br label %cond_exit_549 - -cond_exit_549: ; preds = %__barray_mask_borrow.exit1256, %__barray_check_bounds.exit1252 - %78 = icmp samesign ugt i64 %"546_0.01285", 18 - br i1 %78, label %cond_549_case_0, label %__barray_check_bounds.exit1252 - -cond_exit_368: ; preds = %__barray_check_bounds.exit1242 - %79 = xor i64 %64, %56 - store i64 %79, ptr %1, align 4 - %80 = getelementptr inbounds nuw i1, ptr %0, i64 %"364_0.sroa.15.01278" - store i1 %read_bool, ptr %80, align 1 - %81 = icmp eq i64 %"364_0.sroa.15.01278", 19 - br i1 %81, label %__barray_check_bounds.exit1252, label %__barray_check_bounds.exit1234 - -loop_out509: ; preds = %cond_549_case_0 - tail call void @heap_free(ptr %2) - tail call void @heap_free(ptr nonnull %3) - %82 = load i64, ptr %1, align 4 - %83 = and i64 %82, 1048575 - store i64 %83, ptr %1, align 4 - %84 = icmp eq i64 %83, 0 - br i1 %84, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1257 - -mask_block_err.i1257: ; preds = %loop_out509 - tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") - unreachable - -__barray_check_none_borrowed.exit: ; preds = %loop_out509 - %85 = tail call ptr @heap_alloc(i64 20) - %86 = tail call ptr @heap_alloc(i64 8) - store i64 0, ptr %86, align 1 - tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(20) %85, ptr noundef nonnull align 1 dereferenceable(20) %0, i64 20, i1 false) - tail call void @heap_free(ptr nonnull %85) - %87 = load i64, ptr %1, align 4 - %88 = and i64 %87, 1048575 - store i64 %88, ptr %1, align 4 - %89 = icmp eq i64 %88, 0 - br i1 %89, label %__barray_check_none_borrowed.exit1261, label %mask_block_err.i1259 - -mask_block_err.i1259: ; preds = %__barray_check_none_borrowed.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") - unreachable - -__barray_check_none_borrowed.exit1261: ; preds = %__barray_check_none_borrowed.exit - %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 - %y_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 4 - %arr_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 8 - %mask_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 16 - %90 = alloca [20 x i1], align 1 - call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(20) %90, i8 0, i64 20, i1 false) - store i32 20, ptr %out_arr_alloca, align 8 - store i32 1, ptr %y_ptr, align 4 - store ptr %0, ptr %arr_ptr, align 8 - store ptr %90, ptr %mask_ptr, align 8 - call void @print_bool_arr(ptr nonnull @res_tail.AD5A440E.0, i64 17, ptr nonnull %out_arr_alloca) - ret void -} - -declare ptr @heap_alloc(i64) local_unnamed_addr - -; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) -declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immarg) #0 - -; Function Attrs: noreturn -declare void @panic(i32, ptr) local_unnamed_addr #1 - -declare i64 @___lazy_measure_leaked(i64) local_unnamed_addr - -declare void @___qfree(i64) local_unnamed_addr - -declare void @___inc_future_refcount(i64) local_unnamed_addr - -declare i64 @___read_future_uint(i64) local_unnamed_addr - -declare void @___dec_future_refcount(i64) local_unnamed_addr - -declare void @print_int(ptr, i64, i64) local_unnamed_addr - -declare void @print_bool(ptr, i64, i1) local_unnamed_addr - -declare void @heap_free(ptr) local_unnamed_addr - -declare i64 @___lazy_measure(i64) local_unnamed_addr - -declare i1 @___read_future_bool(i64) local_unnamed_addr - -; Function Attrs: mustprogress 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) #2 - -declare void @print_bool_arr(ptr, i64, ptr) local_unnamed_addr - -declare i64 @___qalloc() local_unnamed_addr - -declare void @___reset(i64) local_unnamed_addr - -declare void @___rp(i64, double, double) local_unnamed_addr - -declare void @___rz(i64, double) local_unnamed_addr - -declare void @___rpp(i64, i64, double, double) local_unnamed_addr - -define i64 @qmain(i64 %0) local_unnamed_addr { -entry: - tail call void @setup(i64 %0) - tail call void @__hugr__.__main__.main.1() - %1 = tail call i64 @teardown() - ret i64 %1 -} - -declare void @setup(i64) local_unnamed_addr - -declare i64 @teardown() local_unnamed_addr - -attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } -attributes #1 = { noreturn } -attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) } - -!name = !{!0} - -!0 = !{!"mainlib"} diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_from_head-sol-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_from_head-sol-x86_64-unknown-linux-gnu.ll deleted file mode 100644 index 50c543a0..00000000 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_from_head-sol-x86_64-unknown-linux-gnu.ll +++ /dev/null @@ -1,415 +0,0 @@ -; ModuleID = 'hugr' -source_filename = "hugr" -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_Index out .DD115165.0" = private constant [29 x i8] c"\1CEXIT:INT:Index out of bounds" -@"e_Array alre.5A300C2A.0" = private constant [57 x i8] c"8EXIT:INT:Array already contains an element at this index" -@e_Option.unw.32D4E82D.0 = private constant [43 x i8] c"*EXIT:INT:Option.unwrap: value is `Nothing`" -@"e_Array elem.E746B1A3.0" = private constant [43 x i8] c"*EXIT:INT:Array element is already borrowed" -@res_head_leake.F4F32972.0 = private constant [21 x i8] c"\14USER:INT:head_leaked" -@res_head.AFE8E005.0 = private constant [15 x i8] c"\0EUSER:BOOL:head" -@"e_Array cont.EFA5AC45.0" = private constant [70 x i8] c"EEXIT:INT:Array contains non-borrowed elements and cannot be discarded" -@"e_Some array.A77EF32E.0" = private constant [48 x i8] c"/EXIT:INT:Some array elements have been borrowed" -@res_tail.AD5A440E.0 = private constant [18 x i8] c"\11USER:BOOLARR:tail" -@"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." - -define void @__hugr__.__main__.main.1() local_unnamed_addr { -alloca_block: - %0 = tail call ptr @heap_alloc(i64 20) - %1 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %1, align 1 - %2 = tail call ptr @heap_alloc(i64 160) - %3 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %3, align 1 - %4 = tail call ptr @heap_alloc(i64 160) - %5 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %5, align 1 - %qalloc.i = tail call i64 @___qalloc() - %not_max.not.not.i = icmp eq i64 %qalloc.i, -1 - br i1 %not_max.not.not.i, label %cond_474_case_0.i, label %__hugr__.__tk2_sol_qalloc.470.exit - -cond_474_case_0.i: ; preds = %alloca_block - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_sol_qalloc.470.exit: ; preds = %alloca_block - tail call void @___reset(i64 %qalloc.i) - tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - br label %loop_body - -loop_body: ; preds = %cond_exit_13, %__hugr__.__tk2_sol_qalloc.470.exit - %"9_2.0" = phi i64 [ 0, %__hugr__.__tk2_sol_qalloc.470.exit ], [ %"2107.0", %cond_exit_13 ] - %"9_0.sroa.0.0" = phi i64 [ 0, %__hugr__.__tk2_sol_qalloc.470.exit ], [ %7, %cond_exit_13 ] - %6 = icmp samesign ugt i64 %"9_0.sroa.0.0", 19 - %7 = add nuw nsw i64 %"9_0.sroa.0.0", 1 - br i1 %6, label %cond_exit_13, label %cond_13_case_1 - -cond_13_case_1: ; preds = %loop_body - %8 = add i64 %"9_2.0", 1 - %qalloc.i1214 = tail call i64 @___qalloc() - %not_max.not.not.i1215 = icmp eq i64 %qalloc.i1214, -1 - br i1 %not_max.not.not.i1215, label %cond_474_case_0.i1216, label %__hugr__.__tk2_sol_qalloc.470.exit1217 - -cond_474_case_0.i1216: ; preds = %cond_13_case_1 - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_sol_qalloc.470.exit1217: ; preds = %cond_13_case_1 - tail call void @___reset(i64 %qalloc.i1214) - %9 = icmp ult i64 %"9_2.0", 20 - br i1 %9, label %__barray_check_bounds.exit, label %out_of_bounds.i - -out_of_bounds.i: ; preds = %__hugr__.__tk2_sol_qalloc.470.exit1217 - tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") - unreachable - -__barray_check_bounds.exit: ; preds = %__hugr__.__tk2_sol_qalloc.470.exit1217 - %10 = load i64, ptr %5, align 4 - %11 = lshr i64 %10, %"9_2.0" - %12 = trunc i64 %11 to i1 - br i1 %12, label %__barray_mask_return.exit, label %panic.i - -panic.i: ; preds = %__barray_check_bounds.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit: ; preds = %__barray_check_bounds.exit - %13 = shl nuw nsw i64 1, %"9_2.0" - %14 = xor i64 %10, %13 - store i64 %14, ptr %5, align 4 - %15 = getelementptr inbounds nuw i64, ptr %4, i64 %"9_2.0" - store i64 %qalloc.i1214, ptr %15, align 4 - br label %cond_exit_13 - -cond_exit_13: ; preds = %loop_body, %__barray_mask_return.exit - %"2107.0" = phi i64 [ %8, %__barray_mask_return.exit ], [ %"9_2.0", %loop_body ] - %exitcond = icmp eq i64 %7, 21 - br i1 %exitcond, label %__barray_check_bounds.exit1219, label %loop_body - -__barray_check_bounds.exit1219: ; preds = %cond_exit_13, %__barray_mask_return.exit1224 - %16 = phi i64 [ %28, %__barray_mask_return.exit1224 ], [ 1, %cond_exit_13 ] - %"114_0.01276" = phi i64 [ %16, %__barray_mask_return.exit1224 ], [ 0, %cond_exit_13 ] - %17 = load i64, ptr %5, align 4 - %18 = lshr i64 %17, %"114_0.01276" - %19 = trunc i64 %18 to i1 - br i1 %19, label %panic.i1220, label %__barray_check_bounds.exit1222 - -panic.i1220: ; preds = %__barray_check_bounds.exit1219 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1222: ; preds = %__barray_check_bounds.exit1219 - %20 = shl nuw nsw i64 1, %"114_0.01276" - %21 = xor i64 %17, %20 - store i64 %21, ptr %5, align 4 - %22 = getelementptr inbounds nuw i64, ptr %4, i64 %"114_0.01276" - %23 = load i64, ptr %22, align 4 - tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rpp(i64 %qalloc.i, i64 %23, double 0x3FF921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %23, double 0xBFF921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %qalloc.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18) - %24 = load i64, ptr %5, align 4 - %25 = lshr i64 %24, %"114_0.01276" - %26 = trunc i64 %25 to i1 - br i1 %26, label %__barray_mask_return.exit1224, label %panic.i1223 - -panic.i1223: ; preds = %__barray_check_bounds.exit1222 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1224: ; preds = %__barray_check_bounds.exit1222 - %27 = xor i64 %24, %20 - store i64 %27, ptr %5, align 4 - store i64 %23, ptr %22, align 4 - %28 = add nuw nsw i64 %16, 1 - %exitcond1279 = icmp eq i64 %28, 21 - br i1 %exitcond1279, label %cond_exit_185, label %__barray_check_bounds.exit1219 - -cond_exit_185: ; preds = %__barray_mask_return.exit1224 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) - tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure_leaked) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - %29 = icmp eq i64 %read_uint, 2 - br i1 %29, label %30, label %cond_exit_256 - -cond_exit_256: ; preds = %cond_exit_185 - %read_uint350 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - %.not = icmp eq i64 %read_uint350, 2 - br i1 %.not, label %cond_236_case_0, label %cond_236_case_1 - -30: ; preds = %cond_exit_185 - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - tail call void @print_int(ptr nonnull @res_head_leake.F4F32972.0, i64 20, i64 1) - br label %__barray_check_bounds.exit1230.preheader - -__barray_check_bounds.exit1230.preheader: ; preds = %cond_236_case_1, %30 - br label %__barray_check_bounds.exit1230 - -cond_236_case_1: ; preds = %cond_exit_256 - %31 = icmp eq i64 %read_uint350, 1 - tail call void @print_bool(ptr nonnull @res_head.AFE8E005.0, i64 14, i1 %31) - br label %__barray_check_bounds.exit1230.preheader - -cond_236_case_0: ; preds = %cond_exit_256 - tail call void @panic(i32 1001, ptr nonnull @e_Option.unw.32D4E82D.0) - unreachable - -out_of_bounds.i1225: ; preds = %.thread - tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") - unreachable - -__barray_check_bounds.exit1226: ; preds = %.thread - %32 = load i64, ptr %3, align 4 - %33 = lshr i64 %32, %"298_2.01283" - %34 = trunc i64 %33 to i1 - br i1 %34, label %cond_exit_302, label %panic.i1227 - -panic.i1227: ; preds = %__barray_check_bounds.exit1226 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -mask_block_ok.i: ; preds = %cond_exit_302 - %35 = load i64, ptr %5, align 4 - %36 = or i64 %35, -1048576 - store i64 %36, ptr %5, align 4 - %37 = icmp eq i64 %36, -1 - br i1 %37, label %loop_body510.preheader.preheader, label %mask_block_err.i - -mask_block_err.i: ; preds = %mask_block_ok.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_check_bounds.exit1230: ; preds = %__barray_check_bounds.exit1230.preheader, %cond_exit_302 - %"298_0.sroa.15.01284" = phi i64 [ %38, %cond_exit_302 ], [ 0, %__barray_check_bounds.exit1230.preheader ] - %"298_2.01283" = phi i64 [ %46, %cond_exit_302 ], [ 0, %__barray_check_bounds.exit1230.preheader ] - %38 = add nuw nsw i64 %"298_0.sroa.15.01284", 1 - %39 = load i64, ptr %5, align 4 - %40 = lshr i64 %39, %"298_0.sroa.15.01284" - %41 = trunc i64 %40 to i1 - br i1 %41, label %panic.i1231, label %.thread - -panic.i1231: ; preds = %__barray_check_bounds.exit1230 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -.thread: ; preds = %__barray_check_bounds.exit1230 - %42 = shl nuw nsw i64 1, %"298_0.sroa.15.01284" - %43 = xor i64 %39, %42 - store i64 %43, ptr %5, align 4 - %44 = getelementptr inbounds nuw i64, ptr %4, i64 %"298_0.sroa.15.01284" - %45 = load i64, ptr %44, align 4 - %46 = add i64 %"298_2.01283", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %45) - tail call void @___qfree(i64 %45) - %47 = icmp ult i64 %"298_2.01283", 20 - br i1 %47, label %__barray_check_bounds.exit1226, label %out_of_bounds.i1225 - -cond_exit_302: ; preds = %__barray_check_bounds.exit1226 - %48 = shl nuw nsw i64 1, %"298_2.01283" - %49 = xor i64 %32, %48 - store i64 %49, ptr %3, align 4 - %50 = getelementptr inbounds nuw i64, ptr %2, i64 %"298_2.01283" - store i64 %lazy_measure, ptr %50, align 4 - %51 = icmp samesign ugt i64 %"298_0.sroa.15.01284", 18 - br i1 %51, label %mask_block_ok.i, label %__barray_check_bounds.exit1230 - -loop_body510.preheader.preheader: ; preds = %mask_block_ok.i - tail call void @heap_free(ptr nonnull %4) - tail call void @heap_free(ptr nonnull %5) - br label %__barray_check_bounds.exit1234 - -__barray_check_bounds.exit1234: ; preds = %cond_exit_368, %loop_body510.preheader.preheader - %"364_0.sroa.15.01278" = phi i64 [ %52, %cond_exit_368 ], [ 0, %loop_body510.preheader.preheader ] - %52 = add nuw nsw i64 %"364_0.sroa.15.01278", 1 - %53 = load i64, ptr %3, align 4 - %54 = lshr i64 %53, %"364_0.sroa.15.01278" - %55 = trunc i64 %54 to i1 - br i1 %55, label %panic.i1235, label %__barray_check_bounds.exit1238 - -panic.i1235: ; preds = %__barray_check_bounds.exit1234 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1238: ; preds = %__barray_check_bounds.exit1234 - %56 = shl nuw nsw i64 1, %"364_0.sroa.15.01278" - %57 = xor i64 %53, %56 - store i64 %57, ptr %3, align 4 - %58 = getelementptr inbounds nuw i64, ptr %2, i64 %"364_0.sroa.15.01278" - %59 = load i64, ptr %58, align 4 - tail call void @___inc_future_refcount(i64 %59) - %60 = load i64, ptr %3, align 4 - %61 = lshr i64 %60, %"364_0.sroa.15.01278" - %62 = trunc i64 %61 to i1 - br i1 %62, label %__barray_check_bounds.exit1242, label %panic.i1239 - -panic.i1239: ; preds = %__barray_check_bounds.exit1238 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_check_bounds.exit1242: ; preds = %__barray_check_bounds.exit1238 - %63 = xor i64 %60, %56 - store i64 %63, ptr %3, align 4 - store i64 %59, ptr %58, align 4 - %read_bool = tail call i1 @___read_future_bool(i64 %59) - tail call void @___dec_future_refcount(i64 %59) - %64 = load i64, ptr %1, align 4 - %65 = lshr i64 %64, %"364_0.sroa.15.01278" - %66 = trunc i64 %65 to i1 - br i1 %66, label %cond_exit_368, label %panic.i1243 - -panic.i1243: ; preds = %__barray_check_bounds.exit1242 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -cond_549_case_0: ; preds = %cond_exit_549 - %67 = load i64, ptr %3, align 4 - %68 = or i64 %67, -1048576 - store i64 %68, ptr %3, align 4 - %69 = icmp eq i64 %68, -1 - br i1 %69, label %loop_out509, label %mask_block_err.i1248 - -mask_block_err.i1248: ; preds = %cond_549_case_0 - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_check_bounds.exit1252: ; preds = %cond_exit_368, %cond_exit_549 - %"546_0.01285" = phi i64 [ %70, %cond_exit_549 ], [ 0, %cond_exit_368 ] - %70 = add nuw nsw i64 %"546_0.01285", 1 - %71 = load i64, ptr %3, align 4 - %72 = lshr i64 %71, %"546_0.01285" - %73 = trunc i64 %72 to i1 - br i1 %73, label %cond_exit_549, label %__barray_mask_borrow.exit1256 - -__barray_mask_borrow.exit1256: ; preds = %__barray_check_bounds.exit1252 - %74 = shl nuw nsw i64 1, %"546_0.01285" - %75 = xor i64 %71, %74 - store i64 %75, ptr %3, align 4 - %76 = getelementptr inbounds nuw i64, ptr %2, i64 %"546_0.01285" - %77 = load i64, ptr %76, align 4 - tail call void @___dec_future_refcount(i64 %77) - br label %cond_exit_549 - -cond_exit_549: ; preds = %__barray_mask_borrow.exit1256, %__barray_check_bounds.exit1252 - %78 = icmp samesign ugt i64 %"546_0.01285", 18 - br i1 %78, label %cond_549_case_0, label %__barray_check_bounds.exit1252 - -cond_exit_368: ; preds = %__barray_check_bounds.exit1242 - %79 = xor i64 %64, %56 - store i64 %79, ptr %1, align 4 - %80 = getelementptr inbounds nuw i1, ptr %0, i64 %"364_0.sroa.15.01278" - store i1 %read_bool, ptr %80, align 1 - %81 = icmp eq i64 %"364_0.sroa.15.01278", 19 - br i1 %81, label %__barray_check_bounds.exit1252, label %__barray_check_bounds.exit1234 - -loop_out509: ; preds = %cond_549_case_0 - tail call void @heap_free(ptr %2) - tail call void @heap_free(ptr nonnull %3) - %82 = load i64, ptr %1, align 4 - %83 = and i64 %82, 1048575 - store i64 %83, ptr %1, align 4 - %84 = icmp eq i64 %83, 0 - br i1 %84, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1257 - -mask_block_err.i1257: ; preds = %loop_out509 - tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") - unreachable - -__barray_check_none_borrowed.exit: ; preds = %loop_out509 - %85 = tail call ptr @heap_alloc(i64 20) - %86 = tail call ptr @heap_alloc(i64 8) - store i64 0, ptr %86, align 1 - tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(20) %85, ptr noundef nonnull align 1 dereferenceable(20) %0, i64 20, i1 false) - tail call void @heap_free(ptr nonnull %85) - %87 = load i64, ptr %1, align 4 - %88 = and i64 %87, 1048575 - store i64 %88, ptr %1, align 4 - %89 = icmp eq i64 %88, 0 - br i1 %89, label %__barray_check_none_borrowed.exit1261, label %mask_block_err.i1259 - -mask_block_err.i1259: ; preds = %__barray_check_none_borrowed.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") - unreachable - -__barray_check_none_borrowed.exit1261: ; preds = %__barray_check_none_borrowed.exit - %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 - %y_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 4 - %arr_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 8 - %mask_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 16 - %90 = alloca [20 x i1], align 1 - call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(20) %90, i8 0, i64 20, i1 false) - store i32 20, ptr %out_arr_alloca, align 8 - store i32 1, ptr %y_ptr, align 4 - store ptr %0, ptr %arr_ptr, align 8 - store ptr %90, ptr %mask_ptr, align 8 - call void @print_bool_arr(ptr nonnull @res_tail.AD5A440E.0, i64 17, ptr nonnull %out_arr_alloca) - ret void -} - -declare ptr @heap_alloc(i64) local_unnamed_addr - -; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) -declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immarg) #0 - -; Function Attrs: noreturn -declare void @panic(i32, ptr) local_unnamed_addr #1 - -declare i64 @___lazy_measure_leaked(i64) local_unnamed_addr - -declare void @___qfree(i64) local_unnamed_addr - -declare void @___inc_future_refcount(i64) local_unnamed_addr - -declare i64 @___read_future_uint(i64) local_unnamed_addr - -declare void @___dec_future_refcount(i64) local_unnamed_addr - -declare void @print_int(ptr, i64, i64) local_unnamed_addr - -declare void @print_bool(ptr, i64, i1) local_unnamed_addr - -declare void @heap_free(ptr) local_unnamed_addr - -declare i64 @___lazy_measure(i64) local_unnamed_addr - -declare i1 @___read_future_bool(i64) local_unnamed_addr - -; Function Attrs: mustprogress 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) #2 - -declare void @print_bool_arr(ptr, i64, ptr) local_unnamed_addr - -declare i64 @___qalloc() local_unnamed_addr - -declare void @___reset(i64) local_unnamed_addr - -declare void @___rp(i64, double, double) local_unnamed_addr - -declare void @___rz(i64, double) local_unnamed_addr - -declare void @___rpp(i64, i64, double, double) local_unnamed_addr - -define i64 @qmain(i64 %0) local_unnamed_addr { -entry: - tail call void @setup(i64 %0) - tail call void @__hugr__.__main__.main.1() - %1 = tail call i64 @teardown() - ret i64 %1 -} - -declare void @setup(i64) local_unnamed_addr - -declare i64 @teardown() local_unnamed_addr - -attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } -attributes #1 = { noreturn } -attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) } - -!name = !{!0} - -!0 = !{!"mainlib"} diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_from_head-sol-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_from_head-sol-x86_64-windows-gnu.ll deleted file mode 100644 index b3374a98..00000000 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_from_head-sol-x86_64-windows-gnu.ll +++ /dev/null @@ -1,415 +0,0 @@ -; ModuleID = 'hugr' -source_filename = "hugr" -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-gnu" - -@"e_Index out .DD115165.0" = private constant [29 x i8] c"\1CEXIT:INT:Index out of bounds" -@"e_Array alre.5A300C2A.0" = private constant [57 x i8] c"8EXIT:INT:Array already contains an element at this index" -@e_Option.unw.32D4E82D.0 = private constant [43 x i8] c"*EXIT:INT:Option.unwrap: value is `Nothing`" -@"e_Array elem.E746B1A3.0" = private constant [43 x i8] c"*EXIT:INT:Array element is already borrowed" -@res_head_leake.F4F32972.0 = private constant [21 x i8] c"\14USER:INT:head_leaked" -@res_head.AFE8E005.0 = private constant [15 x i8] c"\0EUSER:BOOL:head" -@"e_Array cont.EFA5AC45.0" = private constant [70 x i8] c"EEXIT:INT:Array contains non-borrowed elements and cannot be discarded" -@"e_Some array.A77EF32E.0" = private constant [48 x i8] c"/EXIT:INT:Some array elements have been borrowed" -@res_tail.AD5A440E.0 = private constant [18 x i8] c"\11USER:BOOLARR:tail" -@"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." - -define void @__hugr__.__main__.main.1() local_unnamed_addr { -alloca_block: - %0 = tail call ptr @heap_alloc(i64 20) - %1 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %1, align 1 - %2 = tail call ptr @heap_alloc(i64 160) - %3 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %3, align 1 - %4 = tail call ptr @heap_alloc(i64 160) - %5 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %5, align 1 - %qalloc.i = tail call i64 @___qalloc() - %not_max.not.not.i = icmp eq i64 %qalloc.i, -1 - br i1 %not_max.not.not.i, label %cond_474_case_0.i, label %__hugr__.__tk2_sol_qalloc.470.exit - -cond_474_case_0.i: ; preds = %alloca_block - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_sol_qalloc.470.exit: ; preds = %alloca_block - tail call void @___reset(i64 %qalloc.i) - tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - br label %loop_body - -loop_body: ; preds = %cond_exit_13, %__hugr__.__tk2_sol_qalloc.470.exit - %"9_2.0" = phi i64 [ 0, %__hugr__.__tk2_sol_qalloc.470.exit ], [ %"2107.0", %cond_exit_13 ] - %"9_0.sroa.0.0" = phi i64 [ 0, %__hugr__.__tk2_sol_qalloc.470.exit ], [ %7, %cond_exit_13 ] - %6 = icmp samesign ugt i64 %"9_0.sroa.0.0", 19 - %7 = add nuw nsw i64 %"9_0.sroa.0.0", 1 - br i1 %6, label %cond_exit_13, label %cond_13_case_1 - -cond_13_case_1: ; preds = %loop_body - %8 = add i64 %"9_2.0", 1 - %qalloc.i1214 = tail call i64 @___qalloc() - %not_max.not.not.i1215 = icmp eq i64 %qalloc.i1214, -1 - br i1 %not_max.not.not.i1215, label %cond_474_case_0.i1216, label %__hugr__.__tk2_sol_qalloc.470.exit1217 - -cond_474_case_0.i1216: ; preds = %cond_13_case_1 - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_sol_qalloc.470.exit1217: ; preds = %cond_13_case_1 - tail call void @___reset(i64 %qalloc.i1214) - %9 = icmp ult i64 %"9_2.0", 20 - br i1 %9, label %__barray_check_bounds.exit, label %out_of_bounds.i - -out_of_bounds.i: ; preds = %__hugr__.__tk2_sol_qalloc.470.exit1217 - tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") - unreachable - -__barray_check_bounds.exit: ; preds = %__hugr__.__tk2_sol_qalloc.470.exit1217 - %10 = load i64, ptr %5, align 4 - %11 = lshr i64 %10, %"9_2.0" - %12 = trunc i64 %11 to i1 - br i1 %12, label %__barray_mask_return.exit, label %panic.i - -panic.i: ; preds = %__barray_check_bounds.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit: ; preds = %__barray_check_bounds.exit - %13 = shl nuw nsw i64 1, %"9_2.0" - %14 = xor i64 %10, %13 - store i64 %14, ptr %5, align 4 - %15 = getelementptr inbounds nuw i64, ptr %4, i64 %"9_2.0" - store i64 %qalloc.i1214, ptr %15, align 4 - br label %cond_exit_13 - -cond_exit_13: ; preds = %loop_body, %__barray_mask_return.exit - %"2107.0" = phi i64 [ %8, %__barray_mask_return.exit ], [ %"9_2.0", %loop_body ] - %exitcond = icmp eq i64 %7, 21 - br i1 %exitcond, label %__barray_check_bounds.exit1219, label %loop_body - -__barray_check_bounds.exit1219: ; preds = %cond_exit_13, %__barray_mask_return.exit1224 - %16 = phi i64 [ %28, %__barray_mask_return.exit1224 ], [ 1, %cond_exit_13 ] - %"114_0.01276" = phi i64 [ %16, %__barray_mask_return.exit1224 ], [ 0, %cond_exit_13 ] - %17 = load i64, ptr %5, align 4 - %18 = lshr i64 %17, %"114_0.01276" - %19 = trunc i64 %18 to i1 - br i1 %19, label %panic.i1220, label %__barray_check_bounds.exit1222 - -panic.i1220: ; preds = %__barray_check_bounds.exit1219 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1222: ; preds = %__barray_check_bounds.exit1219 - %20 = shl nuw nsw i64 1, %"114_0.01276" - %21 = xor i64 %17, %20 - store i64 %21, ptr %5, align 4 - %22 = getelementptr inbounds nuw i64, ptr %4, i64 %"114_0.01276" - %23 = load i64, ptr %22, align 4 - tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rpp(i64 %qalloc.i, i64 %23, double 0x3FF921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %23, double 0xBFF921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %qalloc.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18) - %24 = load i64, ptr %5, align 4 - %25 = lshr i64 %24, %"114_0.01276" - %26 = trunc i64 %25 to i1 - br i1 %26, label %__barray_mask_return.exit1224, label %panic.i1223 - -panic.i1223: ; preds = %__barray_check_bounds.exit1222 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1224: ; preds = %__barray_check_bounds.exit1222 - %27 = xor i64 %24, %20 - store i64 %27, ptr %5, align 4 - store i64 %23, ptr %22, align 4 - %28 = add nuw nsw i64 %16, 1 - %exitcond1279 = icmp eq i64 %28, 21 - br i1 %exitcond1279, label %cond_exit_185, label %__barray_check_bounds.exit1219 - -cond_exit_185: ; preds = %__barray_mask_return.exit1224 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) - tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure_leaked) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - %29 = icmp eq i64 %read_uint, 2 - br i1 %29, label %30, label %cond_exit_256 - -cond_exit_256: ; preds = %cond_exit_185 - %read_uint350 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - %.not = icmp eq i64 %read_uint350, 2 - br i1 %.not, label %cond_236_case_0, label %cond_236_case_1 - -30: ; preds = %cond_exit_185 - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - tail call void @print_int(ptr nonnull @res_head_leake.F4F32972.0, i64 20, i64 1) - br label %__barray_check_bounds.exit1230.preheader - -__barray_check_bounds.exit1230.preheader: ; preds = %cond_236_case_1, %30 - br label %__barray_check_bounds.exit1230 - -cond_236_case_1: ; preds = %cond_exit_256 - %31 = icmp eq i64 %read_uint350, 1 - tail call void @print_bool(ptr nonnull @res_head.AFE8E005.0, i64 14, i1 %31) - br label %__barray_check_bounds.exit1230.preheader - -cond_236_case_0: ; preds = %cond_exit_256 - tail call void @panic(i32 1001, ptr nonnull @e_Option.unw.32D4E82D.0) - unreachable - -out_of_bounds.i1225: ; preds = %.thread - tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") - unreachable - -__barray_check_bounds.exit1226: ; preds = %.thread - %32 = load i64, ptr %3, align 4 - %33 = lshr i64 %32, %"298_2.01283" - %34 = trunc i64 %33 to i1 - br i1 %34, label %cond_exit_302, label %panic.i1227 - -panic.i1227: ; preds = %__barray_check_bounds.exit1226 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -mask_block_ok.i: ; preds = %cond_exit_302 - %35 = load i64, ptr %5, align 4 - %36 = or i64 %35, -1048576 - store i64 %36, ptr %5, align 4 - %37 = icmp eq i64 %36, -1 - br i1 %37, label %loop_body510.preheader.preheader, label %mask_block_err.i - -mask_block_err.i: ; preds = %mask_block_ok.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_check_bounds.exit1230: ; preds = %__barray_check_bounds.exit1230.preheader, %cond_exit_302 - %"298_0.sroa.15.01284" = phi i64 [ %38, %cond_exit_302 ], [ 0, %__barray_check_bounds.exit1230.preheader ] - %"298_2.01283" = phi i64 [ %46, %cond_exit_302 ], [ 0, %__barray_check_bounds.exit1230.preheader ] - %38 = add nuw nsw i64 %"298_0.sroa.15.01284", 1 - %39 = load i64, ptr %5, align 4 - %40 = lshr i64 %39, %"298_0.sroa.15.01284" - %41 = trunc i64 %40 to i1 - br i1 %41, label %panic.i1231, label %.thread - -panic.i1231: ; preds = %__barray_check_bounds.exit1230 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -.thread: ; preds = %__barray_check_bounds.exit1230 - %42 = shl nuw nsw i64 1, %"298_0.sroa.15.01284" - %43 = xor i64 %39, %42 - store i64 %43, ptr %5, align 4 - %44 = getelementptr inbounds nuw i64, ptr %4, i64 %"298_0.sroa.15.01284" - %45 = load i64, ptr %44, align 4 - %46 = add i64 %"298_2.01283", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %45) - tail call void @___qfree(i64 %45) - %47 = icmp ult i64 %"298_2.01283", 20 - br i1 %47, label %__barray_check_bounds.exit1226, label %out_of_bounds.i1225 - -cond_exit_302: ; preds = %__barray_check_bounds.exit1226 - %48 = shl nuw nsw i64 1, %"298_2.01283" - %49 = xor i64 %32, %48 - store i64 %49, ptr %3, align 4 - %50 = getelementptr inbounds nuw i64, ptr %2, i64 %"298_2.01283" - store i64 %lazy_measure, ptr %50, align 4 - %51 = icmp samesign ugt i64 %"298_0.sroa.15.01284", 18 - br i1 %51, label %mask_block_ok.i, label %__barray_check_bounds.exit1230 - -loop_body510.preheader.preheader: ; preds = %mask_block_ok.i - tail call void @heap_free(ptr nonnull %4) - tail call void @heap_free(ptr nonnull %5) - br label %__barray_check_bounds.exit1234 - -__barray_check_bounds.exit1234: ; preds = %cond_exit_368, %loop_body510.preheader.preheader - %"364_0.sroa.15.01278" = phi i64 [ %52, %cond_exit_368 ], [ 0, %loop_body510.preheader.preheader ] - %52 = add nuw nsw i64 %"364_0.sroa.15.01278", 1 - %53 = load i64, ptr %3, align 4 - %54 = lshr i64 %53, %"364_0.sroa.15.01278" - %55 = trunc i64 %54 to i1 - br i1 %55, label %panic.i1235, label %__barray_check_bounds.exit1238 - -panic.i1235: ; preds = %__barray_check_bounds.exit1234 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1238: ; preds = %__barray_check_bounds.exit1234 - %56 = shl nuw nsw i64 1, %"364_0.sroa.15.01278" - %57 = xor i64 %53, %56 - store i64 %57, ptr %3, align 4 - %58 = getelementptr inbounds nuw i64, ptr %2, i64 %"364_0.sroa.15.01278" - %59 = load i64, ptr %58, align 4 - tail call void @___inc_future_refcount(i64 %59) - %60 = load i64, ptr %3, align 4 - %61 = lshr i64 %60, %"364_0.sroa.15.01278" - %62 = trunc i64 %61 to i1 - br i1 %62, label %__barray_check_bounds.exit1242, label %panic.i1239 - -panic.i1239: ; preds = %__barray_check_bounds.exit1238 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_check_bounds.exit1242: ; preds = %__barray_check_bounds.exit1238 - %63 = xor i64 %60, %56 - store i64 %63, ptr %3, align 4 - store i64 %59, ptr %58, align 4 - %read_bool = tail call i1 @___read_future_bool(i64 %59) - tail call void @___dec_future_refcount(i64 %59) - %64 = load i64, ptr %1, align 4 - %65 = lshr i64 %64, %"364_0.sroa.15.01278" - %66 = trunc i64 %65 to i1 - br i1 %66, label %cond_exit_368, label %panic.i1243 - -panic.i1243: ; preds = %__barray_check_bounds.exit1242 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -cond_549_case_0: ; preds = %cond_exit_549 - %67 = load i64, ptr %3, align 4 - %68 = or i64 %67, -1048576 - store i64 %68, ptr %3, align 4 - %69 = icmp eq i64 %68, -1 - br i1 %69, label %loop_out509, label %mask_block_err.i1248 - -mask_block_err.i1248: ; preds = %cond_549_case_0 - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_check_bounds.exit1252: ; preds = %cond_exit_368, %cond_exit_549 - %"546_0.01285" = phi i64 [ %70, %cond_exit_549 ], [ 0, %cond_exit_368 ] - %70 = add nuw nsw i64 %"546_0.01285", 1 - %71 = load i64, ptr %3, align 4 - %72 = lshr i64 %71, %"546_0.01285" - %73 = trunc i64 %72 to i1 - br i1 %73, label %cond_exit_549, label %__barray_mask_borrow.exit1256 - -__barray_mask_borrow.exit1256: ; preds = %__barray_check_bounds.exit1252 - %74 = shl nuw nsw i64 1, %"546_0.01285" - %75 = xor i64 %71, %74 - store i64 %75, ptr %3, align 4 - %76 = getelementptr inbounds nuw i64, ptr %2, i64 %"546_0.01285" - %77 = load i64, ptr %76, align 4 - tail call void @___dec_future_refcount(i64 %77) - br label %cond_exit_549 - -cond_exit_549: ; preds = %__barray_mask_borrow.exit1256, %__barray_check_bounds.exit1252 - %78 = icmp samesign ugt i64 %"546_0.01285", 18 - br i1 %78, label %cond_549_case_0, label %__barray_check_bounds.exit1252 - -cond_exit_368: ; preds = %__barray_check_bounds.exit1242 - %79 = xor i64 %64, %56 - store i64 %79, ptr %1, align 4 - %80 = getelementptr inbounds nuw i1, ptr %0, i64 %"364_0.sroa.15.01278" - store i1 %read_bool, ptr %80, align 1 - %81 = icmp eq i64 %"364_0.sroa.15.01278", 19 - br i1 %81, label %__barray_check_bounds.exit1252, label %__barray_check_bounds.exit1234 - -loop_out509: ; preds = %cond_549_case_0 - tail call void @heap_free(ptr %2) - tail call void @heap_free(ptr nonnull %3) - %82 = load i64, ptr %1, align 4 - %83 = and i64 %82, 1048575 - store i64 %83, ptr %1, align 4 - %84 = icmp eq i64 %83, 0 - br i1 %84, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1257 - -mask_block_err.i1257: ; preds = %loop_out509 - tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") - unreachable - -__barray_check_none_borrowed.exit: ; preds = %loop_out509 - %85 = tail call ptr @heap_alloc(i64 20) - %86 = tail call ptr @heap_alloc(i64 8) - store i64 0, ptr %86, align 1 - tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(20) %85, ptr noundef nonnull align 1 dereferenceable(20) %0, i64 20, i1 false) - tail call void @heap_free(ptr nonnull %85) - %87 = load i64, ptr %1, align 4 - %88 = and i64 %87, 1048575 - store i64 %88, ptr %1, align 4 - %89 = icmp eq i64 %88, 0 - br i1 %89, label %__barray_check_none_borrowed.exit1261, label %mask_block_err.i1259 - -mask_block_err.i1259: ; preds = %__barray_check_none_borrowed.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") - unreachable - -__barray_check_none_borrowed.exit1261: ; preds = %__barray_check_none_borrowed.exit - %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 - %y_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 4 - %arr_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 8 - %mask_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 16 - %90 = alloca [20 x i1], align 1 - call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(20) %90, i8 0, i64 20, i1 false) - store i32 20, ptr %out_arr_alloca, align 8 - store i32 1, ptr %y_ptr, align 4 - store ptr %0, ptr %arr_ptr, align 8 - store ptr %90, ptr %mask_ptr, align 8 - call void @print_bool_arr(ptr nonnull @res_tail.AD5A440E.0, i64 17, ptr nonnull %out_arr_alloca) - ret void -} - -declare ptr @heap_alloc(i64) local_unnamed_addr - -; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) -declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immarg) #0 - -; Function Attrs: noreturn -declare void @panic(i32, ptr) local_unnamed_addr #1 - -declare i64 @___lazy_measure_leaked(i64) local_unnamed_addr - -declare void @___qfree(i64) local_unnamed_addr - -declare void @___inc_future_refcount(i64) local_unnamed_addr - -declare i64 @___read_future_uint(i64) local_unnamed_addr - -declare void @___dec_future_refcount(i64) local_unnamed_addr - -declare void @print_int(ptr, i64, i64) local_unnamed_addr - -declare void @print_bool(ptr, i64, i1) local_unnamed_addr - -declare void @heap_free(ptr) local_unnamed_addr - -declare i64 @___lazy_measure(i64) local_unnamed_addr - -declare i1 @___read_future_bool(i64) local_unnamed_addr - -; Function Attrs: mustprogress 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) #2 - -declare void @print_bool_arr(ptr, i64, ptr) local_unnamed_addr - -declare i64 @___qalloc() local_unnamed_addr - -declare void @___reset(i64) local_unnamed_addr - -declare void @___rp(i64, double, double) local_unnamed_addr - -declare void @___rz(i64, double) local_unnamed_addr - -declare void @___rpp(i64, i64, double, double) local_unnamed_addr - -define i64 @qmain(i64 %0) local_unnamed_addr { -entry: - tail call void @setup(i64 %0) - tail call void @__hugr__.__main__.main.1() - %1 = tail call i64 @teardown() - ret i64 %1 -} - -declare void @setup(i64) local_unnamed_addr - -declare i64 @teardown() local_unnamed_addr - -attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } -attributes #1 = { noreturn } -attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) } - -!name = !{!0} - -!0 = !{!"mainlib"} diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_from_head.sha256 b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_from_head.sha256 deleted file mode 100644 index df390a5e..00000000 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_from_head.sha256 +++ /dev/null @@ -1 +0,0 @@ -eb65e61bd03aca951c2c68c7d6f68558c55adbc92b6c60de0dbcc0a12c526ec5 \ No newline at end of file diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_within_tail-helios-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_within_tail-helios-aarch64-apple-darwin.ll deleted file mode 100644 index e366a73c..00000000 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_within_tail-helios-aarch64-apple-darwin.ll +++ /dev/null @@ -1,456 +0,0 @@ -; ModuleID = 'hugr' -source_filename = "hugr" -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_Index out .DD115165.0" = private constant [29 x i8] c"\1CEXIT:INT:Index out of bounds" -@"e_Array alre.5A300C2A.0" = private constant [57 x i8] c"8EXIT:INT:Array already contains an element at this index" -@"e_Array elem.E746B1A3.0" = private constant [43 x i8] c"*EXIT:INT:Array element is already borrowed" -@e_Option.unw.32D4E82D.0 = private constant [43 x i8] c"*EXIT:INT:Option.unwrap: value is `Nothing`" -@res_head_leake.F4F32972.0 = private constant [21 x i8] c"\14USER:INT:head_leaked" -@res_head.AFE8E005.0 = private constant [15 x i8] c"\0EUSER:BOOL:head" -@"e_Array cont.EFA5AC45.0" = private constant [70 x i8] c"EEXIT:INT:Array contains non-borrowed elements and cannot be discarded" -@"e_Some array.A77EF32E.0" = private constant [48 x i8] c"/EXIT:INT:Some array elements have been borrowed" -@res_tail.AD5A440E.0 = private constant [18 x i8] c"\11USER:BOOLARR:tail" -@"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." - -define void @__hugr__.__main__.main.1() local_unnamed_addr { -alloca_block: - %0 = tail call ptr @heap_alloc(i64 20) - %1 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %1, align 1 - %2 = tail call ptr @heap_alloc(i64 160) - %3 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %3, align 1 - %4 = tail call ptr @heap_alloc(i64 160) - %5 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %5, align 1 - %qalloc.i = tail call i64 @___qalloc() - %not_max.not.not.i = icmp eq i64 %qalloc.i, -1 - br i1 %not_max.not.not.i, label %cond_489_case_0.i, label %__hugr__.__tk2_helios_qalloc.485.exit - -cond_489_case_0.i: ; preds = %alloca_block - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_helios_qalloc.485.exit: ; preds = %alloca_block - tail call void @___reset(i64 %qalloc.i) - tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - br label %cond_13_case_1 - -cond_13_case_1: ; preds = %__hugr__.__tk2_helios_qalloc.485.exit, %cond_exit_13 - %"9_2.01321" = phi i64 [ 0, %__hugr__.__tk2_helios_qalloc.485.exit ], [ %6, %cond_exit_13 ] - %6 = add nuw nsw i64 %"9_2.01321", 1 - %qalloc.i1244 = tail call i64 @___qalloc() - %not_max.not.not.i1245 = icmp eq i64 %qalloc.i1244, -1 - br i1 %not_max.not.not.i1245, label %cond_489_case_0.i1246, label %__barray_check_bounds.exit - -cond_489_case_0.i1246: ; preds = %cond_13_case_1 - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__barray_check_bounds.exit: ; preds = %cond_13_case_1 - tail call void @___reset(i64 %qalloc.i1244) - %7 = load i64, ptr %5, align 4 - %8 = lshr i64 %7, %"9_2.01321" - %9 = trunc i64 %8 to i1 - br i1 %9, label %cond_exit_13, label %panic.i - -panic.i: ; preds = %__barray_check_bounds.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -cond_exit_13: ; preds = %__barray_check_bounds.exit - %10 = shl nuw nsw i64 1, %"9_2.01321" - %11 = xor i64 %7, %10 - store i64 %11, ptr %5, align 4 - %12 = getelementptr inbounds nuw i64, ptr %4, i64 %"9_2.01321" - store i64 %qalloc.i1244, ptr %12, align 4 - %exitcond = icmp eq i64 %6, 20 - br i1 %exitcond, label %loop_out, label %cond_13_case_1 - -loop_out: ; preds = %cond_exit_13 - %13 = load i64, ptr %5, align 4 - %14 = trunc i64 %13 to i1 - br i1 %14, label %panic.i1248, label %__barray_mask_borrow.exit - -panic.i1248: ; preds = %loop_out - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit: ; preds = %loop_out - %15 = or disjoint i64 %13, 1 - store i64 %15, ptr %5, align 4 - %16 = load i64, ptr %4, align 4 - tail call void @___rxy(i64 %16, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rzz(i64 %qalloc.i, i64 %16, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18) - tail call void @___rxy(i64 %16, double 0x3FF921FB54442D18, double 0x400921FB54442D18) - tail call void @___rz(i64 %16, double 0xBFF921FB54442D18) - %17 = load i64, ptr %5, align 4 - %18 = trunc i64 %17 to i1 - br i1 %18, label %__barray_mask_return.exit1250, label %panic.i1249 - -panic.i1249: ; preds = %__barray_mask_borrow.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1250: ; preds = %__barray_mask_borrow.exit - %19 = and i64 %17, -2 - store i64 %19, ptr %5, align 4 - store i64 %16, ptr %4, align 4 - br label %__barray_check_bounds.exit1252 - -__barray_check_bounds.exit1252: ; preds = %__barray_mask_return.exit1250, %__barray_mask_return.exit1268 - %20 = phi i64 [ 1, %__barray_mask_return.exit1250 ], [ %42, %__barray_mask_return.exit1268 ] - %"118_0.01322" = phi i64 [ 0, %__barray_mask_return.exit1250 ], [ %20, %__barray_mask_return.exit1268 ] - %21 = load i64, ptr %5, align 4 - %22 = lshr i64 %21, %"118_0.01322" - %23 = trunc i64 %22 to i1 - br i1 %23, label %panic.i1253, label %__barray_check_bounds.exit1256 - -panic.i1253: ; preds = %__barray_check_bounds.exit1252 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1256: ; preds = %__barray_check_bounds.exit1252 - %24 = shl nuw nsw i64 1, %"118_0.01322" - %25 = xor i64 %21, %24 - store i64 %25, ptr %5, align 4 - %26 = getelementptr inbounds nuw i64, ptr %4, i64 %"118_0.01322" - %27 = load i64, ptr %26, align 4 - %28 = lshr i64 %25, %20 - %29 = trunc i64 %28 to i1 - br i1 %29, label %panic.i1257, label %__barray_check_bounds.exit1262 - -panic.i1257: ; preds = %__barray_check_bounds.exit1256 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1262: ; preds = %__barray_check_bounds.exit1256 - %30 = shl nuw nsw i64 2, %"118_0.01322" - %31 = xor i64 %25, %30 - store i64 %31, ptr %5, align 4 - %32 = getelementptr inbounds nuw i64, ptr %4, i64 %20 - %33 = load i64, ptr %32, align 4 - tail call void @___rxy(i64 %33, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rzz(i64 %27, i64 %33, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %27, double 0xBFF921FB54442D18) - tail call void @___rxy(i64 %33, double 0x3FF921FB54442D18, double 0x400921FB54442D18) - tail call void @___rz(i64 %33, double 0xBFF921FB54442D18) - %34 = load i64, ptr %5, align 4 - %35 = lshr i64 %34, %"118_0.01322" - %36 = trunc i64 %35 to i1 - br i1 %36, label %__barray_check_bounds.exit1266, label %panic.i1263 - -panic.i1263: ; preds = %__barray_check_bounds.exit1262 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_check_bounds.exit1266: ; preds = %__barray_check_bounds.exit1262 - %37 = xor i64 %34, %24 - store i64 %37, ptr %5, align 4 - store i64 %27, ptr %26, align 4 - %38 = load i64, ptr %5, align 4 - %39 = lshr i64 %38, %20 - %40 = trunc i64 %39 to i1 - br i1 %40, label %__barray_mask_return.exit1268, label %panic.i1267 - -panic.i1267: ; preds = %__barray_check_bounds.exit1266 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1268: ; preds = %__barray_check_bounds.exit1266 - %41 = xor i64 %38, %30 - store i64 %41, ptr %5, align 4 - store i64 %33, ptr %32, align 4 - %42 = add nuw nsw i64 %20, 1 - %exitcond1325 = icmp eq i64 %42, 20 - br i1 %exitcond1325, label %cond_exit_189, label %__barray_check_bounds.exit1252 - -cond_exit_189: ; preds = %__barray_mask_return.exit1268 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) - tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure_leaked) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - %43 = icmp eq i64 %read_uint, 2 - br i1 %43, label %44, label %cond_exit_267 - -cond_exit_267: ; preds = %cond_exit_189 - %read_uint378 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - %.not = icmp eq i64 %read_uint378, 2 - br i1 %.not, label %cond_247_case_0, label %cond_247_case_1 - -44: ; preds = %cond_exit_189 - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - tail call void @print_int(ptr nonnull @res_head_leake.F4F32972.0, i64 20, i64 1) - br label %__barray_check_bounds.exit1274.preheader - -__barray_check_bounds.exit1274.preheader: ; preds = %cond_247_case_1, %44 - br label %__barray_check_bounds.exit1274 - -cond_247_case_1: ; preds = %cond_exit_267 - %45 = icmp eq i64 %read_uint378, 1 - tail call void @print_bool(ptr nonnull @res_head.AFE8E005.0, i64 14, i1 %45) - br label %__barray_check_bounds.exit1274.preheader - -cond_247_case_0: ; preds = %cond_exit_267 - tail call void @panic(i32 1001, ptr nonnull @e_Option.unw.32D4E82D.0) - unreachable - -out_of_bounds.i1269: ; preds = %.thread - tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") - unreachable - -__barray_check_bounds.exit1270: ; preds = %.thread - %46 = load i64, ptr %3, align 4 - %47 = lshr i64 %46, %"310_2.01329" - %48 = trunc i64 %47 to i1 - br i1 %48, label %cond_exit_314, label %panic.i1271 - -panic.i1271: ; preds = %__barray_check_bounds.exit1270 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -mask_block_ok.i: ; preds = %cond_exit_314 - %49 = load i64, ptr %5, align 4 - %50 = or i64 %49, -1048576 - store i64 %50, ptr %5, align 4 - %51 = icmp eq i64 %50, -1 - br i1 %51, label %loop_body538.preheader.preheader, label %mask_block_err.i - -mask_block_err.i: ; preds = %mask_block_ok.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_check_bounds.exit1274: ; preds = %__barray_check_bounds.exit1274.preheader, %cond_exit_314 - %"310_0.sroa.15.01330" = phi i64 [ %52, %cond_exit_314 ], [ 0, %__barray_check_bounds.exit1274.preheader ] - %"310_2.01329" = phi i64 [ %60, %cond_exit_314 ], [ 0, %__barray_check_bounds.exit1274.preheader ] - %52 = add nuw nsw i64 %"310_0.sroa.15.01330", 1 - %53 = load i64, ptr %5, align 4 - %54 = lshr i64 %53, %"310_0.sroa.15.01330" - %55 = trunc i64 %54 to i1 - br i1 %55, label %panic.i1275, label %.thread - -panic.i1275: ; preds = %__barray_check_bounds.exit1274 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -.thread: ; preds = %__barray_check_bounds.exit1274 - %56 = shl nuw nsw i64 1, %"310_0.sroa.15.01330" - %57 = xor i64 %53, %56 - store i64 %57, ptr %5, align 4 - %58 = getelementptr inbounds nuw i64, ptr %4, i64 %"310_0.sroa.15.01330" - %59 = load i64, ptr %58, align 4 - %60 = add i64 %"310_2.01329", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %59) - tail call void @___qfree(i64 %59) - %61 = icmp ult i64 %"310_2.01329", 20 - br i1 %61, label %__barray_check_bounds.exit1270, label %out_of_bounds.i1269 - -cond_exit_314: ; preds = %__barray_check_bounds.exit1270 - %62 = shl nuw nsw i64 1, %"310_2.01329" - %63 = xor i64 %46, %62 - store i64 %63, ptr %3, align 4 - %64 = getelementptr inbounds nuw i64, ptr %2, i64 %"310_2.01329" - store i64 %lazy_measure, ptr %64, align 4 - %65 = icmp samesign ugt i64 %"310_0.sroa.15.01330", 18 - br i1 %65, label %mask_block_ok.i, label %__barray_check_bounds.exit1274 - -loop_body538.preheader.preheader: ; preds = %mask_block_ok.i - tail call void @heap_free(ptr nonnull %4) - tail call void @heap_free(ptr nonnull %5) - br label %__barray_check_bounds.exit1278 - -__barray_check_bounds.exit1278: ; preds = %cond_exit_380, %loop_body538.preheader.preheader - %"376_0.sroa.15.01324" = phi i64 [ %66, %cond_exit_380 ], [ 0, %loop_body538.preheader.preheader ] - %66 = add nuw nsw i64 %"376_0.sroa.15.01324", 1 - %67 = load i64, ptr %3, align 4 - %68 = lshr i64 %67, %"376_0.sroa.15.01324" - %69 = trunc i64 %68 to i1 - br i1 %69, label %panic.i1279, label %__barray_check_bounds.exit1282 - -panic.i1279: ; preds = %__barray_check_bounds.exit1278 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1282: ; preds = %__barray_check_bounds.exit1278 - %70 = shl nuw nsw i64 1, %"376_0.sroa.15.01324" - %71 = xor i64 %67, %70 - store i64 %71, ptr %3, align 4 - %72 = getelementptr inbounds nuw i64, ptr %2, i64 %"376_0.sroa.15.01324" - %73 = load i64, ptr %72, align 4 - tail call void @___inc_future_refcount(i64 %73) - %74 = load i64, ptr %3, align 4 - %75 = lshr i64 %74, %"376_0.sroa.15.01324" - %76 = trunc i64 %75 to i1 - br i1 %76, label %__barray_check_bounds.exit1286, label %panic.i1283 - -panic.i1283: ; preds = %__barray_check_bounds.exit1282 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_check_bounds.exit1286: ; preds = %__barray_check_bounds.exit1282 - %77 = xor i64 %74, %70 - store i64 %77, ptr %3, align 4 - store i64 %73, ptr %72, align 4 - %read_bool = tail call i1 @___read_future_bool(i64 %73) - tail call void @___dec_future_refcount(i64 %73) - %78 = load i64, ptr %1, align 4 - %79 = lshr i64 %78, %"376_0.sroa.15.01324" - %80 = trunc i64 %79 to i1 - br i1 %80, label %cond_exit_380, label %panic.i1287 - -panic.i1287: ; preds = %__barray_check_bounds.exit1286 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -cond_566_case_0: ; preds = %cond_exit_566 - %81 = load i64, ptr %3, align 4 - %82 = or i64 %81, -1048576 - store i64 %82, ptr %3, align 4 - %83 = icmp eq i64 %82, -1 - br i1 %83, label %loop_out537, label %mask_block_err.i1292 - -mask_block_err.i1292: ; preds = %cond_566_case_0 - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_check_bounds.exit1296: ; preds = %cond_exit_380, %cond_exit_566 - %"563_0.01331" = phi i64 [ %84, %cond_exit_566 ], [ 0, %cond_exit_380 ] - %84 = add nuw nsw i64 %"563_0.01331", 1 - %85 = load i64, ptr %3, align 4 - %86 = lshr i64 %85, %"563_0.01331" - %87 = trunc i64 %86 to i1 - br i1 %87, label %cond_exit_566, label %__barray_mask_borrow.exit1300 - -__barray_mask_borrow.exit1300: ; preds = %__barray_check_bounds.exit1296 - %88 = shl nuw nsw i64 1, %"563_0.01331" - %89 = xor i64 %85, %88 - store i64 %89, ptr %3, align 4 - %90 = getelementptr inbounds nuw i64, ptr %2, i64 %"563_0.01331" - %91 = load i64, ptr %90, align 4 - tail call void @___dec_future_refcount(i64 %91) - br label %cond_exit_566 - -cond_exit_566: ; preds = %__barray_mask_borrow.exit1300, %__barray_check_bounds.exit1296 - %92 = icmp samesign ugt i64 %"563_0.01331", 18 - br i1 %92, label %cond_566_case_0, label %__barray_check_bounds.exit1296 - -cond_exit_380: ; preds = %__barray_check_bounds.exit1286 - %93 = xor i64 %78, %70 - store i64 %93, ptr %1, align 4 - %94 = getelementptr inbounds nuw i1, ptr %0, i64 %"376_0.sroa.15.01324" - store i1 %read_bool, ptr %94, align 1 - %95 = icmp eq i64 %"376_0.sroa.15.01324", 19 - br i1 %95, label %__barray_check_bounds.exit1296, label %__barray_check_bounds.exit1278 - -loop_out537: ; preds = %cond_566_case_0 - tail call void @heap_free(ptr %2) - tail call void @heap_free(ptr nonnull %3) - %96 = load i64, ptr %1, align 4 - %97 = and i64 %96, 1048575 - store i64 %97, ptr %1, align 4 - %98 = icmp eq i64 %97, 0 - br i1 %98, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1301 - -mask_block_err.i1301: ; preds = %loop_out537 - tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") - unreachable - -__barray_check_none_borrowed.exit: ; preds = %loop_out537 - %99 = tail call ptr @heap_alloc(i64 20) - %100 = tail call ptr @heap_alloc(i64 8) - store i64 0, ptr %100, align 1 - tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(20) %99, ptr noundef nonnull align 1 dereferenceable(20) %0, i64 20, i1 false) - tail call void @heap_free(ptr nonnull %99) - %101 = load i64, ptr %1, align 4 - %102 = and i64 %101, 1048575 - store i64 %102, ptr %1, align 4 - %103 = icmp eq i64 %102, 0 - br i1 %103, label %__barray_check_none_borrowed.exit1305, label %mask_block_err.i1303 - -mask_block_err.i1303: ; preds = %__barray_check_none_borrowed.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") - unreachable - -__barray_check_none_borrowed.exit1305: ; preds = %__barray_check_none_borrowed.exit - %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 - %y_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 4 - %arr_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 8 - %mask_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 16 - %104 = alloca [20 x i1], align 1 - call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(20) %104, i8 0, i64 20, i1 false) - store i32 20, ptr %out_arr_alloca, align 8 - store i32 1, ptr %y_ptr, align 4 - store ptr %0, ptr %arr_ptr, align 8 - store ptr %104, ptr %mask_ptr, align 8 - call void @print_bool_arr(ptr nonnull @res_tail.AD5A440E.0, i64 17, ptr nonnull %out_arr_alloca) - ret void -} - -declare ptr @heap_alloc(i64) local_unnamed_addr - -; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) -declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immarg) #0 - -; Function Attrs: noreturn -declare void @panic(i32, ptr) local_unnamed_addr #1 - -declare i64 @___lazy_measure_leaked(i64) local_unnamed_addr - -declare void @___qfree(i64) local_unnamed_addr - -declare void @___inc_future_refcount(i64) local_unnamed_addr - -declare i64 @___read_future_uint(i64) local_unnamed_addr - -declare void @___dec_future_refcount(i64) local_unnamed_addr - -declare void @print_int(ptr, i64, i64) local_unnamed_addr - -declare void @print_bool(ptr, i64, i1) local_unnamed_addr - -declare void @heap_free(ptr) local_unnamed_addr - -declare i64 @___lazy_measure(i64) local_unnamed_addr - -declare i1 @___read_future_bool(i64) local_unnamed_addr - -; Function Attrs: mustprogress 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) #2 - -declare void @print_bool_arr(ptr, i64, ptr) local_unnamed_addr - -declare i64 @___qalloc() local_unnamed_addr - -declare void @___reset(i64) local_unnamed_addr - -declare void @___rxy(i64, double, double) local_unnamed_addr - -declare void @___rz(i64, double) local_unnamed_addr - -declare void @___rzz(i64, i64, double) local_unnamed_addr - -define i64 @qmain(i64 %0) local_unnamed_addr { -entry: - tail call void @setup(i64 %0) - tail call void @__hugr__.__main__.main.1() - %1 = tail call i64 @teardown() - ret i64 %1 -} - -declare void @setup(i64) local_unnamed_addr - -declare i64 @teardown() local_unnamed_addr - -attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } -attributes #1 = { noreturn } -attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) } - -!name = !{!0} - -!0 = !{!"mainlib"} diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_within_tail-helios-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_within_tail-helios-aarch64-unknown-linux-gnu.ll deleted file mode 100644 index 0e8e9811..00000000 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_within_tail-helios-aarch64-unknown-linux-gnu.ll +++ /dev/null @@ -1,456 +0,0 @@ -; ModuleID = 'hugr' -source_filename = "hugr" -target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32" -target triple = "aarch64-unknown-linux-gnu" - -@"e_Index out .DD115165.0" = private constant [29 x i8] c"\1CEXIT:INT:Index out of bounds" -@"e_Array alre.5A300C2A.0" = private constant [57 x i8] c"8EXIT:INT:Array already contains an element at this index" -@"e_Array elem.E746B1A3.0" = private constant [43 x i8] c"*EXIT:INT:Array element is already borrowed" -@e_Option.unw.32D4E82D.0 = private constant [43 x i8] c"*EXIT:INT:Option.unwrap: value is `Nothing`" -@res_head_leake.F4F32972.0 = private constant [21 x i8] c"\14USER:INT:head_leaked" -@res_head.AFE8E005.0 = private constant [15 x i8] c"\0EUSER:BOOL:head" -@"e_Array cont.EFA5AC45.0" = private constant [70 x i8] c"EEXIT:INT:Array contains non-borrowed elements and cannot be discarded" -@"e_Some array.A77EF32E.0" = private constant [48 x i8] c"/EXIT:INT:Some array elements have been borrowed" -@res_tail.AD5A440E.0 = private constant [18 x i8] c"\11USER:BOOLARR:tail" -@"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." - -define void @__hugr__.__main__.main.1() local_unnamed_addr { -alloca_block: - %0 = tail call ptr @heap_alloc(i64 20) - %1 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %1, align 1 - %2 = tail call ptr @heap_alloc(i64 160) - %3 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %3, align 1 - %4 = tail call ptr @heap_alloc(i64 160) - %5 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %5, align 1 - %qalloc.i = tail call i64 @___qalloc() - %not_max.not.not.i = icmp eq i64 %qalloc.i, -1 - br i1 %not_max.not.not.i, label %cond_489_case_0.i, label %__hugr__.__tk2_helios_qalloc.485.exit - -cond_489_case_0.i: ; preds = %alloca_block - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_helios_qalloc.485.exit: ; preds = %alloca_block - tail call void @___reset(i64 %qalloc.i) - tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - br label %cond_13_case_1 - -cond_13_case_1: ; preds = %__hugr__.__tk2_helios_qalloc.485.exit, %cond_exit_13 - %"9_2.01321" = phi i64 [ 0, %__hugr__.__tk2_helios_qalloc.485.exit ], [ %6, %cond_exit_13 ] - %6 = add nuw nsw i64 %"9_2.01321", 1 - %qalloc.i1244 = tail call i64 @___qalloc() - %not_max.not.not.i1245 = icmp eq i64 %qalloc.i1244, -1 - br i1 %not_max.not.not.i1245, label %cond_489_case_0.i1246, label %__barray_check_bounds.exit - -cond_489_case_0.i1246: ; preds = %cond_13_case_1 - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__barray_check_bounds.exit: ; preds = %cond_13_case_1 - tail call void @___reset(i64 %qalloc.i1244) - %7 = load i64, ptr %5, align 4 - %8 = lshr i64 %7, %"9_2.01321" - %9 = trunc i64 %8 to i1 - br i1 %9, label %cond_exit_13, label %panic.i - -panic.i: ; preds = %__barray_check_bounds.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -cond_exit_13: ; preds = %__barray_check_bounds.exit - %10 = shl nuw nsw i64 1, %"9_2.01321" - %11 = xor i64 %7, %10 - store i64 %11, ptr %5, align 4 - %12 = getelementptr inbounds nuw i64, ptr %4, i64 %"9_2.01321" - store i64 %qalloc.i1244, ptr %12, align 4 - %exitcond = icmp eq i64 %6, 20 - br i1 %exitcond, label %loop_out, label %cond_13_case_1 - -loop_out: ; preds = %cond_exit_13 - %13 = load i64, ptr %5, align 4 - %14 = trunc i64 %13 to i1 - br i1 %14, label %panic.i1248, label %__barray_mask_borrow.exit - -panic.i1248: ; preds = %loop_out - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit: ; preds = %loop_out - %15 = or disjoint i64 %13, 1 - store i64 %15, ptr %5, align 4 - %16 = load i64, ptr %4, align 4 - tail call void @___rxy(i64 %16, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rzz(i64 %qalloc.i, i64 %16, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18) - tail call void @___rxy(i64 %16, double 0x3FF921FB54442D18, double 0x400921FB54442D18) - tail call void @___rz(i64 %16, double 0xBFF921FB54442D18) - %17 = load i64, ptr %5, align 4 - %18 = trunc i64 %17 to i1 - br i1 %18, label %__barray_mask_return.exit1250, label %panic.i1249 - -panic.i1249: ; preds = %__barray_mask_borrow.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1250: ; preds = %__barray_mask_borrow.exit - %19 = and i64 %17, -2 - store i64 %19, ptr %5, align 4 - store i64 %16, ptr %4, align 4 - br label %__barray_check_bounds.exit1252 - -__barray_check_bounds.exit1252: ; preds = %__barray_mask_return.exit1250, %__barray_mask_return.exit1268 - %20 = phi i64 [ 1, %__barray_mask_return.exit1250 ], [ %42, %__barray_mask_return.exit1268 ] - %"118_0.01322" = phi i64 [ 0, %__barray_mask_return.exit1250 ], [ %20, %__barray_mask_return.exit1268 ] - %21 = load i64, ptr %5, align 4 - %22 = lshr i64 %21, %"118_0.01322" - %23 = trunc i64 %22 to i1 - br i1 %23, label %panic.i1253, label %__barray_check_bounds.exit1256 - -panic.i1253: ; preds = %__barray_check_bounds.exit1252 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1256: ; preds = %__barray_check_bounds.exit1252 - %24 = shl nuw nsw i64 1, %"118_0.01322" - %25 = xor i64 %21, %24 - store i64 %25, ptr %5, align 4 - %26 = getelementptr inbounds nuw i64, ptr %4, i64 %"118_0.01322" - %27 = load i64, ptr %26, align 4 - %28 = lshr i64 %25, %20 - %29 = trunc i64 %28 to i1 - br i1 %29, label %panic.i1257, label %__barray_check_bounds.exit1262 - -panic.i1257: ; preds = %__barray_check_bounds.exit1256 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1262: ; preds = %__barray_check_bounds.exit1256 - %30 = shl nuw nsw i64 2, %"118_0.01322" - %31 = xor i64 %25, %30 - store i64 %31, ptr %5, align 4 - %32 = getelementptr inbounds nuw i64, ptr %4, i64 %20 - %33 = load i64, ptr %32, align 4 - tail call void @___rxy(i64 %33, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rzz(i64 %27, i64 %33, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %27, double 0xBFF921FB54442D18) - tail call void @___rxy(i64 %33, double 0x3FF921FB54442D18, double 0x400921FB54442D18) - tail call void @___rz(i64 %33, double 0xBFF921FB54442D18) - %34 = load i64, ptr %5, align 4 - %35 = lshr i64 %34, %"118_0.01322" - %36 = trunc i64 %35 to i1 - br i1 %36, label %__barray_check_bounds.exit1266, label %panic.i1263 - -panic.i1263: ; preds = %__barray_check_bounds.exit1262 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_check_bounds.exit1266: ; preds = %__barray_check_bounds.exit1262 - %37 = xor i64 %34, %24 - store i64 %37, ptr %5, align 4 - store i64 %27, ptr %26, align 4 - %38 = load i64, ptr %5, align 4 - %39 = lshr i64 %38, %20 - %40 = trunc i64 %39 to i1 - br i1 %40, label %__barray_mask_return.exit1268, label %panic.i1267 - -panic.i1267: ; preds = %__barray_check_bounds.exit1266 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1268: ; preds = %__barray_check_bounds.exit1266 - %41 = xor i64 %38, %30 - store i64 %41, ptr %5, align 4 - store i64 %33, ptr %32, align 4 - %42 = add nuw nsw i64 %20, 1 - %exitcond1325 = icmp eq i64 %42, 20 - br i1 %exitcond1325, label %cond_exit_189, label %__barray_check_bounds.exit1252 - -cond_exit_189: ; preds = %__barray_mask_return.exit1268 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) - tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure_leaked) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - %43 = icmp eq i64 %read_uint, 2 - br i1 %43, label %44, label %cond_exit_267 - -cond_exit_267: ; preds = %cond_exit_189 - %read_uint378 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - %.not = icmp eq i64 %read_uint378, 2 - br i1 %.not, label %cond_247_case_0, label %cond_247_case_1 - -44: ; preds = %cond_exit_189 - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - tail call void @print_int(ptr nonnull @res_head_leake.F4F32972.0, i64 20, i64 1) - br label %__barray_check_bounds.exit1274.preheader - -__barray_check_bounds.exit1274.preheader: ; preds = %cond_247_case_1, %44 - br label %__barray_check_bounds.exit1274 - -cond_247_case_1: ; preds = %cond_exit_267 - %45 = icmp eq i64 %read_uint378, 1 - tail call void @print_bool(ptr nonnull @res_head.AFE8E005.0, i64 14, i1 %45) - br label %__barray_check_bounds.exit1274.preheader - -cond_247_case_0: ; preds = %cond_exit_267 - tail call void @panic(i32 1001, ptr nonnull @e_Option.unw.32D4E82D.0) - unreachable - -out_of_bounds.i1269: ; preds = %.thread - tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") - unreachable - -__barray_check_bounds.exit1270: ; preds = %.thread - %46 = load i64, ptr %3, align 4 - %47 = lshr i64 %46, %"310_2.01329" - %48 = trunc i64 %47 to i1 - br i1 %48, label %cond_exit_314, label %panic.i1271 - -panic.i1271: ; preds = %__barray_check_bounds.exit1270 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -mask_block_ok.i: ; preds = %cond_exit_314 - %49 = load i64, ptr %5, align 4 - %50 = or i64 %49, -1048576 - store i64 %50, ptr %5, align 4 - %51 = icmp eq i64 %50, -1 - br i1 %51, label %loop_body538.preheader.preheader, label %mask_block_err.i - -mask_block_err.i: ; preds = %mask_block_ok.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_check_bounds.exit1274: ; preds = %__barray_check_bounds.exit1274.preheader, %cond_exit_314 - %"310_0.sroa.15.01330" = phi i64 [ %52, %cond_exit_314 ], [ 0, %__barray_check_bounds.exit1274.preheader ] - %"310_2.01329" = phi i64 [ %60, %cond_exit_314 ], [ 0, %__barray_check_bounds.exit1274.preheader ] - %52 = add nuw nsw i64 %"310_0.sroa.15.01330", 1 - %53 = load i64, ptr %5, align 4 - %54 = lshr i64 %53, %"310_0.sroa.15.01330" - %55 = trunc i64 %54 to i1 - br i1 %55, label %panic.i1275, label %.thread - -panic.i1275: ; preds = %__barray_check_bounds.exit1274 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -.thread: ; preds = %__barray_check_bounds.exit1274 - %56 = shl nuw nsw i64 1, %"310_0.sroa.15.01330" - %57 = xor i64 %53, %56 - store i64 %57, ptr %5, align 4 - %58 = getelementptr inbounds nuw i64, ptr %4, i64 %"310_0.sroa.15.01330" - %59 = load i64, ptr %58, align 4 - %60 = add i64 %"310_2.01329", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %59) - tail call void @___qfree(i64 %59) - %61 = icmp ult i64 %"310_2.01329", 20 - br i1 %61, label %__barray_check_bounds.exit1270, label %out_of_bounds.i1269 - -cond_exit_314: ; preds = %__barray_check_bounds.exit1270 - %62 = shl nuw nsw i64 1, %"310_2.01329" - %63 = xor i64 %46, %62 - store i64 %63, ptr %3, align 4 - %64 = getelementptr inbounds nuw i64, ptr %2, i64 %"310_2.01329" - store i64 %lazy_measure, ptr %64, align 4 - %65 = icmp samesign ugt i64 %"310_0.sroa.15.01330", 18 - br i1 %65, label %mask_block_ok.i, label %__barray_check_bounds.exit1274 - -loop_body538.preheader.preheader: ; preds = %mask_block_ok.i - tail call void @heap_free(ptr nonnull %4) - tail call void @heap_free(ptr nonnull %5) - br label %__barray_check_bounds.exit1278 - -__barray_check_bounds.exit1278: ; preds = %cond_exit_380, %loop_body538.preheader.preheader - %"376_0.sroa.15.01324" = phi i64 [ %66, %cond_exit_380 ], [ 0, %loop_body538.preheader.preheader ] - %66 = add nuw nsw i64 %"376_0.sroa.15.01324", 1 - %67 = load i64, ptr %3, align 4 - %68 = lshr i64 %67, %"376_0.sroa.15.01324" - %69 = trunc i64 %68 to i1 - br i1 %69, label %panic.i1279, label %__barray_check_bounds.exit1282 - -panic.i1279: ; preds = %__barray_check_bounds.exit1278 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1282: ; preds = %__barray_check_bounds.exit1278 - %70 = shl nuw nsw i64 1, %"376_0.sroa.15.01324" - %71 = xor i64 %67, %70 - store i64 %71, ptr %3, align 4 - %72 = getelementptr inbounds nuw i64, ptr %2, i64 %"376_0.sroa.15.01324" - %73 = load i64, ptr %72, align 4 - tail call void @___inc_future_refcount(i64 %73) - %74 = load i64, ptr %3, align 4 - %75 = lshr i64 %74, %"376_0.sroa.15.01324" - %76 = trunc i64 %75 to i1 - br i1 %76, label %__barray_check_bounds.exit1286, label %panic.i1283 - -panic.i1283: ; preds = %__barray_check_bounds.exit1282 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_check_bounds.exit1286: ; preds = %__barray_check_bounds.exit1282 - %77 = xor i64 %74, %70 - store i64 %77, ptr %3, align 4 - store i64 %73, ptr %72, align 4 - %read_bool = tail call i1 @___read_future_bool(i64 %73) - tail call void @___dec_future_refcount(i64 %73) - %78 = load i64, ptr %1, align 4 - %79 = lshr i64 %78, %"376_0.sroa.15.01324" - %80 = trunc i64 %79 to i1 - br i1 %80, label %cond_exit_380, label %panic.i1287 - -panic.i1287: ; preds = %__barray_check_bounds.exit1286 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -cond_566_case_0: ; preds = %cond_exit_566 - %81 = load i64, ptr %3, align 4 - %82 = or i64 %81, -1048576 - store i64 %82, ptr %3, align 4 - %83 = icmp eq i64 %82, -1 - br i1 %83, label %loop_out537, label %mask_block_err.i1292 - -mask_block_err.i1292: ; preds = %cond_566_case_0 - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_check_bounds.exit1296: ; preds = %cond_exit_380, %cond_exit_566 - %"563_0.01331" = phi i64 [ %84, %cond_exit_566 ], [ 0, %cond_exit_380 ] - %84 = add nuw nsw i64 %"563_0.01331", 1 - %85 = load i64, ptr %3, align 4 - %86 = lshr i64 %85, %"563_0.01331" - %87 = trunc i64 %86 to i1 - br i1 %87, label %cond_exit_566, label %__barray_mask_borrow.exit1300 - -__barray_mask_borrow.exit1300: ; preds = %__barray_check_bounds.exit1296 - %88 = shl nuw nsw i64 1, %"563_0.01331" - %89 = xor i64 %85, %88 - store i64 %89, ptr %3, align 4 - %90 = getelementptr inbounds nuw i64, ptr %2, i64 %"563_0.01331" - %91 = load i64, ptr %90, align 4 - tail call void @___dec_future_refcount(i64 %91) - br label %cond_exit_566 - -cond_exit_566: ; preds = %__barray_mask_borrow.exit1300, %__barray_check_bounds.exit1296 - %92 = icmp samesign ugt i64 %"563_0.01331", 18 - br i1 %92, label %cond_566_case_0, label %__barray_check_bounds.exit1296 - -cond_exit_380: ; preds = %__barray_check_bounds.exit1286 - %93 = xor i64 %78, %70 - store i64 %93, ptr %1, align 4 - %94 = getelementptr inbounds nuw i1, ptr %0, i64 %"376_0.sroa.15.01324" - store i1 %read_bool, ptr %94, align 1 - %95 = icmp eq i64 %"376_0.sroa.15.01324", 19 - br i1 %95, label %__barray_check_bounds.exit1296, label %__barray_check_bounds.exit1278 - -loop_out537: ; preds = %cond_566_case_0 - tail call void @heap_free(ptr %2) - tail call void @heap_free(ptr nonnull %3) - %96 = load i64, ptr %1, align 4 - %97 = and i64 %96, 1048575 - store i64 %97, ptr %1, align 4 - %98 = icmp eq i64 %97, 0 - br i1 %98, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1301 - -mask_block_err.i1301: ; preds = %loop_out537 - tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") - unreachable - -__barray_check_none_borrowed.exit: ; preds = %loop_out537 - %99 = tail call ptr @heap_alloc(i64 20) - %100 = tail call ptr @heap_alloc(i64 8) - store i64 0, ptr %100, align 1 - tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(20) %99, ptr noundef nonnull align 1 dereferenceable(20) %0, i64 20, i1 false) - tail call void @heap_free(ptr nonnull %99) - %101 = load i64, ptr %1, align 4 - %102 = and i64 %101, 1048575 - store i64 %102, ptr %1, align 4 - %103 = icmp eq i64 %102, 0 - br i1 %103, label %__barray_check_none_borrowed.exit1305, label %mask_block_err.i1303 - -mask_block_err.i1303: ; preds = %__barray_check_none_borrowed.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") - unreachable - -__barray_check_none_borrowed.exit1305: ; preds = %__barray_check_none_borrowed.exit - %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 - %y_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 4 - %arr_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 8 - %mask_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 16 - %104 = alloca [20 x i1], align 1 - call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(20) %104, i8 0, i64 20, i1 false) - store i32 20, ptr %out_arr_alloca, align 8 - store i32 1, ptr %y_ptr, align 4 - store ptr %0, ptr %arr_ptr, align 8 - store ptr %104, ptr %mask_ptr, align 8 - call void @print_bool_arr(ptr nonnull @res_tail.AD5A440E.0, i64 17, ptr nonnull %out_arr_alloca) - ret void -} - -declare ptr @heap_alloc(i64) local_unnamed_addr - -; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) -declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immarg) #0 - -; Function Attrs: noreturn -declare void @panic(i32, ptr) local_unnamed_addr #1 - -declare i64 @___lazy_measure_leaked(i64) local_unnamed_addr - -declare void @___qfree(i64) local_unnamed_addr - -declare void @___inc_future_refcount(i64) local_unnamed_addr - -declare i64 @___read_future_uint(i64) local_unnamed_addr - -declare void @___dec_future_refcount(i64) local_unnamed_addr - -declare void @print_int(ptr, i64, i64) local_unnamed_addr - -declare void @print_bool(ptr, i64, i1) local_unnamed_addr - -declare void @heap_free(ptr) local_unnamed_addr - -declare i64 @___lazy_measure(i64) local_unnamed_addr - -declare i1 @___read_future_bool(i64) local_unnamed_addr - -; Function Attrs: mustprogress 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) #2 - -declare void @print_bool_arr(ptr, i64, ptr) local_unnamed_addr - -declare i64 @___qalloc() local_unnamed_addr - -declare void @___reset(i64) local_unnamed_addr - -declare void @___rxy(i64, double, double) local_unnamed_addr - -declare void @___rz(i64, double) local_unnamed_addr - -declare void @___rzz(i64, i64, double) local_unnamed_addr - -define i64 @qmain(i64 %0) local_unnamed_addr { -entry: - tail call void @setup(i64 %0) - tail call void @__hugr__.__main__.main.1() - %1 = tail call i64 @teardown() - ret i64 %1 -} - -declare void @setup(i64) local_unnamed_addr - -declare i64 @teardown() local_unnamed_addr - -attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } -attributes #1 = { noreturn } -attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) } - -!name = !{!0} - -!0 = !{!"mainlib"} diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_within_tail-helios-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_within_tail-helios-x86_64-apple-darwin.ll deleted file mode 100644 index 7ee2a97e..00000000 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_within_tail-helios-x86_64-apple-darwin.ll +++ /dev/null @@ -1,456 +0,0 @@ -; ModuleID = 'hugr' -source_filename = "hugr" -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_Index out .DD115165.0" = private constant [29 x i8] c"\1CEXIT:INT:Index out of bounds" -@"e_Array alre.5A300C2A.0" = private constant [57 x i8] c"8EXIT:INT:Array already contains an element at this index" -@"e_Array elem.E746B1A3.0" = private constant [43 x i8] c"*EXIT:INT:Array element is already borrowed" -@e_Option.unw.32D4E82D.0 = private constant [43 x i8] c"*EXIT:INT:Option.unwrap: value is `Nothing`" -@res_head_leake.F4F32972.0 = private constant [21 x i8] c"\14USER:INT:head_leaked" -@res_head.AFE8E005.0 = private constant [15 x i8] c"\0EUSER:BOOL:head" -@"e_Array cont.EFA5AC45.0" = private constant [70 x i8] c"EEXIT:INT:Array contains non-borrowed elements and cannot be discarded" -@"e_Some array.A77EF32E.0" = private constant [48 x i8] c"/EXIT:INT:Some array elements have been borrowed" -@res_tail.AD5A440E.0 = private constant [18 x i8] c"\11USER:BOOLARR:tail" -@"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." - -define void @__hugr__.__main__.main.1() local_unnamed_addr { -alloca_block: - %0 = tail call ptr @heap_alloc(i64 20) - %1 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %1, align 1 - %2 = tail call ptr @heap_alloc(i64 160) - %3 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %3, align 1 - %4 = tail call ptr @heap_alloc(i64 160) - %5 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %5, align 1 - %qalloc.i = tail call i64 @___qalloc() - %not_max.not.not.i = icmp eq i64 %qalloc.i, -1 - br i1 %not_max.not.not.i, label %cond_489_case_0.i, label %__hugr__.__tk2_helios_qalloc.485.exit - -cond_489_case_0.i: ; preds = %alloca_block - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_helios_qalloc.485.exit: ; preds = %alloca_block - tail call void @___reset(i64 %qalloc.i) - tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - br label %cond_13_case_1 - -cond_13_case_1: ; preds = %__hugr__.__tk2_helios_qalloc.485.exit, %cond_exit_13 - %"9_2.01321" = phi i64 [ 0, %__hugr__.__tk2_helios_qalloc.485.exit ], [ %6, %cond_exit_13 ] - %6 = add nuw nsw i64 %"9_2.01321", 1 - %qalloc.i1244 = tail call i64 @___qalloc() - %not_max.not.not.i1245 = icmp eq i64 %qalloc.i1244, -1 - br i1 %not_max.not.not.i1245, label %cond_489_case_0.i1246, label %__barray_check_bounds.exit - -cond_489_case_0.i1246: ; preds = %cond_13_case_1 - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__barray_check_bounds.exit: ; preds = %cond_13_case_1 - tail call void @___reset(i64 %qalloc.i1244) - %7 = load i64, ptr %5, align 4 - %8 = lshr i64 %7, %"9_2.01321" - %9 = trunc i64 %8 to i1 - br i1 %9, label %cond_exit_13, label %panic.i - -panic.i: ; preds = %__barray_check_bounds.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -cond_exit_13: ; preds = %__barray_check_bounds.exit - %10 = shl nuw nsw i64 1, %"9_2.01321" - %11 = xor i64 %7, %10 - store i64 %11, ptr %5, align 4 - %12 = getelementptr inbounds nuw i64, ptr %4, i64 %"9_2.01321" - store i64 %qalloc.i1244, ptr %12, align 4 - %exitcond = icmp eq i64 %6, 20 - br i1 %exitcond, label %loop_out, label %cond_13_case_1 - -loop_out: ; preds = %cond_exit_13 - %13 = load i64, ptr %5, align 4 - %14 = trunc i64 %13 to i1 - br i1 %14, label %panic.i1248, label %__barray_mask_borrow.exit - -panic.i1248: ; preds = %loop_out - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit: ; preds = %loop_out - %15 = or disjoint i64 %13, 1 - store i64 %15, ptr %5, align 4 - %16 = load i64, ptr %4, align 4 - tail call void @___rxy(i64 %16, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rzz(i64 %qalloc.i, i64 %16, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18) - tail call void @___rxy(i64 %16, double 0x3FF921FB54442D18, double 0x400921FB54442D18) - tail call void @___rz(i64 %16, double 0xBFF921FB54442D18) - %17 = load i64, ptr %5, align 4 - %18 = trunc i64 %17 to i1 - br i1 %18, label %__barray_mask_return.exit1250, label %panic.i1249 - -panic.i1249: ; preds = %__barray_mask_borrow.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1250: ; preds = %__barray_mask_borrow.exit - %19 = and i64 %17, -2 - store i64 %19, ptr %5, align 4 - store i64 %16, ptr %4, align 4 - br label %__barray_check_bounds.exit1252 - -__barray_check_bounds.exit1252: ; preds = %__barray_mask_return.exit1250, %__barray_mask_return.exit1268 - %20 = phi i64 [ 1, %__barray_mask_return.exit1250 ], [ %42, %__barray_mask_return.exit1268 ] - %"118_0.01322" = phi i64 [ 0, %__barray_mask_return.exit1250 ], [ %20, %__barray_mask_return.exit1268 ] - %21 = load i64, ptr %5, align 4 - %22 = lshr i64 %21, %"118_0.01322" - %23 = trunc i64 %22 to i1 - br i1 %23, label %panic.i1253, label %__barray_check_bounds.exit1256 - -panic.i1253: ; preds = %__barray_check_bounds.exit1252 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1256: ; preds = %__barray_check_bounds.exit1252 - %24 = shl nuw nsw i64 1, %"118_0.01322" - %25 = xor i64 %21, %24 - store i64 %25, ptr %5, align 4 - %26 = getelementptr inbounds nuw i64, ptr %4, i64 %"118_0.01322" - %27 = load i64, ptr %26, align 4 - %28 = lshr i64 %25, %20 - %29 = trunc i64 %28 to i1 - br i1 %29, label %panic.i1257, label %__barray_check_bounds.exit1262 - -panic.i1257: ; preds = %__barray_check_bounds.exit1256 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1262: ; preds = %__barray_check_bounds.exit1256 - %30 = shl nuw nsw i64 2, %"118_0.01322" - %31 = xor i64 %25, %30 - store i64 %31, ptr %5, align 4 - %32 = getelementptr inbounds nuw i64, ptr %4, i64 %20 - %33 = load i64, ptr %32, align 4 - tail call void @___rxy(i64 %33, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rzz(i64 %27, i64 %33, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %27, double 0xBFF921FB54442D18) - tail call void @___rxy(i64 %33, double 0x3FF921FB54442D18, double 0x400921FB54442D18) - tail call void @___rz(i64 %33, double 0xBFF921FB54442D18) - %34 = load i64, ptr %5, align 4 - %35 = lshr i64 %34, %"118_0.01322" - %36 = trunc i64 %35 to i1 - br i1 %36, label %__barray_check_bounds.exit1266, label %panic.i1263 - -panic.i1263: ; preds = %__barray_check_bounds.exit1262 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_check_bounds.exit1266: ; preds = %__barray_check_bounds.exit1262 - %37 = xor i64 %34, %24 - store i64 %37, ptr %5, align 4 - store i64 %27, ptr %26, align 4 - %38 = load i64, ptr %5, align 4 - %39 = lshr i64 %38, %20 - %40 = trunc i64 %39 to i1 - br i1 %40, label %__barray_mask_return.exit1268, label %panic.i1267 - -panic.i1267: ; preds = %__barray_check_bounds.exit1266 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1268: ; preds = %__barray_check_bounds.exit1266 - %41 = xor i64 %38, %30 - store i64 %41, ptr %5, align 4 - store i64 %33, ptr %32, align 4 - %42 = add nuw nsw i64 %20, 1 - %exitcond1325 = icmp eq i64 %42, 20 - br i1 %exitcond1325, label %cond_exit_189, label %__barray_check_bounds.exit1252 - -cond_exit_189: ; preds = %__barray_mask_return.exit1268 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) - tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure_leaked) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - %43 = icmp eq i64 %read_uint, 2 - br i1 %43, label %44, label %cond_exit_267 - -cond_exit_267: ; preds = %cond_exit_189 - %read_uint378 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - %.not = icmp eq i64 %read_uint378, 2 - br i1 %.not, label %cond_247_case_0, label %cond_247_case_1 - -44: ; preds = %cond_exit_189 - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - tail call void @print_int(ptr nonnull @res_head_leake.F4F32972.0, i64 20, i64 1) - br label %__barray_check_bounds.exit1274.preheader - -__barray_check_bounds.exit1274.preheader: ; preds = %cond_247_case_1, %44 - br label %__barray_check_bounds.exit1274 - -cond_247_case_1: ; preds = %cond_exit_267 - %45 = icmp eq i64 %read_uint378, 1 - tail call void @print_bool(ptr nonnull @res_head.AFE8E005.0, i64 14, i1 %45) - br label %__barray_check_bounds.exit1274.preheader - -cond_247_case_0: ; preds = %cond_exit_267 - tail call void @panic(i32 1001, ptr nonnull @e_Option.unw.32D4E82D.0) - unreachable - -out_of_bounds.i1269: ; preds = %.thread - tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") - unreachable - -__barray_check_bounds.exit1270: ; preds = %.thread - %46 = load i64, ptr %3, align 4 - %47 = lshr i64 %46, %"310_2.01329" - %48 = trunc i64 %47 to i1 - br i1 %48, label %cond_exit_314, label %panic.i1271 - -panic.i1271: ; preds = %__barray_check_bounds.exit1270 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -mask_block_ok.i: ; preds = %cond_exit_314 - %49 = load i64, ptr %5, align 4 - %50 = or i64 %49, -1048576 - store i64 %50, ptr %5, align 4 - %51 = icmp eq i64 %50, -1 - br i1 %51, label %loop_body538.preheader.preheader, label %mask_block_err.i - -mask_block_err.i: ; preds = %mask_block_ok.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_check_bounds.exit1274: ; preds = %__barray_check_bounds.exit1274.preheader, %cond_exit_314 - %"310_0.sroa.15.01330" = phi i64 [ %52, %cond_exit_314 ], [ 0, %__barray_check_bounds.exit1274.preheader ] - %"310_2.01329" = phi i64 [ %60, %cond_exit_314 ], [ 0, %__barray_check_bounds.exit1274.preheader ] - %52 = add nuw nsw i64 %"310_0.sroa.15.01330", 1 - %53 = load i64, ptr %5, align 4 - %54 = lshr i64 %53, %"310_0.sroa.15.01330" - %55 = trunc i64 %54 to i1 - br i1 %55, label %panic.i1275, label %.thread - -panic.i1275: ; preds = %__barray_check_bounds.exit1274 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -.thread: ; preds = %__barray_check_bounds.exit1274 - %56 = shl nuw nsw i64 1, %"310_0.sroa.15.01330" - %57 = xor i64 %53, %56 - store i64 %57, ptr %5, align 4 - %58 = getelementptr inbounds nuw i64, ptr %4, i64 %"310_0.sroa.15.01330" - %59 = load i64, ptr %58, align 4 - %60 = add i64 %"310_2.01329", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %59) - tail call void @___qfree(i64 %59) - %61 = icmp ult i64 %"310_2.01329", 20 - br i1 %61, label %__barray_check_bounds.exit1270, label %out_of_bounds.i1269 - -cond_exit_314: ; preds = %__barray_check_bounds.exit1270 - %62 = shl nuw nsw i64 1, %"310_2.01329" - %63 = xor i64 %46, %62 - store i64 %63, ptr %3, align 4 - %64 = getelementptr inbounds nuw i64, ptr %2, i64 %"310_2.01329" - store i64 %lazy_measure, ptr %64, align 4 - %65 = icmp samesign ugt i64 %"310_0.sroa.15.01330", 18 - br i1 %65, label %mask_block_ok.i, label %__barray_check_bounds.exit1274 - -loop_body538.preheader.preheader: ; preds = %mask_block_ok.i - tail call void @heap_free(ptr nonnull %4) - tail call void @heap_free(ptr nonnull %5) - br label %__barray_check_bounds.exit1278 - -__barray_check_bounds.exit1278: ; preds = %cond_exit_380, %loop_body538.preheader.preheader - %"376_0.sroa.15.01324" = phi i64 [ %66, %cond_exit_380 ], [ 0, %loop_body538.preheader.preheader ] - %66 = add nuw nsw i64 %"376_0.sroa.15.01324", 1 - %67 = load i64, ptr %3, align 4 - %68 = lshr i64 %67, %"376_0.sroa.15.01324" - %69 = trunc i64 %68 to i1 - br i1 %69, label %panic.i1279, label %__barray_check_bounds.exit1282 - -panic.i1279: ; preds = %__barray_check_bounds.exit1278 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1282: ; preds = %__barray_check_bounds.exit1278 - %70 = shl nuw nsw i64 1, %"376_0.sroa.15.01324" - %71 = xor i64 %67, %70 - store i64 %71, ptr %3, align 4 - %72 = getelementptr inbounds nuw i64, ptr %2, i64 %"376_0.sroa.15.01324" - %73 = load i64, ptr %72, align 4 - tail call void @___inc_future_refcount(i64 %73) - %74 = load i64, ptr %3, align 4 - %75 = lshr i64 %74, %"376_0.sroa.15.01324" - %76 = trunc i64 %75 to i1 - br i1 %76, label %__barray_check_bounds.exit1286, label %panic.i1283 - -panic.i1283: ; preds = %__barray_check_bounds.exit1282 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_check_bounds.exit1286: ; preds = %__barray_check_bounds.exit1282 - %77 = xor i64 %74, %70 - store i64 %77, ptr %3, align 4 - store i64 %73, ptr %72, align 4 - %read_bool = tail call i1 @___read_future_bool(i64 %73) - tail call void @___dec_future_refcount(i64 %73) - %78 = load i64, ptr %1, align 4 - %79 = lshr i64 %78, %"376_0.sroa.15.01324" - %80 = trunc i64 %79 to i1 - br i1 %80, label %cond_exit_380, label %panic.i1287 - -panic.i1287: ; preds = %__barray_check_bounds.exit1286 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -cond_566_case_0: ; preds = %cond_exit_566 - %81 = load i64, ptr %3, align 4 - %82 = or i64 %81, -1048576 - store i64 %82, ptr %3, align 4 - %83 = icmp eq i64 %82, -1 - br i1 %83, label %loop_out537, label %mask_block_err.i1292 - -mask_block_err.i1292: ; preds = %cond_566_case_0 - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_check_bounds.exit1296: ; preds = %cond_exit_380, %cond_exit_566 - %"563_0.01331" = phi i64 [ %84, %cond_exit_566 ], [ 0, %cond_exit_380 ] - %84 = add nuw nsw i64 %"563_0.01331", 1 - %85 = load i64, ptr %3, align 4 - %86 = lshr i64 %85, %"563_0.01331" - %87 = trunc i64 %86 to i1 - br i1 %87, label %cond_exit_566, label %__barray_mask_borrow.exit1300 - -__barray_mask_borrow.exit1300: ; preds = %__barray_check_bounds.exit1296 - %88 = shl nuw nsw i64 1, %"563_0.01331" - %89 = xor i64 %85, %88 - store i64 %89, ptr %3, align 4 - %90 = getelementptr inbounds nuw i64, ptr %2, i64 %"563_0.01331" - %91 = load i64, ptr %90, align 4 - tail call void @___dec_future_refcount(i64 %91) - br label %cond_exit_566 - -cond_exit_566: ; preds = %__barray_mask_borrow.exit1300, %__barray_check_bounds.exit1296 - %92 = icmp samesign ugt i64 %"563_0.01331", 18 - br i1 %92, label %cond_566_case_0, label %__barray_check_bounds.exit1296 - -cond_exit_380: ; preds = %__barray_check_bounds.exit1286 - %93 = xor i64 %78, %70 - store i64 %93, ptr %1, align 4 - %94 = getelementptr inbounds nuw i1, ptr %0, i64 %"376_0.sroa.15.01324" - store i1 %read_bool, ptr %94, align 1 - %95 = icmp eq i64 %"376_0.sroa.15.01324", 19 - br i1 %95, label %__barray_check_bounds.exit1296, label %__barray_check_bounds.exit1278 - -loop_out537: ; preds = %cond_566_case_0 - tail call void @heap_free(ptr %2) - tail call void @heap_free(ptr nonnull %3) - %96 = load i64, ptr %1, align 4 - %97 = and i64 %96, 1048575 - store i64 %97, ptr %1, align 4 - %98 = icmp eq i64 %97, 0 - br i1 %98, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1301 - -mask_block_err.i1301: ; preds = %loop_out537 - tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") - unreachable - -__barray_check_none_borrowed.exit: ; preds = %loop_out537 - %99 = tail call ptr @heap_alloc(i64 20) - %100 = tail call ptr @heap_alloc(i64 8) - store i64 0, ptr %100, align 1 - tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(20) %99, ptr noundef nonnull align 1 dereferenceable(20) %0, i64 20, i1 false) - tail call void @heap_free(ptr nonnull %99) - %101 = load i64, ptr %1, align 4 - %102 = and i64 %101, 1048575 - store i64 %102, ptr %1, align 4 - %103 = icmp eq i64 %102, 0 - br i1 %103, label %__barray_check_none_borrowed.exit1305, label %mask_block_err.i1303 - -mask_block_err.i1303: ; preds = %__barray_check_none_borrowed.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") - unreachable - -__barray_check_none_borrowed.exit1305: ; preds = %__barray_check_none_borrowed.exit - %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 - %y_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 4 - %arr_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 8 - %mask_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 16 - %104 = alloca [20 x i1], align 1 - call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(20) %104, i8 0, i64 20, i1 false) - store i32 20, ptr %out_arr_alloca, align 8 - store i32 1, ptr %y_ptr, align 4 - store ptr %0, ptr %arr_ptr, align 8 - store ptr %104, ptr %mask_ptr, align 8 - call void @print_bool_arr(ptr nonnull @res_tail.AD5A440E.0, i64 17, ptr nonnull %out_arr_alloca) - ret void -} - -declare ptr @heap_alloc(i64) local_unnamed_addr - -; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) -declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immarg) #0 - -; Function Attrs: noreturn -declare void @panic(i32, ptr) local_unnamed_addr #1 - -declare i64 @___lazy_measure_leaked(i64) local_unnamed_addr - -declare void @___qfree(i64) local_unnamed_addr - -declare void @___inc_future_refcount(i64) local_unnamed_addr - -declare i64 @___read_future_uint(i64) local_unnamed_addr - -declare void @___dec_future_refcount(i64) local_unnamed_addr - -declare void @print_int(ptr, i64, i64) local_unnamed_addr - -declare void @print_bool(ptr, i64, i1) local_unnamed_addr - -declare void @heap_free(ptr) local_unnamed_addr - -declare i64 @___lazy_measure(i64) local_unnamed_addr - -declare i1 @___read_future_bool(i64) local_unnamed_addr - -; Function Attrs: mustprogress 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) #2 - -declare void @print_bool_arr(ptr, i64, ptr) local_unnamed_addr - -declare i64 @___qalloc() local_unnamed_addr - -declare void @___reset(i64) local_unnamed_addr - -declare void @___rxy(i64, double, double) local_unnamed_addr - -declare void @___rz(i64, double) local_unnamed_addr - -declare void @___rzz(i64, i64, double) local_unnamed_addr - -define i64 @qmain(i64 %0) local_unnamed_addr { -entry: - tail call void @setup(i64 %0) - tail call void @__hugr__.__main__.main.1() - %1 = tail call i64 @teardown() - ret i64 %1 -} - -declare void @setup(i64) local_unnamed_addr - -declare i64 @teardown() local_unnamed_addr - -attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } -attributes #1 = { noreturn } -attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) } - -!name = !{!0} - -!0 = !{!"mainlib"} diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_within_tail-helios-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_within_tail-helios-x86_64-unknown-linux-gnu.ll deleted file mode 100644 index 0a46f84e..00000000 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_within_tail-helios-x86_64-unknown-linux-gnu.ll +++ /dev/null @@ -1,456 +0,0 @@ -; ModuleID = 'hugr' -source_filename = "hugr" -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_Index out .DD115165.0" = private constant [29 x i8] c"\1CEXIT:INT:Index out of bounds" -@"e_Array alre.5A300C2A.0" = private constant [57 x i8] c"8EXIT:INT:Array already contains an element at this index" -@"e_Array elem.E746B1A3.0" = private constant [43 x i8] c"*EXIT:INT:Array element is already borrowed" -@e_Option.unw.32D4E82D.0 = private constant [43 x i8] c"*EXIT:INT:Option.unwrap: value is `Nothing`" -@res_head_leake.F4F32972.0 = private constant [21 x i8] c"\14USER:INT:head_leaked" -@res_head.AFE8E005.0 = private constant [15 x i8] c"\0EUSER:BOOL:head" -@"e_Array cont.EFA5AC45.0" = private constant [70 x i8] c"EEXIT:INT:Array contains non-borrowed elements and cannot be discarded" -@"e_Some array.A77EF32E.0" = private constant [48 x i8] c"/EXIT:INT:Some array elements have been borrowed" -@res_tail.AD5A440E.0 = private constant [18 x i8] c"\11USER:BOOLARR:tail" -@"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." - -define void @__hugr__.__main__.main.1() local_unnamed_addr { -alloca_block: - %0 = tail call ptr @heap_alloc(i64 20) - %1 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %1, align 1 - %2 = tail call ptr @heap_alloc(i64 160) - %3 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %3, align 1 - %4 = tail call ptr @heap_alloc(i64 160) - %5 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %5, align 1 - %qalloc.i = tail call i64 @___qalloc() - %not_max.not.not.i = icmp eq i64 %qalloc.i, -1 - br i1 %not_max.not.not.i, label %cond_489_case_0.i, label %__hugr__.__tk2_helios_qalloc.485.exit - -cond_489_case_0.i: ; preds = %alloca_block - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_helios_qalloc.485.exit: ; preds = %alloca_block - tail call void @___reset(i64 %qalloc.i) - tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - br label %cond_13_case_1 - -cond_13_case_1: ; preds = %__hugr__.__tk2_helios_qalloc.485.exit, %cond_exit_13 - %"9_2.01321" = phi i64 [ 0, %__hugr__.__tk2_helios_qalloc.485.exit ], [ %6, %cond_exit_13 ] - %6 = add nuw nsw i64 %"9_2.01321", 1 - %qalloc.i1244 = tail call i64 @___qalloc() - %not_max.not.not.i1245 = icmp eq i64 %qalloc.i1244, -1 - br i1 %not_max.not.not.i1245, label %cond_489_case_0.i1246, label %__barray_check_bounds.exit - -cond_489_case_0.i1246: ; preds = %cond_13_case_1 - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__barray_check_bounds.exit: ; preds = %cond_13_case_1 - tail call void @___reset(i64 %qalloc.i1244) - %7 = load i64, ptr %5, align 4 - %8 = lshr i64 %7, %"9_2.01321" - %9 = trunc i64 %8 to i1 - br i1 %9, label %cond_exit_13, label %panic.i - -panic.i: ; preds = %__barray_check_bounds.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -cond_exit_13: ; preds = %__barray_check_bounds.exit - %10 = shl nuw nsw i64 1, %"9_2.01321" - %11 = xor i64 %7, %10 - store i64 %11, ptr %5, align 4 - %12 = getelementptr inbounds nuw i64, ptr %4, i64 %"9_2.01321" - store i64 %qalloc.i1244, ptr %12, align 4 - %exitcond = icmp eq i64 %6, 20 - br i1 %exitcond, label %loop_out, label %cond_13_case_1 - -loop_out: ; preds = %cond_exit_13 - %13 = load i64, ptr %5, align 4 - %14 = trunc i64 %13 to i1 - br i1 %14, label %panic.i1248, label %__barray_mask_borrow.exit - -panic.i1248: ; preds = %loop_out - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit: ; preds = %loop_out - %15 = or disjoint i64 %13, 1 - store i64 %15, ptr %5, align 4 - %16 = load i64, ptr %4, align 4 - tail call void @___rxy(i64 %16, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rzz(i64 %qalloc.i, i64 %16, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18) - tail call void @___rxy(i64 %16, double 0x3FF921FB54442D18, double 0x400921FB54442D18) - tail call void @___rz(i64 %16, double 0xBFF921FB54442D18) - %17 = load i64, ptr %5, align 4 - %18 = trunc i64 %17 to i1 - br i1 %18, label %__barray_mask_return.exit1250, label %panic.i1249 - -panic.i1249: ; preds = %__barray_mask_borrow.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1250: ; preds = %__barray_mask_borrow.exit - %19 = and i64 %17, -2 - store i64 %19, ptr %5, align 4 - store i64 %16, ptr %4, align 4 - br label %__barray_check_bounds.exit1252 - -__barray_check_bounds.exit1252: ; preds = %__barray_mask_return.exit1250, %__barray_mask_return.exit1268 - %20 = phi i64 [ 1, %__barray_mask_return.exit1250 ], [ %42, %__barray_mask_return.exit1268 ] - %"118_0.01322" = phi i64 [ 0, %__barray_mask_return.exit1250 ], [ %20, %__barray_mask_return.exit1268 ] - %21 = load i64, ptr %5, align 4 - %22 = lshr i64 %21, %"118_0.01322" - %23 = trunc i64 %22 to i1 - br i1 %23, label %panic.i1253, label %__barray_check_bounds.exit1256 - -panic.i1253: ; preds = %__barray_check_bounds.exit1252 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1256: ; preds = %__barray_check_bounds.exit1252 - %24 = shl nuw nsw i64 1, %"118_0.01322" - %25 = xor i64 %21, %24 - store i64 %25, ptr %5, align 4 - %26 = getelementptr inbounds nuw i64, ptr %4, i64 %"118_0.01322" - %27 = load i64, ptr %26, align 4 - %28 = lshr i64 %25, %20 - %29 = trunc i64 %28 to i1 - br i1 %29, label %panic.i1257, label %__barray_check_bounds.exit1262 - -panic.i1257: ; preds = %__barray_check_bounds.exit1256 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1262: ; preds = %__barray_check_bounds.exit1256 - %30 = shl nuw nsw i64 2, %"118_0.01322" - %31 = xor i64 %25, %30 - store i64 %31, ptr %5, align 4 - %32 = getelementptr inbounds nuw i64, ptr %4, i64 %20 - %33 = load i64, ptr %32, align 4 - tail call void @___rxy(i64 %33, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rzz(i64 %27, i64 %33, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %27, double 0xBFF921FB54442D18) - tail call void @___rxy(i64 %33, double 0x3FF921FB54442D18, double 0x400921FB54442D18) - tail call void @___rz(i64 %33, double 0xBFF921FB54442D18) - %34 = load i64, ptr %5, align 4 - %35 = lshr i64 %34, %"118_0.01322" - %36 = trunc i64 %35 to i1 - br i1 %36, label %__barray_check_bounds.exit1266, label %panic.i1263 - -panic.i1263: ; preds = %__barray_check_bounds.exit1262 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_check_bounds.exit1266: ; preds = %__barray_check_bounds.exit1262 - %37 = xor i64 %34, %24 - store i64 %37, ptr %5, align 4 - store i64 %27, ptr %26, align 4 - %38 = load i64, ptr %5, align 4 - %39 = lshr i64 %38, %20 - %40 = trunc i64 %39 to i1 - br i1 %40, label %__barray_mask_return.exit1268, label %panic.i1267 - -panic.i1267: ; preds = %__barray_check_bounds.exit1266 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1268: ; preds = %__barray_check_bounds.exit1266 - %41 = xor i64 %38, %30 - store i64 %41, ptr %5, align 4 - store i64 %33, ptr %32, align 4 - %42 = add nuw nsw i64 %20, 1 - %exitcond1325 = icmp eq i64 %42, 20 - br i1 %exitcond1325, label %cond_exit_189, label %__barray_check_bounds.exit1252 - -cond_exit_189: ; preds = %__barray_mask_return.exit1268 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) - tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure_leaked) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - %43 = icmp eq i64 %read_uint, 2 - br i1 %43, label %44, label %cond_exit_267 - -cond_exit_267: ; preds = %cond_exit_189 - %read_uint378 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - %.not = icmp eq i64 %read_uint378, 2 - br i1 %.not, label %cond_247_case_0, label %cond_247_case_1 - -44: ; preds = %cond_exit_189 - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - tail call void @print_int(ptr nonnull @res_head_leake.F4F32972.0, i64 20, i64 1) - br label %__barray_check_bounds.exit1274.preheader - -__barray_check_bounds.exit1274.preheader: ; preds = %cond_247_case_1, %44 - br label %__barray_check_bounds.exit1274 - -cond_247_case_1: ; preds = %cond_exit_267 - %45 = icmp eq i64 %read_uint378, 1 - tail call void @print_bool(ptr nonnull @res_head.AFE8E005.0, i64 14, i1 %45) - br label %__barray_check_bounds.exit1274.preheader - -cond_247_case_0: ; preds = %cond_exit_267 - tail call void @panic(i32 1001, ptr nonnull @e_Option.unw.32D4E82D.0) - unreachable - -out_of_bounds.i1269: ; preds = %.thread - tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") - unreachable - -__barray_check_bounds.exit1270: ; preds = %.thread - %46 = load i64, ptr %3, align 4 - %47 = lshr i64 %46, %"310_2.01329" - %48 = trunc i64 %47 to i1 - br i1 %48, label %cond_exit_314, label %panic.i1271 - -panic.i1271: ; preds = %__barray_check_bounds.exit1270 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -mask_block_ok.i: ; preds = %cond_exit_314 - %49 = load i64, ptr %5, align 4 - %50 = or i64 %49, -1048576 - store i64 %50, ptr %5, align 4 - %51 = icmp eq i64 %50, -1 - br i1 %51, label %loop_body538.preheader.preheader, label %mask_block_err.i - -mask_block_err.i: ; preds = %mask_block_ok.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_check_bounds.exit1274: ; preds = %__barray_check_bounds.exit1274.preheader, %cond_exit_314 - %"310_0.sroa.15.01330" = phi i64 [ %52, %cond_exit_314 ], [ 0, %__barray_check_bounds.exit1274.preheader ] - %"310_2.01329" = phi i64 [ %60, %cond_exit_314 ], [ 0, %__barray_check_bounds.exit1274.preheader ] - %52 = add nuw nsw i64 %"310_0.sroa.15.01330", 1 - %53 = load i64, ptr %5, align 4 - %54 = lshr i64 %53, %"310_0.sroa.15.01330" - %55 = trunc i64 %54 to i1 - br i1 %55, label %panic.i1275, label %.thread - -panic.i1275: ; preds = %__barray_check_bounds.exit1274 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -.thread: ; preds = %__barray_check_bounds.exit1274 - %56 = shl nuw nsw i64 1, %"310_0.sroa.15.01330" - %57 = xor i64 %53, %56 - store i64 %57, ptr %5, align 4 - %58 = getelementptr inbounds nuw i64, ptr %4, i64 %"310_0.sroa.15.01330" - %59 = load i64, ptr %58, align 4 - %60 = add i64 %"310_2.01329", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %59) - tail call void @___qfree(i64 %59) - %61 = icmp ult i64 %"310_2.01329", 20 - br i1 %61, label %__barray_check_bounds.exit1270, label %out_of_bounds.i1269 - -cond_exit_314: ; preds = %__barray_check_bounds.exit1270 - %62 = shl nuw nsw i64 1, %"310_2.01329" - %63 = xor i64 %46, %62 - store i64 %63, ptr %3, align 4 - %64 = getelementptr inbounds nuw i64, ptr %2, i64 %"310_2.01329" - store i64 %lazy_measure, ptr %64, align 4 - %65 = icmp samesign ugt i64 %"310_0.sroa.15.01330", 18 - br i1 %65, label %mask_block_ok.i, label %__barray_check_bounds.exit1274 - -loop_body538.preheader.preheader: ; preds = %mask_block_ok.i - tail call void @heap_free(ptr nonnull %4) - tail call void @heap_free(ptr nonnull %5) - br label %__barray_check_bounds.exit1278 - -__barray_check_bounds.exit1278: ; preds = %cond_exit_380, %loop_body538.preheader.preheader - %"376_0.sroa.15.01324" = phi i64 [ %66, %cond_exit_380 ], [ 0, %loop_body538.preheader.preheader ] - %66 = add nuw nsw i64 %"376_0.sroa.15.01324", 1 - %67 = load i64, ptr %3, align 4 - %68 = lshr i64 %67, %"376_0.sroa.15.01324" - %69 = trunc i64 %68 to i1 - br i1 %69, label %panic.i1279, label %__barray_check_bounds.exit1282 - -panic.i1279: ; preds = %__barray_check_bounds.exit1278 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1282: ; preds = %__barray_check_bounds.exit1278 - %70 = shl nuw nsw i64 1, %"376_0.sroa.15.01324" - %71 = xor i64 %67, %70 - store i64 %71, ptr %3, align 4 - %72 = getelementptr inbounds nuw i64, ptr %2, i64 %"376_0.sroa.15.01324" - %73 = load i64, ptr %72, align 4 - tail call void @___inc_future_refcount(i64 %73) - %74 = load i64, ptr %3, align 4 - %75 = lshr i64 %74, %"376_0.sroa.15.01324" - %76 = trunc i64 %75 to i1 - br i1 %76, label %__barray_check_bounds.exit1286, label %panic.i1283 - -panic.i1283: ; preds = %__barray_check_bounds.exit1282 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_check_bounds.exit1286: ; preds = %__barray_check_bounds.exit1282 - %77 = xor i64 %74, %70 - store i64 %77, ptr %3, align 4 - store i64 %73, ptr %72, align 4 - %read_bool = tail call i1 @___read_future_bool(i64 %73) - tail call void @___dec_future_refcount(i64 %73) - %78 = load i64, ptr %1, align 4 - %79 = lshr i64 %78, %"376_0.sroa.15.01324" - %80 = trunc i64 %79 to i1 - br i1 %80, label %cond_exit_380, label %panic.i1287 - -panic.i1287: ; preds = %__barray_check_bounds.exit1286 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -cond_566_case_0: ; preds = %cond_exit_566 - %81 = load i64, ptr %3, align 4 - %82 = or i64 %81, -1048576 - store i64 %82, ptr %3, align 4 - %83 = icmp eq i64 %82, -1 - br i1 %83, label %loop_out537, label %mask_block_err.i1292 - -mask_block_err.i1292: ; preds = %cond_566_case_0 - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_check_bounds.exit1296: ; preds = %cond_exit_380, %cond_exit_566 - %"563_0.01331" = phi i64 [ %84, %cond_exit_566 ], [ 0, %cond_exit_380 ] - %84 = add nuw nsw i64 %"563_0.01331", 1 - %85 = load i64, ptr %3, align 4 - %86 = lshr i64 %85, %"563_0.01331" - %87 = trunc i64 %86 to i1 - br i1 %87, label %cond_exit_566, label %__barray_mask_borrow.exit1300 - -__barray_mask_borrow.exit1300: ; preds = %__barray_check_bounds.exit1296 - %88 = shl nuw nsw i64 1, %"563_0.01331" - %89 = xor i64 %85, %88 - store i64 %89, ptr %3, align 4 - %90 = getelementptr inbounds nuw i64, ptr %2, i64 %"563_0.01331" - %91 = load i64, ptr %90, align 4 - tail call void @___dec_future_refcount(i64 %91) - br label %cond_exit_566 - -cond_exit_566: ; preds = %__barray_mask_borrow.exit1300, %__barray_check_bounds.exit1296 - %92 = icmp samesign ugt i64 %"563_0.01331", 18 - br i1 %92, label %cond_566_case_0, label %__barray_check_bounds.exit1296 - -cond_exit_380: ; preds = %__barray_check_bounds.exit1286 - %93 = xor i64 %78, %70 - store i64 %93, ptr %1, align 4 - %94 = getelementptr inbounds nuw i1, ptr %0, i64 %"376_0.sroa.15.01324" - store i1 %read_bool, ptr %94, align 1 - %95 = icmp eq i64 %"376_0.sroa.15.01324", 19 - br i1 %95, label %__barray_check_bounds.exit1296, label %__barray_check_bounds.exit1278 - -loop_out537: ; preds = %cond_566_case_0 - tail call void @heap_free(ptr %2) - tail call void @heap_free(ptr nonnull %3) - %96 = load i64, ptr %1, align 4 - %97 = and i64 %96, 1048575 - store i64 %97, ptr %1, align 4 - %98 = icmp eq i64 %97, 0 - br i1 %98, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1301 - -mask_block_err.i1301: ; preds = %loop_out537 - tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") - unreachable - -__barray_check_none_borrowed.exit: ; preds = %loop_out537 - %99 = tail call ptr @heap_alloc(i64 20) - %100 = tail call ptr @heap_alloc(i64 8) - store i64 0, ptr %100, align 1 - tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(20) %99, ptr noundef nonnull align 1 dereferenceable(20) %0, i64 20, i1 false) - tail call void @heap_free(ptr nonnull %99) - %101 = load i64, ptr %1, align 4 - %102 = and i64 %101, 1048575 - store i64 %102, ptr %1, align 4 - %103 = icmp eq i64 %102, 0 - br i1 %103, label %__barray_check_none_borrowed.exit1305, label %mask_block_err.i1303 - -mask_block_err.i1303: ; preds = %__barray_check_none_borrowed.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") - unreachable - -__barray_check_none_borrowed.exit1305: ; preds = %__barray_check_none_borrowed.exit - %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 - %y_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 4 - %arr_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 8 - %mask_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 16 - %104 = alloca [20 x i1], align 1 - call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(20) %104, i8 0, i64 20, i1 false) - store i32 20, ptr %out_arr_alloca, align 8 - store i32 1, ptr %y_ptr, align 4 - store ptr %0, ptr %arr_ptr, align 8 - store ptr %104, ptr %mask_ptr, align 8 - call void @print_bool_arr(ptr nonnull @res_tail.AD5A440E.0, i64 17, ptr nonnull %out_arr_alloca) - ret void -} - -declare ptr @heap_alloc(i64) local_unnamed_addr - -; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) -declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immarg) #0 - -; Function Attrs: noreturn -declare void @panic(i32, ptr) local_unnamed_addr #1 - -declare i64 @___lazy_measure_leaked(i64) local_unnamed_addr - -declare void @___qfree(i64) local_unnamed_addr - -declare void @___inc_future_refcount(i64) local_unnamed_addr - -declare i64 @___read_future_uint(i64) local_unnamed_addr - -declare void @___dec_future_refcount(i64) local_unnamed_addr - -declare void @print_int(ptr, i64, i64) local_unnamed_addr - -declare void @print_bool(ptr, i64, i1) local_unnamed_addr - -declare void @heap_free(ptr) local_unnamed_addr - -declare i64 @___lazy_measure(i64) local_unnamed_addr - -declare i1 @___read_future_bool(i64) local_unnamed_addr - -; Function Attrs: mustprogress 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) #2 - -declare void @print_bool_arr(ptr, i64, ptr) local_unnamed_addr - -declare i64 @___qalloc() local_unnamed_addr - -declare void @___reset(i64) local_unnamed_addr - -declare void @___rxy(i64, double, double) local_unnamed_addr - -declare void @___rz(i64, double) local_unnamed_addr - -declare void @___rzz(i64, i64, double) local_unnamed_addr - -define i64 @qmain(i64 %0) local_unnamed_addr { -entry: - tail call void @setup(i64 %0) - tail call void @__hugr__.__main__.main.1() - %1 = tail call i64 @teardown() - ret i64 %1 -} - -declare void @setup(i64) local_unnamed_addr - -declare i64 @teardown() local_unnamed_addr - -attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } -attributes #1 = { noreturn } -attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) } - -!name = !{!0} - -!0 = !{!"mainlib"} diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_within_tail-helios-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_within_tail-helios-x86_64-windows-gnu.ll deleted file mode 100644 index a191feea..00000000 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_within_tail-helios-x86_64-windows-gnu.ll +++ /dev/null @@ -1,456 +0,0 @@ -; ModuleID = 'hugr' -source_filename = "hugr" -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-gnu" - -@"e_Index out .DD115165.0" = private constant [29 x i8] c"\1CEXIT:INT:Index out of bounds" -@"e_Array alre.5A300C2A.0" = private constant [57 x i8] c"8EXIT:INT:Array already contains an element at this index" -@"e_Array elem.E746B1A3.0" = private constant [43 x i8] c"*EXIT:INT:Array element is already borrowed" -@e_Option.unw.32D4E82D.0 = private constant [43 x i8] c"*EXIT:INT:Option.unwrap: value is `Nothing`" -@res_head_leake.F4F32972.0 = private constant [21 x i8] c"\14USER:INT:head_leaked" -@res_head.AFE8E005.0 = private constant [15 x i8] c"\0EUSER:BOOL:head" -@"e_Array cont.EFA5AC45.0" = private constant [70 x i8] c"EEXIT:INT:Array contains non-borrowed elements and cannot be discarded" -@"e_Some array.A77EF32E.0" = private constant [48 x i8] c"/EXIT:INT:Some array elements have been borrowed" -@res_tail.AD5A440E.0 = private constant [18 x i8] c"\11USER:BOOLARR:tail" -@"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." - -define void @__hugr__.__main__.main.1() local_unnamed_addr { -alloca_block: - %0 = tail call ptr @heap_alloc(i64 20) - %1 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %1, align 1 - %2 = tail call ptr @heap_alloc(i64 160) - %3 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %3, align 1 - %4 = tail call ptr @heap_alloc(i64 160) - %5 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %5, align 1 - %qalloc.i = tail call i64 @___qalloc() - %not_max.not.not.i = icmp eq i64 %qalloc.i, -1 - br i1 %not_max.not.not.i, label %cond_489_case_0.i, label %__hugr__.__tk2_helios_qalloc.485.exit - -cond_489_case_0.i: ; preds = %alloca_block - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_helios_qalloc.485.exit: ; preds = %alloca_block - tail call void @___reset(i64 %qalloc.i) - tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - br label %cond_13_case_1 - -cond_13_case_1: ; preds = %__hugr__.__tk2_helios_qalloc.485.exit, %cond_exit_13 - %"9_2.01321" = phi i64 [ 0, %__hugr__.__tk2_helios_qalloc.485.exit ], [ %6, %cond_exit_13 ] - %6 = add nuw nsw i64 %"9_2.01321", 1 - %qalloc.i1244 = tail call i64 @___qalloc() - %not_max.not.not.i1245 = icmp eq i64 %qalloc.i1244, -1 - br i1 %not_max.not.not.i1245, label %cond_489_case_0.i1246, label %__barray_check_bounds.exit - -cond_489_case_0.i1246: ; preds = %cond_13_case_1 - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__barray_check_bounds.exit: ; preds = %cond_13_case_1 - tail call void @___reset(i64 %qalloc.i1244) - %7 = load i64, ptr %5, align 4 - %8 = lshr i64 %7, %"9_2.01321" - %9 = trunc i64 %8 to i1 - br i1 %9, label %cond_exit_13, label %panic.i - -panic.i: ; preds = %__barray_check_bounds.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -cond_exit_13: ; preds = %__barray_check_bounds.exit - %10 = shl nuw nsw i64 1, %"9_2.01321" - %11 = xor i64 %7, %10 - store i64 %11, ptr %5, align 4 - %12 = getelementptr inbounds nuw i64, ptr %4, i64 %"9_2.01321" - store i64 %qalloc.i1244, ptr %12, align 4 - %exitcond = icmp eq i64 %6, 20 - br i1 %exitcond, label %loop_out, label %cond_13_case_1 - -loop_out: ; preds = %cond_exit_13 - %13 = load i64, ptr %5, align 4 - %14 = trunc i64 %13 to i1 - br i1 %14, label %panic.i1248, label %__barray_mask_borrow.exit - -panic.i1248: ; preds = %loop_out - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit: ; preds = %loop_out - %15 = or disjoint i64 %13, 1 - store i64 %15, ptr %5, align 4 - %16 = load i64, ptr %4, align 4 - tail call void @___rxy(i64 %16, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rzz(i64 %qalloc.i, i64 %16, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18) - tail call void @___rxy(i64 %16, double 0x3FF921FB54442D18, double 0x400921FB54442D18) - tail call void @___rz(i64 %16, double 0xBFF921FB54442D18) - %17 = load i64, ptr %5, align 4 - %18 = trunc i64 %17 to i1 - br i1 %18, label %__barray_mask_return.exit1250, label %panic.i1249 - -panic.i1249: ; preds = %__barray_mask_borrow.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1250: ; preds = %__barray_mask_borrow.exit - %19 = and i64 %17, -2 - store i64 %19, ptr %5, align 4 - store i64 %16, ptr %4, align 4 - br label %__barray_check_bounds.exit1252 - -__barray_check_bounds.exit1252: ; preds = %__barray_mask_return.exit1250, %__barray_mask_return.exit1268 - %20 = phi i64 [ 1, %__barray_mask_return.exit1250 ], [ %42, %__barray_mask_return.exit1268 ] - %"118_0.01322" = phi i64 [ 0, %__barray_mask_return.exit1250 ], [ %20, %__barray_mask_return.exit1268 ] - %21 = load i64, ptr %5, align 4 - %22 = lshr i64 %21, %"118_0.01322" - %23 = trunc i64 %22 to i1 - br i1 %23, label %panic.i1253, label %__barray_check_bounds.exit1256 - -panic.i1253: ; preds = %__barray_check_bounds.exit1252 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1256: ; preds = %__barray_check_bounds.exit1252 - %24 = shl nuw nsw i64 1, %"118_0.01322" - %25 = xor i64 %21, %24 - store i64 %25, ptr %5, align 4 - %26 = getelementptr inbounds nuw i64, ptr %4, i64 %"118_0.01322" - %27 = load i64, ptr %26, align 4 - %28 = lshr i64 %25, %20 - %29 = trunc i64 %28 to i1 - br i1 %29, label %panic.i1257, label %__barray_check_bounds.exit1262 - -panic.i1257: ; preds = %__barray_check_bounds.exit1256 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1262: ; preds = %__barray_check_bounds.exit1256 - %30 = shl nuw nsw i64 2, %"118_0.01322" - %31 = xor i64 %25, %30 - store i64 %31, ptr %5, align 4 - %32 = getelementptr inbounds nuw i64, ptr %4, i64 %20 - %33 = load i64, ptr %32, align 4 - tail call void @___rxy(i64 %33, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rzz(i64 %27, i64 %33, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %27, double 0xBFF921FB54442D18) - tail call void @___rxy(i64 %33, double 0x3FF921FB54442D18, double 0x400921FB54442D18) - tail call void @___rz(i64 %33, double 0xBFF921FB54442D18) - %34 = load i64, ptr %5, align 4 - %35 = lshr i64 %34, %"118_0.01322" - %36 = trunc i64 %35 to i1 - br i1 %36, label %__barray_check_bounds.exit1266, label %panic.i1263 - -panic.i1263: ; preds = %__barray_check_bounds.exit1262 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_check_bounds.exit1266: ; preds = %__barray_check_bounds.exit1262 - %37 = xor i64 %34, %24 - store i64 %37, ptr %5, align 4 - store i64 %27, ptr %26, align 4 - %38 = load i64, ptr %5, align 4 - %39 = lshr i64 %38, %20 - %40 = trunc i64 %39 to i1 - br i1 %40, label %__barray_mask_return.exit1268, label %panic.i1267 - -panic.i1267: ; preds = %__barray_check_bounds.exit1266 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1268: ; preds = %__barray_check_bounds.exit1266 - %41 = xor i64 %38, %30 - store i64 %41, ptr %5, align 4 - store i64 %33, ptr %32, align 4 - %42 = add nuw nsw i64 %20, 1 - %exitcond1325 = icmp eq i64 %42, 20 - br i1 %exitcond1325, label %cond_exit_189, label %__barray_check_bounds.exit1252 - -cond_exit_189: ; preds = %__barray_mask_return.exit1268 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) - tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure_leaked) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - %43 = icmp eq i64 %read_uint, 2 - br i1 %43, label %44, label %cond_exit_267 - -cond_exit_267: ; preds = %cond_exit_189 - %read_uint378 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - %.not = icmp eq i64 %read_uint378, 2 - br i1 %.not, label %cond_247_case_0, label %cond_247_case_1 - -44: ; preds = %cond_exit_189 - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - tail call void @print_int(ptr nonnull @res_head_leake.F4F32972.0, i64 20, i64 1) - br label %__barray_check_bounds.exit1274.preheader - -__barray_check_bounds.exit1274.preheader: ; preds = %cond_247_case_1, %44 - br label %__barray_check_bounds.exit1274 - -cond_247_case_1: ; preds = %cond_exit_267 - %45 = icmp eq i64 %read_uint378, 1 - tail call void @print_bool(ptr nonnull @res_head.AFE8E005.0, i64 14, i1 %45) - br label %__barray_check_bounds.exit1274.preheader - -cond_247_case_0: ; preds = %cond_exit_267 - tail call void @panic(i32 1001, ptr nonnull @e_Option.unw.32D4E82D.0) - unreachable - -out_of_bounds.i1269: ; preds = %.thread - tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") - unreachable - -__barray_check_bounds.exit1270: ; preds = %.thread - %46 = load i64, ptr %3, align 4 - %47 = lshr i64 %46, %"310_2.01329" - %48 = trunc i64 %47 to i1 - br i1 %48, label %cond_exit_314, label %panic.i1271 - -panic.i1271: ; preds = %__barray_check_bounds.exit1270 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -mask_block_ok.i: ; preds = %cond_exit_314 - %49 = load i64, ptr %5, align 4 - %50 = or i64 %49, -1048576 - store i64 %50, ptr %5, align 4 - %51 = icmp eq i64 %50, -1 - br i1 %51, label %loop_body538.preheader.preheader, label %mask_block_err.i - -mask_block_err.i: ; preds = %mask_block_ok.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_check_bounds.exit1274: ; preds = %__barray_check_bounds.exit1274.preheader, %cond_exit_314 - %"310_0.sroa.15.01330" = phi i64 [ %52, %cond_exit_314 ], [ 0, %__barray_check_bounds.exit1274.preheader ] - %"310_2.01329" = phi i64 [ %60, %cond_exit_314 ], [ 0, %__barray_check_bounds.exit1274.preheader ] - %52 = add nuw nsw i64 %"310_0.sroa.15.01330", 1 - %53 = load i64, ptr %5, align 4 - %54 = lshr i64 %53, %"310_0.sroa.15.01330" - %55 = trunc i64 %54 to i1 - br i1 %55, label %panic.i1275, label %.thread - -panic.i1275: ; preds = %__barray_check_bounds.exit1274 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -.thread: ; preds = %__barray_check_bounds.exit1274 - %56 = shl nuw nsw i64 1, %"310_0.sroa.15.01330" - %57 = xor i64 %53, %56 - store i64 %57, ptr %5, align 4 - %58 = getelementptr inbounds nuw i64, ptr %4, i64 %"310_0.sroa.15.01330" - %59 = load i64, ptr %58, align 4 - %60 = add i64 %"310_2.01329", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %59) - tail call void @___qfree(i64 %59) - %61 = icmp ult i64 %"310_2.01329", 20 - br i1 %61, label %__barray_check_bounds.exit1270, label %out_of_bounds.i1269 - -cond_exit_314: ; preds = %__barray_check_bounds.exit1270 - %62 = shl nuw nsw i64 1, %"310_2.01329" - %63 = xor i64 %46, %62 - store i64 %63, ptr %3, align 4 - %64 = getelementptr inbounds nuw i64, ptr %2, i64 %"310_2.01329" - store i64 %lazy_measure, ptr %64, align 4 - %65 = icmp samesign ugt i64 %"310_0.sroa.15.01330", 18 - br i1 %65, label %mask_block_ok.i, label %__barray_check_bounds.exit1274 - -loop_body538.preheader.preheader: ; preds = %mask_block_ok.i - tail call void @heap_free(ptr nonnull %4) - tail call void @heap_free(ptr nonnull %5) - br label %__barray_check_bounds.exit1278 - -__barray_check_bounds.exit1278: ; preds = %cond_exit_380, %loop_body538.preheader.preheader - %"376_0.sroa.15.01324" = phi i64 [ %66, %cond_exit_380 ], [ 0, %loop_body538.preheader.preheader ] - %66 = add nuw nsw i64 %"376_0.sroa.15.01324", 1 - %67 = load i64, ptr %3, align 4 - %68 = lshr i64 %67, %"376_0.sroa.15.01324" - %69 = trunc i64 %68 to i1 - br i1 %69, label %panic.i1279, label %__barray_check_bounds.exit1282 - -panic.i1279: ; preds = %__barray_check_bounds.exit1278 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1282: ; preds = %__barray_check_bounds.exit1278 - %70 = shl nuw nsw i64 1, %"376_0.sroa.15.01324" - %71 = xor i64 %67, %70 - store i64 %71, ptr %3, align 4 - %72 = getelementptr inbounds nuw i64, ptr %2, i64 %"376_0.sroa.15.01324" - %73 = load i64, ptr %72, align 4 - tail call void @___inc_future_refcount(i64 %73) - %74 = load i64, ptr %3, align 4 - %75 = lshr i64 %74, %"376_0.sroa.15.01324" - %76 = trunc i64 %75 to i1 - br i1 %76, label %__barray_check_bounds.exit1286, label %panic.i1283 - -panic.i1283: ; preds = %__barray_check_bounds.exit1282 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_check_bounds.exit1286: ; preds = %__barray_check_bounds.exit1282 - %77 = xor i64 %74, %70 - store i64 %77, ptr %3, align 4 - store i64 %73, ptr %72, align 4 - %read_bool = tail call i1 @___read_future_bool(i64 %73) - tail call void @___dec_future_refcount(i64 %73) - %78 = load i64, ptr %1, align 4 - %79 = lshr i64 %78, %"376_0.sroa.15.01324" - %80 = trunc i64 %79 to i1 - br i1 %80, label %cond_exit_380, label %panic.i1287 - -panic.i1287: ; preds = %__barray_check_bounds.exit1286 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -cond_566_case_0: ; preds = %cond_exit_566 - %81 = load i64, ptr %3, align 4 - %82 = or i64 %81, -1048576 - store i64 %82, ptr %3, align 4 - %83 = icmp eq i64 %82, -1 - br i1 %83, label %loop_out537, label %mask_block_err.i1292 - -mask_block_err.i1292: ; preds = %cond_566_case_0 - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_check_bounds.exit1296: ; preds = %cond_exit_380, %cond_exit_566 - %"563_0.01331" = phi i64 [ %84, %cond_exit_566 ], [ 0, %cond_exit_380 ] - %84 = add nuw nsw i64 %"563_0.01331", 1 - %85 = load i64, ptr %3, align 4 - %86 = lshr i64 %85, %"563_0.01331" - %87 = trunc i64 %86 to i1 - br i1 %87, label %cond_exit_566, label %__barray_mask_borrow.exit1300 - -__barray_mask_borrow.exit1300: ; preds = %__barray_check_bounds.exit1296 - %88 = shl nuw nsw i64 1, %"563_0.01331" - %89 = xor i64 %85, %88 - store i64 %89, ptr %3, align 4 - %90 = getelementptr inbounds nuw i64, ptr %2, i64 %"563_0.01331" - %91 = load i64, ptr %90, align 4 - tail call void @___dec_future_refcount(i64 %91) - br label %cond_exit_566 - -cond_exit_566: ; preds = %__barray_mask_borrow.exit1300, %__barray_check_bounds.exit1296 - %92 = icmp samesign ugt i64 %"563_0.01331", 18 - br i1 %92, label %cond_566_case_0, label %__barray_check_bounds.exit1296 - -cond_exit_380: ; preds = %__barray_check_bounds.exit1286 - %93 = xor i64 %78, %70 - store i64 %93, ptr %1, align 4 - %94 = getelementptr inbounds nuw i1, ptr %0, i64 %"376_0.sroa.15.01324" - store i1 %read_bool, ptr %94, align 1 - %95 = icmp eq i64 %"376_0.sroa.15.01324", 19 - br i1 %95, label %__barray_check_bounds.exit1296, label %__barray_check_bounds.exit1278 - -loop_out537: ; preds = %cond_566_case_0 - tail call void @heap_free(ptr %2) - tail call void @heap_free(ptr nonnull %3) - %96 = load i64, ptr %1, align 4 - %97 = and i64 %96, 1048575 - store i64 %97, ptr %1, align 4 - %98 = icmp eq i64 %97, 0 - br i1 %98, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1301 - -mask_block_err.i1301: ; preds = %loop_out537 - tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") - unreachable - -__barray_check_none_borrowed.exit: ; preds = %loop_out537 - %99 = tail call ptr @heap_alloc(i64 20) - %100 = tail call ptr @heap_alloc(i64 8) - store i64 0, ptr %100, align 1 - tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(20) %99, ptr noundef nonnull align 1 dereferenceable(20) %0, i64 20, i1 false) - tail call void @heap_free(ptr nonnull %99) - %101 = load i64, ptr %1, align 4 - %102 = and i64 %101, 1048575 - store i64 %102, ptr %1, align 4 - %103 = icmp eq i64 %102, 0 - br i1 %103, label %__barray_check_none_borrowed.exit1305, label %mask_block_err.i1303 - -mask_block_err.i1303: ; preds = %__barray_check_none_borrowed.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") - unreachable - -__barray_check_none_borrowed.exit1305: ; preds = %__barray_check_none_borrowed.exit - %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 - %y_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 4 - %arr_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 8 - %mask_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 16 - %104 = alloca [20 x i1], align 1 - call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(20) %104, i8 0, i64 20, i1 false) - store i32 20, ptr %out_arr_alloca, align 8 - store i32 1, ptr %y_ptr, align 4 - store ptr %0, ptr %arr_ptr, align 8 - store ptr %104, ptr %mask_ptr, align 8 - call void @print_bool_arr(ptr nonnull @res_tail.AD5A440E.0, i64 17, ptr nonnull %out_arr_alloca) - ret void -} - -declare ptr @heap_alloc(i64) local_unnamed_addr - -; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) -declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immarg) #0 - -; Function Attrs: noreturn -declare void @panic(i32, ptr) local_unnamed_addr #1 - -declare i64 @___lazy_measure_leaked(i64) local_unnamed_addr - -declare void @___qfree(i64) local_unnamed_addr - -declare void @___inc_future_refcount(i64) local_unnamed_addr - -declare i64 @___read_future_uint(i64) local_unnamed_addr - -declare void @___dec_future_refcount(i64) local_unnamed_addr - -declare void @print_int(ptr, i64, i64) local_unnamed_addr - -declare void @print_bool(ptr, i64, i1) local_unnamed_addr - -declare void @heap_free(ptr) local_unnamed_addr - -declare i64 @___lazy_measure(i64) local_unnamed_addr - -declare i1 @___read_future_bool(i64) local_unnamed_addr - -; Function Attrs: mustprogress 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) #2 - -declare void @print_bool_arr(ptr, i64, ptr) local_unnamed_addr - -declare i64 @___qalloc() local_unnamed_addr - -declare void @___reset(i64) local_unnamed_addr - -declare void @___rxy(i64, double, double) local_unnamed_addr - -declare void @___rz(i64, double) local_unnamed_addr - -declare void @___rzz(i64, i64, double) local_unnamed_addr - -define i64 @qmain(i64 %0) local_unnamed_addr { -entry: - tail call void @setup(i64 %0) - tail call void @__hugr__.__main__.main.1() - %1 = tail call i64 @teardown() - ret i64 %1 -} - -declare void @setup(i64) local_unnamed_addr - -declare i64 @teardown() local_unnamed_addr - -attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } -attributes #1 = { noreturn } -attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) } - -!name = !{!0} - -!0 = !{!"mainlib"} diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_within_tail-sol-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_within_tail-sol-aarch64-apple-darwin.ll deleted file mode 100644 index 3fff3483..00000000 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_within_tail-sol-aarch64-apple-darwin.ll +++ /dev/null @@ -1,456 +0,0 @@ -; ModuleID = 'hugr' -source_filename = "hugr" -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_Index out .DD115165.0" = private constant [29 x i8] c"\1CEXIT:INT:Index out of bounds" -@"e_Array alre.5A300C2A.0" = private constant [57 x i8] c"8EXIT:INT:Array already contains an element at this index" -@"e_Array elem.E746B1A3.0" = private constant [43 x i8] c"*EXIT:INT:Array element is already borrowed" -@e_Option.unw.32D4E82D.0 = private constant [43 x i8] c"*EXIT:INT:Option.unwrap: value is `Nothing`" -@res_head_leake.F4F32972.0 = private constant [21 x i8] c"\14USER:INT:head_leaked" -@res_head.AFE8E005.0 = private constant [15 x i8] c"\0EUSER:BOOL:head" -@"e_Array cont.EFA5AC45.0" = private constant [70 x i8] c"EEXIT:INT:Array contains non-borrowed elements and cannot be discarded" -@"e_Some array.A77EF32E.0" = private constant [48 x i8] c"/EXIT:INT:Some array elements have been borrowed" -@res_tail.AD5A440E.0 = private constant [18 x i8] c"\11USER:BOOLARR:tail" -@"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." - -define void @__hugr__.__main__.main.1() local_unnamed_addr { -alloca_block: - %0 = tail call ptr @heap_alloc(i64 20) - %1 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %1, align 1 - %2 = tail call ptr @heap_alloc(i64 160) - %3 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %3, align 1 - %4 = tail call ptr @heap_alloc(i64 160) - %5 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %5, align 1 - %qalloc.i = tail call i64 @___qalloc() - %not_max.not.not.i = icmp eq i64 %qalloc.i, -1 - br i1 %not_max.not.not.i, label %cond_489_case_0.i, label %__hugr__.__tk2_sol_qalloc.485.exit - -cond_489_case_0.i: ; preds = %alloca_block - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_sol_qalloc.485.exit: ; preds = %alloca_block - tail call void @___reset(i64 %qalloc.i) - tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - br label %cond_13_case_1 - -cond_13_case_1: ; preds = %__hugr__.__tk2_sol_qalloc.485.exit, %cond_exit_13 - %"9_2.01321" = phi i64 [ 0, %__hugr__.__tk2_sol_qalloc.485.exit ], [ %6, %cond_exit_13 ] - %6 = add nuw nsw i64 %"9_2.01321", 1 - %qalloc.i1244 = tail call i64 @___qalloc() - %not_max.not.not.i1245 = icmp eq i64 %qalloc.i1244, -1 - br i1 %not_max.not.not.i1245, label %cond_489_case_0.i1246, label %__barray_check_bounds.exit - -cond_489_case_0.i1246: ; preds = %cond_13_case_1 - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__barray_check_bounds.exit: ; preds = %cond_13_case_1 - tail call void @___reset(i64 %qalloc.i1244) - %7 = load i64, ptr %5, align 4 - %8 = lshr i64 %7, %"9_2.01321" - %9 = trunc i64 %8 to i1 - br i1 %9, label %cond_exit_13, label %panic.i - -panic.i: ; preds = %__barray_check_bounds.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -cond_exit_13: ; preds = %__barray_check_bounds.exit - %10 = shl nuw nsw i64 1, %"9_2.01321" - %11 = xor i64 %7, %10 - store i64 %11, ptr %5, align 4 - %12 = getelementptr inbounds nuw i64, ptr %4, i64 %"9_2.01321" - store i64 %qalloc.i1244, ptr %12, align 4 - %exitcond = icmp eq i64 %6, 20 - br i1 %exitcond, label %loop_out, label %cond_13_case_1 - -loop_out: ; preds = %cond_exit_13 - %13 = load i64, ptr %5, align 4 - %14 = trunc i64 %13 to i1 - br i1 %14, label %panic.i1248, label %__barray_mask_borrow.exit - -panic.i1248: ; preds = %loop_out - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit: ; preds = %loop_out - %15 = or disjoint i64 %13, 1 - store i64 %15, ptr %5, align 4 - %16 = load i64, ptr %4, align 4 - tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rpp(i64 %qalloc.i, i64 %16, double 0x3FF921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %16, double 0xBFF921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %qalloc.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18) - %17 = load i64, ptr %5, align 4 - %18 = trunc i64 %17 to i1 - br i1 %18, label %__barray_mask_return.exit1250, label %panic.i1249 - -panic.i1249: ; preds = %__barray_mask_borrow.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1250: ; preds = %__barray_mask_borrow.exit - %19 = and i64 %17, -2 - store i64 %19, ptr %5, align 4 - store i64 %16, ptr %4, align 4 - br label %__barray_check_bounds.exit1252 - -__barray_check_bounds.exit1252: ; preds = %__barray_mask_return.exit1250, %__barray_mask_return.exit1268 - %20 = phi i64 [ 1, %__barray_mask_return.exit1250 ], [ %42, %__barray_mask_return.exit1268 ] - %"118_0.01322" = phi i64 [ 0, %__barray_mask_return.exit1250 ], [ %20, %__barray_mask_return.exit1268 ] - %21 = load i64, ptr %5, align 4 - %22 = lshr i64 %21, %"118_0.01322" - %23 = trunc i64 %22 to i1 - br i1 %23, label %panic.i1253, label %__barray_check_bounds.exit1256 - -panic.i1253: ; preds = %__barray_check_bounds.exit1252 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1256: ; preds = %__barray_check_bounds.exit1252 - %24 = shl nuw nsw i64 1, %"118_0.01322" - %25 = xor i64 %21, %24 - store i64 %25, ptr %5, align 4 - %26 = getelementptr inbounds nuw i64, ptr %4, i64 %"118_0.01322" - %27 = load i64, ptr %26, align 4 - %28 = lshr i64 %25, %20 - %29 = trunc i64 %28 to i1 - br i1 %29, label %panic.i1257, label %__barray_check_bounds.exit1262 - -panic.i1257: ; preds = %__barray_check_bounds.exit1256 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1262: ; preds = %__barray_check_bounds.exit1256 - %30 = shl nuw nsw i64 2, %"118_0.01322" - %31 = xor i64 %25, %30 - store i64 %31, ptr %5, align 4 - %32 = getelementptr inbounds nuw i64, ptr %4, i64 %20 - %33 = load i64, ptr %32, align 4 - tail call void @___rp(i64 %27, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rpp(i64 %27, i64 %33, double 0x3FF921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %33, double 0xBFF921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %27, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %27, double 0xBFF921FB54442D18) - %34 = load i64, ptr %5, align 4 - %35 = lshr i64 %34, %"118_0.01322" - %36 = trunc i64 %35 to i1 - br i1 %36, label %__barray_check_bounds.exit1266, label %panic.i1263 - -panic.i1263: ; preds = %__barray_check_bounds.exit1262 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_check_bounds.exit1266: ; preds = %__barray_check_bounds.exit1262 - %37 = xor i64 %34, %24 - store i64 %37, ptr %5, align 4 - store i64 %27, ptr %26, align 4 - %38 = load i64, ptr %5, align 4 - %39 = lshr i64 %38, %20 - %40 = trunc i64 %39 to i1 - br i1 %40, label %__barray_mask_return.exit1268, label %panic.i1267 - -panic.i1267: ; preds = %__barray_check_bounds.exit1266 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1268: ; preds = %__barray_check_bounds.exit1266 - %41 = xor i64 %38, %30 - store i64 %41, ptr %5, align 4 - store i64 %33, ptr %32, align 4 - %42 = add nuw nsw i64 %20, 1 - %exitcond1325 = icmp eq i64 %42, 20 - br i1 %exitcond1325, label %cond_exit_189, label %__barray_check_bounds.exit1252 - -cond_exit_189: ; preds = %__barray_mask_return.exit1268 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) - tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure_leaked) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - %43 = icmp eq i64 %read_uint, 2 - br i1 %43, label %44, label %cond_exit_267 - -cond_exit_267: ; preds = %cond_exit_189 - %read_uint378 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - %.not = icmp eq i64 %read_uint378, 2 - br i1 %.not, label %cond_247_case_0, label %cond_247_case_1 - -44: ; preds = %cond_exit_189 - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - tail call void @print_int(ptr nonnull @res_head_leake.F4F32972.0, i64 20, i64 1) - br label %__barray_check_bounds.exit1274.preheader - -__barray_check_bounds.exit1274.preheader: ; preds = %cond_247_case_1, %44 - br label %__barray_check_bounds.exit1274 - -cond_247_case_1: ; preds = %cond_exit_267 - %45 = icmp eq i64 %read_uint378, 1 - tail call void @print_bool(ptr nonnull @res_head.AFE8E005.0, i64 14, i1 %45) - br label %__barray_check_bounds.exit1274.preheader - -cond_247_case_0: ; preds = %cond_exit_267 - tail call void @panic(i32 1001, ptr nonnull @e_Option.unw.32D4E82D.0) - unreachable - -out_of_bounds.i1269: ; preds = %.thread - tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") - unreachable - -__barray_check_bounds.exit1270: ; preds = %.thread - %46 = load i64, ptr %3, align 4 - %47 = lshr i64 %46, %"310_2.01329" - %48 = trunc i64 %47 to i1 - br i1 %48, label %cond_exit_314, label %panic.i1271 - -panic.i1271: ; preds = %__barray_check_bounds.exit1270 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -mask_block_ok.i: ; preds = %cond_exit_314 - %49 = load i64, ptr %5, align 4 - %50 = or i64 %49, -1048576 - store i64 %50, ptr %5, align 4 - %51 = icmp eq i64 %50, -1 - br i1 %51, label %loop_body538.preheader.preheader, label %mask_block_err.i - -mask_block_err.i: ; preds = %mask_block_ok.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_check_bounds.exit1274: ; preds = %__barray_check_bounds.exit1274.preheader, %cond_exit_314 - %"310_0.sroa.15.01330" = phi i64 [ %52, %cond_exit_314 ], [ 0, %__barray_check_bounds.exit1274.preheader ] - %"310_2.01329" = phi i64 [ %60, %cond_exit_314 ], [ 0, %__barray_check_bounds.exit1274.preheader ] - %52 = add nuw nsw i64 %"310_0.sroa.15.01330", 1 - %53 = load i64, ptr %5, align 4 - %54 = lshr i64 %53, %"310_0.sroa.15.01330" - %55 = trunc i64 %54 to i1 - br i1 %55, label %panic.i1275, label %.thread - -panic.i1275: ; preds = %__barray_check_bounds.exit1274 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -.thread: ; preds = %__barray_check_bounds.exit1274 - %56 = shl nuw nsw i64 1, %"310_0.sroa.15.01330" - %57 = xor i64 %53, %56 - store i64 %57, ptr %5, align 4 - %58 = getelementptr inbounds nuw i64, ptr %4, i64 %"310_0.sroa.15.01330" - %59 = load i64, ptr %58, align 4 - %60 = add i64 %"310_2.01329", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %59) - tail call void @___qfree(i64 %59) - %61 = icmp ult i64 %"310_2.01329", 20 - br i1 %61, label %__barray_check_bounds.exit1270, label %out_of_bounds.i1269 - -cond_exit_314: ; preds = %__barray_check_bounds.exit1270 - %62 = shl nuw nsw i64 1, %"310_2.01329" - %63 = xor i64 %46, %62 - store i64 %63, ptr %3, align 4 - %64 = getelementptr inbounds nuw i64, ptr %2, i64 %"310_2.01329" - store i64 %lazy_measure, ptr %64, align 4 - %65 = icmp samesign ugt i64 %"310_0.sroa.15.01330", 18 - br i1 %65, label %mask_block_ok.i, label %__barray_check_bounds.exit1274 - -loop_body538.preheader.preheader: ; preds = %mask_block_ok.i - tail call void @heap_free(ptr nonnull %4) - tail call void @heap_free(ptr nonnull %5) - br label %__barray_check_bounds.exit1278 - -__barray_check_bounds.exit1278: ; preds = %cond_exit_380, %loop_body538.preheader.preheader - %"376_0.sroa.15.01324" = phi i64 [ %66, %cond_exit_380 ], [ 0, %loop_body538.preheader.preheader ] - %66 = add nuw nsw i64 %"376_0.sroa.15.01324", 1 - %67 = load i64, ptr %3, align 4 - %68 = lshr i64 %67, %"376_0.sroa.15.01324" - %69 = trunc i64 %68 to i1 - br i1 %69, label %panic.i1279, label %__barray_check_bounds.exit1282 - -panic.i1279: ; preds = %__barray_check_bounds.exit1278 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1282: ; preds = %__barray_check_bounds.exit1278 - %70 = shl nuw nsw i64 1, %"376_0.sroa.15.01324" - %71 = xor i64 %67, %70 - store i64 %71, ptr %3, align 4 - %72 = getelementptr inbounds nuw i64, ptr %2, i64 %"376_0.sroa.15.01324" - %73 = load i64, ptr %72, align 4 - tail call void @___inc_future_refcount(i64 %73) - %74 = load i64, ptr %3, align 4 - %75 = lshr i64 %74, %"376_0.sroa.15.01324" - %76 = trunc i64 %75 to i1 - br i1 %76, label %__barray_check_bounds.exit1286, label %panic.i1283 - -panic.i1283: ; preds = %__barray_check_bounds.exit1282 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_check_bounds.exit1286: ; preds = %__barray_check_bounds.exit1282 - %77 = xor i64 %74, %70 - store i64 %77, ptr %3, align 4 - store i64 %73, ptr %72, align 4 - %read_bool = tail call i1 @___read_future_bool(i64 %73) - tail call void @___dec_future_refcount(i64 %73) - %78 = load i64, ptr %1, align 4 - %79 = lshr i64 %78, %"376_0.sroa.15.01324" - %80 = trunc i64 %79 to i1 - br i1 %80, label %cond_exit_380, label %panic.i1287 - -panic.i1287: ; preds = %__barray_check_bounds.exit1286 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -cond_565_case_0: ; preds = %cond_exit_565 - %81 = load i64, ptr %3, align 4 - %82 = or i64 %81, -1048576 - store i64 %82, ptr %3, align 4 - %83 = icmp eq i64 %82, -1 - br i1 %83, label %loop_out537, label %mask_block_err.i1292 - -mask_block_err.i1292: ; preds = %cond_565_case_0 - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_check_bounds.exit1296: ; preds = %cond_exit_380, %cond_exit_565 - %"562_0.01331" = phi i64 [ %84, %cond_exit_565 ], [ 0, %cond_exit_380 ] - %84 = add nuw nsw i64 %"562_0.01331", 1 - %85 = load i64, ptr %3, align 4 - %86 = lshr i64 %85, %"562_0.01331" - %87 = trunc i64 %86 to i1 - br i1 %87, label %cond_exit_565, label %__barray_mask_borrow.exit1300 - -__barray_mask_borrow.exit1300: ; preds = %__barray_check_bounds.exit1296 - %88 = shl nuw nsw i64 1, %"562_0.01331" - %89 = xor i64 %85, %88 - store i64 %89, ptr %3, align 4 - %90 = getelementptr inbounds nuw i64, ptr %2, i64 %"562_0.01331" - %91 = load i64, ptr %90, align 4 - tail call void @___dec_future_refcount(i64 %91) - br label %cond_exit_565 - -cond_exit_565: ; preds = %__barray_mask_borrow.exit1300, %__barray_check_bounds.exit1296 - %92 = icmp samesign ugt i64 %"562_0.01331", 18 - br i1 %92, label %cond_565_case_0, label %__barray_check_bounds.exit1296 - -cond_exit_380: ; preds = %__barray_check_bounds.exit1286 - %93 = xor i64 %78, %70 - store i64 %93, ptr %1, align 4 - %94 = getelementptr inbounds nuw i1, ptr %0, i64 %"376_0.sroa.15.01324" - store i1 %read_bool, ptr %94, align 1 - %95 = icmp eq i64 %"376_0.sroa.15.01324", 19 - br i1 %95, label %__barray_check_bounds.exit1296, label %__barray_check_bounds.exit1278 - -loop_out537: ; preds = %cond_565_case_0 - tail call void @heap_free(ptr %2) - tail call void @heap_free(ptr nonnull %3) - %96 = load i64, ptr %1, align 4 - %97 = and i64 %96, 1048575 - store i64 %97, ptr %1, align 4 - %98 = icmp eq i64 %97, 0 - br i1 %98, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1301 - -mask_block_err.i1301: ; preds = %loop_out537 - tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") - unreachable - -__barray_check_none_borrowed.exit: ; preds = %loop_out537 - %99 = tail call ptr @heap_alloc(i64 20) - %100 = tail call ptr @heap_alloc(i64 8) - store i64 0, ptr %100, align 1 - tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(20) %99, ptr noundef nonnull align 1 dereferenceable(20) %0, i64 20, i1 false) - tail call void @heap_free(ptr nonnull %99) - %101 = load i64, ptr %1, align 4 - %102 = and i64 %101, 1048575 - store i64 %102, ptr %1, align 4 - %103 = icmp eq i64 %102, 0 - br i1 %103, label %__barray_check_none_borrowed.exit1305, label %mask_block_err.i1303 - -mask_block_err.i1303: ; preds = %__barray_check_none_borrowed.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") - unreachable - -__barray_check_none_borrowed.exit1305: ; preds = %__barray_check_none_borrowed.exit - %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 - %y_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 4 - %arr_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 8 - %mask_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 16 - %104 = alloca [20 x i1], align 1 - call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(20) %104, i8 0, i64 20, i1 false) - store i32 20, ptr %out_arr_alloca, align 8 - store i32 1, ptr %y_ptr, align 4 - store ptr %0, ptr %arr_ptr, align 8 - store ptr %104, ptr %mask_ptr, align 8 - call void @print_bool_arr(ptr nonnull @res_tail.AD5A440E.0, i64 17, ptr nonnull %out_arr_alloca) - ret void -} - -declare ptr @heap_alloc(i64) local_unnamed_addr - -; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) -declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immarg) #0 - -; Function Attrs: noreturn -declare void @panic(i32, ptr) local_unnamed_addr #1 - -declare i64 @___lazy_measure_leaked(i64) local_unnamed_addr - -declare void @___qfree(i64) local_unnamed_addr - -declare void @___inc_future_refcount(i64) local_unnamed_addr - -declare i64 @___read_future_uint(i64) local_unnamed_addr - -declare void @___dec_future_refcount(i64) local_unnamed_addr - -declare void @print_int(ptr, i64, i64) local_unnamed_addr - -declare void @print_bool(ptr, i64, i1) local_unnamed_addr - -declare void @heap_free(ptr) local_unnamed_addr - -declare i64 @___lazy_measure(i64) local_unnamed_addr - -declare i1 @___read_future_bool(i64) local_unnamed_addr - -; Function Attrs: mustprogress 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) #2 - -declare void @print_bool_arr(ptr, i64, ptr) local_unnamed_addr - -declare i64 @___qalloc() local_unnamed_addr - -declare void @___reset(i64) local_unnamed_addr - -declare void @___rp(i64, double, double) local_unnamed_addr - -declare void @___rz(i64, double) local_unnamed_addr - -declare void @___rpp(i64, i64, double, double) local_unnamed_addr - -define i64 @qmain(i64 %0) local_unnamed_addr { -entry: - tail call void @setup(i64 %0) - tail call void @__hugr__.__main__.main.1() - %1 = tail call i64 @teardown() - ret i64 %1 -} - -declare void @setup(i64) local_unnamed_addr - -declare i64 @teardown() local_unnamed_addr - -attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } -attributes #1 = { noreturn } -attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) } - -!name = !{!0} - -!0 = !{!"mainlib"} diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_within_tail-sol-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_within_tail-sol-aarch64-unknown-linux-gnu.ll deleted file mode 100644 index 6b0817c5..00000000 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_within_tail-sol-aarch64-unknown-linux-gnu.ll +++ /dev/null @@ -1,456 +0,0 @@ -; ModuleID = 'hugr' -source_filename = "hugr" -target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32" -target triple = "aarch64-unknown-linux-gnu" - -@"e_Index out .DD115165.0" = private constant [29 x i8] c"\1CEXIT:INT:Index out of bounds" -@"e_Array alre.5A300C2A.0" = private constant [57 x i8] c"8EXIT:INT:Array already contains an element at this index" -@"e_Array elem.E746B1A3.0" = private constant [43 x i8] c"*EXIT:INT:Array element is already borrowed" -@e_Option.unw.32D4E82D.0 = private constant [43 x i8] c"*EXIT:INT:Option.unwrap: value is `Nothing`" -@res_head_leake.F4F32972.0 = private constant [21 x i8] c"\14USER:INT:head_leaked" -@res_head.AFE8E005.0 = private constant [15 x i8] c"\0EUSER:BOOL:head" -@"e_Array cont.EFA5AC45.0" = private constant [70 x i8] c"EEXIT:INT:Array contains non-borrowed elements and cannot be discarded" -@"e_Some array.A77EF32E.0" = private constant [48 x i8] c"/EXIT:INT:Some array elements have been borrowed" -@res_tail.AD5A440E.0 = private constant [18 x i8] c"\11USER:BOOLARR:tail" -@"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." - -define void @__hugr__.__main__.main.1() local_unnamed_addr { -alloca_block: - %0 = tail call ptr @heap_alloc(i64 20) - %1 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %1, align 1 - %2 = tail call ptr @heap_alloc(i64 160) - %3 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %3, align 1 - %4 = tail call ptr @heap_alloc(i64 160) - %5 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %5, align 1 - %qalloc.i = tail call i64 @___qalloc() - %not_max.not.not.i = icmp eq i64 %qalloc.i, -1 - br i1 %not_max.not.not.i, label %cond_489_case_0.i, label %__hugr__.__tk2_sol_qalloc.485.exit - -cond_489_case_0.i: ; preds = %alloca_block - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_sol_qalloc.485.exit: ; preds = %alloca_block - tail call void @___reset(i64 %qalloc.i) - tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - br label %cond_13_case_1 - -cond_13_case_1: ; preds = %__hugr__.__tk2_sol_qalloc.485.exit, %cond_exit_13 - %"9_2.01321" = phi i64 [ 0, %__hugr__.__tk2_sol_qalloc.485.exit ], [ %6, %cond_exit_13 ] - %6 = add nuw nsw i64 %"9_2.01321", 1 - %qalloc.i1244 = tail call i64 @___qalloc() - %not_max.not.not.i1245 = icmp eq i64 %qalloc.i1244, -1 - br i1 %not_max.not.not.i1245, label %cond_489_case_0.i1246, label %__barray_check_bounds.exit - -cond_489_case_0.i1246: ; preds = %cond_13_case_1 - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__barray_check_bounds.exit: ; preds = %cond_13_case_1 - tail call void @___reset(i64 %qalloc.i1244) - %7 = load i64, ptr %5, align 4 - %8 = lshr i64 %7, %"9_2.01321" - %9 = trunc i64 %8 to i1 - br i1 %9, label %cond_exit_13, label %panic.i - -panic.i: ; preds = %__barray_check_bounds.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -cond_exit_13: ; preds = %__barray_check_bounds.exit - %10 = shl nuw nsw i64 1, %"9_2.01321" - %11 = xor i64 %7, %10 - store i64 %11, ptr %5, align 4 - %12 = getelementptr inbounds nuw i64, ptr %4, i64 %"9_2.01321" - store i64 %qalloc.i1244, ptr %12, align 4 - %exitcond = icmp eq i64 %6, 20 - br i1 %exitcond, label %loop_out, label %cond_13_case_1 - -loop_out: ; preds = %cond_exit_13 - %13 = load i64, ptr %5, align 4 - %14 = trunc i64 %13 to i1 - br i1 %14, label %panic.i1248, label %__barray_mask_borrow.exit - -panic.i1248: ; preds = %loop_out - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit: ; preds = %loop_out - %15 = or disjoint i64 %13, 1 - store i64 %15, ptr %5, align 4 - %16 = load i64, ptr %4, align 4 - tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rpp(i64 %qalloc.i, i64 %16, double 0x3FF921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %16, double 0xBFF921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %qalloc.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18) - %17 = load i64, ptr %5, align 4 - %18 = trunc i64 %17 to i1 - br i1 %18, label %__barray_mask_return.exit1250, label %panic.i1249 - -panic.i1249: ; preds = %__barray_mask_borrow.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1250: ; preds = %__barray_mask_borrow.exit - %19 = and i64 %17, -2 - store i64 %19, ptr %5, align 4 - store i64 %16, ptr %4, align 4 - br label %__barray_check_bounds.exit1252 - -__barray_check_bounds.exit1252: ; preds = %__barray_mask_return.exit1250, %__barray_mask_return.exit1268 - %20 = phi i64 [ 1, %__barray_mask_return.exit1250 ], [ %42, %__barray_mask_return.exit1268 ] - %"118_0.01322" = phi i64 [ 0, %__barray_mask_return.exit1250 ], [ %20, %__barray_mask_return.exit1268 ] - %21 = load i64, ptr %5, align 4 - %22 = lshr i64 %21, %"118_0.01322" - %23 = trunc i64 %22 to i1 - br i1 %23, label %panic.i1253, label %__barray_check_bounds.exit1256 - -panic.i1253: ; preds = %__barray_check_bounds.exit1252 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1256: ; preds = %__barray_check_bounds.exit1252 - %24 = shl nuw nsw i64 1, %"118_0.01322" - %25 = xor i64 %21, %24 - store i64 %25, ptr %5, align 4 - %26 = getelementptr inbounds nuw i64, ptr %4, i64 %"118_0.01322" - %27 = load i64, ptr %26, align 4 - %28 = lshr i64 %25, %20 - %29 = trunc i64 %28 to i1 - br i1 %29, label %panic.i1257, label %__barray_check_bounds.exit1262 - -panic.i1257: ; preds = %__barray_check_bounds.exit1256 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1262: ; preds = %__barray_check_bounds.exit1256 - %30 = shl nuw nsw i64 2, %"118_0.01322" - %31 = xor i64 %25, %30 - store i64 %31, ptr %5, align 4 - %32 = getelementptr inbounds nuw i64, ptr %4, i64 %20 - %33 = load i64, ptr %32, align 4 - tail call void @___rp(i64 %27, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rpp(i64 %27, i64 %33, double 0x3FF921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %33, double 0xBFF921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %27, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %27, double 0xBFF921FB54442D18) - %34 = load i64, ptr %5, align 4 - %35 = lshr i64 %34, %"118_0.01322" - %36 = trunc i64 %35 to i1 - br i1 %36, label %__barray_check_bounds.exit1266, label %panic.i1263 - -panic.i1263: ; preds = %__barray_check_bounds.exit1262 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_check_bounds.exit1266: ; preds = %__barray_check_bounds.exit1262 - %37 = xor i64 %34, %24 - store i64 %37, ptr %5, align 4 - store i64 %27, ptr %26, align 4 - %38 = load i64, ptr %5, align 4 - %39 = lshr i64 %38, %20 - %40 = trunc i64 %39 to i1 - br i1 %40, label %__barray_mask_return.exit1268, label %panic.i1267 - -panic.i1267: ; preds = %__barray_check_bounds.exit1266 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1268: ; preds = %__barray_check_bounds.exit1266 - %41 = xor i64 %38, %30 - store i64 %41, ptr %5, align 4 - store i64 %33, ptr %32, align 4 - %42 = add nuw nsw i64 %20, 1 - %exitcond1325 = icmp eq i64 %42, 20 - br i1 %exitcond1325, label %cond_exit_189, label %__barray_check_bounds.exit1252 - -cond_exit_189: ; preds = %__barray_mask_return.exit1268 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) - tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure_leaked) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - %43 = icmp eq i64 %read_uint, 2 - br i1 %43, label %44, label %cond_exit_267 - -cond_exit_267: ; preds = %cond_exit_189 - %read_uint378 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - %.not = icmp eq i64 %read_uint378, 2 - br i1 %.not, label %cond_247_case_0, label %cond_247_case_1 - -44: ; preds = %cond_exit_189 - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - tail call void @print_int(ptr nonnull @res_head_leake.F4F32972.0, i64 20, i64 1) - br label %__barray_check_bounds.exit1274.preheader - -__barray_check_bounds.exit1274.preheader: ; preds = %cond_247_case_1, %44 - br label %__barray_check_bounds.exit1274 - -cond_247_case_1: ; preds = %cond_exit_267 - %45 = icmp eq i64 %read_uint378, 1 - tail call void @print_bool(ptr nonnull @res_head.AFE8E005.0, i64 14, i1 %45) - br label %__barray_check_bounds.exit1274.preheader - -cond_247_case_0: ; preds = %cond_exit_267 - tail call void @panic(i32 1001, ptr nonnull @e_Option.unw.32D4E82D.0) - unreachable - -out_of_bounds.i1269: ; preds = %.thread - tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") - unreachable - -__barray_check_bounds.exit1270: ; preds = %.thread - %46 = load i64, ptr %3, align 4 - %47 = lshr i64 %46, %"310_2.01329" - %48 = trunc i64 %47 to i1 - br i1 %48, label %cond_exit_314, label %panic.i1271 - -panic.i1271: ; preds = %__barray_check_bounds.exit1270 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -mask_block_ok.i: ; preds = %cond_exit_314 - %49 = load i64, ptr %5, align 4 - %50 = or i64 %49, -1048576 - store i64 %50, ptr %5, align 4 - %51 = icmp eq i64 %50, -1 - br i1 %51, label %loop_body538.preheader.preheader, label %mask_block_err.i - -mask_block_err.i: ; preds = %mask_block_ok.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_check_bounds.exit1274: ; preds = %__barray_check_bounds.exit1274.preheader, %cond_exit_314 - %"310_0.sroa.15.01330" = phi i64 [ %52, %cond_exit_314 ], [ 0, %__barray_check_bounds.exit1274.preheader ] - %"310_2.01329" = phi i64 [ %60, %cond_exit_314 ], [ 0, %__barray_check_bounds.exit1274.preheader ] - %52 = add nuw nsw i64 %"310_0.sroa.15.01330", 1 - %53 = load i64, ptr %5, align 4 - %54 = lshr i64 %53, %"310_0.sroa.15.01330" - %55 = trunc i64 %54 to i1 - br i1 %55, label %panic.i1275, label %.thread - -panic.i1275: ; preds = %__barray_check_bounds.exit1274 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -.thread: ; preds = %__barray_check_bounds.exit1274 - %56 = shl nuw nsw i64 1, %"310_0.sroa.15.01330" - %57 = xor i64 %53, %56 - store i64 %57, ptr %5, align 4 - %58 = getelementptr inbounds nuw i64, ptr %4, i64 %"310_0.sroa.15.01330" - %59 = load i64, ptr %58, align 4 - %60 = add i64 %"310_2.01329", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %59) - tail call void @___qfree(i64 %59) - %61 = icmp ult i64 %"310_2.01329", 20 - br i1 %61, label %__barray_check_bounds.exit1270, label %out_of_bounds.i1269 - -cond_exit_314: ; preds = %__barray_check_bounds.exit1270 - %62 = shl nuw nsw i64 1, %"310_2.01329" - %63 = xor i64 %46, %62 - store i64 %63, ptr %3, align 4 - %64 = getelementptr inbounds nuw i64, ptr %2, i64 %"310_2.01329" - store i64 %lazy_measure, ptr %64, align 4 - %65 = icmp samesign ugt i64 %"310_0.sroa.15.01330", 18 - br i1 %65, label %mask_block_ok.i, label %__barray_check_bounds.exit1274 - -loop_body538.preheader.preheader: ; preds = %mask_block_ok.i - tail call void @heap_free(ptr nonnull %4) - tail call void @heap_free(ptr nonnull %5) - br label %__barray_check_bounds.exit1278 - -__barray_check_bounds.exit1278: ; preds = %cond_exit_380, %loop_body538.preheader.preheader - %"376_0.sroa.15.01324" = phi i64 [ %66, %cond_exit_380 ], [ 0, %loop_body538.preheader.preheader ] - %66 = add nuw nsw i64 %"376_0.sroa.15.01324", 1 - %67 = load i64, ptr %3, align 4 - %68 = lshr i64 %67, %"376_0.sroa.15.01324" - %69 = trunc i64 %68 to i1 - br i1 %69, label %panic.i1279, label %__barray_check_bounds.exit1282 - -panic.i1279: ; preds = %__barray_check_bounds.exit1278 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1282: ; preds = %__barray_check_bounds.exit1278 - %70 = shl nuw nsw i64 1, %"376_0.sroa.15.01324" - %71 = xor i64 %67, %70 - store i64 %71, ptr %3, align 4 - %72 = getelementptr inbounds nuw i64, ptr %2, i64 %"376_0.sroa.15.01324" - %73 = load i64, ptr %72, align 4 - tail call void @___inc_future_refcount(i64 %73) - %74 = load i64, ptr %3, align 4 - %75 = lshr i64 %74, %"376_0.sroa.15.01324" - %76 = trunc i64 %75 to i1 - br i1 %76, label %__barray_check_bounds.exit1286, label %panic.i1283 - -panic.i1283: ; preds = %__barray_check_bounds.exit1282 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_check_bounds.exit1286: ; preds = %__barray_check_bounds.exit1282 - %77 = xor i64 %74, %70 - store i64 %77, ptr %3, align 4 - store i64 %73, ptr %72, align 4 - %read_bool = tail call i1 @___read_future_bool(i64 %73) - tail call void @___dec_future_refcount(i64 %73) - %78 = load i64, ptr %1, align 4 - %79 = lshr i64 %78, %"376_0.sroa.15.01324" - %80 = trunc i64 %79 to i1 - br i1 %80, label %cond_exit_380, label %panic.i1287 - -panic.i1287: ; preds = %__barray_check_bounds.exit1286 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -cond_565_case_0: ; preds = %cond_exit_565 - %81 = load i64, ptr %3, align 4 - %82 = or i64 %81, -1048576 - store i64 %82, ptr %3, align 4 - %83 = icmp eq i64 %82, -1 - br i1 %83, label %loop_out537, label %mask_block_err.i1292 - -mask_block_err.i1292: ; preds = %cond_565_case_0 - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_check_bounds.exit1296: ; preds = %cond_exit_380, %cond_exit_565 - %"562_0.01331" = phi i64 [ %84, %cond_exit_565 ], [ 0, %cond_exit_380 ] - %84 = add nuw nsw i64 %"562_0.01331", 1 - %85 = load i64, ptr %3, align 4 - %86 = lshr i64 %85, %"562_0.01331" - %87 = trunc i64 %86 to i1 - br i1 %87, label %cond_exit_565, label %__barray_mask_borrow.exit1300 - -__barray_mask_borrow.exit1300: ; preds = %__barray_check_bounds.exit1296 - %88 = shl nuw nsw i64 1, %"562_0.01331" - %89 = xor i64 %85, %88 - store i64 %89, ptr %3, align 4 - %90 = getelementptr inbounds nuw i64, ptr %2, i64 %"562_0.01331" - %91 = load i64, ptr %90, align 4 - tail call void @___dec_future_refcount(i64 %91) - br label %cond_exit_565 - -cond_exit_565: ; preds = %__barray_mask_borrow.exit1300, %__barray_check_bounds.exit1296 - %92 = icmp samesign ugt i64 %"562_0.01331", 18 - br i1 %92, label %cond_565_case_0, label %__barray_check_bounds.exit1296 - -cond_exit_380: ; preds = %__barray_check_bounds.exit1286 - %93 = xor i64 %78, %70 - store i64 %93, ptr %1, align 4 - %94 = getelementptr inbounds nuw i1, ptr %0, i64 %"376_0.sroa.15.01324" - store i1 %read_bool, ptr %94, align 1 - %95 = icmp eq i64 %"376_0.sroa.15.01324", 19 - br i1 %95, label %__barray_check_bounds.exit1296, label %__barray_check_bounds.exit1278 - -loop_out537: ; preds = %cond_565_case_0 - tail call void @heap_free(ptr %2) - tail call void @heap_free(ptr nonnull %3) - %96 = load i64, ptr %1, align 4 - %97 = and i64 %96, 1048575 - store i64 %97, ptr %1, align 4 - %98 = icmp eq i64 %97, 0 - br i1 %98, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1301 - -mask_block_err.i1301: ; preds = %loop_out537 - tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") - unreachable - -__barray_check_none_borrowed.exit: ; preds = %loop_out537 - %99 = tail call ptr @heap_alloc(i64 20) - %100 = tail call ptr @heap_alloc(i64 8) - store i64 0, ptr %100, align 1 - tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(20) %99, ptr noundef nonnull align 1 dereferenceable(20) %0, i64 20, i1 false) - tail call void @heap_free(ptr nonnull %99) - %101 = load i64, ptr %1, align 4 - %102 = and i64 %101, 1048575 - store i64 %102, ptr %1, align 4 - %103 = icmp eq i64 %102, 0 - br i1 %103, label %__barray_check_none_borrowed.exit1305, label %mask_block_err.i1303 - -mask_block_err.i1303: ; preds = %__barray_check_none_borrowed.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") - unreachable - -__barray_check_none_borrowed.exit1305: ; preds = %__barray_check_none_borrowed.exit - %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 - %y_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 4 - %arr_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 8 - %mask_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 16 - %104 = alloca [20 x i1], align 1 - call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(20) %104, i8 0, i64 20, i1 false) - store i32 20, ptr %out_arr_alloca, align 8 - store i32 1, ptr %y_ptr, align 4 - store ptr %0, ptr %arr_ptr, align 8 - store ptr %104, ptr %mask_ptr, align 8 - call void @print_bool_arr(ptr nonnull @res_tail.AD5A440E.0, i64 17, ptr nonnull %out_arr_alloca) - ret void -} - -declare ptr @heap_alloc(i64) local_unnamed_addr - -; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) -declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immarg) #0 - -; Function Attrs: noreturn -declare void @panic(i32, ptr) local_unnamed_addr #1 - -declare i64 @___lazy_measure_leaked(i64) local_unnamed_addr - -declare void @___qfree(i64) local_unnamed_addr - -declare void @___inc_future_refcount(i64) local_unnamed_addr - -declare i64 @___read_future_uint(i64) local_unnamed_addr - -declare void @___dec_future_refcount(i64) local_unnamed_addr - -declare void @print_int(ptr, i64, i64) local_unnamed_addr - -declare void @print_bool(ptr, i64, i1) local_unnamed_addr - -declare void @heap_free(ptr) local_unnamed_addr - -declare i64 @___lazy_measure(i64) local_unnamed_addr - -declare i1 @___read_future_bool(i64) local_unnamed_addr - -; Function Attrs: mustprogress 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) #2 - -declare void @print_bool_arr(ptr, i64, ptr) local_unnamed_addr - -declare i64 @___qalloc() local_unnamed_addr - -declare void @___reset(i64) local_unnamed_addr - -declare void @___rp(i64, double, double) local_unnamed_addr - -declare void @___rz(i64, double) local_unnamed_addr - -declare void @___rpp(i64, i64, double, double) local_unnamed_addr - -define i64 @qmain(i64 %0) local_unnamed_addr { -entry: - tail call void @setup(i64 %0) - tail call void @__hugr__.__main__.main.1() - %1 = tail call i64 @teardown() - ret i64 %1 -} - -declare void @setup(i64) local_unnamed_addr - -declare i64 @teardown() local_unnamed_addr - -attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } -attributes #1 = { noreturn } -attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) } - -!name = !{!0} - -!0 = !{!"mainlib"} diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_within_tail-sol-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_within_tail-sol-x86_64-apple-darwin.ll deleted file mode 100644 index 30e956b4..00000000 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_within_tail-sol-x86_64-apple-darwin.ll +++ /dev/null @@ -1,456 +0,0 @@ -; ModuleID = 'hugr' -source_filename = "hugr" -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_Index out .DD115165.0" = private constant [29 x i8] c"\1CEXIT:INT:Index out of bounds" -@"e_Array alre.5A300C2A.0" = private constant [57 x i8] c"8EXIT:INT:Array already contains an element at this index" -@"e_Array elem.E746B1A3.0" = private constant [43 x i8] c"*EXIT:INT:Array element is already borrowed" -@e_Option.unw.32D4E82D.0 = private constant [43 x i8] c"*EXIT:INT:Option.unwrap: value is `Nothing`" -@res_head_leake.F4F32972.0 = private constant [21 x i8] c"\14USER:INT:head_leaked" -@res_head.AFE8E005.0 = private constant [15 x i8] c"\0EUSER:BOOL:head" -@"e_Array cont.EFA5AC45.0" = private constant [70 x i8] c"EEXIT:INT:Array contains non-borrowed elements and cannot be discarded" -@"e_Some array.A77EF32E.0" = private constant [48 x i8] c"/EXIT:INT:Some array elements have been borrowed" -@res_tail.AD5A440E.0 = private constant [18 x i8] c"\11USER:BOOLARR:tail" -@"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." - -define void @__hugr__.__main__.main.1() local_unnamed_addr { -alloca_block: - %0 = tail call ptr @heap_alloc(i64 20) - %1 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %1, align 1 - %2 = tail call ptr @heap_alloc(i64 160) - %3 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %3, align 1 - %4 = tail call ptr @heap_alloc(i64 160) - %5 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %5, align 1 - %qalloc.i = tail call i64 @___qalloc() - %not_max.not.not.i = icmp eq i64 %qalloc.i, -1 - br i1 %not_max.not.not.i, label %cond_489_case_0.i, label %__hugr__.__tk2_sol_qalloc.485.exit - -cond_489_case_0.i: ; preds = %alloca_block - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_sol_qalloc.485.exit: ; preds = %alloca_block - tail call void @___reset(i64 %qalloc.i) - tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - br label %cond_13_case_1 - -cond_13_case_1: ; preds = %__hugr__.__tk2_sol_qalloc.485.exit, %cond_exit_13 - %"9_2.01321" = phi i64 [ 0, %__hugr__.__tk2_sol_qalloc.485.exit ], [ %6, %cond_exit_13 ] - %6 = add nuw nsw i64 %"9_2.01321", 1 - %qalloc.i1244 = tail call i64 @___qalloc() - %not_max.not.not.i1245 = icmp eq i64 %qalloc.i1244, -1 - br i1 %not_max.not.not.i1245, label %cond_489_case_0.i1246, label %__barray_check_bounds.exit - -cond_489_case_0.i1246: ; preds = %cond_13_case_1 - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__barray_check_bounds.exit: ; preds = %cond_13_case_1 - tail call void @___reset(i64 %qalloc.i1244) - %7 = load i64, ptr %5, align 4 - %8 = lshr i64 %7, %"9_2.01321" - %9 = trunc i64 %8 to i1 - br i1 %9, label %cond_exit_13, label %panic.i - -panic.i: ; preds = %__barray_check_bounds.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -cond_exit_13: ; preds = %__barray_check_bounds.exit - %10 = shl nuw nsw i64 1, %"9_2.01321" - %11 = xor i64 %7, %10 - store i64 %11, ptr %5, align 4 - %12 = getelementptr inbounds nuw i64, ptr %4, i64 %"9_2.01321" - store i64 %qalloc.i1244, ptr %12, align 4 - %exitcond = icmp eq i64 %6, 20 - br i1 %exitcond, label %loop_out, label %cond_13_case_1 - -loop_out: ; preds = %cond_exit_13 - %13 = load i64, ptr %5, align 4 - %14 = trunc i64 %13 to i1 - br i1 %14, label %panic.i1248, label %__barray_mask_borrow.exit - -panic.i1248: ; preds = %loop_out - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit: ; preds = %loop_out - %15 = or disjoint i64 %13, 1 - store i64 %15, ptr %5, align 4 - %16 = load i64, ptr %4, align 4 - tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rpp(i64 %qalloc.i, i64 %16, double 0x3FF921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %16, double 0xBFF921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %qalloc.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18) - %17 = load i64, ptr %5, align 4 - %18 = trunc i64 %17 to i1 - br i1 %18, label %__barray_mask_return.exit1250, label %panic.i1249 - -panic.i1249: ; preds = %__barray_mask_borrow.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1250: ; preds = %__barray_mask_borrow.exit - %19 = and i64 %17, -2 - store i64 %19, ptr %5, align 4 - store i64 %16, ptr %4, align 4 - br label %__barray_check_bounds.exit1252 - -__barray_check_bounds.exit1252: ; preds = %__barray_mask_return.exit1250, %__barray_mask_return.exit1268 - %20 = phi i64 [ 1, %__barray_mask_return.exit1250 ], [ %42, %__barray_mask_return.exit1268 ] - %"118_0.01322" = phi i64 [ 0, %__barray_mask_return.exit1250 ], [ %20, %__barray_mask_return.exit1268 ] - %21 = load i64, ptr %5, align 4 - %22 = lshr i64 %21, %"118_0.01322" - %23 = trunc i64 %22 to i1 - br i1 %23, label %panic.i1253, label %__barray_check_bounds.exit1256 - -panic.i1253: ; preds = %__barray_check_bounds.exit1252 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1256: ; preds = %__barray_check_bounds.exit1252 - %24 = shl nuw nsw i64 1, %"118_0.01322" - %25 = xor i64 %21, %24 - store i64 %25, ptr %5, align 4 - %26 = getelementptr inbounds nuw i64, ptr %4, i64 %"118_0.01322" - %27 = load i64, ptr %26, align 4 - %28 = lshr i64 %25, %20 - %29 = trunc i64 %28 to i1 - br i1 %29, label %panic.i1257, label %__barray_check_bounds.exit1262 - -panic.i1257: ; preds = %__barray_check_bounds.exit1256 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1262: ; preds = %__barray_check_bounds.exit1256 - %30 = shl nuw nsw i64 2, %"118_0.01322" - %31 = xor i64 %25, %30 - store i64 %31, ptr %5, align 4 - %32 = getelementptr inbounds nuw i64, ptr %4, i64 %20 - %33 = load i64, ptr %32, align 4 - tail call void @___rp(i64 %27, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rpp(i64 %27, i64 %33, double 0x3FF921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %33, double 0xBFF921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %27, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %27, double 0xBFF921FB54442D18) - %34 = load i64, ptr %5, align 4 - %35 = lshr i64 %34, %"118_0.01322" - %36 = trunc i64 %35 to i1 - br i1 %36, label %__barray_check_bounds.exit1266, label %panic.i1263 - -panic.i1263: ; preds = %__barray_check_bounds.exit1262 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_check_bounds.exit1266: ; preds = %__barray_check_bounds.exit1262 - %37 = xor i64 %34, %24 - store i64 %37, ptr %5, align 4 - store i64 %27, ptr %26, align 4 - %38 = load i64, ptr %5, align 4 - %39 = lshr i64 %38, %20 - %40 = trunc i64 %39 to i1 - br i1 %40, label %__barray_mask_return.exit1268, label %panic.i1267 - -panic.i1267: ; preds = %__barray_check_bounds.exit1266 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1268: ; preds = %__barray_check_bounds.exit1266 - %41 = xor i64 %38, %30 - store i64 %41, ptr %5, align 4 - store i64 %33, ptr %32, align 4 - %42 = add nuw nsw i64 %20, 1 - %exitcond1325 = icmp eq i64 %42, 20 - br i1 %exitcond1325, label %cond_exit_189, label %__barray_check_bounds.exit1252 - -cond_exit_189: ; preds = %__barray_mask_return.exit1268 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) - tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure_leaked) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - %43 = icmp eq i64 %read_uint, 2 - br i1 %43, label %44, label %cond_exit_267 - -cond_exit_267: ; preds = %cond_exit_189 - %read_uint378 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - %.not = icmp eq i64 %read_uint378, 2 - br i1 %.not, label %cond_247_case_0, label %cond_247_case_1 - -44: ; preds = %cond_exit_189 - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - tail call void @print_int(ptr nonnull @res_head_leake.F4F32972.0, i64 20, i64 1) - br label %__barray_check_bounds.exit1274.preheader - -__barray_check_bounds.exit1274.preheader: ; preds = %cond_247_case_1, %44 - br label %__barray_check_bounds.exit1274 - -cond_247_case_1: ; preds = %cond_exit_267 - %45 = icmp eq i64 %read_uint378, 1 - tail call void @print_bool(ptr nonnull @res_head.AFE8E005.0, i64 14, i1 %45) - br label %__barray_check_bounds.exit1274.preheader - -cond_247_case_0: ; preds = %cond_exit_267 - tail call void @panic(i32 1001, ptr nonnull @e_Option.unw.32D4E82D.0) - unreachable - -out_of_bounds.i1269: ; preds = %.thread - tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") - unreachable - -__barray_check_bounds.exit1270: ; preds = %.thread - %46 = load i64, ptr %3, align 4 - %47 = lshr i64 %46, %"310_2.01329" - %48 = trunc i64 %47 to i1 - br i1 %48, label %cond_exit_314, label %panic.i1271 - -panic.i1271: ; preds = %__barray_check_bounds.exit1270 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -mask_block_ok.i: ; preds = %cond_exit_314 - %49 = load i64, ptr %5, align 4 - %50 = or i64 %49, -1048576 - store i64 %50, ptr %5, align 4 - %51 = icmp eq i64 %50, -1 - br i1 %51, label %loop_body538.preheader.preheader, label %mask_block_err.i - -mask_block_err.i: ; preds = %mask_block_ok.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_check_bounds.exit1274: ; preds = %__barray_check_bounds.exit1274.preheader, %cond_exit_314 - %"310_0.sroa.15.01330" = phi i64 [ %52, %cond_exit_314 ], [ 0, %__barray_check_bounds.exit1274.preheader ] - %"310_2.01329" = phi i64 [ %60, %cond_exit_314 ], [ 0, %__barray_check_bounds.exit1274.preheader ] - %52 = add nuw nsw i64 %"310_0.sroa.15.01330", 1 - %53 = load i64, ptr %5, align 4 - %54 = lshr i64 %53, %"310_0.sroa.15.01330" - %55 = trunc i64 %54 to i1 - br i1 %55, label %panic.i1275, label %.thread - -panic.i1275: ; preds = %__barray_check_bounds.exit1274 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -.thread: ; preds = %__barray_check_bounds.exit1274 - %56 = shl nuw nsw i64 1, %"310_0.sroa.15.01330" - %57 = xor i64 %53, %56 - store i64 %57, ptr %5, align 4 - %58 = getelementptr inbounds nuw i64, ptr %4, i64 %"310_0.sroa.15.01330" - %59 = load i64, ptr %58, align 4 - %60 = add i64 %"310_2.01329", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %59) - tail call void @___qfree(i64 %59) - %61 = icmp ult i64 %"310_2.01329", 20 - br i1 %61, label %__barray_check_bounds.exit1270, label %out_of_bounds.i1269 - -cond_exit_314: ; preds = %__barray_check_bounds.exit1270 - %62 = shl nuw nsw i64 1, %"310_2.01329" - %63 = xor i64 %46, %62 - store i64 %63, ptr %3, align 4 - %64 = getelementptr inbounds nuw i64, ptr %2, i64 %"310_2.01329" - store i64 %lazy_measure, ptr %64, align 4 - %65 = icmp samesign ugt i64 %"310_0.sroa.15.01330", 18 - br i1 %65, label %mask_block_ok.i, label %__barray_check_bounds.exit1274 - -loop_body538.preheader.preheader: ; preds = %mask_block_ok.i - tail call void @heap_free(ptr nonnull %4) - tail call void @heap_free(ptr nonnull %5) - br label %__barray_check_bounds.exit1278 - -__barray_check_bounds.exit1278: ; preds = %cond_exit_380, %loop_body538.preheader.preheader - %"376_0.sroa.15.01324" = phi i64 [ %66, %cond_exit_380 ], [ 0, %loop_body538.preheader.preheader ] - %66 = add nuw nsw i64 %"376_0.sroa.15.01324", 1 - %67 = load i64, ptr %3, align 4 - %68 = lshr i64 %67, %"376_0.sroa.15.01324" - %69 = trunc i64 %68 to i1 - br i1 %69, label %panic.i1279, label %__barray_check_bounds.exit1282 - -panic.i1279: ; preds = %__barray_check_bounds.exit1278 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1282: ; preds = %__barray_check_bounds.exit1278 - %70 = shl nuw nsw i64 1, %"376_0.sroa.15.01324" - %71 = xor i64 %67, %70 - store i64 %71, ptr %3, align 4 - %72 = getelementptr inbounds nuw i64, ptr %2, i64 %"376_0.sroa.15.01324" - %73 = load i64, ptr %72, align 4 - tail call void @___inc_future_refcount(i64 %73) - %74 = load i64, ptr %3, align 4 - %75 = lshr i64 %74, %"376_0.sroa.15.01324" - %76 = trunc i64 %75 to i1 - br i1 %76, label %__barray_check_bounds.exit1286, label %panic.i1283 - -panic.i1283: ; preds = %__barray_check_bounds.exit1282 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_check_bounds.exit1286: ; preds = %__barray_check_bounds.exit1282 - %77 = xor i64 %74, %70 - store i64 %77, ptr %3, align 4 - store i64 %73, ptr %72, align 4 - %read_bool = tail call i1 @___read_future_bool(i64 %73) - tail call void @___dec_future_refcount(i64 %73) - %78 = load i64, ptr %1, align 4 - %79 = lshr i64 %78, %"376_0.sroa.15.01324" - %80 = trunc i64 %79 to i1 - br i1 %80, label %cond_exit_380, label %panic.i1287 - -panic.i1287: ; preds = %__barray_check_bounds.exit1286 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -cond_565_case_0: ; preds = %cond_exit_565 - %81 = load i64, ptr %3, align 4 - %82 = or i64 %81, -1048576 - store i64 %82, ptr %3, align 4 - %83 = icmp eq i64 %82, -1 - br i1 %83, label %loop_out537, label %mask_block_err.i1292 - -mask_block_err.i1292: ; preds = %cond_565_case_0 - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_check_bounds.exit1296: ; preds = %cond_exit_380, %cond_exit_565 - %"562_0.01331" = phi i64 [ %84, %cond_exit_565 ], [ 0, %cond_exit_380 ] - %84 = add nuw nsw i64 %"562_0.01331", 1 - %85 = load i64, ptr %3, align 4 - %86 = lshr i64 %85, %"562_0.01331" - %87 = trunc i64 %86 to i1 - br i1 %87, label %cond_exit_565, label %__barray_mask_borrow.exit1300 - -__barray_mask_borrow.exit1300: ; preds = %__barray_check_bounds.exit1296 - %88 = shl nuw nsw i64 1, %"562_0.01331" - %89 = xor i64 %85, %88 - store i64 %89, ptr %3, align 4 - %90 = getelementptr inbounds nuw i64, ptr %2, i64 %"562_0.01331" - %91 = load i64, ptr %90, align 4 - tail call void @___dec_future_refcount(i64 %91) - br label %cond_exit_565 - -cond_exit_565: ; preds = %__barray_mask_borrow.exit1300, %__barray_check_bounds.exit1296 - %92 = icmp samesign ugt i64 %"562_0.01331", 18 - br i1 %92, label %cond_565_case_0, label %__barray_check_bounds.exit1296 - -cond_exit_380: ; preds = %__barray_check_bounds.exit1286 - %93 = xor i64 %78, %70 - store i64 %93, ptr %1, align 4 - %94 = getelementptr inbounds nuw i1, ptr %0, i64 %"376_0.sroa.15.01324" - store i1 %read_bool, ptr %94, align 1 - %95 = icmp eq i64 %"376_0.sroa.15.01324", 19 - br i1 %95, label %__barray_check_bounds.exit1296, label %__barray_check_bounds.exit1278 - -loop_out537: ; preds = %cond_565_case_0 - tail call void @heap_free(ptr %2) - tail call void @heap_free(ptr nonnull %3) - %96 = load i64, ptr %1, align 4 - %97 = and i64 %96, 1048575 - store i64 %97, ptr %1, align 4 - %98 = icmp eq i64 %97, 0 - br i1 %98, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1301 - -mask_block_err.i1301: ; preds = %loop_out537 - tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") - unreachable - -__barray_check_none_borrowed.exit: ; preds = %loop_out537 - %99 = tail call ptr @heap_alloc(i64 20) - %100 = tail call ptr @heap_alloc(i64 8) - store i64 0, ptr %100, align 1 - tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(20) %99, ptr noundef nonnull align 1 dereferenceable(20) %0, i64 20, i1 false) - tail call void @heap_free(ptr nonnull %99) - %101 = load i64, ptr %1, align 4 - %102 = and i64 %101, 1048575 - store i64 %102, ptr %1, align 4 - %103 = icmp eq i64 %102, 0 - br i1 %103, label %__barray_check_none_borrowed.exit1305, label %mask_block_err.i1303 - -mask_block_err.i1303: ; preds = %__barray_check_none_borrowed.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") - unreachable - -__barray_check_none_borrowed.exit1305: ; preds = %__barray_check_none_borrowed.exit - %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 - %y_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 4 - %arr_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 8 - %mask_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 16 - %104 = alloca [20 x i1], align 1 - call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(20) %104, i8 0, i64 20, i1 false) - store i32 20, ptr %out_arr_alloca, align 8 - store i32 1, ptr %y_ptr, align 4 - store ptr %0, ptr %arr_ptr, align 8 - store ptr %104, ptr %mask_ptr, align 8 - call void @print_bool_arr(ptr nonnull @res_tail.AD5A440E.0, i64 17, ptr nonnull %out_arr_alloca) - ret void -} - -declare ptr @heap_alloc(i64) local_unnamed_addr - -; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) -declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immarg) #0 - -; Function Attrs: noreturn -declare void @panic(i32, ptr) local_unnamed_addr #1 - -declare i64 @___lazy_measure_leaked(i64) local_unnamed_addr - -declare void @___qfree(i64) local_unnamed_addr - -declare void @___inc_future_refcount(i64) local_unnamed_addr - -declare i64 @___read_future_uint(i64) local_unnamed_addr - -declare void @___dec_future_refcount(i64) local_unnamed_addr - -declare void @print_int(ptr, i64, i64) local_unnamed_addr - -declare void @print_bool(ptr, i64, i1) local_unnamed_addr - -declare void @heap_free(ptr) local_unnamed_addr - -declare i64 @___lazy_measure(i64) local_unnamed_addr - -declare i1 @___read_future_bool(i64) local_unnamed_addr - -; Function Attrs: mustprogress 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) #2 - -declare void @print_bool_arr(ptr, i64, ptr) local_unnamed_addr - -declare i64 @___qalloc() local_unnamed_addr - -declare void @___reset(i64) local_unnamed_addr - -declare void @___rp(i64, double, double) local_unnamed_addr - -declare void @___rz(i64, double) local_unnamed_addr - -declare void @___rpp(i64, i64, double, double) local_unnamed_addr - -define i64 @qmain(i64 %0) local_unnamed_addr { -entry: - tail call void @setup(i64 %0) - tail call void @__hugr__.__main__.main.1() - %1 = tail call i64 @teardown() - ret i64 %1 -} - -declare void @setup(i64) local_unnamed_addr - -declare i64 @teardown() local_unnamed_addr - -attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } -attributes #1 = { noreturn } -attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) } - -!name = !{!0} - -!0 = !{!"mainlib"} diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_within_tail-sol-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_within_tail-sol-x86_64-unknown-linux-gnu.ll deleted file mode 100644 index 67e378b8..00000000 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_within_tail-sol-x86_64-unknown-linux-gnu.ll +++ /dev/null @@ -1,456 +0,0 @@ -; ModuleID = 'hugr' -source_filename = "hugr" -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_Index out .DD115165.0" = private constant [29 x i8] c"\1CEXIT:INT:Index out of bounds" -@"e_Array alre.5A300C2A.0" = private constant [57 x i8] c"8EXIT:INT:Array already contains an element at this index" -@"e_Array elem.E746B1A3.0" = private constant [43 x i8] c"*EXIT:INT:Array element is already borrowed" -@e_Option.unw.32D4E82D.0 = private constant [43 x i8] c"*EXIT:INT:Option.unwrap: value is `Nothing`" -@res_head_leake.F4F32972.0 = private constant [21 x i8] c"\14USER:INT:head_leaked" -@res_head.AFE8E005.0 = private constant [15 x i8] c"\0EUSER:BOOL:head" -@"e_Array cont.EFA5AC45.0" = private constant [70 x i8] c"EEXIT:INT:Array contains non-borrowed elements and cannot be discarded" -@"e_Some array.A77EF32E.0" = private constant [48 x i8] c"/EXIT:INT:Some array elements have been borrowed" -@res_tail.AD5A440E.0 = private constant [18 x i8] c"\11USER:BOOLARR:tail" -@"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." - -define void @__hugr__.__main__.main.1() local_unnamed_addr { -alloca_block: - %0 = tail call ptr @heap_alloc(i64 20) - %1 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %1, align 1 - %2 = tail call ptr @heap_alloc(i64 160) - %3 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %3, align 1 - %4 = tail call ptr @heap_alloc(i64 160) - %5 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %5, align 1 - %qalloc.i = tail call i64 @___qalloc() - %not_max.not.not.i = icmp eq i64 %qalloc.i, -1 - br i1 %not_max.not.not.i, label %cond_489_case_0.i, label %__hugr__.__tk2_sol_qalloc.485.exit - -cond_489_case_0.i: ; preds = %alloca_block - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_sol_qalloc.485.exit: ; preds = %alloca_block - tail call void @___reset(i64 %qalloc.i) - tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - br label %cond_13_case_1 - -cond_13_case_1: ; preds = %__hugr__.__tk2_sol_qalloc.485.exit, %cond_exit_13 - %"9_2.01321" = phi i64 [ 0, %__hugr__.__tk2_sol_qalloc.485.exit ], [ %6, %cond_exit_13 ] - %6 = add nuw nsw i64 %"9_2.01321", 1 - %qalloc.i1244 = tail call i64 @___qalloc() - %not_max.not.not.i1245 = icmp eq i64 %qalloc.i1244, -1 - br i1 %not_max.not.not.i1245, label %cond_489_case_0.i1246, label %__barray_check_bounds.exit - -cond_489_case_0.i1246: ; preds = %cond_13_case_1 - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__barray_check_bounds.exit: ; preds = %cond_13_case_1 - tail call void @___reset(i64 %qalloc.i1244) - %7 = load i64, ptr %5, align 4 - %8 = lshr i64 %7, %"9_2.01321" - %9 = trunc i64 %8 to i1 - br i1 %9, label %cond_exit_13, label %panic.i - -panic.i: ; preds = %__barray_check_bounds.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -cond_exit_13: ; preds = %__barray_check_bounds.exit - %10 = shl nuw nsw i64 1, %"9_2.01321" - %11 = xor i64 %7, %10 - store i64 %11, ptr %5, align 4 - %12 = getelementptr inbounds nuw i64, ptr %4, i64 %"9_2.01321" - store i64 %qalloc.i1244, ptr %12, align 4 - %exitcond = icmp eq i64 %6, 20 - br i1 %exitcond, label %loop_out, label %cond_13_case_1 - -loop_out: ; preds = %cond_exit_13 - %13 = load i64, ptr %5, align 4 - %14 = trunc i64 %13 to i1 - br i1 %14, label %panic.i1248, label %__barray_mask_borrow.exit - -panic.i1248: ; preds = %loop_out - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit: ; preds = %loop_out - %15 = or disjoint i64 %13, 1 - store i64 %15, ptr %5, align 4 - %16 = load i64, ptr %4, align 4 - tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rpp(i64 %qalloc.i, i64 %16, double 0x3FF921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %16, double 0xBFF921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %qalloc.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18) - %17 = load i64, ptr %5, align 4 - %18 = trunc i64 %17 to i1 - br i1 %18, label %__barray_mask_return.exit1250, label %panic.i1249 - -panic.i1249: ; preds = %__barray_mask_borrow.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1250: ; preds = %__barray_mask_borrow.exit - %19 = and i64 %17, -2 - store i64 %19, ptr %5, align 4 - store i64 %16, ptr %4, align 4 - br label %__barray_check_bounds.exit1252 - -__barray_check_bounds.exit1252: ; preds = %__barray_mask_return.exit1250, %__barray_mask_return.exit1268 - %20 = phi i64 [ 1, %__barray_mask_return.exit1250 ], [ %42, %__barray_mask_return.exit1268 ] - %"118_0.01322" = phi i64 [ 0, %__barray_mask_return.exit1250 ], [ %20, %__barray_mask_return.exit1268 ] - %21 = load i64, ptr %5, align 4 - %22 = lshr i64 %21, %"118_0.01322" - %23 = trunc i64 %22 to i1 - br i1 %23, label %panic.i1253, label %__barray_check_bounds.exit1256 - -panic.i1253: ; preds = %__barray_check_bounds.exit1252 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1256: ; preds = %__barray_check_bounds.exit1252 - %24 = shl nuw nsw i64 1, %"118_0.01322" - %25 = xor i64 %21, %24 - store i64 %25, ptr %5, align 4 - %26 = getelementptr inbounds nuw i64, ptr %4, i64 %"118_0.01322" - %27 = load i64, ptr %26, align 4 - %28 = lshr i64 %25, %20 - %29 = trunc i64 %28 to i1 - br i1 %29, label %panic.i1257, label %__barray_check_bounds.exit1262 - -panic.i1257: ; preds = %__barray_check_bounds.exit1256 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1262: ; preds = %__barray_check_bounds.exit1256 - %30 = shl nuw nsw i64 2, %"118_0.01322" - %31 = xor i64 %25, %30 - store i64 %31, ptr %5, align 4 - %32 = getelementptr inbounds nuw i64, ptr %4, i64 %20 - %33 = load i64, ptr %32, align 4 - tail call void @___rp(i64 %27, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rpp(i64 %27, i64 %33, double 0x3FF921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %33, double 0xBFF921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %27, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %27, double 0xBFF921FB54442D18) - %34 = load i64, ptr %5, align 4 - %35 = lshr i64 %34, %"118_0.01322" - %36 = trunc i64 %35 to i1 - br i1 %36, label %__barray_check_bounds.exit1266, label %panic.i1263 - -panic.i1263: ; preds = %__barray_check_bounds.exit1262 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_check_bounds.exit1266: ; preds = %__barray_check_bounds.exit1262 - %37 = xor i64 %34, %24 - store i64 %37, ptr %5, align 4 - store i64 %27, ptr %26, align 4 - %38 = load i64, ptr %5, align 4 - %39 = lshr i64 %38, %20 - %40 = trunc i64 %39 to i1 - br i1 %40, label %__barray_mask_return.exit1268, label %panic.i1267 - -panic.i1267: ; preds = %__barray_check_bounds.exit1266 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1268: ; preds = %__barray_check_bounds.exit1266 - %41 = xor i64 %38, %30 - store i64 %41, ptr %5, align 4 - store i64 %33, ptr %32, align 4 - %42 = add nuw nsw i64 %20, 1 - %exitcond1325 = icmp eq i64 %42, 20 - br i1 %exitcond1325, label %cond_exit_189, label %__barray_check_bounds.exit1252 - -cond_exit_189: ; preds = %__barray_mask_return.exit1268 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) - tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure_leaked) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - %43 = icmp eq i64 %read_uint, 2 - br i1 %43, label %44, label %cond_exit_267 - -cond_exit_267: ; preds = %cond_exit_189 - %read_uint378 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - %.not = icmp eq i64 %read_uint378, 2 - br i1 %.not, label %cond_247_case_0, label %cond_247_case_1 - -44: ; preds = %cond_exit_189 - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - tail call void @print_int(ptr nonnull @res_head_leake.F4F32972.0, i64 20, i64 1) - br label %__barray_check_bounds.exit1274.preheader - -__barray_check_bounds.exit1274.preheader: ; preds = %cond_247_case_1, %44 - br label %__barray_check_bounds.exit1274 - -cond_247_case_1: ; preds = %cond_exit_267 - %45 = icmp eq i64 %read_uint378, 1 - tail call void @print_bool(ptr nonnull @res_head.AFE8E005.0, i64 14, i1 %45) - br label %__barray_check_bounds.exit1274.preheader - -cond_247_case_0: ; preds = %cond_exit_267 - tail call void @panic(i32 1001, ptr nonnull @e_Option.unw.32D4E82D.0) - unreachable - -out_of_bounds.i1269: ; preds = %.thread - tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") - unreachable - -__barray_check_bounds.exit1270: ; preds = %.thread - %46 = load i64, ptr %3, align 4 - %47 = lshr i64 %46, %"310_2.01329" - %48 = trunc i64 %47 to i1 - br i1 %48, label %cond_exit_314, label %panic.i1271 - -panic.i1271: ; preds = %__barray_check_bounds.exit1270 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -mask_block_ok.i: ; preds = %cond_exit_314 - %49 = load i64, ptr %5, align 4 - %50 = or i64 %49, -1048576 - store i64 %50, ptr %5, align 4 - %51 = icmp eq i64 %50, -1 - br i1 %51, label %loop_body538.preheader.preheader, label %mask_block_err.i - -mask_block_err.i: ; preds = %mask_block_ok.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_check_bounds.exit1274: ; preds = %__barray_check_bounds.exit1274.preheader, %cond_exit_314 - %"310_0.sroa.15.01330" = phi i64 [ %52, %cond_exit_314 ], [ 0, %__barray_check_bounds.exit1274.preheader ] - %"310_2.01329" = phi i64 [ %60, %cond_exit_314 ], [ 0, %__barray_check_bounds.exit1274.preheader ] - %52 = add nuw nsw i64 %"310_0.sroa.15.01330", 1 - %53 = load i64, ptr %5, align 4 - %54 = lshr i64 %53, %"310_0.sroa.15.01330" - %55 = trunc i64 %54 to i1 - br i1 %55, label %panic.i1275, label %.thread - -panic.i1275: ; preds = %__barray_check_bounds.exit1274 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -.thread: ; preds = %__barray_check_bounds.exit1274 - %56 = shl nuw nsw i64 1, %"310_0.sroa.15.01330" - %57 = xor i64 %53, %56 - store i64 %57, ptr %5, align 4 - %58 = getelementptr inbounds nuw i64, ptr %4, i64 %"310_0.sroa.15.01330" - %59 = load i64, ptr %58, align 4 - %60 = add i64 %"310_2.01329", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %59) - tail call void @___qfree(i64 %59) - %61 = icmp ult i64 %"310_2.01329", 20 - br i1 %61, label %__barray_check_bounds.exit1270, label %out_of_bounds.i1269 - -cond_exit_314: ; preds = %__barray_check_bounds.exit1270 - %62 = shl nuw nsw i64 1, %"310_2.01329" - %63 = xor i64 %46, %62 - store i64 %63, ptr %3, align 4 - %64 = getelementptr inbounds nuw i64, ptr %2, i64 %"310_2.01329" - store i64 %lazy_measure, ptr %64, align 4 - %65 = icmp samesign ugt i64 %"310_0.sroa.15.01330", 18 - br i1 %65, label %mask_block_ok.i, label %__barray_check_bounds.exit1274 - -loop_body538.preheader.preheader: ; preds = %mask_block_ok.i - tail call void @heap_free(ptr nonnull %4) - tail call void @heap_free(ptr nonnull %5) - br label %__barray_check_bounds.exit1278 - -__barray_check_bounds.exit1278: ; preds = %cond_exit_380, %loop_body538.preheader.preheader - %"376_0.sroa.15.01324" = phi i64 [ %66, %cond_exit_380 ], [ 0, %loop_body538.preheader.preheader ] - %66 = add nuw nsw i64 %"376_0.sroa.15.01324", 1 - %67 = load i64, ptr %3, align 4 - %68 = lshr i64 %67, %"376_0.sroa.15.01324" - %69 = trunc i64 %68 to i1 - br i1 %69, label %panic.i1279, label %__barray_check_bounds.exit1282 - -panic.i1279: ; preds = %__barray_check_bounds.exit1278 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1282: ; preds = %__barray_check_bounds.exit1278 - %70 = shl nuw nsw i64 1, %"376_0.sroa.15.01324" - %71 = xor i64 %67, %70 - store i64 %71, ptr %3, align 4 - %72 = getelementptr inbounds nuw i64, ptr %2, i64 %"376_0.sroa.15.01324" - %73 = load i64, ptr %72, align 4 - tail call void @___inc_future_refcount(i64 %73) - %74 = load i64, ptr %3, align 4 - %75 = lshr i64 %74, %"376_0.sroa.15.01324" - %76 = trunc i64 %75 to i1 - br i1 %76, label %__barray_check_bounds.exit1286, label %panic.i1283 - -panic.i1283: ; preds = %__barray_check_bounds.exit1282 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_check_bounds.exit1286: ; preds = %__barray_check_bounds.exit1282 - %77 = xor i64 %74, %70 - store i64 %77, ptr %3, align 4 - store i64 %73, ptr %72, align 4 - %read_bool = tail call i1 @___read_future_bool(i64 %73) - tail call void @___dec_future_refcount(i64 %73) - %78 = load i64, ptr %1, align 4 - %79 = lshr i64 %78, %"376_0.sroa.15.01324" - %80 = trunc i64 %79 to i1 - br i1 %80, label %cond_exit_380, label %panic.i1287 - -panic.i1287: ; preds = %__barray_check_bounds.exit1286 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -cond_565_case_0: ; preds = %cond_exit_565 - %81 = load i64, ptr %3, align 4 - %82 = or i64 %81, -1048576 - store i64 %82, ptr %3, align 4 - %83 = icmp eq i64 %82, -1 - br i1 %83, label %loop_out537, label %mask_block_err.i1292 - -mask_block_err.i1292: ; preds = %cond_565_case_0 - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_check_bounds.exit1296: ; preds = %cond_exit_380, %cond_exit_565 - %"562_0.01331" = phi i64 [ %84, %cond_exit_565 ], [ 0, %cond_exit_380 ] - %84 = add nuw nsw i64 %"562_0.01331", 1 - %85 = load i64, ptr %3, align 4 - %86 = lshr i64 %85, %"562_0.01331" - %87 = trunc i64 %86 to i1 - br i1 %87, label %cond_exit_565, label %__barray_mask_borrow.exit1300 - -__barray_mask_borrow.exit1300: ; preds = %__barray_check_bounds.exit1296 - %88 = shl nuw nsw i64 1, %"562_0.01331" - %89 = xor i64 %85, %88 - store i64 %89, ptr %3, align 4 - %90 = getelementptr inbounds nuw i64, ptr %2, i64 %"562_0.01331" - %91 = load i64, ptr %90, align 4 - tail call void @___dec_future_refcount(i64 %91) - br label %cond_exit_565 - -cond_exit_565: ; preds = %__barray_mask_borrow.exit1300, %__barray_check_bounds.exit1296 - %92 = icmp samesign ugt i64 %"562_0.01331", 18 - br i1 %92, label %cond_565_case_0, label %__barray_check_bounds.exit1296 - -cond_exit_380: ; preds = %__barray_check_bounds.exit1286 - %93 = xor i64 %78, %70 - store i64 %93, ptr %1, align 4 - %94 = getelementptr inbounds nuw i1, ptr %0, i64 %"376_0.sroa.15.01324" - store i1 %read_bool, ptr %94, align 1 - %95 = icmp eq i64 %"376_0.sroa.15.01324", 19 - br i1 %95, label %__barray_check_bounds.exit1296, label %__barray_check_bounds.exit1278 - -loop_out537: ; preds = %cond_565_case_0 - tail call void @heap_free(ptr %2) - tail call void @heap_free(ptr nonnull %3) - %96 = load i64, ptr %1, align 4 - %97 = and i64 %96, 1048575 - store i64 %97, ptr %1, align 4 - %98 = icmp eq i64 %97, 0 - br i1 %98, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1301 - -mask_block_err.i1301: ; preds = %loop_out537 - tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") - unreachable - -__barray_check_none_borrowed.exit: ; preds = %loop_out537 - %99 = tail call ptr @heap_alloc(i64 20) - %100 = tail call ptr @heap_alloc(i64 8) - store i64 0, ptr %100, align 1 - tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(20) %99, ptr noundef nonnull align 1 dereferenceable(20) %0, i64 20, i1 false) - tail call void @heap_free(ptr nonnull %99) - %101 = load i64, ptr %1, align 4 - %102 = and i64 %101, 1048575 - store i64 %102, ptr %1, align 4 - %103 = icmp eq i64 %102, 0 - br i1 %103, label %__barray_check_none_borrowed.exit1305, label %mask_block_err.i1303 - -mask_block_err.i1303: ; preds = %__barray_check_none_borrowed.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") - unreachable - -__barray_check_none_borrowed.exit1305: ; preds = %__barray_check_none_borrowed.exit - %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 - %y_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 4 - %arr_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 8 - %mask_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 16 - %104 = alloca [20 x i1], align 1 - call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(20) %104, i8 0, i64 20, i1 false) - store i32 20, ptr %out_arr_alloca, align 8 - store i32 1, ptr %y_ptr, align 4 - store ptr %0, ptr %arr_ptr, align 8 - store ptr %104, ptr %mask_ptr, align 8 - call void @print_bool_arr(ptr nonnull @res_tail.AD5A440E.0, i64 17, ptr nonnull %out_arr_alloca) - ret void -} - -declare ptr @heap_alloc(i64) local_unnamed_addr - -; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) -declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immarg) #0 - -; Function Attrs: noreturn -declare void @panic(i32, ptr) local_unnamed_addr #1 - -declare i64 @___lazy_measure_leaked(i64) local_unnamed_addr - -declare void @___qfree(i64) local_unnamed_addr - -declare void @___inc_future_refcount(i64) local_unnamed_addr - -declare i64 @___read_future_uint(i64) local_unnamed_addr - -declare void @___dec_future_refcount(i64) local_unnamed_addr - -declare void @print_int(ptr, i64, i64) local_unnamed_addr - -declare void @print_bool(ptr, i64, i1) local_unnamed_addr - -declare void @heap_free(ptr) local_unnamed_addr - -declare i64 @___lazy_measure(i64) local_unnamed_addr - -declare i1 @___read_future_bool(i64) local_unnamed_addr - -; Function Attrs: mustprogress 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) #2 - -declare void @print_bool_arr(ptr, i64, ptr) local_unnamed_addr - -declare i64 @___qalloc() local_unnamed_addr - -declare void @___reset(i64) local_unnamed_addr - -declare void @___rp(i64, double, double) local_unnamed_addr - -declare void @___rz(i64, double) local_unnamed_addr - -declare void @___rpp(i64, i64, double, double) local_unnamed_addr - -define i64 @qmain(i64 %0) local_unnamed_addr { -entry: - tail call void @setup(i64 %0) - tail call void @__hugr__.__main__.main.1() - %1 = tail call i64 @teardown() - ret i64 %1 -} - -declare void @setup(i64) local_unnamed_addr - -declare i64 @teardown() local_unnamed_addr - -attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } -attributes #1 = { noreturn } -attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) } - -!name = !{!0} - -!0 = !{!"mainlib"} diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_within_tail-sol-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_within_tail-sol-x86_64-windows-gnu.ll deleted file mode 100644 index 6ee4afeb..00000000 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_within_tail-sol-x86_64-windows-gnu.ll +++ /dev/null @@ -1,456 +0,0 @@ -; ModuleID = 'hugr' -source_filename = "hugr" -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-gnu" - -@"e_Index out .DD115165.0" = private constant [29 x i8] c"\1CEXIT:INT:Index out of bounds" -@"e_Array alre.5A300C2A.0" = private constant [57 x i8] c"8EXIT:INT:Array already contains an element at this index" -@"e_Array elem.E746B1A3.0" = private constant [43 x i8] c"*EXIT:INT:Array element is already borrowed" -@e_Option.unw.32D4E82D.0 = private constant [43 x i8] c"*EXIT:INT:Option.unwrap: value is `Nothing`" -@res_head_leake.F4F32972.0 = private constant [21 x i8] c"\14USER:INT:head_leaked" -@res_head.AFE8E005.0 = private constant [15 x i8] c"\0EUSER:BOOL:head" -@"e_Array cont.EFA5AC45.0" = private constant [70 x i8] c"EEXIT:INT:Array contains non-borrowed elements and cannot be discarded" -@"e_Some array.A77EF32E.0" = private constant [48 x i8] c"/EXIT:INT:Some array elements have been borrowed" -@res_tail.AD5A440E.0 = private constant [18 x i8] c"\11USER:BOOLARR:tail" -@"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." - -define void @__hugr__.__main__.main.1() local_unnamed_addr { -alloca_block: - %0 = tail call ptr @heap_alloc(i64 20) - %1 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %1, align 1 - %2 = tail call ptr @heap_alloc(i64 160) - %3 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %3, align 1 - %4 = tail call ptr @heap_alloc(i64 160) - %5 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %5, align 1 - %qalloc.i = tail call i64 @___qalloc() - %not_max.not.not.i = icmp eq i64 %qalloc.i, -1 - br i1 %not_max.not.not.i, label %cond_489_case_0.i, label %__hugr__.__tk2_sol_qalloc.485.exit - -cond_489_case_0.i: ; preds = %alloca_block - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_sol_qalloc.485.exit: ; preds = %alloca_block - tail call void @___reset(i64 %qalloc.i) - tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - br label %cond_13_case_1 - -cond_13_case_1: ; preds = %__hugr__.__tk2_sol_qalloc.485.exit, %cond_exit_13 - %"9_2.01321" = phi i64 [ 0, %__hugr__.__tk2_sol_qalloc.485.exit ], [ %6, %cond_exit_13 ] - %6 = add nuw nsw i64 %"9_2.01321", 1 - %qalloc.i1244 = tail call i64 @___qalloc() - %not_max.not.not.i1245 = icmp eq i64 %qalloc.i1244, -1 - br i1 %not_max.not.not.i1245, label %cond_489_case_0.i1246, label %__barray_check_bounds.exit - -cond_489_case_0.i1246: ; preds = %cond_13_case_1 - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__barray_check_bounds.exit: ; preds = %cond_13_case_1 - tail call void @___reset(i64 %qalloc.i1244) - %7 = load i64, ptr %5, align 4 - %8 = lshr i64 %7, %"9_2.01321" - %9 = trunc i64 %8 to i1 - br i1 %9, label %cond_exit_13, label %panic.i - -panic.i: ; preds = %__barray_check_bounds.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -cond_exit_13: ; preds = %__barray_check_bounds.exit - %10 = shl nuw nsw i64 1, %"9_2.01321" - %11 = xor i64 %7, %10 - store i64 %11, ptr %5, align 4 - %12 = getelementptr inbounds nuw i64, ptr %4, i64 %"9_2.01321" - store i64 %qalloc.i1244, ptr %12, align 4 - %exitcond = icmp eq i64 %6, 20 - br i1 %exitcond, label %loop_out, label %cond_13_case_1 - -loop_out: ; preds = %cond_exit_13 - %13 = load i64, ptr %5, align 4 - %14 = trunc i64 %13 to i1 - br i1 %14, label %panic.i1248, label %__barray_mask_borrow.exit - -panic.i1248: ; preds = %loop_out - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit: ; preds = %loop_out - %15 = or disjoint i64 %13, 1 - store i64 %15, ptr %5, align 4 - %16 = load i64, ptr %4, align 4 - tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rpp(i64 %qalloc.i, i64 %16, double 0x3FF921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %16, double 0xBFF921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %qalloc.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18) - %17 = load i64, ptr %5, align 4 - %18 = trunc i64 %17 to i1 - br i1 %18, label %__barray_mask_return.exit1250, label %panic.i1249 - -panic.i1249: ; preds = %__barray_mask_borrow.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1250: ; preds = %__barray_mask_borrow.exit - %19 = and i64 %17, -2 - store i64 %19, ptr %5, align 4 - store i64 %16, ptr %4, align 4 - br label %__barray_check_bounds.exit1252 - -__barray_check_bounds.exit1252: ; preds = %__barray_mask_return.exit1250, %__barray_mask_return.exit1268 - %20 = phi i64 [ 1, %__barray_mask_return.exit1250 ], [ %42, %__barray_mask_return.exit1268 ] - %"118_0.01322" = phi i64 [ 0, %__barray_mask_return.exit1250 ], [ %20, %__barray_mask_return.exit1268 ] - %21 = load i64, ptr %5, align 4 - %22 = lshr i64 %21, %"118_0.01322" - %23 = trunc i64 %22 to i1 - br i1 %23, label %panic.i1253, label %__barray_check_bounds.exit1256 - -panic.i1253: ; preds = %__barray_check_bounds.exit1252 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1256: ; preds = %__barray_check_bounds.exit1252 - %24 = shl nuw nsw i64 1, %"118_0.01322" - %25 = xor i64 %21, %24 - store i64 %25, ptr %5, align 4 - %26 = getelementptr inbounds nuw i64, ptr %4, i64 %"118_0.01322" - %27 = load i64, ptr %26, align 4 - %28 = lshr i64 %25, %20 - %29 = trunc i64 %28 to i1 - br i1 %29, label %panic.i1257, label %__barray_check_bounds.exit1262 - -panic.i1257: ; preds = %__barray_check_bounds.exit1256 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1262: ; preds = %__barray_check_bounds.exit1256 - %30 = shl nuw nsw i64 2, %"118_0.01322" - %31 = xor i64 %25, %30 - store i64 %31, ptr %5, align 4 - %32 = getelementptr inbounds nuw i64, ptr %4, i64 %20 - %33 = load i64, ptr %32, align 4 - tail call void @___rp(i64 %27, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rpp(i64 %27, i64 %33, double 0x3FF921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %33, double 0xBFF921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %27, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %27, double 0xBFF921FB54442D18) - %34 = load i64, ptr %5, align 4 - %35 = lshr i64 %34, %"118_0.01322" - %36 = trunc i64 %35 to i1 - br i1 %36, label %__barray_check_bounds.exit1266, label %panic.i1263 - -panic.i1263: ; preds = %__barray_check_bounds.exit1262 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_check_bounds.exit1266: ; preds = %__barray_check_bounds.exit1262 - %37 = xor i64 %34, %24 - store i64 %37, ptr %5, align 4 - store i64 %27, ptr %26, align 4 - %38 = load i64, ptr %5, align 4 - %39 = lshr i64 %38, %20 - %40 = trunc i64 %39 to i1 - br i1 %40, label %__barray_mask_return.exit1268, label %panic.i1267 - -panic.i1267: ; preds = %__barray_check_bounds.exit1266 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1268: ; preds = %__barray_check_bounds.exit1266 - %41 = xor i64 %38, %30 - store i64 %41, ptr %5, align 4 - store i64 %33, ptr %32, align 4 - %42 = add nuw nsw i64 %20, 1 - %exitcond1325 = icmp eq i64 %42, 20 - br i1 %exitcond1325, label %cond_exit_189, label %__barray_check_bounds.exit1252 - -cond_exit_189: ; preds = %__barray_mask_return.exit1268 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) - tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure_leaked) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - %43 = icmp eq i64 %read_uint, 2 - br i1 %43, label %44, label %cond_exit_267 - -cond_exit_267: ; preds = %cond_exit_189 - %read_uint378 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - %.not = icmp eq i64 %read_uint378, 2 - br i1 %.not, label %cond_247_case_0, label %cond_247_case_1 - -44: ; preds = %cond_exit_189 - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - tail call void @print_int(ptr nonnull @res_head_leake.F4F32972.0, i64 20, i64 1) - br label %__barray_check_bounds.exit1274.preheader - -__barray_check_bounds.exit1274.preheader: ; preds = %cond_247_case_1, %44 - br label %__barray_check_bounds.exit1274 - -cond_247_case_1: ; preds = %cond_exit_267 - %45 = icmp eq i64 %read_uint378, 1 - tail call void @print_bool(ptr nonnull @res_head.AFE8E005.0, i64 14, i1 %45) - br label %__barray_check_bounds.exit1274.preheader - -cond_247_case_0: ; preds = %cond_exit_267 - tail call void @panic(i32 1001, ptr nonnull @e_Option.unw.32D4E82D.0) - unreachable - -out_of_bounds.i1269: ; preds = %.thread - tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") - unreachable - -__barray_check_bounds.exit1270: ; preds = %.thread - %46 = load i64, ptr %3, align 4 - %47 = lshr i64 %46, %"310_2.01329" - %48 = trunc i64 %47 to i1 - br i1 %48, label %cond_exit_314, label %panic.i1271 - -panic.i1271: ; preds = %__barray_check_bounds.exit1270 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -mask_block_ok.i: ; preds = %cond_exit_314 - %49 = load i64, ptr %5, align 4 - %50 = or i64 %49, -1048576 - store i64 %50, ptr %5, align 4 - %51 = icmp eq i64 %50, -1 - br i1 %51, label %loop_body538.preheader.preheader, label %mask_block_err.i - -mask_block_err.i: ; preds = %mask_block_ok.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_check_bounds.exit1274: ; preds = %__barray_check_bounds.exit1274.preheader, %cond_exit_314 - %"310_0.sroa.15.01330" = phi i64 [ %52, %cond_exit_314 ], [ 0, %__barray_check_bounds.exit1274.preheader ] - %"310_2.01329" = phi i64 [ %60, %cond_exit_314 ], [ 0, %__barray_check_bounds.exit1274.preheader ] - %52 = add nuw nsw i64 %"310_0.sroa.15.01330", 1 - %53 = load i64, ptr %5, align 4 - %54 = lshr i64 %53, %"310_0.sroa.15.01330" - %55 = trunc i64 %54 to i1 - br i1 %55, label %panic.i1275, label %.thread - -panic.i1275: ; preds = %__barray_check_bounds.exit1274 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -.thread: ; preds = %__barray_check_bounds.exit1274 - %56 = shl nuw nsw i64 1, %"310_0.sroa.15.01330" - %57 = xor i64 %53, %56 - store i64 %57, ptr %5, align 4 - %58 = getelementptr inbounds nuw i64, ptr %4, i64 %"310_0.sroa.15.01330" - %59 = load i64, ptr %58, align 4 - %60 = add i64 %"310_2.01329", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %59) - tail call void @___qfree(i64 %59) - %61 = icmp ult i64 %"310_2.01329", 20 - br i1 %61, label %__barray_check_bounds.exit1270, label %out_of_bounds.i1269 - -cond_exit_314: ; preds = %__barray_check_bounds.exit1270 - %62 = shl nuw nsw i64 1, %"310_2.01329" - %63 = xor i64 %46, %62 - store i64 %63, ptr %3, align 4 - %64 = getelementptr inbounds nuw i64, ptr %2, i64 %"310_2.01329" - store i64 %lazy_measure, ptr %64, align 4 - %65 = icmp samesign ugt i64 %"310_0.sroa.15.01330", 18 - br i1 %65, label %mask_block_ok.i, label %__barray_check_bounds.exit1274 - -loop_body538.preheader.preheader: ; preds = %mask_block_ok.i - tail call void @heap_free(ptr nonnull %4) - tail call void @heap_free(ptr nonnull %5) - br label %__barray_check_bounds.exit1278 - -__barray_check_bounds.exit1278: ; preds = %cond_exit_380, %loop_body538.preheader.preheader - %"376_0.sroa.15.01324" = phi i64 [ %66, %cond_exit_380 ], [ 0, %loop_body538.preheader.preheader ] - %66 = add nuw nsw i64 %"376_0.sroa.15.01324", 1 - %67 = load i64, ptr %3, align 4 - %68 = lshr i64 %67, %"376_0.sroa.15.01324" - %69 = trunc i64 %68 to i1 - br i1 %69, label %panic.i1279, label %__barray_check_bounds.exit1282 - -panic.i1279: ; preds = %__barray_check_bounds.exit1278 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1282: ; preds = %__barray_check_bounds.exit1278 - %70 = shl nuw nsw i64 1, %"376_0.sroa.15.01324" - %71 = xor i64 %67, %70 - store i64 %71, ptr %3, align 4 - %72 = getelementptr inbounds nuw i64, ptr %2, i64 %"376_0.sroa.15.01324" - %73 = load i64, ptr %72, align 4 - tail call void @___inc_future_refcount(i64 %73) - %74 = load i64, ptr %3, align 4 - %75 = lshr i64 %74, %"376_0.sroa.15.01324" - %76 = trunc i64 %75 to i1 - br i1 %76, label %__barray_check_bounds.exit1286, label %panic.i1283 - -panic.i1283: ; preds = %__barray_check_bounds.exit1282 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_check_bounds.exit1286: ; preds = %__barray_check_bounds.exit1282 - %77 = xor i64 %74, %70 - store i64 %77, ptr %3, align 4 - store i64 %73, ptr %72, align 4 - %read_bool = tail call i1 @___read_future_bool(i64 %73) - tail call void @___dec_future_refcount(i64 %73) - %78 = load i64, ptr %1, align 4 - %79 = lshr i64 %78, %"376_0.sroa.15.01324" - %80 = trunc i64 %79 to i1 - br i1 %80, label %cond_exit_380, label %panic.i1287 - -panic.i1287: ; preds = %__barray_check_bounds.exit1286 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -cond_565_case_0: ; preds = %cond_exit_565 - %81 = load i64, ptr %3, align 4 - %82 = or i64 %81, -1048576 - store i64 %82, ptr %3, align 4 - %83 = icmp eq i64 %82, -1 - br i1 %83, label %loop_out537, label %mask_block_err.i1292 - -mask_block_err.i1292: ; preds = %cond_565_case_0 - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_check_bounds.exit1296: ; preds = %cond_exit_380, %cond_exit_565 - %"562_0.01331" = phi i64 [ %84, %cond_exit_565 ], [ 0, %cond_exit_380 ] - %84 = add nuw nsw i64 %"562_0.01331", 1 - %85 = load i64, ptr %3, align 4 - %86 = lshr i64 %85, %"562_0.01331" - %87 = trunc i64 %86 to i1 - br i1 %87, label %cond_exit_565, label %__barray_mask_borrow.exit1300 - -__barray_mask_borrow.exit1300: ; preds = %__barray_check_bounds.exit1296 - %88 = shl nuw nsw i64 1, %"562_0.01331" - %89 = xor i64 %85, %88 - store i64 %89, ptr %3, align 4 - %90 = getelementptr inbounds nuw i64, ptr %2, i64 %"562_0.01331" - %91 = load i64, ptr %90, align 4 - tail call void @___dec_future_refcount(i64 %91) - br label %cond_exit_565 - -cond_exit_565: ; preds = %__barray_mask_borrow.exit1300, %__barray_check_bounds.exit1296 - %92 = icmp samesign ugt i64 %"562_0.01331", 18 - br i1 %92, label %cond_565_case_0, label %__barray_check_bounds.exit1296 - -cond_exit_380: ; preds = %__barray_check_bounds.exit1286 - %93 = xor i64 %78, %70 - store i64 %93, ptr %1, align 4 - %94 = getelementptr inbounds nuw i1, ptr %0, i64 %"376_0.sroa.15.01324" - store i1 %read_bool, ptr %94, align 1 - %95 = icmp eq i64 %"376_0.sroa.15.01324", 19 - br i1 %95, label %__barray_check_bounds.exit1296, label %__barray_check_bounds.exit1278 - -loop_out537: ; preds = %cond_565_case_0 - tail call void @heap_free(ptr %2) - tail call void @heap_free(ptr nonnull %3) - %96 = load i64, ptr %1, align 4 - %97 = and i64 %96, 1048575 - store i64 %97, ptr %1, align 4 - %98 = icmp eq i64 %97, 0 - br i1 %98, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1301 - -mask_block_err.i1301: ; preds = %loop_out537 - tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") - unreachable - -__barray_check_none_borrowed.exit: ; preds = %loop_out537 - %99 = tail call ptr @heap_alloc(i64 20) - %100 = tail call ptr @heap_alloc(i64 8) - store i64 0, ptr %100, align 1 - tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(20) %99, ptr noundef nonnull align 1 dereferenceable(20) %0, i64 20, i1 false) - tail call void @heap_free(ptr nonnull %99) - %101 = load i64, ptr %1, align 4 - %102 = and i64 %101, 1048575 - store i64 %102, ptr %1, align 4 - %103 = icmp eq i64 %102, 0 - br i1 %103, label %__barray_check_none_borrowed.exit1305, label %mask_block_err.i1303 - -mask_block_err.i1303: ; preds = %__barray_check_none_borrowed.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") - unreachable - -__barray_check_none_borrowed.exit1305: ; preds = %__barray_check_none_borrowed.exit - %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 - %y_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 4 - %arr_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 8 - %mask_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 16 - %104 = alloca [20 x i1], align 1 - call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(20) %104, i8 0, i64 20, i1 false) - store i32 20, ptr %out_arr_alloca, align 8 - store i32 1, ptr %y_ptr, align 4 - store ptr %0, ptr %arr_ptr, align 8 - store ptr %104, ptr %mask_ptr, align 8 - call void @print_bool_arr(ptr nonnull @res_tail.AD5A440E.0, i64 17, ptr nonnull %out_arr_alloca) - ret void -} - -declare ptr @heap_alloc(i64) local_unnamed_addr - -; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) -declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immarg) #0 - -; Function Attrs: noreturn -declare void @panic(i32, ptr) local_unnamed_addr #1 - -declare i64 @___lazy_measure_leaked(i64) local_unnamed_addr - -declare void @___qfree(i64) local_unnamed_addr - -declare void @___inc_future_refcount(i64) local_unnamed_addr - -declare i64 @___read_future_uint(i64) local_unnamed_addr - -declare void @___dec_future_refcount(i64) local_unnamed_addr - -declare void @print_int(ptr, i64, i64) local_unnamed_addr - -declare void @print_bool(ptr, i64, i1) local_unnamed_addr - -declare void @heap_free(ptr) local_unnamed_addr - -declare i64 @___lazy_measure(i64) local_unnamed_addr - -declare i1 @___read_future_bool(i64) local_unnamed_addr - -; Function Attrs: mustprogress 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) #2 - -declare void @print_bool_arr(ptr, i64, ptr) local_unnamed_addr - -declare i64 @___qalloc() local_unnamed_addr - -declare void @___reset(i64) local_unnamed_addr - -declare void @___rp(i64, double, double) local_unnamed_addr - -declare void @___rz(i64, double) local_unnamed_addr - -declare void @___rpp(i64, i64, double, double) local_unnamed_addr - -define i64 @qmain(i64 %0) local_unnamed_addr { -entry: - tail call void @setup(i64 %0) - tail call void @__hugr__.__main__.main.1() - %1 = tail call i64 @teardown() - ret i64 %1 -} - -declare void @setup(i64) local_unnamed_addr - -declare i64 @teardown() local_unnamed_addr - -attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } -attributes #1 = { noreturn } -attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) } - -!name = !{!0} - -!0 = !{!"mainlib"} diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_within_tail.sha256 b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_within_tail.sha256 deleted file mode 100644 index 01f50f65..00000000 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked/leak_within_tail.sha256 +++ /dev/null @@ -1 +0,0 @@ -64190f721c67173346b1c70904d1aa7dfeecac84496b4be0785cac2a964e09e4 \ No newline at end of file diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_from_head-helios-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_from_head-helios-aarch64-apple-darwin.ll index 71bec774..7bea24d3 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_from_head-helios-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_from_head-helios-aarch64-apple-darwin.ll @@ -129,22 +129,22 @@ __barray_mask_return.exit1224: ; preds = %__barray_check_boun br i1 %exitcond1279, label %cond_exit_185, label %__barray_check_bounds.exit1219 cond_exit_185: ; preds = %__barray_mask_return.exit1224 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) + %___lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure_leaked) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___inc_future_refcount(i64 %___lazy_measure_leaked) + %read_uint = tail call i64 @___read_future_uint(i64 %___lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) %29 = icmp eq i64 %read_uint, 2 br i1 %29, label %30, label %cond_exit_256 cond_exit_256: ; preds = %cond_exit_185 - %read_uint350 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + %read_uint350 = tail call i64 @___read_future_uint(i64 %___lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) %.not = icmp eq i64 %read_uint350, 2 br i1 %.not, label %cond_236_case_0, label %cond_236_case_1 30: ; preds = %cond_exit_185 - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) tail call void @print_int(ptr nonnull @res_head_leake.F4F32972.0, i64 20, i64 1) br label %__barray_check_bounds.exit1230.preheader @@ -205,7 +205,7 @@ panic.i1231: ; preds = %__barray_check_boun %44 = getelementptr inbounds nuw i64, ptr %4, i64 %"298_0.sroa.15.01284" %45 = load i64, ptr %44, align 4 %46 = add i64 %"298_2.01283", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %45) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %45) tail call void @___qfree(i64 %45) %47 = icmp ult i64 %"298_2.01283", 20 br i1 %47, label %__barray_check_bounds.exit1226, label %out_of_bounds.i1225 @@ -215,7 +215,7 @@ cond_exit_302: ; preds = %__barray_check_boun %49 = xor i64 %32, %48 store i64 %49, ptr %3, align 4 %50 = getelementptr inbounds nuw i64, ptr %2, i64 %"298_2.01283" - store i64 %lazy_measure, ptr %50, align 4 + store i64 %___lazy_measure, ptr %50, align 4 %51 = icmp samesign ugt i64 %"298_0.sroa.15.01284", 18 br i1 %51, label %mask_block_ok.i, label %__barray_check_bounds.exit1230 diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_from_head-helios-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_from_head-helios-aarch64-unknown-linux-gnu.ll index cdc73338..d665cac1 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_from_head-helios-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_from_head-helios-aarch64-unknown-linux-gnu.ll @@ -129,22 +129,22 @@ __barray_mask_return.exit1224: ; preds = %__barray_check_boun br i1 %exitcond1279, label %cond_exit_185, label %__barray_check_bounds.exit1219 cond_exit_185: ; preds = %__barray_mask_return.exit1224 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) + %___lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure_leaked) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___inc_future_refcount(i64 %___lazy_measure_leaked) + %read_uint = tail call i64 @___read_future_uint(i64 %___lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) %29 = icmp eq i64 %read_uint, 2 br i1 %29, label %30, label %cond_exit_256 cond_exit_256: ; preds = %cond_exit_185 - %read_uint350 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + %read_uint350 = tail call i64 @___read_future_uint(i64 %___lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) %.not = icmp eq i64 %read_uint350, 2 br i1 %.not, label %cond_236_case_0, label %cond_236_case_1 30: ; preds = %cond_exit_185 - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) tail call void @print_int(ptr nonnull @res_head_leake.F4F32972.0, i64 20, i64 1) br label %__barray_check_bounds.exit1230.preheader @@ -205,7 +205,7 @@ panic.i1231: ; preds = %__barray_check_boun %44 = getelementptr inbounds nuw i64, ptr %4, i64 %"298_0.sroa.15.01284" %45 = load i64, ptr %44, align 4 %46 = add i64 %"298_2.01283", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %45) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %45) tail call void @___qfree(i64 %45) %47 = icmp ult i64 %"298_2.01283", 20 br i1 %47, label %__barray_check_bounds.exit1226, label %out_of_bounds.i1225 @@ -215,7 +215,7 @@ cond_exit_302: ; preds = %__barray_check_boun %49 = xor i64 %32, %48 store i64 %49, ptr %3, align 4 %50 = getelementptr inbounds nuw i64, ptr %2, i64 %"298_2.01283" - store i64 %lazy_measure, ptr %50, align 4 + store i64 %___lazy_measure, ptr %50, align 4 %51 = icmp samesign ugt i64 %"298_0.sroa.15.01284", 18 br i1 %51, label %mask_block_ok.i, label %__barray_check_bounds.exit1230 diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_from_head-helios-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_from_head-helios-x86_64-apple-darwin.ll index 7252fad1..42b74855 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_from_head-helios-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_from_head-helios-x86_64-apple-darwin.ll @@ -129,22 +129,22 @@ __barray_mask_return.exit1224: ; preds = %__barray_check_boun br i1 %exitcond1279, label %cond_exit_185, label %__barray_check_bounds.exit1219 cond_exit_185: ; preds = %__barray_mask_return.exit1224 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) + %___lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure_leaked) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___inc_future_refcount(i64 %___lazy_measure_leaked) + %read_uint = tail call i64 @___read_future_uint(i64 %___lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) %29 = icmp eq i64 %read_uint, 2 br i1 %29, label %30, label %cond_exit_256 cond_exit_256: ; preds = %cond_exit_185 - %read_uint350 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + %read_uint350 = tail call i64 @___read_future_uint(i64 %___lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) %.not = icmp eq i64 %read_uint350, 2 br i1 %.not, label %cond_236_case_0, label %cond_236_case_1 30: ; preds = %cond_exit_185 - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) tail call void @print_int(ptr nonnull @res_head_leake.F4F32972.0, i64 20, i64 1) br label %__barray_check_bounds.exit1230.preheader @@ -205,7 +205,7 @@ panic.i1231: ; preds = %__barray_check_boun %44 = getelementptr inbounds nuw i64, ptr %4, i64 %"298_0.sroa.15.01284" %45 = load i64, ptr %44, align 4 %46 = add i64 %"298_2.01283", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %45) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %45) tail call void @___qfree(i64 %45) %47 = icmp ult i64 %"298_2.01283", 20 br i1 %47, label %__barray_check_bounds.exit1226, label %out_of_bounds.i1225 @@ -215,7 +215,7 @@ cond_exit_302: ; preds = %__barray_check_boun %49 = xor i64 %32, %48 store i64 %49, ptr %3, align 4 %50 = getelementptr inbounds nuw i64, ptr %2, i64 %"298_2.01283" - store i64 %lazy_measure, ptr %50, align 4 + store i64 %___lazy_measure, ptr %50, align 4 %51 = icmp samesign ugt i64 %"298_0.sroa.15.01284", 18 br i1 %51, label %mask_block_ok.i, label %__barray_check_bounds.exit1230 diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_from_head-helios-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_from_head-helios-x86_64-unknown-linux-gnu.ll index 1ef881c5..5076d0ff 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_from_head-helios-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_from_head-helios-x86_64-unknown-linux-gnu.ll @@ -129,22 +129,22 @@ __barray_mask_return.exit1224: ; preds = %__barray_check_boun br i1 %exitcond1279, label %cond_exit_185, label %__barray_check_bounds.exit1219 cond_exit_185: ; preds = %__barray_mask_return.exit1224 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) + %___lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure_leaked) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___inc_future_refcount(i64 %___lazy_measure_leaked) + %read_uint = tail call i64 @___read_future_uint(i64 %___lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) %29 = icmp eq i64 %read_uint, 2 br i1 %29, label %30, label %cond_exit_256 cond_exit_256: ; preds = %cond_exit_185 - %read_uint350 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + %read_uint350 = tail call i64 @___read_future_uint(i64 %___lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) %.not = icmp eq i64 %read_uint350, 2 br i1 %.not, label %cond_236_case_0, label %cond_236_case_1 30: ; preds = %cond_exit_185 - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) tail call void @print_int(ptr nonnull @res_head_leake.F4F32972.0, i64 20, i64 1) br label %__barray_check_bounds.exit1230.preheader @@ -205,7 +205,7 @@ panic.i1231: ; preds = %__barray_check_boun %44 = getelementptr inbounds nuw i64, ptr %4, i64 %"298_0.sroa.15.01284" %45 = load i64, ptr %44, align 4 %46 = add i64 %"298_2.01283", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %45) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %45) tail call void @___qfree(i64 %45) %47 = icmp ult i64 %"298_2.01283", 20 br i1 %47, label %__barray_check_bounds.exit1226, label %out_of_bounds.i1225 @@ -215,7 +215,7 @@ cond_exit_302: ; preds = %__barray_check_boun %49 = xor i64 %32, %48 store i64 %49, ptr %3, align 4 %50 = getelementptr inbounds nuw i64, ptr %2, i64 %"298_2.01283" - store i64 %lazy_measure, ptr %50, align 4 + store i64 %___lazy_measure, ptr %50, align 4 %51 = icmp samesign ugt i64 %"298_0.sroa.15.01284", 18 br i1 %51, label %mask_block_ok.i, label %__barray_check_bounds.exit1230 diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_from_head-helios-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_from_head-helios-x86_64-windows-gnu.ll index adae1b0f..4de66cd7 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_from_head-helios-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_from_head-helios-x86_64-windows-gnu.ll @@ -129,22 +129,22 @@ __barray_mask_return.exit1224: ; preds = %__barray_check_boun br i1 %exitcond1279, label %cond_exit_185, label %__barray_check_bounds.exit1219 cond_exit_185: ; preds = %__barray_mask_return.exit1224 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) + %___lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure_leaked) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___inc_future_refcount(i64 %___lazy_measure_leaked) + %read_uint = tail call i64 @___read_future_uint(i64 %___lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) %29 = icmp eq i64 %read_uint, 2 br i1 %29, label %30, label %cond_exit_256 cond_exit_256: ; preds = %cond_exit_185 - %read_uint350 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + %read_uint350 = tail call i64 @___read_future_uint(i64 %___lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) %.not = icmp eq i64 %read_uint350, 2 br i1 %.not, label %cond_236_case_0, label %cond_236_case_1 30: ; preds = %cond_exit_185 - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) tail call void @print_int(ptr nonnull @res_head_leake.F4F32972.0, i64 20, i64 1) br label %__barray_check_bounds.exit1230.preheader @@ -205,7 +205,7 @@ panic.i1231: ; preds = %__barray_check_boun %44 = getelementptr inbounds nuw i64, ptr %4, i64 %"298_0.sroa.15.01284" %45 = load i64, ptr %44, align 4 %46 = add i64 %"298_2.01283", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %45) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %45) tail call void @___qfree(i64 %45) %47 = icmp ult i64 %"298_2.01283", 20 br i1 %47, label %__barray_check_bounds.exit1226, label %out_of_bounds.i1225 @@ -215,7 +215,7 @@ cond_exit_302: ; preds = %__barray_check_boun %49 = xor i64 %32, %48 store i64 %49, ptr %3, align 4 %50 = getelementptr inbounds nuw i64, ptr %2, i64 %"298_2.01283" - store i64 %lazy_measure, ptr %50, align 4 + store i64 %___lazy_measure, ptr %50, align 4 %51 = icmp samesign ugt i64 %"298_0.sroa.15.01284", 18 br i1 %51, label %mask_block_ok.i, label %__barray_check_bounds.exit1230 diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_from_head-sol-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_from_head-sol-aarch64-apple-darwin.ll index f9316b44..4fcbba4d 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_from_head-sol-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_from_head-sol-aarch64-apple-darwin.ll @@ -48,24 +48,24 @@ loop_body: ; preds = %cond_exit_13, %__hu cond_13_case_1: ; preds = %loop_body %8 = add i64 %"9_2.0", 1 - %qalloc.i1214 = tail call i64 @___qalloc() - %not_max.not.not.i1215 = icmp eq i64 %qalloc.i1214, -1 - br i1 %not_max.not.not.i1215, label %cond_474_case_0.i1216, label %__hugr__.__tk2_sol_qalloc.470.exit1217 + %qalloc.i1215 = tail call i64 @___qalloc() + %not_max.not.not.i1216 = icmp eq i64 %qalloc.i1215, -1 + br i1 %not_max.not.not.i1216, label %cond_474_case_0.i1217, label %__hugr__.__tk2_sol_qalloc.470.exit1218 -cond_474_case_0.i1216: ; preds = %cond_13_case_1 +cond_474_case_0.i1217: ; preds = %cond_13_case_1 tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_sol_qalloc.470.exit1217: ; preds = %cond_13_case_1 - tail call void @___reset(i64 %qalloc.i1214) +__hugr__.__tk2_sol_qalloc.470.exit1218: ; preds = %cond_13_case_1 + tail call void @___reset(i64 %qalloc.i1215) %9 = icmp ult i64 %"9_2.0", 20 br i1 %9, label %__barray_check_bounds.exit, label %out_of_bounds.i -out_of_bounds.i: ; preds = %__hugr__.__tk2_sol_qalloc.470.exit1217 +out_of_bounds.i: ; preds = %__hugr__.__tk2_sol_qalloc.470.exit1218 tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") unreachable -__barray_check_bounds.exit: ; preds = %__hugr__.__tk2_sol_qalloc.470.exit1217 +__barray_check_bounds.exit: ; preds = %__hugr__.__tk2_sol_qalloc.470.exit1218 %10 = load i64, ptr %5, align 4 %11 = lshr i64 %10, %"9_2.0" %12 = trunc i64 %11 to i1 @@ -80,31 +80,31 @@ __barray_mask_return.exit: ; preds = %__barray_check_boun %14 = xor i64 %10, %13 store i64 %14, ptr %5, align 4 %15 = getelementptr inbounds nuw i64, ptr %4, i64 %"9_2.0" - store i64 %qalloc.i1214, ptr %15, align 4 + store i64 %qalloc.i1215, ptr %15, align 4 br label %cond_exit_13 cond_exit_13: ; preds = %loop_body, %__barray_mask_return.exit %"2107.0" = phi i64 [ %8, %__barray_mask_return.exit ], [ %"9_2.0", %loop_body ] %exitcond = icmp eq i64 %7, 21 - br i1 %exitcond, label %__barray_check_bounds.exit1219, label %loop_body + br i1 %exitcond, label %__barray_check_bounds.exit1220, label %loop_body -__barray_check_bounds.exit1219: ; preds = %cond_exit_13, %__barray_mask_return.exit1224 - %16 = phi i64 [ %28, %__barray_mask_return.exit1224 ], [ 1, %cond_exit_13 ] - %"114_0.01276" = phi i64 [ %16, %__barray_mask_return.exit1224 ], [ 0, %cond_exit_13 ] +__barray_check_bounds.exit1220: ; preds = %cond_exit_13, %__barray_mask_return.exit1225 + %16 = phi i64 [ %28, %__barray_mask_return.exit1225 ], [ 1, %cond_exit_13 ] + %"114_0.01277" = phi i64 [ %16, %__barray_mask_return.exit1225 ], [ 0, %cond_exit_13 ] %17 = load i64, ptr %5, align 4 - %18 = lshr i64 %17, %"114_0.01276" + %18 = lshr i64 %17, %"114_0.01277" %19 = trunc i64 %18 to i1 - br i1 %19, label %panic.i1220, label %__barray_check_bounds.exit1222 + br i1 %19, label %panic.i1221, label %__barray_check_bounds.exit1223 -panic.i1220: ; preds = %__barray_check_bounds.exit1219 +panic.i1221: ; preds = %__barray_check_bounds.exit1220 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_check_bounds.exit1222: ; preds = %__barray_check_bounds.exit1219 - %20 = shl nuw nsw i64 1, %"114_0.01276" +__barray_check_bounds.exit1223: ; preds = %__barray_check_bounds.exit1220 + %20 = shl nuw nsw i64 1, %"114_0.01277" %21 = xor i64 %17, %20 store i64 %21, ptr %5, align 4 - %22 = getelementptr inbounds nuw i64, ptr %4, i64 %"114_0.01276" + %22 = getelementptr inbounds nuw i64, ptr %4, i64 %"114_0.01277" %23 = load i64, ptr %22, align 4 tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rpp(i64 %qalloc.i, i64 %23, double 0x3FF921FB54442D18, double 0.000000e+00) @@ -112,65 +112,65 @@ __barray_check_bounds.exit1222: ; preds = %__barray_check_boun tail call void @___rp(i64 %qalloc.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18) %24 = load i64, ptr %5, align 4 - %25 = lshr i64 %24, %"114_0.01276" + %25 = lshr i64 %24, %"114_0.01277" %26 = trunc i64 %25 to i1 - br i1 %26, label %__barray_mask_return.exit1224, label %panic.i1223 + br i1 %26, label %__barray_mask_return.exit1225, label %panic.i1224 -panic.i1223: ; preds = %__barray_check_bounds.exit1222 +panic.i1224: ; preds = %__barray_check_bounds.exit1223 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_mask_return.exit1224: ; preds = %__barray_check_bounds.exit1222 +__barray_mask_return.exit1225: ; preds = %__barray_check_bounds.exit1223 %27 = xor i64 %24, %20 store i64 %27, ptr %5, align 4 store i64 %23, ptr %22, align 4 %28 = add nuw nsw i64 %16, 1 - %exitcond1279 = icmp eq i64 %28, 21 - br i1 %exitcond1279, label %cond_exit_185, label %__barray_check_bounds.exit1219 + %exitcond1280 = icmp eq i64 %28, 21 + br i1 %exitcond1280, label %cond_exit_185, label %__barray_check_bounds.exit1220 -cond_exit_185: ; preds = %__barray_mask_return.exit1224 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) +cond_exit_185: ; preds = %__barray_mask_return.exit1225 + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 1) tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure_leaked) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___inc_future_refcount(i64 %___future_measure) + %read_uint = tail call i64 @___read_future_uint(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) %29 = icmp eq i64 %read_uint, 2 br i1 %29, label %30, label %cond_exit_256 cond_exit_256: ; preds = %cond_exit_185 - %read_uint350 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + %read_uint350 = tail call i64 @___read_future_uint(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) %.not = icmp eq i64 %read_uint350, 2 br i1 %.not, label %cond_236_case_0, label %cond_236_case_1 30: ; preds = %cond_exit_185 - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_int(ptr nonnull @res_head_leake.F4F32972.0, i64 20, i64 1) - br label %__barray_check_bounds.exit1230.preheader + br label %__barray_check_bounds.exit1231.preheader -__barray_check_bounds.exit1230.preheader: ; preds = %cond_236_case_1, %30 - br label %__barray_check_bounds.exit1230 +__barray_check_bounds.exit1231.preheader: ; preds = %cond_236_case_1, %30 + br label %__barray_check_bounds.exit1231 cond_236_case_1: ; preds = %cond_exit_256 %31 = icmp eq i64 %read_uint350, 1 tail call void @print_bool(ptr nonnull @res_head.AFE8E005.0, i64 14, i1 %31) - br label %__barray_check_bounds.exit1230.preheader + br label %__barray_check_bounds.exit1231.preheader cond_236_case_0: ; preds = %cond_exit_256 tail call void @panic(i32 1001, ptr nonnull @e_Option.unw.32D4E82D.0) unreachable -out_of_bounds.i1225: ; preds = %.thread +out_of_bounds.i1226: ; preds = %.thread tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") unreachable -__barray_check_bounds.exit1226: ; preds = %.thread +__barray_check_bounds.exit1227: ; preds = %.thread %32 = load i64, ptr %3, align 4 - %33 = lshr i64 %32, %"298_2.01283" + %33 = lshr i64 %32, %"298_2.01284" %34 = trunc i64 %33 to i1 - br i1 %34, label %cond_exit_302, label %panic.i1227 + br i1 %34, label %cond_exit_302, label %panic.i1228 -panic.i1227: ; preds = %__barray_check_bounds.exit1226 +panic.i1228: ; preds = %__barray_check_bounds.exit1227 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable @@ -179,91 +179,91 @@ mask_block_ok.i: ; preds = %cond_exit_302 %36 = or i64 %35, -1048576 store i64 %36, ptr %5, align 4 %37 = icmp eq i64 %36, -1 - br i1 %37, label %loop_body510.preheader.preheader, label %mask_block_err.i + br i1 %37, label %loop_body511.preheader.preheader, label %mask_block_err.i mask_block_err.i: ; preds = %mask_block_ok.i tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_check_bounds.exit1230: ; preds = %__barray_check_bounds.exit1230.preheader, %cond_exit_302 - %"298_0.sroa.15.01284" = phi i64 [ %38, %cond_exit_302 ], [ 0, %__barray_check_bounds.exit1230.preheader ] - %"298_2.01283" = phi i64 [ %46, %cond_exit_302 ], [ 0, %__barray_check_bounds.exit1230.preheader ] - %38 = add nuw nsw i64 %"298_0.sroa.15.01284", 1 +__barray_check_bounds.exit1231: ; preds = %__barray_check_bounds.exit1231.preheader, %cond_exit_302 + %"298_0.sroa.15.01285" = phi i64 [ %38, %cond_exit_302 ], [ 0, %__barray_check_bounds.exit1231.preheader ] + %"298_2.01284" = phi i64 [ %46, %cond_exit_302 ], [ 0, %__barray_check_bounds.exit1231.preheader ] + %38 = add nuw nsw i64 %"298_0.sroa.15.01285", 1 %39 = load i64, ptr %5, align 4 - %40 = lshr i64 %39, %"298_0.sroa.15.01284" + %40 = lshr i64 %39, %"298_0.sroa.15.01285" %41 = trunc i64 %40 to i1 - br i1 %41, label %panic.i1231, label %.thread + br i1 %41, label %panic.i1232, label %.thread -panic.i1231: ; preds = %__barray_check_bounds.exit1230 +panic.i1232: ; preds = %__barray_check_bounds.exit1231 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -.thread: ; preds = %__barray_check_bounds.exit1230 - %42 = shl nuw nsw i64 1, %"298_0.sroa.15.01284" +.thread: ; preds = %__barray_check_bounds.exit1231 + %42 = shl nuw nsw i64 1, %"298_0.sroa.15.01285" %43 = xor i64 %39, %42 store i64 %43, ptr %5, align 4 - %44 = getelementptr inbounds nuw i64, ptr %4, i64 %"298_0.sroa.15.01284" + %44 = getelementptr inbounds nuw i64, ptr %4, i64 %"298_0.sroa.15.01285" %45 = load i64, ptr %44, align 4 - %46 = add i64 %"298_2.01283", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %45) + %46 = add i64 %"298_2.01284", 1 + %___future_measure485 = tail call i64 @___future_measure(i64 %45, i64 0) tail call void @___qfree(i64 %45) - %47 = icmp ult i64 %"298_2.01283", 20 - br i1 %47, label %__barray_check_bounds.exit1226, label %out_of_bounds.i1225 + %47 = icmp ult i64 %"298_2.01284", 20 + br i1 %47, label %__barray_check_bounds.exit1227, label %out_of_bounds.i1226 -cond_exit_302: ; preds = %__barray_check_bounds.exit1226 - %48 = shl nuw nsw i64 1, %"298_2.01283" +cond_exit_302: ; preds = %__barray_check_bounds.exit1227 + %48 = shl nuw nsw i64 1, %"298_2.01284" %49 = xor i64 %32, %48 store i64 %49, ptr %3, align 4 - %50 = getelementptr inbounds nuw i64, ptr %2, i64 %"298_2.01283" - store i64 %lazy_measure, ptr %50, align 4 - %51 = icmp samesign ugt i64 %"298_0.sroa.15.01284", 18 - br i1 %51, label %mask_block_ok.i, label %__barray_check_bounds.exit1230 + %50 = getelementptr inbounds nuw i64, ptr %2, i64 %"298_2.01284" + store i64 %___future_measure485, ptr %50, align 4 + %51 = icmp samesign ugt i64 %"298_0.sroa.15.01285", 18 + br i1 %51, label %mask_block_ok.i, label %__barray_check_bounds.exit1231 -loop_body510.preheader.preheader: ; preds = %mask_block_ok.i +loop_body511.preheader.preheader: ; preds = %mask_block_ok.i tail call void @heap_free(ptr nonnull %4) tail call void @heap_free(ptr nonnull %5) - br label %__barray_check_bounds.exit1234 + br label %__barray_check_bounds.exit1235 -__barray_check_bounds.exit1234: ; preds = %cond_exit_368, %loop_body510.preheader.preheader - %"364_0.sroa.15.01278" = phi i64 [ %52, %cond_exit_368 ], [ 0, %loop_body510.preheader.preheader ] - %52 = add nuw nsw i64 %"364_0.sroa.15.01278", 1 +__barray_check_bounds.exit1235: ; preds = %cond_exit_368, %loop_body511.preheader.preheader + %"364_0.sroa.15.01279" = phi i64 [ %52, %cond_exit_368 ], [ 0, %loop_body511.preheader.preheader ] + %52 = add nuw nsw i64 %"364_0.sroa.15.01279", 1 %53 = load i64, ptr %3, align 4 - %54 = lshr i64 %53, %"364_0.sroa.15.01278" + %54 = lshr i64 %53, %"364_0.sroa.15.01279" %55 = trunc i64 %54 to i1 - br i1 %55, label %panic.i1235, label %__barray_check_bounds.exit1238 + br i1 %55, label %panic.i1236, label %__barray_check_bounds.exit1239 -panic.i1235: ; preds = %__barray_check_bounds.exit1234 +panic.i1236: ; preds = %__barray_check_bounds.exit1235 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_check_bounds.exit1238: ; preds = %__barray_check_bounds.exit1234 - %56 = shl nuw nsw i64 1, %"364_0.sroa.15.01278" +__barray_check_bounds.exit1239: ; preds = %__barray_check_bounds.exit1235 + %56 = shl nuw nsw i64 1, %"364_0.sroa.15.01279" %57 = xor i64 %53, %56 store i64 %57, ptr %3, align 4 - %58 = getelementptr inbounds nuw i64, ptr %2, i64 %"364_0.sroa.15.01278" + %58 = getelementptr inbounds nuw i64, ptr %2, i64 %"364_0.sroa.15.01279" %59 = load i64, ptr %58, align 4 tail call void @___inc_future_refcount(i64 %59) %60 = load i64, ptr %3, align 4 - %61 = lshr i64 %60, %"364_0.sroa.15.01278" + %61 = lshr i64 %60, %"364_0.sroa.15.01279" %62 = trunc i64 %61 to i1 - br i1 %62, label %__barray_check_bounds.exit1242, label %panic.i1239 + br i1 %62, label %__barray_check_bounds.exit1243, label %panic.i1240 -panic.i1239: ; preds = %__barray_check_bounds.exit1238 +panic.i1240: ; preds = %__barray_check_bounds.exit1239 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_check_bounds.exit1242: ; preds = %__barray_check_bounds.exit1238 +__barray_check_bounds.exit1243: ; preds = %__barray_check_bounds.exit1239 %63 = xor i64 %60, %56 store i64 %63, ptr %3, align 4 store i64 %59, ptr %58, align 4 %read_bool = tail call i1 @___read_future_bool(i64 %59) tail call void @___dec_future_refcount(i64 %59) %64 = load i64, ptr %1, align 4 - %65 = lshr i64 %64, %"364_0.sroa.15.01278" + %65 = lshr i64 %64, %"364_0.sroa.15.01279" %66 = trunc i64 %65 to i1 - br i1 %66, label %cond_exit_368, label %panic.i1243 + br i1 %66, label %cond_exit_368, label %panic.i1244 -panic.i1243: ; preds = %__barray_check_bounds.exit1242 +panic.i1244: ; preds = %__barray_check_bounds.exit1243 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable @@ -272,55 +272,55 @@ cond_549_case_0: ; preds = %cond_exit_549 %68 = or i64 %67, -1048576 store i64 %68, ptr %3, align 4 %69 = icmp eq i64 %68, -1 - br i1 %69, label %loop_out509, label %mask_block_err.i1248 + br i1 %69, label %loop_out510, label %mask_block_err.i1249 -mask_block_err.i1248: ; preds = %cond_549_case_0 +mask_block_err.i1249: ; preds = %cond_549_case_0 tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_check_bounds.exit1252: ; preds = %cond_exit_368, %cond_exit_549 - %"546_0.01285" = phi i64 [ %70, %cond_exit_549 ], [ 0, %cond_exit_368 ] - %70 = add nuw nsw i64 %"546_0.01285", 1 +__barray_check_bounds.exit1253: ; preds = %cond_exit_368, %cond_exit_549 + %"546_0.01286" = phi i64 [ %70, %cond_exit_549 ], [ 0, %cond_exit_368 ] + %70 = add nuw nsw i64 %"546_0.01286", 1 %71 = load i64, ptr %3, align 4 - %72 = lshr i64 %71, %"546_0.01285" + %72 = lshr i64 %71, %"546_0.01286" %73 = trunc i64 %72 to i1 - br i1 %73, label %cond_exit_549, label %__barray_mask_borrow.exit1256 + br i1 %73, label %cond_exit_549, label %__barray_mask_borrow.exit1257 -__barray_mask_borrow.exit1256: ; preds = %__barray_check_bounds.exit1252 - %74 = shl nuw nsw i64 1, %"546_0.01285" +__barray_mask_borrow.exit1257: ; preds = %__barray_check_bounds.exit1253 + %74 = shl nuw nsw i64 1, %"546_0.01286" %75 = xor i64 %71, %74 store i64 %75, ptr %3, align 4 - %76 = getelementptr inbounds nuw i64, ptr %2, i64 %"546_0.01285" + %76 = getelementptr inbounds nuw i64, ptr %2, i64 %"546_0.01286" %77 = load i64, ptr %76, align 4 tail call void @___dec_future_refcount(i64 %77) br label %cond_exit_549 -cond_exit_549: ; preds = %__barray_mask_borrow.exit1256, %__barray_check_bounds.exit1252 - %78 = icmp samesign ugt i64 %"546_0.01285", 18 - br i1 %78, label %cond_549_case_0, label %__barray_check_bounds.exit1252 +cond_exit_549: ; preds = %__barray_mask_borrow.exit1257, %__barray_check_bounds.exit1253 + %78 = icmp samesign ugt i64 %"546_0.01286", 18 + br i1 %78, label %cond_549_case_0, label %__barray_check_bounds.exit1253 -cond_exit_368: ; preds = %__barray_check_bounds.exit1242 +cond_exit_368: ; preds = %__barray_check_bounds.exit1243 %79 = xor i64 %64, %56 store i64 %79, ptr %1, align 4 - %80 = getelementptr inbounds nuw i1, ptr %0, i64 %"364_0.sroa.15.01278" + %80 = getelementptr inbounds nuw i1, ptr %0, i64 %"364_0.sroa.15.01279" store i1 %read_bool, ptr %80, align 1 - %81 = icmp eq i64 %"364_0.sroa.15.01278", 19 - br i1 %81, label %__barray_check_bounds.exit1252, label %__barray_check_bounds.exit1234 + %81 = icmp eq i64 %"364_0.sroa.15.01279", 19 + br i1 %81, label %__barray_check_bounds.exit1253, label %__barray_check_bounds.exit1235 -loop_out509: ; preds = %cond_549_case_0 +loop_out510: ; preds = %cond_549_case_0 tail call void @heap_free(ptr %2) tail call void @heap_free(ptr nonnull %3) %82 = load i64, ptr %1, align 4 %83 = and i64 %82, 1048575 store i64 %83, ptr %1, align 4 %84 = icmp eq i64 %83, 0 - br i1 %84, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1257 + br i1 %84, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1258 -mask_block_err.i1257: ; preds = %loop_out509 +mask_block_err.i1258: ; preds = %loop_out510 tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") unreachable -__barray_check_none_borrowed.exit: ; preds = %loop_out509 +__barray_check_none_borrowed.exit: ; preds = %loop_out510 %85 = tail call ptr @heap_alloc(i64 20) %86 = tail call ptr @heap_alloc(i64 8) store i64 0, ptr %86, align 1 @@ -330,13 +330,13 @@ __barray_check_none_borrowed.exit: ; preds = %loop_out509 %88 = and i64 %87, 1048575 store i64 %88, ptr %1, align 4 %89 = icmp eq i64 %88, 0 - br i1 %89, label %__barray_check_none_borrowed.exit1261, label %mask_block_err.i1259 + br i1 %89, label %__barray_check_none_borrowed.exit1262, label %mask_block_err.i1260 -mask_block_err.i1259: ; preds = %__barray_check_none_borrowed.exit +mask_block_err.i1260: ; preds = %__barray_check_none_borrowed.exit tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") unreachable -__barray_check_none_borrowed.exit1261: ; preds = %__barray_check_none_borrowed.exit +__barray_check_none_borrowed.exit1262: ; preds = %__barray_check_none_borrowed.exit %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 %y_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 4 %arr_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 8 @@ -359,7 +359,7 @@ declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immar ; Function Attrs: noreturn declare void @panic(i32, ptr) local_unnamed_addr #1 -declare i64 @___lazy_measure_leaked(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -375,8 +375,6 @@ declare void @print_bool(ptr, i64, i1) local_unnamed_addr declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr - declare i1 @___read_future_bool(i64) local_unnamed_addr ; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_from_head-sol-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_from_head-sol-aarch64-unknown-linux-gnu.ll index 070d0ec1..bffeb9cf 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_from_head-sol-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_from_head-sol-aarch64-unknown-linux-gnu.ll @@ -48,24 +48,24 @@ loop_body: ; preds = %cond_exit_13, %__hu cond_13_case_1: ; preds = %loop_body %8 = add i64 %"9_2.0", 1 - %qalloc.i1214 = tail call i64 @___qalloc() - %not_max.not.not.i1215 = icmp eq i64 %qalloc.i1214, -1 - br i1 %not_max.not.not.i1215, label %cond_474_case_0.i1216, label %__hugr__.__tk2_sol_qalloc.470.exit1217 + %qalloc.i1215 = tail call i64 @___qalloc() + %not_max.not.not.i1216 = icmp eq i64 %qalloc.i1215, -1 + br i1 %not_max.not.not.i1216, label %cond_474_case_0.i1217, label %__hugr__.__tk2_sol_qalloc.470.exit1218 -cond_474_case_0.i1216: ; preds = %cond_13_case_1 +cond_474_case_0.i1217: ; preds = %cond_13_case_1 tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_sol_qalloc.470.exit1217: ; preds = %cond_13_case_1 - tail call void @___reset(i64 %qalloc.i1214) +__hugr__.__tk2_sol_qalloc.470.exit1218: ; preds = %cond_13_case_1 + tail call void @___reset(i64 %qalloc.i1215) %9 = icmp ult i64 %"9_2.0", 20 br i1 %9, label %__barray_check_bounds.exit, label %out_of_bounds.i -out_of_bounds.i: ; preds = %__hugr__.__tk2_sol_qalloc.470.exit1217 +out_of_bounds.i: ; preds = %__hugr__.__tk2_sol_qalloc.470.exit1218 tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") unreachable -__barray_check_bounds.exit: ; preds = %__hugr__.__tk2_sol_qalloc.470.exit1217 +__barray_check_bounds.exit: ; preds = %__hugr__.__tk2_sol_qalloc.470.exit1218 %10 = load i64, ptr %5, align 4 %11 = lshr i64 %10, %"9_2.0" %12 = trunc i64 %11 to i1 @@ -80,31 +80,31 @@ __barray_mask_return.exit: ; preds = %__barray_check_boun %14 = xor i64 %10, %13 store i64 %14, ptr %5, align 4 %15 = getelementptr inbounds nuw i64, ptr %4, i64 %"9_2.0" - store i64 %qalloc.i1214, ptr %15, align 4 + store i64 %qalloc.i1215, ptr %15, align 4 br label %cond_exit_13 cond_exit_13: ; preds = %loop_body, %__barray_mask_return.exit %"2107.0" = phi i64 [ %8, %__barray_mask_return.exit ], [ %"9_2.0", %loop_body ] %exitcond = icmp eq i64 %7, 21 - br i1 %exitcond, label %__barray_check_bounds.exit1219, label %loop_body + br i1 %exitcond, label %__barray_check_bounds.exit1220, label %loop_body -__barray_check_bounds.exit1219: ; preds = %cond_exit_13, %__barray_mask_return.exit1224 - %16 = phi i64 [ %28, %__barray_mask_return.exit1224 ], [ 1, %cond_exit_13 ] - %"114_0.01276" = phi i64 [ %16, %__barray_mask_return.exit1224 ], [ 0, %cond_exit_13 ] +__barray_check_bounds.exit1220: ; preds = %cond_exit_13, %__barray_mask_return.exit1225 + %16 = phi i64 [ %28, %__barray_mask_return.exit1225 ], [ 1, %cond_exit_13 ] + %"114_0.01277" = phi i64 [ %16, %__barray_mask_return.exit1225 ], [ 0, %cond_exit_13 ] %17 = load i64, ptr %5, align 4 - %18 = lshr i64 %17, %"114_0.01276" + %18 = lshr i64 %17, %"114_0.01277" %19 = trunc i64 %18 to i1 - br i1 %19, label %panic.i1220, label %__barray_check_bounds.exit1222 + br i1 %19, label %panic.i1221, label %__barray_check_bounds.exit1223 -panic.i1220: ; preds = %__barray_check_bounds.exit1219 +panic.i1221: ; preds = %__barray_check_bounds.exit1220 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_check_bounds.exit1222: ; preds = %__barray_check_bounds.exit1219 - %20 = shl nuw nsw i64 1, %"114_0.01276" +__barray_check_bounds.exit1223: ; preds = %__barray_check_bounds.exit1220 + %20 = shl nuw nsw i64 1, %"114_0.01277" %21 = xor i64 %17, %20 store i64 %21, ptr %5, align 4 - %22 = getelementptr inbounds nuw i64, ptr %4, i64 %"114_0.01276" + %22 = getelementptr inbounds nuw i64, ptr %4, i64 %"114_0.01277" %23 = load i64, ptr %22, align 4 tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rpp(i64 %qalloc.i, i64 %23, double 0x3FF921FB54442D18, double 0.000000e+00) @@ -112,65 +112,65 @@ __barray_check_bounds.exit1222: ; preds = %__barray_check_boun tail call void @___rp(i64 %qalloc.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18) %24 = load i64, ptr %5, align 4 - %25 = lshr i64 %24, %"114_0.01276" + %25 = lshr i64 %24, %"114_0.01277" %26 = trunc i64 %25 to i1 - br i1 %26, label %__barray_mask_return.exit1224, label %panic.i1223 + br i1 %26, label %__barray_mask_return.exit1225, label %panic.i1224 -panic.i1223: ; preds = %__barray_check_bounds.exit1222 +panic.i1224: ; preds = %__barray_check_bounds.exit1223 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_mask_return.exit1224: ; preds = %__barray_check_bounds.exit1222 +__barray_mask_return.exit1225: ; preds = %__barray_check_bounds.exit1223 %27 = xor i64 %24, %20 store i64 %27, ptr %5, align 4 store i64 %23, ptr %22, align 4 %28 = add nuw nsw i64 %16, 1 - %exitcond1279 = icmp eq i64 %28, 21 - br i1 %exitcond1279, label %cond_exit_185, label %__barray_check_bounds.exit1219 + %exitcond1280 = icmp eq i64 %28, 21 + br i1 %exitcond1280, label %cond_exit_185, label %__barray_check_bounds.exit1220 -cond_exit_185: ; preds = %__barray_mask_return.exit1224 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) +cond_exit_185: ; preds = %__barray_mask_return.exit1225 + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 1) tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure_leaked) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___inc_future_refcount(i64 %___future_measure) + %read_uint = tail call i64 @___read_future_uint(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) %29 = icmp eq i64 %read_uint, 2 br i1 %29, label %30, label %cond_exit_256 cond_exit_256: ; preds = %cond_exit_185 - %read_uint350 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + %read_uint350 = tail call i64 @___read_future_uint(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) %.not = icmp eq i64 %read_uint350, 2 br i1 %.not, label %cond_236_case_0, label %cond_236_case_1 30: ; preds = %cond_exit_185 - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_int(ptr nonnull @res_head_leake.F4F32972.0, i64 20, i64 1) - br label %__barray_check_bounds.exit1230.preheader + br label %__barray_check_bounds.exit1231.preheader -__barray_check_bounds.exit1230.preheader: ; preds = %cond_236_case_1, %30 - br label %__barray_check_bounds.exit1230 +__barray_check_bounds.exit1231.preheader: ; preds = %cond_236_case_1, %30 + br label %__barray_check_bounds.exit1231 cond_236_case_1: ; preds = %cond_exit_256 %31 = icmp eq i64 %read_uint350, 1 tail call void @print_bool(ptr nonnull @res_head.AFE8E005.0, i64 14, i1 %31) - br label %__barray_check_bounds.exit1230.preheader + br label %__barray_check_bounds.exit1231.preheader cond_236_case_0: ; preds = %cond_exit_256 tail call void @panic(i32 1001, ptr nonnull @e_Option.unw.32D4E82D.0) unreachable -out_of_bounds.i1225: ; preds = %.thread +out_of_bounds.i1226: ; preds = %.thread tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") unreachable -__barray_check_bounds.exit1226: ; preds = %.thread +__barray_check_bounds.exit1227: ; preds = %.thread %32 = load i64, ptr %3, align 4 - %33 = lshr i64 %32, %"298_2.01283" + %33 = lshr i64 %32, %"298_2.01284" %34 = trunc i64 %33 to i1 - br i1 %34, label %cond_exit_302, label %panic.i1227 + br i1 %34, label %cond_exit_302, label %panic.i1228 -panic.i1227: ; preds = %__barray_check_bounds.exit1226 +panic.i1228: ; preds = %__barray_check_bounds.exit1227 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable @@ -179,91 +179,91 @@ mask_block_ok.i: ; preds = %cond_exit_302 %36 = or i64 %35, -1048576 store i64 %36, ptr %5, align 4 %37 = icmp eq i64 %36, -1 - br i1 %37, label %loop_body510.preheader.preheader, label %mask_block_err.i + br i1 %37, label %loop_body511.preheader.preheader, label %mask_block_err.i mask_block_err.i: ; preds = %mask_block_ok.i tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_check_bounds.exit1230: ; preds = %__barray_check_bounds.exit1230.preheader, %cond_exit_302 - %"298_0.sroa.15.01284" = phi i64 [ %38, %cond_exit_302 ], [ 0, %__barray_check_bounds.exit1230.preheader ] - %"298_2.01283" = phi i64 [ %46, %cond_exit_302 ], [ 0, %__barray_check_bounds.exit1230.preheader ] - %38 = add nuw nsw i64 %"298_0.sroa.15.01284", 1 +__barray_check_bounds.exit1231: ; preds = %__barray_check_bounds.exit1231.preheader, %cond_exit_302 + %"298_0.sroa.15.01285" = phi i64 [ %38, %cond_exit_302 ], [ 0, %__barray_check_bounds.exit1231.preheader ] + %"298_2.01284" = phi i64 [ %46, %cond_exit_302 ], [ 0, %__barray_check_bounds.exit1231.preheader ] + %38 = add nuw nsw i64 %"298_0.sroa.15.01285", 1 %39 = load i64, ptr %5, align 4 - %40 = lshr i64 %39, %"298_0.sroa.15.01284" + %40 = lshr i64 %39, %"298_0.sroa.15.01285" %41 = trunc i64 %40 to i1 - br i1 %41, label %panic.i1231, label %.thread + br i1 %41, label %panic.i1232, label %.thread -panic.i1231: ; preds = %__barray_check_bounds.exit1230 +panic.i1232: ; preds = %__barray_check_bounds.exit1231 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -.thread: ; preds = %__barray_check_bounds.exit1230 - %42 = shl nuw nsw i64 1, %"298_0.sroa.15.01284" +.thread: ; preds = %__barray_check_bounds.exit1231 + %42 = shl nuw nsw i64 1, %"298_0.sroa.15.01285" %43 = xor i64 %39, %42 store i64 %43, ptr %5, align 4 - %44 = getelementptr inbounds nuw i64, ptr %4, i64 %"298_0.sroa.15.01284" + %44 = getelementptr inbounds nuw i64, ptr %4, i64 %"298_0.sroa.15.01285" %45 = load i64, ptr %44, align 4 - %46 = add i64 %"298_2.01283", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %45) + %46 = add i64 %"298_2.01284", 1 + %___future_measure485 = tail call i64 @___future_measure(i64 %45, i64 0) tail call void @___qfree(i64 %45) - %47 = icmp ult i64 %"298_2.01283", 20 - br i1 %47, label %__barray_check_bounds.exit1226, label %out_of_bounds.i1225 + %47 = icmp ult i64 %"298_2.01284", 20 + br i1 %47, label %__barray_check_bounds.exit1227, label %out_of_bounds.i1226 -cond_exit_302: ; preds = %__barray_check_bounds.exit1226 - %48 = shl nuw nsw i64 1, %"298_2.01283" +cond_exit_302: ; preds = %__barray_check_bounds.exit1227 + %48 = shl nuw nsw i64 1, %"298_2.01284" %49 = xor i64 %32, %48 store i64 %49, ptr %3, align 4 - %50 = getelementptr inbounds nuw i64, ptr %2, i64 %"298_2.01283" - store i64 %lazy_measure, ptr %50, align 4 - %51 = icmp samesign ugt i64 %"298_0.sroa.15.01284", 18 - br i1 %51, label %mask_block_ok.i, label %__barray_check_bounds.exit1230 + %50 = getelementptr inbounds nuw i64, ptr %2, i64 %"298_2.01284" + store i64 %___future_measure485, ptr %50, align 4 + %51 = icmp samesign ugt i64 %"298_0.sroa.15.01285", 18 + br i1 %51, label %mask_block_ok.i, label %__barray_check_bounds.exit1231 -loop_body510.preheader.preheader: ; preds = %mask_block_ok.i +loop_body511.preheader.preheader: ; preds = %mask_block_ok.i tail call void @heap_free(ptr nonnull %4) tail call void @heap_free(ptr nonnull %5) - br label %__barray_check_bounds.exit1234 + br label %__barray_check_bounds.exit1235 -__barray_check_bounds.exit1234: ; preds = %cond_exit_368, %loop_body510.preheader.preheader - %"364_0.sroa.15.01278" = phi i64 [ %52, %cond_exit_368 ], [ 0, %loop_body510.preheader.preheader ] - %52 = add nuw nsw i64 %"364_0.sroa.15.01278", 1 +__barray_check_bounds.exit1235: ; preds = %cond_exit_368, %loop_body511.preheader.preheader + %"364_0.sroa.15.01279" = phi i64 [ %52, %cond_exit_368 ], [ 0, %loop_body511.preheader.preheader ] + %52 = add nuw nsw i64 %"364_0.sroa.15.01279", 1 %53 = load i64, ptr %3, align 4 - %54 = lshr i64 %53, %"364_0.sroa.15.01278" + %54 = lshr i64 %53, %"364_0.sroa.15.01279" %55 = trunc i64 %54 to i1 - br i1 %55, label %panic.i1235, label %__barray_check_bounds.exit1238 + br i1 %55, label %panic.i1236, label %__barray_check_bounds.exit1239 -panic.i1235: ; preds = %__barray_check_bounds.exit1234 +panic.i1236: ; preds = %__barray_check_bounds.exit1235 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_check_bounds.exit1238: ; preds = %__barray_check_bounds.exit1234 - %56 = shl nuw nsw i64 1, %"364_0.sroa.15.01278" +__barray_check_bounds.exit1239: ; preds = %__barray_check_bounds.exit1235 + %56 = shl nuw nsw i64 1, %"364_0.sroa.15.01279" %57 = xor i64 %53, %56 store i64 %57, ptr %3, align 4 - %58 = getelementptr inbounds nuw i64, ptr %2, i64 %"364_0.sroa.15.01278" + %58 = getelementptr inbounds nuw i64, ptr %2, i64 %"364_0.sroa.15.01279" %59 = load i64, ptr %58, align 4 tail call void @___inc_future_refcount(i64 %59) %60 = load i64, ptr %3, align 4 - %61 = lshr i64 %60, %"364_0.sroa.15.01278" + %61 = lshr i64 %60, %"364_0.sroa.15.01279" %62 = trunc i64 %61 to i1 - br i1 %62, label %__barray_check_bounds.exit1242, label %panic.i1239 + br i1 %62, label %__barray_check_bounds.exit1243, label %panic.i1240 -panic.i1239: ; preds = %__barray_check_bounds.exit1238 +panic.i1240: ; preds = %__barray_check_bounds.exit1239 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_check_bounds.exit1242: ; preds = %__barray_check_bounds.exit1238 +__barray_check_bounds.exit1243: ; preds = %__barray_check_bounds.exit1239 %63 = xor i64 %60, %56 store i64 %63, ptr %3, align 4 store i64 %59, ptr %58, align 4 %read_bool = tail call i1 @___read_future_bool(i64 %59) tail call void @___dec_future_refcount(i64 %59) %64 = load i64, ptr %1, align 4 - %65 = lshr i64 %64, %"364_0.sroa.15.01278" + %65 = lshr i64 %64, %"364_0.sroa.15.01279" %66 = trunc i64 %65 to i1 - br i1 %66, label %cond_exit_368, label %panic.i1243 + br i1 %66, label %cond_exit_368, label %panic.i1244 -panic.i1243: ; preds = %__barray_check_bounds.exit1242 +panic.i1244: ; preds = %__barray_check_bounds.exit1243 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable @@ -272,55 +272,55 @@ cond_549_case_0: ; preds = %cond_exit_549 %68 = or i64 %67, -1048576 store i64 %68, ptr %3, align 4 %69 = icmp eq i64 %68, -1 - br i1 %69, label %loop_out509, label %mask_block_err.i1248 + br i1 %69, label %loop_out510, label %mask_block_err.i1249 -mask_block_err.i1248: ; preds = %cond_549_case_0 +mask_block_err.i1249: ; preds = %cond_549_case_0 tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_check_bounds.exit1252: ; preds = %cond_exit_368, %cond_exit_549 - %"546_0.01285" = phi i64 [ %70, %cond_exit_549 ], [ 0, %cond_exit_368 ] - %70 = add nuw nsw i64 %"546_0.01285", 1 +__barray_check_bounds.exit1253: ; preds = %cond_exit_368, %cond_exit_549 + %"546_0.01286" = phi i64 [ %70, %cond_exit_549 ], [ 0, %cond_exit_368 ] + %70 = add nuw nsw i64 %"546_0.01286", 1 %71 = load i64, ptr %3, align 4 - %72 = lshr i64 %71, %"546_0.01285" + %72 = lshr i64 %71, %"546_0.01286" %73 = trunc i64 %72 to i1 - br i1 %73, label %cond_exit_549, label %__barray_mask_borrow.exit1256 + br i1 %73, label %cond_exit_549, label %__barray_mask_borrow.exit1257 -__barray_mask_borrow.exit1256: ; preds = %__barray_check_bounds.exit1252 - %74 = shl nuw nsw i64 1, %"546_0.01285" +__barray_mask_borrow.exit1257: ; preds = %__barray_check_bounds.exit1253 + %74 = shl nuw nsw i64 1, %"546_0.01286" %75 = xor i64 %71, %74 store i64 %75, ptr %3, align 4 - %76 = getelementptr inbounds nuw i64, ptr %2, i64 %"546_0.01285" + %76 = getelementptr inbounds nuw i64, ptr %2, i64 %"546_0.01286" %77 = load i64, ptr %76, align 4 tail call void @___dec_future_refcount(i64 %77) br label %cond_exit_549 -cond_exit_549: ; preds = %__barray_mask_borrow.exit1256, %__barray_check_bounds.exit1252 - %78 = icmp samesign ugt i64 %"546_0.01285", 18 - br i1 %78, label %cond_549_case_0, label %__barray_check_bounds.exit1252 +cond_exit_549: ; preds = %__barray_mask_borrow.exit1257, %__barray_check_bounds.exit1253 + %78 = icmp samesign ugt i64 %"546_0.01286", 18 + br i1 %78, label %cond_549_case_0, label %__barray_check_bounds.exit1253 -cond_exit_368: ; preds = %__barray_check_bounds.exit1242 +cond_exit_368: ; preds = %__barray_check_bounds.exit1243 %79 = xor i64 %64, %56 store i64 %79, ptr %1, align 4 - %80 = getelementptr inbounds nuw i1, ptr %0, i64 %"364_0.sroa.15.01278" + %80 = getelementptr inbounds nuw i1, ptr %0, i64 %"364_0.sroa.15.01279" store i1 %read_bool, ptr %80, align 1 - %81 = icmp eq i64 %"364_0.sroa.15.01278", 19 - br i1 %81, label %__barray_check_bounds.exit1252, label %__barray_check_bounds.exit1234 + %81 = icmp eq i64 %"364_0.sroa.15.01279", 19 + br i1 %81, label %__barray_check_bounds.exit1253, label %__barray_check_bounds.exit1235 -loop_out509: ; preds = %cond_549_case_0 +loop_out510: ; preds = %cond_549_case_0 tail call void @heap_free(ptr %2) tail call void @heap_free(ptr nonnull %3) %82 = load i64, ptr %1, align 4 %83 = and i64 %82, 1048575 store i64 %83, ptr %1, align 4 %84 = icmp eq i64 %83, 0 - br i1 %84, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1257 + br i1 %84, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1258 -mask_block_err.i1257: ; preds = %loop_out509 +mask_block_err.i1258: ; preds = %loop_out510 tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") unreachable -__barray_check_none_borrowed.exit: ; preds = %loop_out509 +__barray_check_none_borrowed.exit: ; preds = %loop_out510 %85 = tail call ptr @heap_alloc(i64 20) %86 = tail call ptr @heap_alloc(i64 8) store i64 0, ptr %86, align 1 @@ -330,13 +330,13 @@ __barray_check_none_borrowed.exit: ; preds = %loop_out509 %88 = and i64 %87, 1048575 store i64 %88, ptr %1, align 4 %89 = icmp eq i64 %88, 0 - br i1 %89, label %__barray_check_none_borrowed.exit1261, label %mask_block_err.i1259 + br i1 %89, label %__barray_check_none_borrowed.exit1262, label %mask_block_err.i1260 -mask_block_err.i1259: ; preds = %__barray_check_none_borrowed.exit +mask_block_err.i1260: ; preds = %__barray_check_none_borrowed.exit tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") unreachable -__barray_check_none_borrowed.exit1261: ; preds = %__barray_check_none_borrowed.exit +__barray_check_none_borrowed.exit1262: ; preds = %__barray_check_none_borrowed.exit %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 %y_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 4 %arr_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 8 @@ -359,7 +359,7 @@ declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immar ; Function Attrs: noreturn declare void @panic(i32, ptr) local_unnamed_addr #1 -declare i64 @___lazy_measure_leaked(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -375,8 +375,6 @@ declare void @print_bool(ptr, i64, i1) local_unnamed_addr declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr - declare i1 @___read_future_bool(i64) local_unnamed_addr ; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_from_head-sol-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_from_head-sol-x86_64-apple-darwin.ll index e0bf789a..7cfe691b 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_from_head-sol-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_from_head-sol-x86_64-apple-darwin.ll @@ -48,24 +48,24 @@ loop_body: ; preds = %cond_exit_13, %__hu cond_13_case_1: ; preds = %loop_body %8 = add i64 %"9_2.0", 1 - %qalloc.i1214 = tail call i64 @___qalloc() - %not_max.not.not.i1215 = icmp eq i64 %qalloc.i1214, -1 - br i1 %not_max.not.not.i1215, label %cond_474_case_0.i1216, label %__hugr__.__tk2_sol_qalloc.470.exit1217 + %qalloc.i1215 = tail call i64 @___qalloc() + %not_max.not.not.i1216 = icmp eq i64 %qalloc.i1215, -1 + br i1 %not_max.not.not.i1216, label %cond_474_case_0.i1217, label %__hugr__.__tk2_sol_qalloc.470.exit1218 -cond_474_case_0.i1216: ; preds = %cond_13_case_1 +cond_474_case_0.i1217: ; preds = %cond_13_case_1 tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_sol_qalloc.470.exit1217: ; preds = %cond_13_case_1 - tail call void @___reset(i64 %qalloc.i1214) +__hugr__.__tk2_sol_qalloc.470.exit1218: ; preds = %cond_13_case_1 + tail call void @___reset(i64 %qalloc.i1215) %9 = icmp ult i64 %"9_2.0", 20 br i1 %9, label %__barray_check_bounds.exit, label %out_of_bounds.i -out_of_bounds.i: ; preds = %__hugr__.__tk2_sol_qalloc.470.exit1217 +out_of_bounds.i: ; preds = %__hugr__.__tk2_sol_qalloc.470.exit1218 tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") unreachable -__barray_check_bounds.exit: ; preds = %__hugr__.__tk2_sol_qalloc.470.exit1217 +__barray_check_bounds.exit: ; preds = %__hugr__.__tk2_sol_qalloc.470.exit1218 %10 = load i64, ptr %5, align 4 %11 = lshr i64 %10, %"9_2.0" %12 = trunc i64 %11 to i1 @@ -80,31 +80,31 @@ __barray_mask_return.exit: ; preds = %__barray_check_boun %14 = xor i64 %10, %13 store i64 %14, ptr %5, align 4 %15 = getelementptr inbounds nuw i64, ptr %4, i64 %"9_2.0" - store i64 %qalloc.i1214, ptr %15, align 4 + store i64 %qalloc.i1215, ptr %15, align 4 br label %cond_exit_13 cond_exit_13: ; preds = %loop_body, %__barray_mask_return.exit %"2107.0" = phi i64 [ %8, %__barray_mask_return.exit ], [ %"9_2.0", %loop_body ] %exitcond = icmp eq i64 %7, 21 - br i1 %exitcond, label %__barray_check_bounds.exit1219, label %loop_body + br i1 %exitcond, label %__barray_check_bounds.exit1220, label %loop_body -__barray_check_bounds.exit1219: ; preds = %cond_exit_13, %__barray_mask_return.exit1224 - %16 = phi i64 [ %28, %__barray_mask_return.exit1224 ], [ 1, %cond_exit_13 ] - %"114_0.01276" = phi i64 [ %16, %__barray_mask_return.exit1224 ], [ 0, %cond_exit_13 ] +__barray_check_bounds.exit1220: ; preds = %cond_exit_13, %__barray_mask_return.exit1225 + %16 = phi i64 [ %28, %__barray_mask_return.exit1225 ], [ 1, %cond_exit_13 ] + %"114_0.01277" = phi i64 [ %16, %__barray_mask_return.exit1225 ], [ 0, %cond_exit_13 ] %17 = load i64, ptr %5, align 4 - %18 = lshr i64 %17, %"114_0.01276" + %18 = lshr i64 %17, %"114_0.01277" %19 = trunc i64 %18 to i1 - br i1 %19, label %panic.i1220, label %__barray_check_bounds.exit1222 + br i1 %19, label %panic.i1221, label %__barray_check_bounds.exit1223 -panic.i1220: ; preds = %__barray_check_bounds.exit1219 +panic.i1221: ; preds = %__barray_check_bounds.exit1220 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_check_bounds.exit1222: ; preds = %__barray_check_bounds.exit1219 - %20 = shl nuw nsw i64 1, %"114_0.01276" +__barray_check_bounds.exit1223: ; preds = %__barray_check_bounds.exit1220 + %20 = shl nuw nsw i64 1, %"114_0.01277" %21 = xor i64 %17, %20 store i64 %21, ptr %5, align 4 - %22 = getelementptr inbounds nuw i64, ptr %4, i64 %"114_0.01276" + %22 = getelementptr inbounds nuw i64, ptr %4, i64 %"114_0.01277" %23 = load i64, ptr %22, align 4 tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rpp(i64 %qalloc.i, i64 %23, double 0x3FF921FB54442D18, double 0.000000e+00) @@ -112,65 +112,65 @@ __barray_check_bounds.exit1222: ; preds = %__barray_check_boun tail call void @___rp(i64 %qalloc.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18) %24 = load i64, ptr %5, align 4 - %25 = lshr i64 %24, %"114_0.01276" + %25 = lshr i64 %24, %"114_0.01277" %26 = trunc i64 %25 to i1 - br i1 %26, label %__barray_mask_return.exit1224, label %panic.i1223 + br i1 %26, label %__barray_mask_return.exit1225, label %panic.i1224 -panic.i1223: ; preds = %__barray_check_bounds.exit1222 +panic.i1224: ; preds = %__barray_check_bounds.exit1223 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_mask_return.exit1224: ; preds = %__barray_check_bounds.exit1222 +__barray_mask_return.exit1225: ; preds = %__barray_check_bounds.exit1223 %27 = xor i64 %24, %20 store i64 %27, ptr %5, align 4 store i64 %23, ptr %22, align 4 %28 = add nuw nsw i64 %16, 1 - %exitcond1279 = icmp eq i64 %28, 21 - br i1 %exitcond1279, label %cond_exit_185, label %__barray_check_bounds.exit1219 + %exitcond1280 = icmp eq i64 %28, 21 + br i1 %exitcond1280, label %cond_exit_185, label %__barray_check_bounds.exit1220 -cond_exit_185: ; preds = %__barray_mask_return.exit1224 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) +cond_exit_185: ; preds = %__barray_mask_return.exit1225 + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 1) tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure_leaked) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___inc_future_refcount(i64 %___future_measure) + %read_uint = tail call i64 @___read_future_uint(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) %29 = icmp eq i64 %read_uint, 2 br i1 %29, label %30, label %cond_exit_256 cond_exit_256: ; preds = %cond_exit_185 - %read_uint350 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + %read_uint350 = tail call i64 @___read_future_uint(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) %.not = icmp eq i64 %read_uint350, 2 br i1 %.not, label %cond_236_case_0, label %cond_236_case_1 30: ; preds = %cond_exit_185 - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_int(ptr nonnull @res_head_leake.F4F32972.0, i64 20, i64 1) - br label %__barray_check_bounds.exit1230.preheader + br label %__barray_check_bounds.exit1231.preheader -__barray_check_bounds.exit1230.preheader: ; preds = %cond_236_case_1, %30 - br label %__barray_check_bounds.exit1230 +__barray_check_bounds.exit1231.preheader: ; preds = %cond_236_case_1, %30 + br label %__barray_check_bounds.exit1231 cond_236_case_1: ; preds = %cond_exit_256 %31 = icmp eq i64 %read_uint350, 1 tail call void @print_bool(ptr nonnull @res_head.AFE8E005.0, i64 14, i1 %31) - br label %__barray_check_bounds.exit1230.preheader + br label %__barray_check_bounds.exit1231.preheader cond_236_case_0: ; preds = %cond_exit_256 tail call void @panic(i32 1001, ptr nonnull @e_Option.unw.32D4E82D.0) unreachable -out_of_bounds.i1225: ; preds = %.thread +out_of_bounds.i1226: ; preds = %.thread tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") unreachable -__barray_check_bounds.exit1226: ; preds = %.thread +__barray_check_bounds.exit1227: ; preds = %.thread %32 = load i64, ptr %3, align 4 - %33 = lshr i64 %32, %"298_2.01283" + %33 = lshr i64 %32, %"298_2.01284" %34 = trunc i64 %33 to i1 - br i1 %34, label %cond_exit_302, label %panic.i1227 + br i1 %34, label %cond_exit_302, label %panic.i1228 -panic.i1227: ; preds = %__barray_check_bounds.exit1226 +panic.i1228: ; preds = %__barray_check_bounds.exit1227 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable @@ -179,91 +179,91 @@ mask_block_ok.i: ; preds = %cond_exit_302 %36 = or i64 %35, -1048576 store i64 %36, ptr %5, align 4 %37 = icmp eq i64 %36, -1 - br i1 %37, label %loop_body510.preheader.preheader, label %mask_block_err.i + br i1 %37, label %loop_body511.preheader.preheader, label %mask_block_err.i mask_block_err.i: ; preds = %mask_block_ok.i tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_check_bounds.exit1230: ; preds = %__barray_check_bounds.exit1230.preheader, %cond_exit_302 - %"298_0.sroa.15.01284" = phi i64 [ %38, %cond_exit_302 ], [ 0, %__barray_check_bounds.exit1230.preheader ] - %"298_2.01283" = phi i64 [ %46, %cond_exit_302 ], [ 0, %__barray_check_bounds.exit1230.preheader ] - %38 = add nuw nsw i64 %"298_0.sroa.15.01284", 1 +__barray_check_bounds.exit1231: ; preds = %__barray_check_bounds.exit1231.preheader, %cond_exit_302 + %"298_0.sroa.15.01285" = phi i64 [ %38, %cond_exit_302 ], [ 0, %__barray_check_bounds.exit1231.preheader ] + %"298_2.01284" = phi i64 [ %46, %cond_exit_302 ], [ 0, %__barray_check_bounds.exit1231.preheader ] + %38 = add nuw nsw i64 %"298_0.sroa.15.01285", 1 %39 = load i64, ptr %5, align 4 - %40 = lshr i64 %39, %"298_0.sroa.15.01284" + %40 = lshr i64 %39, %"298_0.sroa.15.01285" %41 = trunc i64 %40 to i1 - br i1 %41, label %panic.i1231, label %.thread + br i1 %41, label %panic.i1232, label %.thread -panic.i1231: ; preds = %__barray_check_bounds.exit1230 +panic.i1232: ; preds = %__barray_check_bounds.exit1231 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -.thread: ; preds = %__barray_check_bounds.exit1230 - %42 = shl nuw nsw i64 1, %"298_0.sroa.15.01284" +.thread: ; preds = %__barray_check_bounds.exit1231 + %42 = shl nuw nsw i64 1, %"298_0.sroa.15.01285" %43 = xor i64 %39, %42 store i64 %43, ptr %5, align 4 - %44 = getelementptr inbounds nuw i64, ptr %4, i64 %"298_0.sroa.15.01284" + %44 = getelementptr inbounds nuw i64, ptr %4, i64 %"298_0.sroa.15.01285" %45 = load i64, ptr %44, align 4 - %46 = add i64 %"298_2.01283", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %45) + %46 = add i64 %"298_2.01284", 1 + %___future_measure485 = tail call i64 @___future_measure(i64 %45, i64 0) tail call void @___qfree(i64 %45) - %47 = icmp ult i64 %"298_2.01283", 20 - br i1 %47, label %__barray_check_bounds.exit1226, label %out_of_bounds.i1225 + %47 = icmp ult i64 %"298_2.01284", 20 + br i1 %47, label %__barray_check_bounds.exit1227, label %out_of_bounds.i1226 -cond_exit_302: ; preds = %__barray_check_bounds.exit1226 - %48 = shl nuw nsw i64 1, %"298_2.01283" +cond_exit_302: ; preds = %__barray_check_bounds.exit1227 + %48 = shl nuw nsw i64 1, %"298_2.01284" %49 = xor i64 %32, %48 store i64 %49, ptr %3, align 4 - %50 = getelementptr inbounds nuw i64, ptr %2, i64 %"298_2.01283" - store i64 %lazy_measure, ptr %50, align 4 - %51 = icmp samesign ugt i64 %"298_0.sroa.15.01284", 18 - br i1 %51, label %mask_block_ok.i, label %__barray_check_bounds.exit1230 + %50 = getelementptr inbounds nuw i64, ptr %2, i64 %"298_2.01284" + store i64 %___future_measure485, ptr %50, align 4 + %51 = icmp samesign ugt i64 %"298_0.sroa.15.01285", 18 + br i1 %51, label %mask_block_ok.i, label %__barray_check_bounds.exit1231 -loop_body510.preheader.preheader: ; preds = %mask_block_ok.i +loop_body511.preheader.preheader: ; preds = %mask_block_ok.i tail call void @heap_free(ptr nonnull %4) tail call void @heap_free(ptr nonnull %5) - br label %__barray_check_bounds.exit1234 + br label %__barray_check_bounds.exit1235 -__barray_check_bounds.exit1234: ; preds = %cond_exit_368, %loop_body510.preheader.preheader - %"364_0.sroa.15.01278" = phi i64 [ %52, %cond_exit_368 ], [ 0, %loop_body510.preheader.preheader ] - %52 = add nuw nsw i64 %"364_0.sroa.15.01278", 1 +__barray_check_bounds.exit1235: ; preds = %cond_exit_368, %loop_body511.preheader.preheader + %"364_0.sroa.15.01279" = phi i64 [ %52, %cond_exit_368 ], [ 0, %loop_body511.preheader.preheader ] + %52 = add nuw nsw i64 %"364_0.sroa.15.01279", 1 %53 = load i64, ptr %3, align 4 - %54 = lshr i64 %53, %"364_0.sroa.15.01278" + %54 = lshr i64 %53, %"364_0.sroa.15.01279" %55 = trunc i64 %54 to i1 - br i1 %55, label %panic.i1235, label %__barray_check_bounds.exit1238 + br i1 %55, label %panic.i1236, label %__barray_check_bounds.exit1239 -panic.i1235: ; preds = %__barray_check_bounds.exit1234 +panic.i1236: ; preds = %__barray_check_bounds.exit1235 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_check_bounds.exit1238: ; preds = %__barray_check_bounds.exit1234 - %56 = shl nuw nsw i64 1, %"364_0.sroa.15.01278" +__barray_check_bounds.exit1239: ; preds = %__barray_check_bounds.exit1235 + %56 = shl nuw nsw i64 1, %"364_0.sroa.15.01279" %57 = xor i64 %53, %56 store i64 %57, ptr %3, align 4 - %58 = getelementptr inbounds nuw i64, ptr %2, i64 %"364_0.sroa.15.01278" + %58 = getelementptr inbounds nuw i64, ptr %2, i64 %"364_0.sroa.15.01279" %59 = load i64, ptr %58, align 4 tail call void @___inc_future_refcount(i64 %59) %60 = load i64, ptr %3, align 4 - %61 = lshr i64 %60, %"364_0.sroa.15.01278" + %61 = lshr i64 %60, %"364_0.sroa.15.01279" %62 = trunc i64 %61 to i1 - br i1 %62, label %__barray_check_bounds.exit1242, label %panic.i1239 + br i1 %62, label %__barray_check_bounds.exit1243, label %panic.i1240 -panic.i1239: ; preds = %__barray_check_bounds.exit1238 +panic.i1240: ; preds = %__barray_check_bounds.exit1239 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_check_bounds.exit1242: ; preds = %__barray_check_bounds.exit1238 +__barray_check_bounds.exit1243: ; preds = %__barray_check_bounds.exit1239 %63 = xor i64 %60, %56 store i64 %63, ptr %3, align 4 store i64 %59, ptr %58, align 4 %read_bool = tail call i1 @___read_future_bool(i64 %59) tail call void @___dec_future_refcount(i64 %59) %64 = load i64, ptr %1, align 4 - %65 = lshr i64 %64, %"364_0.sroa.15.01278" + %65 = lshr i64 %64, %"364_0.sroa.15.01279" %66 = trunc i64 %65 to i1 - br i1 %66, label %cond_exit_368, label %panic.i1243 + br i1 %66, label %cond_exit_368, label %panic.i1244 -panic.i1243: ; preds = %__barray_check_bounds.exit1242 +panic.i1244: ; preds = %__barray_check_bounds.exit1243 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable @@ -272,55 +272,55 @@ cond_549_case_0: ; preds = %cond_exit_549 %68 = or i64 %67, -1048576 store i64 %68, ptr %3, align 4 %69 = icmp eq i64 %68, -1 - br i1 %69, label %loop_out509, label %mask_block_err.i1248 + br i1 %69, label %loop_out510, label %mask_block_err.i1249 -mask_block_err.i1248: ; preds = %cond_549_case_0 +mask_block_err.i1249: ; preds = %cond_549_case_0 tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_check_bounds.exit1252: ; preds = %cond_exit_368, %cond_exit_549 - %"546_0.01285" = phi i64 [ %70, %cond_exit_549 ], [ 0, %cond_exit_368 ] - %70 = add nuw nsw i64 %"546_0.01285", 1 +__barray_check_bounds.exit1253: ; preds = %cond_exit_368, %cond_exit_549 + %"546_0.01286" = phi i64 [ %70, %cond_exit_549 ], [ 0, %cond_exit_368 ] + %70 = add nuw nsw i64 %"546_0.01286", 1 %71 = load i64, ptr %3, align 4 - %72 = lshr i64 %71, %"546_0.01285" + %72 = lshr i64 %71, %"546_0.01286" %73 = trunc i64 %72 to i1 - br i1 %73, label %cond_exit_549, label %__barray_mask_borrow.exit1256 + br i1 %73, label %cond_exit_549, label %__barray_mask_borrow.exit1257 -__barray_mask_borrow.exit1256: ; preds = %__barray_check_bounds.exit1252 - %74 = shl nuw nsw i64 1, %"546_0.01285" +__barray_mask_borrow.exit1257: ; preds = %__barray_check_bounds.exit1253 + %74 = shl nuw nsw i64 1, %"546_0.01286" %75 = xor i64 %71, %74 store i64 %75, ptr %3, align 4 - %76 = getelementptr inbounds nuw i64, ptr %2, i64 %"546_0.01285" + %76 = getelementptr inbounds nuw i64, ptr %2, i64 %"546_0.01286" %77 = load i64, ptr %76, align 4 tail call void @___dec_future_refcount(i64 %77) br label %cond_exit_549 -cond_exit_549: ; preds = %__barray_mask_borrow.exit1256, %__barray_check_bounds.exit1252 - %78 = icmp samesign ugt i64 %"546_0.01285", 18 - br i1 %78, label %cond_549_case_0, label %__barray_check_bounds.exit1252 +cond_exit_549: ; preds = %__barray_mask_borrow.exit1257, %__barray_check_bounds.exit1253 + %78 = icmp samesign ugt i64 %"546_0.01286", 18 + br i1 %78, label %cond_549_case_0, label %__barray_check_bounds.exit1253 -cond_exit_368: ; preds = %__barray_check_bounds.exit1242 +cond_exit_368: ; preds = %__barray_check_bounds.exit1243 %79 = xor i64 %64, %56 store i64 %79, ptr %1, align 4 - %80 = getelementptr inbounds nuw i1, ptr %0, i64 %"364_0.sroa.15.01278" + %80 = getelementptr inbounds nuw i1, ptr %0, i64 %"364_0.sroa.15.01279" store i1 %read_bool, ptr %80, align 1 - %81 = icmp eq i64 %"364_0.sroa.15.01278", 19 - br i1 %81, label %__barray_check_bounds.exit1252, label %__barray_check_bounds.exit1234 + %81 = icmp eq i64 %"364_0.sroa.15.01279", 19 + br i1 %81, label %__barray_check_bounds.exit1253, label %__barray_check_bounds.exit1235 -loop_out509: ; preds = %cond_549_case_0 +loop_out510: ; preds = %cond_549_case_0 tail call void @heap_free(ptr %2) tail call void @heap_free(ptr nonnull %3) %82 = load i64, ptr %1, align 4 %83 = and i64 %82, 1048575 store i64 %83, ptr %1, align 4 %84 = icmp eq i64 %83, 0 - br i1 %84, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1257 + br i1 %84, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1258 -mask_block_err.i1257: ; preds = %loop_out509 +mask_block_err.i1258: ; preds = %loop_out510 tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") unreachable -__barray_check_none_borrowed.exit: ; preds = %loop_out509 +__barray_check_none_borrowed.exit: ; preds = %loop_out510 %85 = tail call ptr @heap_alloc(i64 20) %86 = tail call ptr @heap_alloc(i64 8) store i64 0, ptr %86, align 1 @@ -330,13 +330,13 @@ __barray_check_none_borrowed.exit: ; preds = %loop_out509 %88 = and i64 %87, 1048575 store i64 %88, ptr %1, align 4 %89 = icmp eq i64 %88, 0 - br i1 %89, label %__barray_check_none_borrowed.exit1261, label %mask_block_err.i1259 + br i1 %89, label %__barray_check_none_borrowed.exit1262, label %mask_block_err.i1260 -mask_block_err.i1259: ; preds = %__barray_check_none_borrowed.exit +mask_block_err.i1260: ; preds = %__barray_check_none_borrowed.exit tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") unreachable -__barray_check_none_borrowed.exit1261: ; preds = %__barray_check_none_borrowed.exit +__barray_check_none_borrowed.exit1262: ; preds = %__barray_check_none_borrowed.exit %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 %y_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 4 %arr_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 8 @@ -359,7 +359,7 @@ declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immar ; Function Attrs: noreturn declare void @panic(i32, ptr) local_unnamed_addr #1 -declare i64 @___lazy_measure_leaked(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -375,8 +375,6 @@ declare void @print_bool(ptr, i64, i1) local_unnamed_addr declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr - declare i1 @___read_future_bool(i64) local_unnamed_addr ; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_from_head-sol-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_from_head-sol-x86_64-unknown-linux-gnu.ll index 50c543a0..af17b198 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_from_head-sol-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_from_head-sol-x86_64-unknown-linux-gnu.ll @@ -48,24 +48,24 @@ loop_body: ; preds = %cond_exit_13, %__hu cond_13_case_1: ; preds = %loop_body %8 = add i64 %"9_2.0", 1 - %qalloc.i1214 = tail call i64 @___qalloc() - %not_max.not.not.i1215 = icmp eq i64 %qalloc.i1214, -1 - br i1 %not_max.not.not.i1215, label %cond_474_case_0.i1216, label %__hugr__.__tk2_sol_qalloc.470.exit1217 + %qalloc.i1215 = tail call i64 @___qalloc() + %not_max.not.not.i1216 = icmp eq i64 %qalloc.i1215, -1 + br i1 %not_max.not.not.i1216, label %cond_474_case_0.i1217, label %__hugr__.__tk2_sol_qalloc.470.exit1218 -cond_474_case_0.i1216: ; preds = %cond_13_case_1 +cond_474_case_0.i1217: ; preds = %cond_13_case_1 tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_sol_qalloc.470.exit1217: ; preds = %cond_13_case_1 - tail call void @___reset(i64 %qalloc.i1214) +__hugr__.__tk2_sol_qalloc.470.exit1218: ; preds = %cond_13_case_1 + tail call void @___reset(i64 %qalloc.i1215) %9 = icmp ult i64 %"9_2.0", 20 br i1 %9, label %__barray_check_bounds.exit, label %out_of_bounds.i -out_of_bounds.i: ; preds = %__hugr__.__tk2_sol_qalloc.470.exit1217 +out_of_bounds.i: ; preds = %__hugr__.__tk2_sol_qalloc.470.exit1218 tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") unreachable -__barray_check_bounds.exit: ; preds = %__hugr__.__tk2_sol_qalloc.470.exit1217 +__barray_check_bounds.exit: ; preds = %__hugr__.__tk2_sol_qalloc.470.exit1218 %10 = load i64, ptr %5, align 4 %11 = lshr i64 %10, %"9_2.0" %12 = trunc i64 %11 to i1 @@ -80,31 +80,31 @@ __barray_mask_return.exit: ; preds = %__barray_check_boun %14 = xor i64 %10, %13 store i64 %14, ptr %5, align 4 %15 = getelementptr inbounds nuw i64, ptr %4, i64 %"9_2.0" - store i64 %qalloc.i1214, ptr %15, align 4 + store i64 %qalloc.i1215, ptr %15, align 4 br label %cond_exit_13 cond_exit_13: ; preds = %loop_body, %__barray_mask_return.exit %"2107.0" = phi i64 [ %8, %__barray_mask_return.exit ], [ %"9_2.0", %loop_body ] %exitcond = icmp eq i64 %7, 21 - br i1 %exitcond, label %__barray_check_bounds.exit1219, label %loop_body + br i1 %exitcond, label %__barray_check_bounds.exit1220, label %loop_body -__barray_check_bounds.exit1219: ; preds = %cond_exit_13, %__barray_mask_return.exit1224 - %16 = phi i64 [ %28, %__barray_mask_return.exit1224 ], [ 1, %cond_exit_13 ] - %"114_0.01276" = phi i64 [ %16, %__barray_mask_return.exit1224 ], [ 0, %cond_exit_13 ] +__barray_check_bounds.exit1220: ; preds = %cond_exit_13, %__barray_mask_return.exit1225 + %16 = phi i64 [ %28, %__barray_mask_return.exit1225 ], [ 1, %cond_exit_13 ] + %"114_0.01277" = phi i64 [ %16, %__barray_mask_return.exit1225 ], [ 0, %cond_exit_13 ] %17 = load i64, ptr %5, align 4 - %18 = lshr i64 %17, %"114_0.01276" + %18 = lshr i64 %17, %"114_0.01277" %19 = trunc i64 %18 to i1 - br i1 %19, label %panic.i1220, label %__barray_check_bounds.exit1222 + br i1 %19, label %panic.i1221, label %__barray_check_bounds.exit1223 -panic.i1220: ; preds = %__barray_check_bounds.exit1219 +panic.i1221: ; preds = %__barray_check_bounds.exit1220 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_check_bounds.exit1222: ; preds = %__barray_check_bounds.exit1219 - %20 = shl nuw nsw i64 1, %"114_0.01276" +__barray_check_bounds.exit1223: ; preds = %__barray_check_bounds.exit1220 + %20 = shl nuw nsw i64 1, %"114_0.01277" %21 = xor i64 %17, %20 store i64 %21, ptr %5, align 4 - %22 = getelementptr inbounds nuw i64, ptr %4, i64 %"114_0.01276" + %22 = getelementptr inbounds nuw i64, ptr %4, i64 %"114_0.01277" %23 = load i64, ptr %22, align 4 tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rpp(i64 %qalloc.i, i64 %23, double 0x3FF921FB54442D18, double 0.000000e+00) @@ -112,65 +112,65 @@ __barray_check_bounds.exit1222: ; preds = %__barray_check_boun tail call void @___rp(i64 %qalloc.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18) %24 = load i64, ptr %5, align 4 - %25 = lshr i64 %24, %"114_0.01276" + %25 = lshr i64 %24, %"114_0.01277" %26 = trunc i64 %25 to i1 - br i1 %26, label %__barray_mask_return.exit1224, label %panic.i1223 + br i1 %26, label %__barray_mask_return.exit1225, label %panic.i1224 -panic.i1223: ; preds = %__barray_check_bounds.exit1222 +panic.i1224: ; preds = %__barray_check_bounds.exit1223 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_mask_return.exit1224: ; preds = %__barray_check_bounds.exit1222 +__barray_mask_return.exit1225: ; preds = %__barray_check_bounds.exit1223 %27 = xor i64 %24, %20 store i64 %27, ptr %5, align 4 store i64 %23, ptr %22, align 4 %28 = add nuw nsw i64 %16, 1 - %exitcond1279 = icmp eq i64 %28, 21 - br i1 %exitcond1279, label %cond_exit_185, label %__barray_check_bounds.exit1219 + %exitcond1280 = icmp eq i64 %28, 21 + br i1 %exitcond1280, label %cond_exit_185, label %__barray_check_bounds.exit1220 -cond_exit_185: ; preds = %__barray_mask_return.exit1224 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) +cond_exit_185: ; preds = %__barray_mask_return.exit1225 + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 1) tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure_leaked) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___inc_future_refcount(i64 %___future_measure) + %read_uint = tail call i64 @___read_future_uint(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) %29 = icmp eq i64 %read_uint, 2 br i1 %29, label %30, label %cond_exit_256 cond_exit_256: ; preds = %cond_exit_185 - %read_uint350 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + %read_uint350 = tail call i64 @___read_future_uint(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) %.not = icmp eq i64 %read_uint350, 2 br i1 %.not, label %cond_236_case_0, label %cond_236_case_1 30: ; preds = %cond_exit_185 - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_int(ptr nonnull @res_head_leake.F4F32972.0, i64 20, i64 1) - br label %__barray_check_bounds.exit1230.preheader + br label %__barray_check_bounds.exit1231.preheader -__barray_check_bounds.exit1230.preheader: ; preds = %cond_236_case_1, %30 - br label %__barray_check_bounds.exit1230 +__barray_check_bounds.exit1231.preheader: ; preds = %cond_236_case_1, %30 + br label %__barray_check_bounds.exit1231 cond_236_case_1: ; preds = %cond_exit_256 %31 = icmp eq i64 %read_uint350, 1 tail call void @print_bool(ptr nonnull @res_head.AFE8E005.0, i64 14, i1 %31) - br label %__barray_check_bounds.exit1230.preheader + br label %__barray_check_bounds.exit1231.preheader cond_236_case_0: ; preds = %cond_exit_256 tail call void @panic(i32 1001, ptr nonnull @e_Option.unw.32D4E82D.0) unreachable -out_of_bounds.i1225: ; preds = %.thread +out_of_bounds.i1226: ; preds = %.thread tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") unreachable -__barray_check_bounds.exit1226: ; preds = %.thread +__barray_check_bounds.exit1227: ; preds = %.thread %32 = load i64, ptr %3, align 4 - %33 = lshr i64 %32, %"298_2.01283" + %33 = lshr i64 %32, %"298_2.01284" %34 = trunc i64 %33 to i1 - br i1 %34, label %cond_exit_302, label %panic.i1227 + br i1 %34, label %cond_exit_302, label %panic.i1228 -panic.i1227: ; preds = %__barray_check_bounds.exit1226 +panic.i1228: ; preds = %__barray_check_bounds.exit1227 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable @@ -179,91 +179,91 @@ mask_block_ok.i: ; preds = %cond_exit_302 %36 = or i64 %35, -1048576 store i64 %36, ptr %5, align 4 %37 = icmp eq i64 %36, -1 - br i1 %37, label %loop_body510.preheader.preheader, label %mask_block_err.i + br i1 %37, label %loop_body511.preheader.preheader, label %mask_block_err.i mask_block_err.i: ; preds = %mask_block_ok.i tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_check_bounds.exit1230: ; preds = %__barray_check_bounds.exit1230.preheader, %cond_exit_302 - %"298_0.sroa.15.01284" = phi i64 [ %38, %cond_exit_302 ], [ 0, %__barray_check_bounds.exit1230.preheader ] - %"298_2.01283" = phi i64 [ %46, %cond_exit_302 ], [ 0, %__barray_check_bounds.exit1230.preheader ] - %38 = add nuw nsw i64 %"298_0.sroa.15.01284", 1 +__barray_check_bounds.exit1231: ; preds = %__barray_check_bounds.exit1231.preheader, %cond_exit_302 + %"298_0.sroa.15.01285" = phi i64 [ %38, %cond_exit_302 ], [ 0, %__barray_check_bounds.exit1231.preheader ] + %"298_2.01284" = phi i64 [ %46, %cond_exit_302 ], [ 0, %__barray_check_bounds.exit1231.preheader ] + %38 = add nuw nsw i64 %"298_0.sroa.15.01285", 1 %39 = load i64, ptr %5, align 4 - %40 = lshr i64 %39, %"298_0.sroa.15.01284" + %40 = lshr i64 %39, %"298_0.sroa.15.01285" %41 = trunc i64 %40 to i1 - br i1 %41, label %panic.i1231, label %.thread + br i1 %41, label %panic.i1232, label %.thread -panic.i1231: ; preds = %__barray_check_bounds.exit1230 +panic.i1232: ; preds = %__barray_check_bounds.exit1231 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -.thread: ; preds = %__barray_check_bounds.exit1230 - %42 = shl nuw nsw i64 1, %"298_0.sroa.15.01284" +.thread: ; preds = %__barray_check_bounds.exit1231 + %42 = shl nuw nsw i64 1, %"298_0.sroa.15.01285" %43 = xor i64 %39, %42 store i64 %43, ptr %5, align 4 - %44 = getelementptr inbounds nuw i64, ptr %4, i64 %"298_0.sroa.15.01284" + %44 = getelementptr inbounds nuw i64, ptr %4, i64 %"298_0.sroa.15.01285" %45 = load i64, ptr %44, align 4 - %46 = add i64 %"298_2.01283", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %45) + %46 = add i64 %"298_2.01284", 1 + %___future_measure485 = tail call i64 @___future_measure(i64 %45, i64 0) tail call void @___qfree(i64 %45) - %47 = icmp ult i64 %"298_2.01283", 20 - br i1 %47, label %__barray_check_bounds.exit1226, label %out_of_bounds.i1225 + %47 = icmp ult i64 %"298_2.01284", 20 + br i1 %47, label %__barray_check_bounds.exit1227, label %out_of_bounds.i1226 -cond_exit_302: ; preds = %__barray_check_bounds.exit1226 - %48 = shl nuw nsw i64 1, %"298_2.01283" +cond_exit_302: ; preds = %__barray_check_bounds.exit1227 + %48 = shl nuw nsw i64 1, %"298_2.01284" %49 = xor i64 %32, %48 store i64 %49, ptr %3, align 4 - %50 = getelementptr inbounds nuw i64, ptr %2, i64 %"298_2.01283" - store i64 %lazy_measure, ptr %50, align 4 - %51 = icmp samesign ugt i64 %"298_0.sroa.15.01284", 18 - br i1 %51, label %mask_block_ok.i, label %__barray_check_bounds.exit1230 + %50 = getelementptr inbounds nuw i64, ptr %2, i64 %"298_2.01284" + store i64 %___future_measure485, ptr %50, align 4 + %51 = icmp samesign ugt i64 %"298_0.sroa.15.01285", 18 + br i1 %51, label %mask_block_ok.i, label %__barray_check_bounds.exit1231 -loop_body510.preheader.preheader: ; preds = %mask_block_ok.i +loop_body511.preheader.preheader: ; preds = %mask_block_ok.i tail call void @heap_free(ptr nonnull %4) tail call void @heap_free(ptr nonnull %5) - br label %__barray_check_bounds.exit1234 + br label %__barray_check_bounds.exit1235 -__barray_check_bounds.exit1234: ; preds = %cond_exit_368, %loop_body510.preheader.preheader - %"364_0.sroa.15.01278" = phi i64 [ %52, %cond_exit_368 ], [ 0, %loop_body510.preheader.preheader ] - %52 = add nuw nsw i64 %"364_0.sroa.15.01278", 1 +__barray_check_bounds.exit1235: ; preds = %cond_exit_368, %loop_body511.preheader.preheader + %"364_0.sroa.15.01279" = phi i64 [ %52, %cond_exit_368 ], [ 0, %loop_body511.preheader.preheader ] + %52 = add nuw nsw i64 %"364_0.sroa.15.01279", 1 %53 = load i64, ptr %3, align 4 - %54 = lshr i64 %53, %"364_0.sroa.15.01278" + %54 = lshr i64 %53, %"364_0.sroa.15.01279" %55 = trunc i64 %54 to i1 - br i1 %55, label %panic.i1235, label %__barray_check_bounds.exit1238 + br i1 %55, label %panic.i1236, label %__barray_check_bounds.exit1239 -panic.i1235: ; preds = %__barray_check_bounds.exit1234 +panic.i1236: ; preds = %__barray_check_bounds.exit1235 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_check_bounds.exit1238: ; preds = %__barray_check_bounds.exit1234 - %56 = shl nuw nsw i64 1, %"364_0.sroa.15.01278" +__barray_check_bounds.exit1239: ; preds = %__barray_check_bounds.exit1235 + %56 = shl nuw nsw i64 1, %"364_0.sroa.15.01279" %57 = xor i64 %53, %56 store i64 %57, ptr %3, align 4 - %58 = getelementptr inbounds nuw i64, ptr %2, i64 %"364_0.sroa.15.01278" + %58 = getelementptr inbounds nuw i64, ptr %2, i64 %"364_0.sroa.15.01279" %59 = load i64, ptr %58, align 4 tail call void @___inc_future_refcount(i64 %59) %60 = load i64, ptr %3, align 4 - %61 = lshr i64 %60, %"364_0.sroa.15.01278" + %61 = lshr i64 %60, %"364_0.sroa.15.01279" %62 = trunc i64 %61 to i1 - br i1 %62, label %__barray_check_bounds.exit1242, label %panic.i1239 + br i1 %62, label %__barray_check_bounds.exit1243, label %panic.i1240 -panic.i1239: ; preds = %__barray_check_bounds.exit1238 +panic.i1240: ; preds = %__barray_check_bounds.exit1239 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_check_bounds.exit1242: ; preds = %__barray_check_bounds.exit1238 +__barray_check_bounds.exit1243: ; preds = %__barray_check_bounds.exit1239 %63 = xor i64 %60, %56 store i64 %63, ptr %3, align 4 store i64 %59, ptr %58, align 4 %read_bool = tail call i1 @___read_future_bool(i64 %59) tail call void @___dec_future_refcount(i64 %59) %64 = load i64, ptr %1, align 4 - %65 = lshr i64 %64, %"364_0.sroa.15.01278" + %65 = lshr i64 %64, %"364_0.sroa.15.01279" %66 = trunc i64 %65 to i1 - br i1 %66, label %cond_exit_368, label %panic.i1243 + br i1 %66, label %cond_exit_368, label %panic.i1244 -panic.i1243: ; preds = %__barray_check_bounds.exit1242 +panic.i1244: ; preds = %__barray_check_bounds.exit1243 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable @@ -272,55 +272,55 @@ cond_549_case_0: ; preds = %cond_exit_549 %68 = or i64 %67, -1048576 store i64 %68, ptr %3, align 4 %69 = icmp eq i64 %68, -1 - br i1 %69, label %loop_out509, label %mask_block_err.i1248 + br i1 %69, label %loop_out510, label %mask_block_err.i1249 -mask_block_err.i1248: ; preds = %cond_549_case_0 +mask_block_err.i1249: ; preds = %cond_549_case_0 tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_check_bounds.exit1252: ; preds = %cond_exit_368, %cond_exit_549 - %"546_0.01285" = phi i64 [ %70, %cond_exit_549 ], [ 0, %cond_exit_368 ] - %70 = add nuw nsw i64 %"546_0.01285", 1 +__barray_check_bounds.exit1253: ; preds = %cond_exit_368, %cond_exit_549 + %"546_0.01286" = phi i64 [ %70, %cond_exit_549 ], [ 0, %cond_exit_368 ] + %70 = add nuw nsw i64 %"546_0.01286", 1 %71 = load i64, ptr %3, align 4 - %72 = lshr i64 %71, %"546_0.01285" + %72 = lshr i64 %71, %"546_0.01286" %73 = trunc i64 %72 to i1 - br i1 %73, label %cond_exit_549, label %__barray_mask_borrow.exit1256 + br i1 %73, label %cond_exit_549, label %__barray_mask_borrow.exit1257 -__barray_mask_borrow.exit1256: ; preds = %__barray_check_bounds.exit1252 - %74 = shl nuw nsw i64 1, %"546_0.01285" +__barray_mask_borrow.exit1257: ; preds = %__barray_check_bounds.exit1253 + %74 = shl nuw nsw i64 1, %"546_0.01286" %75 = xor i64 %71, %74 store i64 %75, ptr %3, align 4 - %76 = getelementptr inbounds nuw i64, ptr %2, i64 %"546_0.01285" + %76 = getelementptr inbounds nuw i64, ptr %2, i64 %"546_0.01286" %77 = load i64, ptr %76, align 4 tail call void @___dec_future_refcount(i64 %77) br label %cond_exit_549 -cond_exit_549: ; preds = %__barray_mask_borrow.exit1256, %__barray_check_bounds.exit1252 - %78 = icmp samesign ugt i64 %"546_0.01285", 18 - br i1 %78, label %cond_549_case_0, label %__barray_check_bounds.exit1252 +cond_exit_549: ; preds = %__barray_mask_borrow.exit1257, %__barray_check_bounds.exit1253 + %78 = icmp samesign ugt i64 %"546_0.01286", 18 + br i1 %78, label %cond_549_case_0, label %__barray_check_bounds.exit1253 -cond_exit_368: ; preds = %__barray_check_bounds.exit1242 +cond_exit_368: ; preds = %__barray_check_bounds.exit1243 %79 = xor i64 %64, %56 store i64 %79, ptr %1, align 4 - %80 = getelementptr inbounds nuw i1, ptr %0, i64 %"364_0.sroa.15.01278" + %80 = getelementptr inbounds nuw i1, ptr %0, i64 %"364_0.sroa.15.01279" store i1 %read_bool, ptr %80, align 1 - %81 = icmp eq i64 %"364_0.sroa.15.01278", 19 - br i1 %81, label %__barray_check_bounds.exit1252, label %__barray_check_bounds.exit1234 + %81 = icmp eq i64 %"364_0.sroa.15.01279", 19 + br i1 %81, label %__barray_check_bounds.exit1253, label %__barray_check_bounds.exit1235 -loop_out509: ; preds = %cond_549_case_0 +loop_out510: ; preds = %cond_549_case_0 tail call void @heap_free(ptr %2) tail call void @heap_free(ptr nonnull %3) %82 = load i64, ptr %1, align 4 %83 = and i64 %82, 1048575 store i64 %83, ptr %1, align 4 %84 = icmp eq i64 %83, 0 - br i1 %84, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1257 + br i1 %84, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1258 -mask_block_err.i1257: ; preds = %loop_out509 +mask_block_err.i1258: ; preds = %loop_out510 tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") unreachable -__barray_check_none_borrowed.exit: ; preds = %loop_out509 +__barray_check_none_borrowed.exit: ; preds = %loop_out510 %85 = tail call ptr @heap_alloc(i64 20) %86 = tail call ptr @heap_alloc(i64 8) store i64 0, ptr %86, align 1 @@ -330,13 +330,13 @@ __barray_check_none_borrowed.exit: ; preds = %loop_out509 %88 = and i64 %87, 1048575 store i64 %88, ptr %1, align 4 %89 = icmp eq i64 %88, 0 - br i1 %89, label %__barray_check_none_borrowed.exit1261, label %mask_block_err.i1259 + br i1 %89, label %__barray_check_none_borrowed.exit1262, label %mask_block_err.i1260 -mask_block_err.i1259: ; preds = %__barray_check_none_borrowed.exit +mask_block_err.i1260: ; preds = %__barray_check_none_borrowed.exit tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") unreachable -__barray_check_none_borrowed.exit1261: ; preds = %__barray_check_none_borrowed.exit +__barray_check_none_borrowed.exit1262: ; preds = %__barray_check_none_borrowed.exit %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 %y_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 4 %arr_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 8 @@ -359,7 +359,7 @@ declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immar ; Function Attrs: noreturn declare void @panic(i32, ptr) local_unnamed_addr #1 -declare i64 @___lazy_measure_leaked(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -375,8 +375,6 @@ declare void @print_bool(ptr, i64, i1) local_unnamed_addr declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr - declare i1 @___read_future_bool(i64) local_unnamed_addr ; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_from_head-sol-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_from_head-sol-x86_64-windows-gnu.ll index b3374a98..4ae0d2d1 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_from_head-sol-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_from_head-sol-x86_64-windows-gnu.ll @@ -48,24 +48,24 @@ loop_body: ; preds = %cond_exit_13, %__hu cond_13_case_1: ; preds = %loop_body %8 = add i64 %"9_2.0", 1 - %qalloc.i1214 = tail call i64 @___qalloc() - %not_max.not.not.i1215 = icmp eq i64 %qalloc.i1214, -1 - br i1 %not_max.not.not.i1215, label %cond_474_case_0.i1216, label %__hugr__.__tk2_sol_qalloc.470.exit1217 + %qalloc.i1215 = tail call i64 @___qalloc() + %not_max.not.not.i1216 = icmp eq i64 %qalloc.i1215, -1 + br i1 %not_max.not.not.i1216, label %cond_474_case_0.i1217, label %__hugr__.__tk2_sol_qalloc.470.exit1218 -cond_474_case_0.i1216: ; preds = %cond_13_case_1 +cond_474_case_0.i1217: ; preds = %cond_13_case_1 tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_sol_qalloc.470.exit1217: ; preds = %cond_13_case_1 - tail call void @___reset(i64 %qalloc.i1214) +__hugr__.__tk2_sol_qalloc.470.exit1218: ; preds = %cond_13_case_1 + tail call void @___reset(i64 %qalloc.i1215) %9 = icmp ult i64 %"9_2.0", 20 br i1 %9, label %__barray_check_bounds.exit, label %out_of_bounds.i -out_of_bounds.i: ; preds = %__hugr__.__tk2_sol_qalloc.470.exit1217 +out_of_bounds.i: ; preds = %__hugr__.__tk2_sol_qalloc.470.exit1218 tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") unreachable -__barray_check_bounds.exit: ; preds = %__hugr__.__tk2_sol_qalloc.470.exit1217 +__barray_check_bounds.exit: ; preds = %__hugr__.__tk2_sol_qalloc.470.exit1218 %10 = load i64, ptr %5, align 4 %11 = lshr i64 %10, %"9_2.0" %12 = trunc i64 %11 to i1 @@ -80,31 +80,31 @@ __barray_mask_return.exit: ; preds = %__barray_check_boun %14 = xor i64 %10, %13 store i64 %14, ptr %5, align 4 %15 = getelementptr inbounds nuw i64, ptr %4, i64 %"9_2.0" - store i64 %qalloc.i1214, ptr %15, align 4 + store i64 %qalloc.i1215, ptr %15, align 4 br label %cond_exit_13 cond_exit_13: ; preds = %loop_body, %__barray_mask_return.exit %"2107.0" = phi i64 [ %8, %__barray_mask_return.exit ], [ %"9_2.0", %loop_body ] %exitcond = icmp eq i64 %7, 21 - br i1 %exitcond, label %__barray_check_bounds.exit1219, label %loop_body + br i1 %exitcond, label %__barray_check_bounds.exit1220, label %loop_body -__barray_check_bounds.exit1219: ; preds = %cond_exit_13, %__barray_mask_return.exit1224 - %16 = phi i64 [ %28, %__barray_mask_return.exit1224 ], [ 1, %cond_exit_13 ] - %"114_0.01276" = phi i64 [ %16, %__barray_mask_return.exit1224 ], [ 0, %cond_exit_13 ] +__barray_check_bounds.exit1220: ; preds = %cond_exit_13, %__barray_mask_return.exit1225 + %16 = phi i64 [ %28, %__barray_mask_return.exit1225 ], [ 1, %cond_exit_13 ] + %"114_0.01277" = phi i64 [ %16, %__barray_mask_return.exit1225 ], [ 0, %cond_exit_13 ] %17 = load i64, ptr %5, align 4 - %18 = lshr i64 %17, %"114_0.01276" + %18 = lshr i64 %17, %"114_0.01277" %19 = trunc i64 %18 to i1 - br i1 %19, label %panic.i1220, label %__barray_check_bounds.exit1222 + br i1 %19, label %panic.i1221, label %__barray_check_bounds.exit1223 -panic.i1220: ; preds = %__barray_check_bounds.exit1219 +panic.i1221: ; preds = %__barray_check_bounds.exit1220 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_check_bounds.exit1222: ; preds = %__barray_check_bounds.exit1219 - %20 = shl nuw nsw i64 1, %"114_0.01276" +__barray_check_bounds.exit1223: ; preds = %__barray_check_bounds.exit1220 + %20 = shl nuw nsw i64 1, %"114_0.01277" %21 = xor i64 %17, %20 store i64 %21, ptr %5, align 4 - %22 = getelementptr inbounds nuw i64, ptr %4, i64 %"114_0.01276" + %22 = getelementptr inbounds nuw i64, ptr %4, i64 %"114_0.01277" %23 = load i64, ptr %22, align 4 tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rpp(i64 %qalloc.i, i64 %23, double 0x3FF921FB54442D18, double 0.000000e+00) @@ -112,65 +112,65 @@ __barray_check_bounds.exit1222: ; preds = %__barray_check_boun tail call void @___rp(i64 %qalloc.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18) %24 = load i64, ptr %5, align 4 - %25 = lshr i64 %24, %"114_0.01276" + %25 = lshr i64 %24, %"114_0.01277" %26 = trunc i64 %25 to i1 - br i1 %26, label %__barray_mask_return.exit1224, label %panic.i1223 + br i1 %26, label %__barray_mask_return.exit1225, label %panic.i1224 -panic.i1223: ; preds = %__barray_check_bounds.exit1222 +panic.i1224: ; preds = %__barray_check_bounds.exit1223 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_mask_return.exit1224: ; preds = %__barray_check_bounds.exit1222 +__barray_mask_return.exit1225: ; preds = %__barray_check_bounds.exit1223 %27 = xor i64 %24, %20 store i64 %27, ptr %5, align 4 store i64 %23, ptr %22, align 4 %28 = add nuw nsw i64 %16, 1 - %exitcond1279 = icmp eq i64 %28, 21 - br i1 %exitcond1279, label %cond_exit_185, label %__barray_check_bounds.exit1219 + %exitcond1280 = icmp eq i64 %28, 21 + br i1 %exitcond1280, label %cond_exit_185, label %__barray_check_bounds.exit1220 -cond_exit_185: ; preds = %__barray_mask_return.exit1224 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) +cond_exit_185: ; preds = %__barray_mask_return.exit1225 + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 1) tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure_leaked) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___inc_future_refcount(i64 %___future_measure) + %read_uint = tail call i64 @___read_future_uint(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) %29 = icmp eq i64 %read_uint, 2 br i1 %29, label %30, label %cond_exit_256 cond_exit_256: ; preds = %cond_exit_185 - %read_uint350 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + %read_uint350 = tail call i64 @___read_future_uint(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) %.not = icmp eq i64 %read_uint350, 2 br i1 %.not, label %cond_236_case_0, label %cond_236_case_1 30: ; preds = %cond_exit_185 - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_int(ptr nonnull @res_head_leake.F4F32972.0, i64 20, i64 1) - br label %__barray_check_bounds.exit1230.preheader + br label %__barray_check_bounds.exit1231.preheader -__barray_check_bounds.exit1230.preheader: ; preds = %cond_236_case_1, %30 - br label %__barray_check_bounds.exit1230 +__barray_check_bounds.exit1231.preheader: ; preds = %cond_236_case_1, %30 + br label %__barray_check_bounds.exit1231 cond_236_case_1: ; preds = %cond_exit_256 %31 = icmp eq i64 %read_uint350, 1 tail call void @print_bool(ptr nonnull @res_head.AFE8E005.0, i64 14, i1 %31) - br label %__barray_check_bounds.exit1230.preheader + br label %__barray_check_bounds.exit1231.preheader cond_236_case_0: ; preds = %cond_exit_256 tail call void @panic(i32 1001, ptr nonnull @e_Option.unw.32D4E82D.0) unreachable -out_of_bounds.i1225: ; preds = %.thread +out_of_bounds.i1226: ; preds = %.thread tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") unreachable -__barray_check_bounds.exit1226: ; preds = %.thread +__barray_check_bounds.exit1227: ; preds = %.thread %32 = load i64, ptr %3, align 4 - %33 = lshr i64 %32, %"298_2.01283" + %33 = lshr i64 %32, %"298_2.01284" %34 = trunc i64 %33 to i1 - br i1 %34, label %cond_exit_302, label %panic.i1227 + br i1 %34, label %cond_exit_302, label %panic.i1228 -panic.i1227: ; preds = %__barray_check_bounds.exit1226 +panic.i1228: ; preds = %__barray_check_bounds.exit1227 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable @@ -179,91 +179,91 @@ mask_block_ok.i: ; preds = %cond_exit_302 %36 = or i64 %35, -1048576 store i64 %36, ptr %5, align 4 %37 = icmp eq i64 %36, -1 - br i1 %37, label %loop_body510.preheader.preheader, label %mask_block_err.i + br i1 %37, label %loop_body511.preheader.preheader, label %mask_block_err.i mask_block_err.i: ; preds = %mask_block_ok.i tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_check_bounds.exit1230: ; preds = %__barray_check_bounds.exit1230.preheader, %cond_exit_302 - %"298_0.sroa.15.01284" = phi i64 [ %38, %cond_exit_302 ], [ 0, %__barray_check_bounds.exit1230.preheader ] - %"298_2.01283" = phi i64 [ %46, %cond_exit_302 ], [ 0, %__barray_check_bounds.exit1230.preheader ] - %38 = add nuw nsw i64 %"298_0.sroa.15.01284", 1 +__barray_check_bounds.exit1231: ; preds = %__barray_check_bounds.exit1231.preheader, %cond_exit_302 + %"298_0.sroa.15.01285" = phi i64 [ %38, %cond_exit_302 ], [ 0, %__barray_check_bounds.exit1231.preheader ] + %"298_2.01284" = phi i64 [ %46, %cond_exit_302 ], [ 0, %__barray_check_bounds.exit1231.preheader ] + %38 = add nuw nsw i64 %"298_0.sroa.15.01285", 1 %39 = load i64, ptr %5, align 4 - %40 = lshr i64 %39, %"298_0.sroa.15.01284" + %40 = lshr i64 %39, %"298_0.sroa.15.01285" %41 = trunc i64 %40 to i1 - br i1 %41, label %panic.i1231, label %.thread + br i1 %41, label %panic.i1232, label %.thread -panic.i1231: ; preds = %__barray_check_bounds.exit1230 +panic.i1232: ; preds = %__barray_check_bounds.exit1231 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -.thread: ; preds = %__barray_check_bounds.exit1230 - %42 = shl nuw nsw i64 1, %"298_0.sroa.15.01284" +.thread: ; preds = %__barray_check_bounds.exit1231 + %42 = shl nuw nsw i64 1, %"298_0.sroa.15.01285" %43 = xor i64 %39, %42 store i64 %43, ptr %5, align 4 - %44 = getelementptr inbounds nuw i64, ptr %4, i64 %"298_0.sroa.15.01284" + %44 = getelementptr inbounds nuw i64, ptr %4, i64 %"298_0.sroa.15.01285" %45 = load i64, ptr %44, align 4 - %46 = add i64 %"298_2.01283", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %45) + %46 = add i64 %"298_2.01284", 1 + %___future_measure485 = tail call i64 @___future_measure(i64 %45, i64 0) tail call void @___qfree(i64 %45) - %47 = icmp ult i64 %"298_2.01283", 20 - br i1 %47, label %__barray_check_bounds.exit1226, label %out_of_bounds.i1225 + %47 = icmp ult i64 %"298_2.01284", 20 + br i1 %47, label %__barray_check_bounds.exit1227, label %out_of_bounds.i1226 -cond_exit_302: ; preds = %__barray_check_bounds.exit1226 - %48 = shl nuw nsw i64 1, %"298_2.01283" +cond_exit_302: ; preds = %__barray_check_bounds.exit1227 + %48 = shl nuw nsw i64 1, %"298_2.01284" %49 = xor i64 %32, %48 store i64 %49, ptr %3, align 4 - %50 = getelementptr inbounds nuw i64, ptr %2, i64 %"298_2.01283" - store i64 %lazy_measure, ptr %50, align 4 - %51 = icmp samesign ugt i64 %"298_0.sroa.15.01284", 18 - br i1 %51, label %mask_block_ok.i, label %__barray_check_bounds.exit1230 + %50 = getelementptr inbounds nuw i64, ptr %2, i64 %"298_2.01284" + store i64 %___future_measure485, ptr %50, align 4 + %51 = icmp samesign ugt i64 %"298_0.sroa.15.01285", 18 + br i1 %51, label %mask_block_ok.i, label %__barray_check_bounds.exit1231 -loop_body510.preheader.preheader: ; preds = %mask_block_ok.i +loop_body511.preheader.preheader: ; preds = %mask_block_ok.i tail call void @heap_free(ptr nonnull %4) tail call void @heap_free(ptr nonnull %5) - br label %__barray_check_bounds.exit1234 + br label %__barray_check_bounds.exit1235 -__barray_check_bounds.exit1234: ; preds = %cond_exit_368, %loop_body510.preheader.preheader - %"364_0.sroa.15.01278" = phi i64 [ %52, %cond_exit_368 ], [ 0, %loop_body510.preheader.preheader ] - %52 = add nuw nsw i64 %"364_0.sroa.15.01278", 1 +__barray_check_bounds.exit1235: ; preds = %cond_exit_368, %loop_body511.preheader.preheader + %"364_0.sroa.15.01279" = phi i64 [ %52, %cond_exit_368 ], [ 0, %loop_body511.preheader.preheader ] + %52 = add nuw nsw i64 %"364_0.sroa.15.01279", 1 %53 = load i64, ptr %3, align 4 - %54 = lshr i64 %53, %"364_0.sroa.15.01278" + %54 = lshr i64 %53, %"364_0.sroa.15.01279" %55 = trunc i64 %54 to i1 - br i1 %55, label %panic.i1235, label %__barray_check_bounds.exit1238 + br i1 %55, label %panic.i1236, label %__barray_check_bounds.exit1239 -panic.i1235: ; preds = %__barray_check_bounds.exit1234 +panic.i1236: ; preds = %__barray_check_bounds.exit1235 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_check_bounds.exit1238: ; preds = %__barray_check_bounds.exit1234 - %56 = shl nuw nsw i64 1, %"364_0.sroa.15.01278" +__barray_check_bounds.exit1239: ; preds = %__barray_check_bounds.exit1235 + %56 = shl nuw nsw i64 1, %"364_0.sroa.15.01279" %57 = xor i64 %53, %56 store i64 %57, ptr %3, align 4 - %58 = getelementptr inbounds nuw i64, ptr %2, i64 %"364_0.sroa.15.01278" + %58 = getelementptr inbounds nuw i64, ptr %2, i64 %"364_0.sroa.15.01279" %59 = load i64, ptr %58, align 4 tail call void @___inc_future_refcount(i64 %59) %60 = load i64, ptr %3, align 4 - %61 = lshr i64 %60, %"364_0.sroa.15.01278" + %61 = lshr i64 %60, %"364_0.sroa.15.01279" %62 = trunc i64 %61 to i1 - br i1 %62, label %__barray_check_bounds.exit1242, label %panic.i1239 + br i1 %62, label %__barray_check_bounds.exit1243, label %panic.i1240 -panic.i1239: ; preds = %__barray_check_bounds.exit1238 +panic.i1240: ; preds = %__barray_check_bounds.exit1239 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_check_bounds.exit1242: ; preds = %__barray_check_bounds.exit1238 +__barray_check_bounds.exit1243: ; preds = %__barray_check_bounds.exit1239 %63 = xor i64 %60, %56 store i64 %63, ptr %3, align 4 store i64 %59, ptr %58, align 4 %read_bool = tail call i1 @___read_future_bool(i64 %59) tail call void @___dec_future_refcount(i64 %59) %64 = load i64, ptr %1, align 4 - %65 = lshr i64 %64, %"364_0.sroa.15.01278" + %65 = lshr i64 %64, %"364_0.sroa.15.01279" %66 = trunc i64 %65 to i1 - br i1 %66, label %cond_exit_368, label %panic.i1243 + br i1 %66, label %cond_exit_368, label %panic.i1244 -panic.i1243: ; preds = %__barray_check_bounds.exit1242 +panic.i1244: ; preds = %__barray_check_bounds.exit1243 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable @@ -272,55 +272,55 @@ cond_549_case_0: ; preds = %cond_exit_549 %68 = or i64 %67, -1048576 store i64 %68, ptr %3, align 4 %69 = icmp eq i64 %68, -1 - br i1 %69, label %loop_out509, label %mask_block_err.i1248 + br i1 %69, label %loop_out510, label %mask_block_err.i1249 -mask_block_err.i1248: ; preds = %cond_549_case_0 +mask_block_err.i1249: ; preds = %cond_549_case_0 tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_check_bounds.exit1252: ; preds = %cond_exit_368, %cond_exit_549 - %"546_0.01285" = phi i64 [ %70, %cond_exit_549 ], [ 0, %cond_exit_368 ] - %70 = add nuw nsw i64 %"546_0.01285", 1 +__barray_check_bounds.exit1253: ; preds = %cond_exit_368, %cond_exit_549 + %"546_0.01286" = phi i64 [ %70, %cond_exit_549 ], [ 0, %cond_exit_368 ] + %70 = add nuw nsw i64 %"546_0.01286", 1 %71 = load i64, ptr %3, align 4 - %72 = lshr i64 %71, %"546_0.01285" + %72 = lshr i64 %71, %"546_0.01286" %73 = trunc i64 %72 to i1 - br i1 %73, label %cond_exit_549, label %__barray_mask_borrow.exit1256 + br i1 %73, label %cond_exit_549, label %__barray_mask_borrow.exit1257 -__barray_mask_borrow.exit1256: ; preds = %__barray_check_bounds.exit1252 - %74 = shl nuw nsw i64 1, %"546_0.01285" +__barray_mask_borrow.exit1257: ; preds = %__barray_check_bounds.exit1253 + %74 = shl nuw nsw i64 1, %"546_0.01286" %75 = xor i64 %71, %74 store i64 %75, ptr %3, align 4 - %76 = getelementptr inbounds nuw i64, ptr %2, i64 %"546_0.01285" + %76 = getelementptr inbounds nuw i64, ptr %2, i64 %"546_0.01286" %77 = load i64, ptr %76, align 4 tail call void @___dec_future_refcount(i64 %77) br label %cond_exit_549 -cond_exit_549: ; preds = %__barray_mask_borrow.exit1256, %__barray_check_bounds.exit1252 - %78 = icmp samesign ugt i64 %"546_0.01285", 18 - br i1 %78, label %cond_549_case_0, label %__barray_check_bounds.exit1252 +cond_exit_549: ; preds = %__barray_mask_borrow.exit1257, %__barray_check_bounds.exit1253 + %78 = icmp samesign ugt i64 %"546_0.01286", 18 + br i1 %78, label %cond_549_case_0, label %__barray_check_bounds.exit1253 -cond_exit_368: ; preds = %__barray_check_bounds.exit1242 +cond_exit_368: ; preds = %__barray_check_bounds.exit1243 %79 = xor i64 %64, %56 store i64 %79, ptr %1, align 4 - %80 = getelementptr inbounds nuw i1, ptr %0, i64 %"364_0.sroa.15.01278" + %80 = getelementptr inbounds nuw i1, ptr %0, i64 %"364_0.sroa.15.01279" store i1 %read_bool, ptr %80, align 1 - %81 = icmp eq i64 %"364_0.sroa.15.01278", 19 - br i1 %81, label %__barray_check_bounds.exit1252, label %__barray_check_bounds.exit1234 + %81 = icmp eq i64 %"364_0.sroa.15.01279", 19 + br i1 %81, label %__barray_check_bounds.exit1253, label %__barray_check_bounds.exit1235 -loop_out509: ; preds = %cond_549_case_0 +loop_out510: ; preds = %cond_549_case_0 tail call void @heap_free(ptr %2) tail call void @heap_free(ptr nonnull %3) %82 = load i64, ptr %1, align 4 %83 = and i64 %82, 1048575 store i64 %83, ptr %1, align 4 %84 = icmp eq i64 %83, 0 - br i1 %84, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1257 + br i1 %84, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1258 -mask_block_err.i1257: ; preds = %loop_out509 +mask_block_err.i1258: ; preds = %loop_out510 tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") unreachable -__barray_check_none_borrowed.exit: ; preds = %loop_out509 +__barray_check_none_borrowed.exit: ; preds = %loop_out510 %85 = tail call ptr @heap_alloc(i64 20) %86 = tail call ptr @heap_alloc(i64 8) store i64 0, ptr %86, align 1 @@ -330,13 +330,13 @@ __barray_check_none_borrowed.exit: ; preds = %loop_out509 %88 = and i64 %87, 1048575 store i64 %88, ptr %1, align 4 %89 = icmp eq i64 %88, 0 - br i1 %89, label %__barray_check_none_borrowed.exit1261, label %mask_block_err.i1259 + br i1 %89, label %__barray_check_none_borrowed.exit1262, label %mask_block_err.i1260 -mask_block_err.i1259: ; preds = %__barray_check_none_borrowed.exit +mask_block_err.i1260: ; preds = %__barray_check_none_borrowed.exit tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") unreachable -__barray_check_none_borrowed.exit1261: ; preds = %__barray_check_none_borrowed.exit +__barray_check_none_borrowed.exit1262: ; preds = %__barray_check_none_borrowed.exit %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 %y_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 4 %arr_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 8 @@ -359,7 +359,7 @@ declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immar ; Function Attrs: noreturn declare void @panic(i32, ptr) local_unnamed_addr #1 -declare i64 @___lazy_measure_leaked(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -375,8 +375,6 @@ declare void @print_bool(ptr, i64, i1) local_unnamed_addr declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr - declare i1 @___read_future_bool(i64) local_unnamed_addr ; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_within_tail-helios-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_within_tail-helios-aarch64-apple-darwin.ll index e366a73c..39a35cb5 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_within_tail-helios-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_within_tail-helios-aarch64-apple-darwin.ll @@ -170,22 +170,22 @@ __barray_mask_return.exit1268: ; preds = %__barray_check_boun br i1 %exitcond1325, label %cond_exit_189, label %__barray_check_bounds.exit1252 cond_exit_189: ; preds = %__barray_mask_return.exit1268 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) + %___lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure_leaked) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___inc_future_refcount(i64 %___lazy_measure_leaked) + %read_uint = tail call i64 @___read_future_uint(i64 %___lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) %43 = icmp eq i64 %read_uint, 2 br i1 %43, label %44, label %cond_exit_267 cond_exit_267: ; preds = %cond_exit_189 - %read_uint378 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + %read_uint378 = tail call i64 @___read_future_uint(i64 %___lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) %.not = icmp eq i64 %read_uint378, 2 br i1 %.not, label %cond_247_case_0, label %cond_247_case_1 44: ; preds = %cond_exit_189 - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) tail call void @print_int(ptr nonnull @res_head_leake.F4F32972.0, i64 20, i64 1) br label %__barray_check_bounds.exit1274.preheader @@ -246,7 +246,7 @@ panic.i1275: ; preds = %__barray_check_boun %58 = getelementptr inbounds nuw i64, ptr %4, i64 %"310_0.sroa.15.01330" %59 = load i64, ptr %58, align 4 %60 = add i64 %"310_2.01329", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %59) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %59) tail call void @___qfree(i64 %59) %61 = icmp ult i64 %"310_2.01329", 20 br i1 %61, label %__barray_check_bounds.exit1270, label %out_of_bounds.i1269 @@ -256,7 +256,7 @@ cond_exit_314: ; preds = %__barray_check_boun %63 = xor i64 %46, %62 store i64 %63, ptr %3, align 4 %64 = getelementptr inbounds nuw i64, ptr %2, i64 %"310_2.01329" - store i64 %lazy_measure, ptr %64, align 4 + store i64 %___lazy_measure, ptr %64, align 4 %65 = icmp samesign ugt i64 %"310_0.sroa.15.01330", 18 br i1 %65, label %mask_block_ok.i, label %__barray_check_bounds.exit1274 diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_within_tail-helios-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_within_tail-helios-aarch64-unknown-linux-gnu.ll index 0e8e9811..6028b59a 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_within_tail-helios-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_within_tail-helios-aarch64-unknown-linux-gnu.ll @@ -170,22 +170,22 @@ __barray_mask_return.exit1268: ; preds = %__barray_check_boun br i1 %exitcond1325, label %cond_exit_189, label %__barray_check_bounds.exit1252 cond_exit_189: ; preds = %__barray_mask_return.exit1268 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) + %___lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure_leaked) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___inc_future_refcount(i64 %___lazy_measure_leaked) + %read_uint = tail call i64 @___read_future_uint(i64 %___lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) %43 = icmp eq i64 %read_uint, 2 br i1 %43, label %44, label %cond_exit_267 cond_exit_267: ; preds = %cond_exit_189 - %read_uint378 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + %read_uint378 = tail call i64 @___read_future_uint(i64 %___lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) %.not = icmp eq i64 %read_uint378, 2 br i1 %.not, label %cond_247_case_0, label %cond_247_case_1 44: ; preds = %cond_exit_189 - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) tail call void @print_int(ptr nonnull @res_head_leake.F4F32972.0, i64 20, i64 1) br label %__barray_check_bounds.exit1274.preheader @@ -246,7 +246,7 @@ panic.i1275: ; preds = %__barray_check_boun %58 = getelementptr inbounds nuw i64, ptr %4, i64 %"310_0.sroa.15.01330" %59 = load i64, ptr %58, align 4 %60 = add i64 %"310_2.01329", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %59) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %59) tail call void @___qfree(i64 %59) %61 = icmp ult i64 %"310_2.01329", 20 br i1 %61, label %__barray_check_bounds.exit1270, label %out_of_bounds.i1269 @@ -256,7 +256,7 @@ cond_exit_314: ; preds = %__barray_check_boun %63 = xor i64 %46, %62 store i64 %63, ptr %3, align 4 %64 = getelementptr inbounds nuw i64, ptr %2, i64 %"310_2.01329" - store i64 %lazy_measure, ptr %64, align 4 + store i64 %___lazy_measure, ptr %64, align 4 %65 = icmp samesign ugt i64 %"310_0.sroa.15.01330", 18 br i1 %65, label %mask_block_ok.i, label %__barray_check_bounds.exit1274 diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_within_tail-helios-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_within_tail-helios-x86_64-apple-darwin.ll index 7ee2a97e..ad1d01e7 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_within_tail-helios-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_within_tail-helios-x86_64-apple-darwin.ll @@ -170,22 +170,22 @@ __barray_mask_return.exit1268: ; preds = %__barray_check_boun br i1 %exitcond1325, label %cond_exit_189, label %__barray_check_bounds.exit1252 cond_exit_189: ; preds = %__barray_mask_return.exit1268 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) + %___lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure_leaked) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___inc_future_refcount(i64 %___lazy_measure_leaked) + %read_uint = tail call i64 @___read_future_uint(i64 %___lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) %43 = icmp eq i64 %read_uint, 2 br i1 %43, label %44, label %cond_exit_267 cond_exit_267: ; preds = %cond_exit_189 - %read_uint378 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + %read_uint378 = tail call i64 @___read_future_uint(i64 %___lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) %.not = icmp eq i64 %read_uint378, 2 br i1 %.not, label %cond_247_case_0, label %cond_247_case_1 44: ; preds = %cond_exit_189 - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) tail call void @print_int(ptr nonnull @res_head_leake.F4F32972.0, i64 20, i64 1) br label %__barray_check_bounds.exit1274.preheader @@ -246,7 +246,7 @@ panic.i1275: ; preds = %__barray_check_boun %58 = getelementptr inbounds nuw i64, ptr %4, i64 %"310_0.sroa.15.01330" %59 = load i64, ptr %58, align 4 %60 = add i64 %"310_2.01329", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %59) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %59) tail call void @___qfree(i64 %59) %61 = icmp ult i64 %"310_2.01329", 20 br i1 %61, label %__barray_check_bounds.exit1270, label %out_of_bounds.i1269 @@ -256,7 +256,7 @@ cond_exit_314: ; preds = %__barray_check_boun %63 = xor i64 %46, %62 store i64 %63, ptr %3, align 4 %64 = getelementptr inbounds nuw i64, ptr %2, i64 %"310_2.01329" - store i64 %lazy_measure, ptr %64, align 4 + store i64 %___lazy_measure, ptr %64, align 4 %65 = icmp samesign ugt i64 %"310_0.sroa.15.01330", 18 br i1 %65, label %mask_block_ok.i, label %__barray_check_bounds.exit1274 diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_within_tail-helios-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_within_tail-helios-x86_64-unknown-linux-gnu.ll index 0a46f84e..b2aa6dea 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_within_tail-helios-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_within_tail-helios-x86_64-unknown-linux-gnu.ll @@ -170,22 +170,22 @@ __barray_mask_return.exit1268: ; preds = %__barray_check_boun br i1 %exitcond1325, label %cond_exit_189, label %__barray_check_bounds.exit1252 cond_exit_189: ; preds = %__barray_mask_return.exit1268 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) + %___lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure_leaked) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___inc_future_refcount(i64 %___lazy_measure_leaked) + %read_uint = tail call i64 @___read_future_uint(i64 %___lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) %43 = icmp eq i64 %read_uint, 2 br i1 %43, label %44, label %cond_exit_267 cond_exit_267: ; preds = %cond_exit_189 - %read_uint378 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + %read_uint378 = tail call i64 @___read_future_uint(i64 %___lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) %.not = icmp eq i64 %read_uint378, 2 br i1 %.not, label %cond_247_case_0, label %cond_247_case_1 44: ; preds = %cond_exit_189 - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) tail call void @print_int(ptr nonnull @res_head_leake.F4F32972.0, i64 20, i64 1) br label %__barray_check_bounds.exit1274.preheader @@ -246,7 +246,7 @@ panic.i1275: ; preds = %__barray_check_boun %58 = getelementptr inbounds nuw i64, ptr %4, i64 %"310_0.sroa.15.01330" %59 = load i64, ptr %58, align 4 %60 = add i64 %"310_2.01329", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %59) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %59) tail call void @___qfree(i64 %59) %61 = icmp ult i64 %"310_2.01329", 20 br i1 %61, label %__barray_check_bounds.exit1270, label %out_of_bounds.i1269 @@ -256,7 +256,7 @@ cond_exit_314: ; preds = %__barray_check_boun %63 = xor i64 %46, %62 store i64 %63, ptr %3, align 4 %64 = getelementptr inbounds nuw i64, ptr %2, i64 %"310_2.01329" - store i64 %lazy_measure, ptr %64, align 4 + store i64 %___lazy_measure, ptr %64, align 4 %65 = icmp samesign ugt i64 %"310_0.sroa.15.01330", 18 br i1 %65, label %mask_block_ok.i, label %__barray_check_bounds.exit1274 diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_within_tail-helios-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_within_tail-helios-x86_64-windows-gnu.ll index a191feea..763baa56 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_within_tail-helios-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_within_tail-helios-x86_64-windows-gnu.ll @@ -170,22 +170,22 @@ __barray_mask_return.exit1268: ; preds = %__barray_check_boun br i1 %exitcond1325, label %cond_exit_189, label %__barray_check_bounds.exit1252 cond_exit_189: ; preds = %__barray_mask_return.exit1268 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) + %___lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure_leaked) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___inc_future_refcount(i64 %___lazy_measure_leaked) + %read_uint = tail call i64 @___read_future_uint(i64 %___lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) %43 = icmp eq i64 %read_uint, 2 br i1 %43, label %44, label %cond_exit_267 cond_exit_267: ; preds = %cond_exit_189 - %read_uint378 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + %read_uint378 = tail call i64 @___read_future_uint(i64 %___lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) %.not = icmp eq i64 %read_uint378, 2 br i1 %.not, label %cond_247_case_0, label %cond_247_case_1 44: ; preds = %cond_exit_189 - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) tail call void @print_int(ptr nonnull @res_head_leake.F4F32972.0, i64 20, i64 1) br label %__barray_check_bounds.exit1274.preheader @@ -246,7 +246,7 @@ panic.i1275: ; preds = %__barray_check_boun %58 = getelementptr inbounds nuw i64, ptr %4, i64 %"310_0.sroa.15.01330" %59 = load i64, ptr %58, align 4 %60 = add i64 %"310_2.01329", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %59) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %59) tail call void @___qfree(i64 %59) %61 = icmp ult i64 %"310_2.01329", 20 br i1 %61, label %__barray_check_bounds.exit1270, label %out_of_bounds.i1269 @@ -256,7 +256,7 @@ cond_exit_314: ; preds = %__barray_check_boun %63 = xor i64 %46, %62 store i64 %63, ptr %3, align 4 %64 = getelementptr inbounds nuw i64, ptr %2, i64 %"310_2.01329" - store i64 %lazy_measure, ptr %64, align 4 + store i64 %___lazy_measure, ptr %64, align 4 %65 = icmp samesign ugt i64 %"310_0.sroa.15.01330", 18 br i1 %65, label %mask_block_ok.i, label %__barray_check_bounds.exit1274 diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_within_tail-sol-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_within_tail-sol-aarch64-apple-darwin.ll index 3fff3483..904f0004 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_within_tail-sol-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_within_tail-sol-aarch64-apple-darwin.ll @@ -40,20 +40,20 @@ __hugr__.__tk2_sol_qalloc.485.exit: ; preds = %alloca_block br label %cond_13_case_1 cond_13_case_1: ; preds = %__hugr__.__tk2_sol_qalloc.485.exit, %cond_exit_13 - %"9_2.01321" = phi i64 [ 0, %__hugr__.__tk2_sol_qalloc.485.exit ], [ %6, %cond_exit_13 ] - %6 = add nuw nsw i64 %"9_2.01321", 1 - %qalloc.i1244 = tail call i64 @___qalloc() - %not_max.not.not.i1245 = icmp eq i64 %qalloc.i1244, -1 - br i1 %not_max.not.not.i1245, label %cond_489_case_0.i1246, label %__barray_check_bounds.exit + %"9_2.01322" = phi i64 [ 0, %__hugr__.__tk2_sol_qalloc.485.exit ], [ %6, %cond_exit_13 ] + %6 = add nuw nsw i64 %"9_2.01322", 1 + %qalloc.i1245 = tail call i64 @___qalloc() + %not_max.not.not.i1246 = icmp eq i64 %qalloc.i1245, -1 + br i1 %not_max.not.not.i1246, label %cond_489_case_0.i1247, label %__barray_check_bounds.exit -cond_489_case_0.i1246: ; preds = %cond_13_case_1 +cond_489_case_0.i1247: ; preds = %cond_13_case_1 tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable __barray_check_bounds.exit: ; preds = %cond_13_case_1 - tail call void @___reset(i64 %qalloc.i1244) + tail call void @___reset(i64 %qalloc.i1245) %7 = load i64, ptr %5, align 4 - %8 = lshr i64 %7, %"9_2.01321" + %8 = lshr i64 %7, %"9_2.01322" %9 = trunc i64 %8 to i1 br i1 %9, label %cond_exit_13, label %panic.i @@ -62,20 +62,20 @@ panic.i: ; preds = %__barray_check_boun unreachable cond_exit_13: ; preds = %__barray_check_bounds.exit - %10 = shl nuw nsw i64 1, %"9_2.01321" + %10 = shl nuw nsw i64 1, %"9_2.01322" %11 = xor i64 %7, %10 store i64 %11, ptr %5, align 4 - %12 = getelementptr inbounds nuw i64, ptr %4, i64 %"9_2.01321" - store i64 %qalloc.i1244, ptr %12, align 4 + %12 = getelementptr inbounds nuw i64, ptr %4, i64 %"9_2.01322" + store i64 %qalloc.i1245, ptr %12, align 4 %exitcond = icmp eq i64 %6, 20 br i1 %exitcond, label %loop_out, label %cond_13_case_1 loop_out: ; preds = %cond_exit_13 %13 = load i64, ptr %5, align 4 %14 = trunc i64 %13 to i1 - br i1 %14, label %panic.i1248, label %__barray_mask_borrow.exit + br i1 %14, label %panic.i1249, label %__barray_mask_borrow.exit -panic.i1248: ; preds = %loop_out +panic.i1249: ; preds = %loop_out tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable @@ -90,46 +90,46 @@ __barray_mask_borrow.exit: ; preds = %loop_out tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18) %17 = load i64, ptr %5, align 4 %18 = trunc i64 %17 to i1 - br i1 %18, label %__barray_mask_return.exit1250, label %panic.i1249 + br i1 %18, label %__barray_mask_return.exit1251, label %panic.i1250 -panic.i1249: ; preds = %__barray_mask_borrow.exit +panic.i1250: ; preds = %__barray_mask_borrow.exit tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_mask_return.exit1250: ; preds = %__barray_mask_borrow.exit +__barray_mask_return.exit1251: ; preds = %__barray_mask_borrow.exit %19 = and i64 %17, -2 store i64 %19, ptr %5, align 4 store i64 %16, ptr %4, align 4 - br label %__barray_check_bounds.exit1252 + br label %__barray_check_bounds.exit1253 -__barray_check_bounds.exit1252: ; preds = %__barray_mask_return.exit1250, %__barray_mask_return.exit1268 - %20 = phi i64 [ 1, %__barray_mask_return.exit1250 ], [ %42, %__barray_mask_return.exit1268 ] - %"118_0.01322" = phi i64 [ 0, %__barray_mask_return.exit1250 ], [ %20, %__barray_mask_return.exit1268 ] +__barray_check_bounds.exit1253: ; preds = %__barray_mask_return.exit1251, %__barray_mask_return.exit1269 + %20 = phi i64 [ 1, %__barray_mask_return.exit1251 ], [ %42, %__barray_mask_return.exit1269 ] + %"118_0.01323" = phi i64 [ 0, %__barray_mask_return.exit1251 ], [ %20, %__barray_mask_return.exit1269 ] %21 = load i64, ptr %5, align 4 - %22 = lshr i64 %21, %"118_0.01322" + %22 = lshr i64 %21, %"118_0.01323" %23 = trunc i64 %22 to i1 - br i1 %23, label %panic.i1253, label %__barray_check_bounds.exit1256 + br i1 %23, label %panic.i1254, label %__barray_check_bounds.exit1257 -panic.i1253: ; preds = %__barray_check_bounds.exit1252 +panic.i1254: ; preds = %__barray_check_bounds.exit1253 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_check_bounds.exit1256: ; preds = %__barray_check_bounds.exit1252 - %24 = shl nuw nsw i64 1, %"118_0.01322" +__barray_check_bounds.exit1257: ; preds = %__barray_check_bounds.exit1253 + %24 = shl nuw nsw i64 1, %"118_0.01323" %25 = xor i64 %21, %24 store i64 %25, ptr %5, align 4 - %26 = getelementptr inbounds nuw i64, ptr %4, i64 %"118_0.01322" + %26 = getelementptr inbounds nuw i64, ptr %4, i64 %"118_0.01323" %27 = load i64, ptr %26, align 4 %28 = lshr i64 %25, %20 %29 = trunc i64 %28 to i1 - br i1 %29, label %panic.i1257, label %__barray_check_bounds.exit1262 + br i1 %29, label %panic.i1258, label %__barray_check_bounds.exit1263 -panic.i1257: ; preds = %__barray_check_bounds.exit1256 +panic.i1258: ; preds = %__barray_check_bounds.exit1257 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_check_bounds.exit1262: ; preds = %__barray_check_bounds.exit1256 - %30 = shl nuw nsw i64 2, %"118_0.01322" +__barray_check_bounds.exit1263: ; preds = %__barray_check_bounds.exit1257 + %30 = shl nuw nsw i64 2, %"118_0.01323" %31 = xor i64 %25, %30 store i64 %31, ptr %5, align 4 %32 = getelementptr inbounds nuw i64, ptr %4, i64 %20 @@ -140,78 +140,78 @@ __barray_check_bounds.exit1262: ; preds = %__barray_check_boun tail call void @___rp(i64 %27, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rz(i64 %27, double 0xBFF921FB54442D18) %34 = load i64, ptr %5, align 4 - %35 = lshr i64 %34, %"118_0.01322" + %35 = lshr i64 %34, %"118_0.01323" %36 = trunc i64 %35 to i1 - br i1 %36, label %__barray_check_bounds.exit1266, label %panic.i1263 + br i1 %36, label %__barray_check_bounds.exit1267, label %panic.i1264 -panic.i1263: ; preds = %__barray_check_bounds.exit1262 +panic.i1264: ; preds = %__barray_check_bounds.exit1263 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_check_bounds.exit1266: ; preds = %__barray_check_bounds.exit1262 +__barray_check_bounds.exit1267: ; preds = %__barray_check_bounds.exit1263 %37 = xor i64 %34, %24 store i64 %37, ptr %5, align 4 store i64 %27, ptr %26, align 4 %38 = load i64, ptr %5, align 4 %39 = lshr i64 %38, %20 %40 = trunc i64 %39 to i1 - br i1 %40, label %__barray_mask_return.exit1268, label %panic.i1267 + br i1 %40, label %__barray_mask_return.exit1269, label %panic.i1268 -panic.i1267: ; preds = %__barray_check_bounds.exit1266 +panic.i1268: ; preds = %__barray_check_bounds.exit1267 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_mask_return.exit1268: ; preds = %__barray_check_bounds.exit1266 +__barray_mask_return.exit1269: ; preds = %__barray_check_bounds.exit1267 %41 = xor i64 %38, %30 store i64 %41, ptr %5, align 4 store i64 %33, ptr %32, align 4 %42 = add nuw nsw i64 %20, 1 - %exitcond1325 = icmp eq i64 %42, 20 - br i1 %exitcond1325, label %cond_exit_189, label %__barray_check_bounds.exit1252 + %exitcond1326 = icmp eq i64 %42, 20 + br i1 %exitcond1326, label %cond_exit_189, label %__barray_check_bounds.exit1253 -cond_exit_189: ; preds = %__barray_mask_return.exit1268 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) +cond_exit_189: ; preds = %__barray_mask_return.exit1269 + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 1) tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure_leaked) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___inc_future_refcount(i64 %___future_measure) + %read_uint = tail call i64 @___read_future_uint(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) %43 = icmp eq i64 %read_uint, 2 br i1 %43, label %44, label %cond_exit_267 cond_exit_267: ; preds = %cond_exit_189 - %read_uint378 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + %read_uint378 = tail call i64 @___read_future_uint(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) %.not = icmp eq i64 %read_uint378, 2 br i1 %.not, label %cond_247_case_0, label %cond_247_case_1 44: ; preds = %cond_exit_189 - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_int(ptr nonnull @res_head_leake.F4F32972.0, i64 20, i64 1) - br label %__barray_check_bounds.exit1274.preheader + br label %__barray_check_bounds.exit1275.preheader -__barray_check_bounds.exit1274.preheader: ; preds = %cond_247_case_1, %44 - br label %__barray_check_bounds.exit1274 +__barray_check_bounds.exit1275.preheader: ; preds = %cond_247_case_1, %44 + br label %__barray_check_bounds.exit1275 cond_247_case_1: ; preds = %cond_exit_267 %45 = icmp eq i64 %read_uint378, 1 tail call void @print_bool(ptr nonnull @res_head.AFE8E005.0, i64 14, i1 %45) - br label %__barray_check_bounds.exit1274.preheader + br label %__barray_check_bounds.exit1275.preheader cond_247_case_0: ; preds = %cond_exit_267 tail call void @panic(i32 1001, ptr nonnull @e_Option.unw.32D4E82D.0) unreachable -out_of_bounds.i1269: ; preds = %.thread +out_of_bounds.i1270: ; preds = %.thread tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") unreachable -__barray_check_bounds.exit1270: ; preds = %.thread +__barray_check_bounds.exit1271: ; preds = %.thread %46 = load i64, ptr %3, align 4 - %47 = lshr i64 %46, %"310_2.01329" + %47 = lshr i64 %46, %"310_2.01330" %48 = trunc i64 %47 to i1 - br i1 %48, label %cond_exit_314, label %panic.i1271 + br i1 %48, label %cond_exit_314, label %panic.i1272 -panic.i1271: ; preds = %__barray_check_bounds.exit1270 +panic.i1272: ; preds = %__barray_check_bounds.exit1271 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable @@ -220,91 +220,91 @@ mask_block_ok.i: ; preds = %cond_exit_314 %50 = or i64 %49, -1048576 store i64 %50, ptr %5, align 4 %51 = icmp eq i64 %50, -1 - br i1 %51, label %loop_body538.preheader.preheader, label %mask_block_err.i + br i1 %51, label %loop_body539.preheader.preheader, label %mask_block_err.i mask_block_err.i: ; preds = %mask_block_ok.i tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_check_bounds.exit1274: ; preds = %__barray_check_bounds.exit1274.preheader, %cond_exit_314 - %"310_0.sroa.15.01330" = phi i64 [ %52, %cond_exit_314 ], [ 0, %__barray_check_bounds.exit1274.preheader ] - %"310_2.01329" = phi i64 [ %60, %cond_exit_314 ], [ 0, %__barray_check_bounds.exit1274.preheader ] - %52 = add nuw nsw i64 %"310_0.sroa.15.01330", 1 +__barray_check_bounds.exit1275: ; preds = %__barray_check_bounds.exit1275.preheader, %cond_exit_314 + %"310_0.sroa.15.01331" = phi i64 [ %52, %cond_exit_314 ], [ 0, %__barray_check_bounds.exit1275.preheader ] + %"310_2.01330" = phi i64 [ %60, %cond_exit_314 ], [ 0, %__barray_check_bounds.exit1275.preheader ] + %52 = add nuw nsw i64 %"310_0.sroa.15.01331", 1 %53 = load i64, ptr %5, align 4 - %54 = lshr i64 %53, %"310_0.sroa.15.01330" + %54 = lshr i64 %53, %"310_0.sroa.15.01331" %55 = trunc i64 %54 to i1 - br i1 %55, label %panic.i1275, label %.thread + br i1 %55, label %panic.i1276, label %.thread -panic.i1275: ; preds = %__barray_check_bounds.exit1274 +panic.i1276: ; preds = %__barray_check_bounds.exit1275 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -.thread: ; preds = %__barray_check_bounds.exit1274 - %56 = shl nuw nsw i64 1, %"310_0.sroa.15.01330" +.thread: ; preds = %__barray_check_bounds.exit1275 + %56 = shl nuw nsw i64 1, %"310_0.sroa.15.01331" %57 = xor i64 %53, %56 store i64 %57, ptr %5, align 4 - %58 = getelementptr inbounds nuw i64, ptr %4, i64 %"310_0.sroa.15.01330" + %58 = getelementptr inbounds nuw i64, ptr %4, i64 %"310_0.sroa.15.01331" %59 = load i64, ptr %58, align 4 - %60 = add i64 %"310_2.01329", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %59) + %60 = add i64 %"310_2.01330", 1 + %___future_measure513 = tail call i64 @___future_measure(i64 %59, i64 0) tail call void @___qfree(i64 %59) - %61 = icmp ult i64 %"310_2.01329", 20 - br i1 %61, label %__barray_check_bounds.exit1270, label %out_of_bounds.i1269 + %61 = icmp ult i64 %"310_2.01330", 20 + br i1 %61, label %__barray_check_bounds.exit1271, label %out_of_bounds.i1270 -cond_exit_314: ; preds = %__barray_check_bounds.exit1270 - %62 = shl nuw nsw i64 1, %"310_2.01329" +cond_exit_314: ; preds = %__barray_check_bounds.exit1271 + %62 = shl nuw nsw i64 1, %"310_2.01330" %63 = xor i64 %46, %62 store i64 %63, ptr %3, align 4 - %64 = getelementptr inbounds nuw i64, ptr %2, i64 %"310_2.01329" - store i64 %lazy_measure, ptr %64, align 4 - %65 = icmp samesign ugt i64 %"310_0.sroa.15.01330", 18 - br i1 %65, label %mask_block_ok.i, label %__barray_check_bounds.exit1274 + %64 = getelementptr inbounds nuw i64, ptr %2, i64 %"310_2.01330" + store i64 %___future_measure513, ptr %64, align 4 + %65 = icmp samesign ugt i64 %"310_0.sroa.15.01331", 18 + br i1 %65, label %mask_block_ok.i, label %__barray_check_bounds.exit1275 -loop_body538.preheader.preheader: ; preds = %mask_block_ok.i +loop_body539.preheader.preheader: ; preds = %mask_block_ok.i tail call void @heap_free(ptr nonnull %4) tail call void @heap_free(ptr nonnull %5) - br label %__barray_check_bounds.exit1278 + br label %__barray_check_bounds.exit1279 -__barray_check_bounds.exit1278: ; preds = %cond_exit_380, %loop_body538.preheader.preheader - %"376_0.sroa.15.01324" = phi i64 [ %66, %cond_exit_380 ], [ 0, %loop_body538.preheader.preheader ] - %66 = add nuw nsw i64 %"376_0.sroa.15.01324", 1 +__barray_check_bounds.exit1279: ; preds = %cond_exit_380, %loop_body539.preheader.preheader + %"376_0.sroa.15.01325" = phi i64 [ %66, %cond_exit_380 ], [ 0, %loop_body539.preheader.preheader ] + %66 = add nuw nsw i64 %"376_0.sroa.15.01325", 1 %67 = load i64, ptr %3, align 4 - %68 = lshr i64 %67, %"376_0.sroa.15.01324" + %68 = lshr i64 %67, %"376_0.sroa.15.01325" %69 = trunc i64 %68 to i1 - br i1 %69, label %panic.i1279, label %__barray_check_bounds.exit1282 + br i1 %69, label %panic.i1280, label %__barray_check_bounds.exit1283 -panic.i1279: ; preds = %__barray_check_bounds.exit1278 +panic.i1280: ; preds = %__barray_check_bounds.exit1279 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_check_bounds.exit1282: ; preds = %__barray_check_bounds.exit1278 - %70 = shl nuw nsw i64 1, %"376_0.sroa.15.01324" +__barray_check_bounds.exit1283: ; preds = %__barray_check_bounds.exit1279 + %70 = shl nuw nsw i64 1, %"376_0.sroa.15.01325" %71 = xor i64 %67, %70 store i64 %71, ptr %3, align 4 - %72 = getelementptr inbounds nuw i64, ptr %2, i64 %"376_0.sroa.15.01324" + %72 = getelementptr inbounds nuw i64, ptr %2, i64 %"376_0.sroa.15.01325" %73 = load i64, ptr %72, align 4 tail call void @___inc_future_refcount(i64 %73) %74 = load i64, ptr %3, align 4 - %75 = lshr i64 %74, %"376_0.sroa.15.01324" + %75 = lshr i64 %74, %"376_0.sroa.15.01325" %76 = trunc i64 %75 to i1 - br i1 %76, label %__barray_check_bounds.exit1286, label %panic.i1283 + br i1 %76, label %__barray_check_bounds.exit1287, label %panic.i1284 -panic.i1283: ; preds = %__barray_check_bounds.exit1282 +panic.i1284: ; preds = %__barray_check_bounds.exit1283 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_check_bounds.exit1286: ; preds = %__barray_check_bounds.exit1282 +__barray_check_bounds.exit1287: ; preds = %__barray_check_bounds.exit1283 %77 = xor i64 %74, %70 store i64 %77, ptr %3, align 4 store i64 %73, ptr %72, align 4 %read_bool = tail call i1 @___read_future_bool(i64 %73) tail call void @___dec_future_refcount(i64 %73) %78 = load i64, ptr %1, align 4 - %79 = lshr i64 %78, %"376_0.sroa.15.01324" + %79 = lshr i64 %78, %"376_0.sroa.15.01325" %80 = trunc i64 %79 to i1 - br i1 %80, label %cond_exit_380, label %panic.i1287 + br i1 %80, label %cond_exit_380, label %panic.i1288 -panic.i1287: ; preds = %__barray_check_bounds.exit1286 +panic.i1288: ; preds = %__barray_check_bounds.exit1287 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable @@ -313,55 +313,55 @@ cond_565_case_0: ; preds = %cond_exit_565 %82 = or i64 %81, -1048576 store i64 %82, ptr %3, align 4 %83 = icmp eq i64 %82, -1 - br i1 %83, label %loop_out537, label %mask_block_err.i1292 + br i1 %83, label %loop_out538, label %mask_block_err.i1293 -mask_block_err.i1292: ; preds = %cond_565_case_0 +mask_block_err.i1293: ; preds = %cond_565_case_0 tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_check_bounds.exit1296: ; preds = %cond_exit_380, %cond_exit_565 - %"562_0.01331" = phi i64 [ %84, %cond_exit_565 ], [ 0, %cond_exit_380 ] - %84 = add nuw nsw i64 %"562_0.01331", 1 +__barray_check_bounds.exit1297: ; preds = %cond_exit_380, %cond_exit_565 + %"562_0.01332" = phi i64 [ %84, %cond_exit_565 ], [ 0, %cond_exit_380 ] + %84 = add nuw nsw i64 %"562_0.01332", 1 %85 = load i64, ptr %3, align 4 - %86 = lshr i64 %85, %"562_0.01331" + %86 = lshr i64 %85, %"562_0.01332" %87 = trunc i64 %86 to i1 - br i1 %87, label %cond_exit_565, label %__barray_mask_borrow.exit1300 + br i1 %87, label %cond_exit_565, label %__barray_mask_borrow.exit1301 -__barray_mask_borrow.exit1300: ; preds = %__barray_check_bounds.exit1296 - %88 = shl nuw nsw i64 1, %"562_0.01331" +__barray_mask_borrow.exit1301: ; preds = %__barray_check_bounds.exit1297 + %88 = shl nuw nsw i64 1, %"562_0.01332" %89 = xor i64 %85, %88 store i64 %89, ptr %3, align 4 - %90 = getelementptr inbounds nuw i64, ptr %2, i64 %"562_0.01331" + %90 = getelementptr inbounds nuw i64, ptr %2, i64 %"562_0.01332" %91 = load i64, ptr %90, align 4 tail call void @___dec_future_refcount(i64 %91) br label %cond_exit_565 -cond_exit_565: ; preds = %__barray_mask_borrow.exit1300, %__barray_check_bounds.exit1296 - %92 = icmp samesign ugt i64 %"562_0.01331", 18 - br i1 %92, label %cond_565_case_0, label %__barray_check_bounds.exit1296 +cond_exit_565: ; preds = %__barray_mask_borrow.exit1301, %__barray_check_bounds.exit1297 + %92 = icmp samesign ugt i64 %"562_0.01332", 18 + br i1 %92, label %cond_565_case_0, label %__barray_check_bounds.exit1297 -cond_exit_380: ; preds = %__barray_check_bounds.exit1286 +cond_exit_380: ; preds = %__barray_check_bounds.exit1287 %93 = xor i64 %78, %70 store i64 %93, ptr %1, align 4 - %94 = getelementptr inbounds nuw i1, ptr %0, i64 %"376_0.sroa.15.01324" + %94 = getelementptr inbounds nuw i1, ptr %0, i64 %"376_0.sroa.15.01325" store i1 %read_bool, ptr %94, align 1 - %95 = icmp eq i64 %"376_0.sroa.15.01324", 19 - br i1 %95, label %__barray_check_bounds.exit1296, label %__barray_check_bounds.exit1278 + %95 = icmp eq i64 %"376_0.sroa.15.01325", 19 + br i1 %95, label %__barray_check_bounds.exit1297, label %__barray_check_bounds.exit1279 -loop_out537: ; preds = %cond_565_case_0 +loop_out538: ; preds = %cond_565_case_0 tail call void @heap_free(ptr %2) tail call void @heap_free(ptr nonnull %3) %96 = load i64, ptr %1, align 4 %97 = and i64 %96, 1048575 store i64 %97, ptr %1, align 4 %98 = icmp eq i64 %97, 0 - br i1 %98, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1301 + br i1 %98, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1302 -mask_block_err.i1301: ; preds = %loop_out537 +mask_block_err.i1302: ; preds = %loop_out538 tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") unreachable -__barray_check_none_borrowed.exit: ; preds = %loop_out537 +__barray_check_none_borrowed.exit: ; preds = %loop_out538 %99 = tail call ptr @heap_alloc(i64 20) %100 = tail call ptr @heap_alloc(i64 8) store i64 0, ptr %100, align 1 @@ -371,13 +371,13 @@ __barray_check_none_borrowed.exit: ; preds = %loop_out537 %102 = and i64 %101, 1048575 store i64 %102, ptr %1, align 4 %103 = icmp eq i64 %102, 0 - br i1 %103, label %__barray_check_none_borrowed.exit1305, label %mask_block_err.i1303 + br i1 %103, label %__barray_check_none_borrowed.exit1306, label %mask_block_err.i1304 -mask_block_err.i1303: ; preds = %__barray_check_none_borrowed.exit +mask_block_err.i1304: ; preds = %__barray_check_none_borrowed.exit tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") unreachable -__barray_check_none_borrowed.exit1305: ; preds = %__barray_check_none_borrowed.exit +__barray_check_none_borrowed.exit1306: ; preds = %__barray_check_none_borrowed.exit %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 %y_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 4 %arr_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 8 @@ -400,7 +400,7 @@ declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immar ; Function Attrs: noreturn declare void @panic(i32, ptr) local_unnamed_addr #1 -declare i64 @___lazy_measure_leaked(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -416,8 +416,6 @@ declare void @print_bool(ptr, i64, i1) local_unnamed_addr declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr - declare i1 @___read_future_bool(i64) local_unnamed_addr ; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_within_tail-sol-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_within_tail-sol-aarch64-unknown-linux-gnu.ll index 6b0817c5..28b6d90d 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_within_tail-sol-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_within_tail-sol-aarch64-unknown-linux-gnu.ll @@ -40,20 +40,20 @@ __hugr__.__tk2_sol_qalloc.485.exit: ; preds = %alloca_block br label %cond_13_case_1 cond_13_case_1: ; preds = %__hugr__.__tk2_sol_qalloc.485.exit, %cond_exit_13 - %"9_2.01321" = phi i64 [ 0, %__hugr__.__tk2_sol_qalloc.485.exit ], [ %6, %cond_exit_13 ] - %6 = add nuw nsw i64 %"9_2.01321", 1 - %qalloc.i1244 = tail call i64 @___qalloc() - %not_max.not.not.i1245 = icmp eq i64 %qalloc.i1244, -1 - br i1 %not_max.not.not.i1245, label %cond_489_case_0.i1246, label %__barray_check_bounds.exit + %"9_2.01322" = phi i64 [ 0, %__hugr__.__tk2_sol_qalloc.485.exit ], [ %6, %cond_exit_13 ] + %6 = add nuw nsw i64 %"9_2.01322", 1 + %qalloc.i1245 = tail call i64 @___qalloc() + %not_max.not.not.i1246 = icmp eq i64 %qalloc.i1245, -1 + br i1 %not_max.not.not.i1246, label %cond_489_case_0.i1247, label %__barray_check_bounds.exit -cond_489_case_0.i1246: ; preds = %cond_13_case_1 +cond_489_case_0.i1247: ; preds = %cond_13_case_1 tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable __barray_check_bounds.exit: ; preds = %cond_13_case_1 - tail call void @___reset(i64 %qalloc.i1244) + tail call void @___reset(i64 %qalloc.i1245) %7 = load i64, ptr %5, align 4 - %8 = lshr i64 %7, %"9_2.01321" + %8 = lshr i64 %7, %"9_2.01322" %9 = trunc i64 %8 to i1 br i1 %9, label %cond_exit_13, label %panic.i @@ -62,20 +62,20 @@ panic.i: ; preds = %__barray_check_boun unreachable cond_exit_13: ; preds = %__barray_check_bounds.exit - %10 = shl nuw nsw i64 1, %"9_2.01321" + %10 = shl nuw nsw i64 1, %"9_2.01322" %11 = xor i64 %7, %10 store i64 %11, ptr %5, align 4 - %12 = getelementptr inbounds nuw i64, ptr %4, i64 %"9_2.01321" - store i64 %qalloc.i1244, ptr %12, align 4 + %12 = getelementptr inbounds nuw i64, ptr %4, i64 %"9_2.01322" + store i64 %qalloc.i1245, ptr %12, align 4 %exitcond = icmp eq i64 %6, 20 br i1 %exitcond, label %loop_out, label %cond_13_case_1 loop_out: ; preds = %cond_exit_13 %13 = load i64, ptr %5, align 4 %14 = trunc i64 %13 to i1 - br i1 %14, label %panic.i1248, label %__barray_mask_borrow.exit + br i1 %14, label %panic.i1249, label %__barray_mask_borrow.exit -panic.i1248: ; preds = %loop_out +panic.i1249: ; preds = %loop_out tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable @@ -90,46 +90,46 @@ __barray_mask_borrow.exit: ; preds = %loop_out tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18) %17 = load i64, ptr %5, align 4 %18 = trunc i64 %17 to i1 - br i1 %18, label %__barray_mask_return.exit1250, label %panic.i1249 + br i1 %18, label %__barray_mask_return.exit1251, label %panic.i1250 -panic.i1249: ; preds = %__barray_mask_borrow.exit +panic.i1250: ; preds = %__barray_mask_borrow.exit tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_mask_return.exit1250: ; preds = %__barray_mask_borrow.exit +__barray_mask_return.exit1251: ; preds = %__barray_mask_borrow.exit %19 = and i64 %17, -2 store i64 %19, ptr %5, align 4 store i64 %16, ptr %4, align 4 - br label %__barray_check_bounds.exit1252 + br label %__barray_check_bounds.exit1253 -__barray_check_bounds.exit1252: ; preds = %__barray_mask_return.exit1250, %__barray_mask_return.exit1268 - %20 = phi i64 [ 1, %__barray_mask_return.exit1250 ], [ %42, %__barray_mask_return.exit1268 ] - %"118_0.01322" = phi i64 [ 0, %__barray_mask_return.exit1250 ], [ %20, %__barray_mask_return.exit1268 ] +__barray_check_bounds.exit1253: ; preds = %__barray_mask_return.exit1251, %__barray_mask_return.exit1269 + %20 = phi i64 [ 1, %__barray_mask_return.exit1251 ], [ %42, %__barray_mask_return.exit1269 ] + %"118_0.01323" = phi i64 [ 0, %__barray_mask_return.exit1251 ], [ %20, %__barray_mask_return.exit1269 ] %21 = load i64, ptr %5, align 4 - %22 = lshr i64 %21, %"118_0.01322" + %22 = lshr i64 %21, %"118_0.01323" %23 = trunc i64 %22 to i1 - br i1 %23, label %panic.i1253, label %__barray_check_bounds.exit1256 + br i1 %23, label %panic.i1254, label %__barray_check_bounds.exit1257 -panic.i1253: ; preds = %__barray_check_bounds.exit1252 +panic.i1254: ; preds = %__barray_check_bounds.exit1253 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_check_bounds.exit1256: ; preds = %__barray_check_bounds.exit1252 - %24 = shl nuw nsw i64 1, %"118_0.01322" +__barray_check_bounds.exit1257: ; preds = %__barray_check_bounds.exit1253 + %24 = shl nuw nsw i64 1, %"118_0.01323" %25 = xor i64 %21, %24 store i64 %25, ptr %5, align 4 - %26 = getelementptr inbounds nuw i64, ptr %4, i64 %"118_0.01322" + %26 = getelementptr inbounds nuw i64, ptr %4, i64 %"118_0.01323" %27 = load i64, ptr %26, align 4 %28 = lshr i64 %25, %20 %29 = trunc i64 %28 to i1 - br i1 %29, label %panic.i1257, label %__barray_check_bounds.exit1262 + br i1 %29, label %panic.i1258, label %__barray_check_bounds.exit1263 -panic.i1257: ; preds = %__barray_check_bounds.exit1256 +panic.i1258: ; preds = %__barray_check_bounds.exit1257 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_check_bounds.exit1262: ; preds = %__barray_check_bounds.exit1256 - %30 = shl nuw nsw i64 2, %"118_0.01322" +__barray_check_bounds.exit1263: ; preds = %__barray_check_bounds.exit1257 + %30 = shl nuw nsw i64 2, %"118_0.01323" %31 = xor i64 %25, %30 store i64 %31, ptr %5, align 4 %32 = getelementptr inbounds nuw i64, ptr %4, i64 %20 @@ -140,78 +140,78 @@ __barray_check_bounds.exit1262: ; preds = %__barray_check_boun tail call void @___rp(i64 %27, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rz(i64 %27, double 0xBFF921FB54442D18) %34 = load i64, ptr %5, align 4 - %35 = lshr i64 %34, %"118_0.01322" + %35 = lshr i64 %34, %"118_0.01323" %36 = trunc i64 %35 to i1 - br i1 %36, label %__barray_check_bounds.exit1266, label %panic.i1263 + br i1 %36, label %__barray_check_bounds.exit1267, label %panic.i1264 -panic.i1263: ; preds = %__barray_check_bounds.exit1262 +panic.i1264: ; preds = %__barray_check_bounds.exit1263 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_check_bounds.exit1266: ; preds = %__barray_check_bounds.exit1262 +__barray_check_bounds.exit1267: ; preds = %__barray_check_bounds.exit1263 %37 = xor i64 %34, %24 store i64 %37, ptr %5, align 4 store i64 %27, ptr %26, align 4 %38 = load i64, ptr %5, align 4 %39 = lshr i64 %38, %20 %40 = trunc i64 %39 to i1 - br i1 %40, label %__barray_mask_return.exit1268, label %panic.i1267 + br i1 %40, label %__barray_mask_return.exit1269, label %panic.i1268 -panic.i1267: ; preds = %__barray_check_bounds.exit1266 +panic.i1268: ; preds = %__barray_check_bounds.exit1267 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_mask_return.exit1268: ; preds = %__barray_check_bounds.exit1266 +__barray_mask_return.exit1269: ; preds = %__barray_check_bounds.exit1267 %41 = xor i64 %38, %30 store i64 %41, ptr %5, align 4 store i64 %33, ptr %32, align 4 %42 = add nuw nsw i64 %20, 1 - %exitcond1325 = icmp eq i64 %42, 20 - br i1 %exitcond1325, label %cond_exit_189, label %__barray_check_bounds.exit1252 + %exitcond1326 = icmp eq i64 %42, 20 + br i1 %exitcond1326, label %cond_exit_189, label %__barray_check_bounds.exit1253 -cond_exit_189: ; preds = %__barray_mask_return.exit1268 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) +cond_exit_189: ; preds = %__barray_mask_return.exit1269 + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 1) tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure_leaked) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___inc_future_refcount(i64 %___future_measure) + %read_uint = tail call i64 @___read_future_uint(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) %43 = icmp eq i64 %read_uint, 2 br i1 %43, label %44, label %cond_exit_267 cond_exit_267: ; preds = %cond_exit_189 - %read_uint378 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + %read_uint378 = tail call i64 @___read_future_uint(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) %.not = icmp eq i64 %read_uint378, 2 br i1 %.not, label %cond_247_case_0, label %cond_247_case_1 44: ; preds = %cond_exit_189 - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_int(ptr nonnull @res_head_leake.F4F32972.0, i64 20, i64 1) - br label %__barray_check_bounds.exit1274.preheader + br label %__barray_check_bounds.exit1275.preheader -__barray_check_bounds.exit1274.preheader: ; preds = %cond_247_case_1, %44 - br label %__barray_check_bounds.exit1274 +__barray_check_bounds.exit1275.preheader: ; preds = %cond_247_case_1, %44 + br label %__barray_check_bounds.exit1275 cond_247_case_1: ; preds = %cond_exit_267 %45 = icmp eq i64 %read_uint378, 1 tail call void @print_bool(ptr nonnull @res_head.AFE8E005.0, i64 14, i1 %45) - br label %__barray_check_bounds.exit1274.preheader + br label %__barray_check_bounds.exit1275.preheader cond_247_case_0: ; preds = %cond_exit_267 tail call void @panic(i32 1001, ptr nonnull @e_Option.unw.32D4E82D.0) unreachable -out_of_bounds.i1269: ; preds = %.thread +out_of_bounds.i1270: ; preds = %.thread tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") unreachable -__barray_check_bounds.exit1270: ; preds = %.thread +__barray_check_bounds.exit1271: ; preds = %.thread %46 = load i64, ptr %3, align 4 - %47 = lshr i64 %46, %"310_2.01329" + %47 = lshr i64 %46, %"310_2.01330" %48 = trunc i64 %47 to i1 - br i1 %48, label %cond_exit_314, label %panic.i1271 + br i1 %48, label %cond_exit_314, label %panic.i1272 -panic.i1271: ; preds = %__barray_check_bounds.exit1270 +panic.i1272: ; preds = %__barray_check_bounds.exit1271 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable @@ -220,91 +220,91 @@ mask_block_ok.i: ; preds = %cond_exit_314 %50 = or i64 %49, -1048576 store i64 %50, ptr %5, align 4 %51 = icmp eq i64 %50, -1 - br i1 %51, label %loop_body538.preheader.preheader, label %mask_block_err.i + br i1 %51, label %loop_body539.preheader.preheader, label %mask_block_err.i mask_block_err.i: ; preds = %mask_block_ok.i tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_check_bounds.exit1274: ; preds = %__barray_check_bounds.exit1274.preheader, %cond_exit_314 - %"310_0.sroa.15.01330" = phi i64 [ %52, %cond_exit_314 ], [ 0, %__barray_check_bounds.exit1274.preheader ] - %"310_2.01329" = phi i64 [ %60, %cond_exit_314 ], [ 0, %__barray_check_bounds.exit1274.preheader ] - %52 = add nuw nsw i64 %"310_0.sroa.15.01330", 1 +__barray_check_bounds.exit1275: ; preds = %__barray_check_bounds.exit1275.preheader, %cond_exit_314 + %"310_0.sroa.15.01331" = phi i64 [ %52, %cond_exit_314 ], [ 0, %__barray_check_bounds.exit1275.preheader ] + %"310_2.01330" = phi i64 [ %60, %cond_exit_314 ], [ 0, %__barray_check_bounds.exit1275.preheader ] + %52 = add nuw nsw i64 %"310_0.sroa.15.01331", 1 %53 = load i64, ptr %5, align 4 - %54 = lshr i64 %53, %"310_0.sroa.15.01330" + %54 = lshr i64 %53, %"310_0.sroa.15.01331" %55 = trunc i64 %54 to i1 - br i1 %55, label %panic.i1275, label %.thread + br i1 %55, label %panic.i1276, label %.thread -panic.i1275: ; preds = %__barray_check_bounds.exit1274 +panic.i1276: ; preds = %__barray_check_bounds.exit1275 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -.thread: ; preds = %__barray_check_bounds.exit1274 - %56 = shl nuw nsw i64 1, %"310_0.sroa.15.01330" +.thread: ; preds = %__barray_check_bounds.exit1275 + %56 = shl nuw nsw i64 1, %"310_0.sroa.15.01331" %57 = xor i64 %53, %56 store i64 %57, ptr %5, align 4 - %58 = getelementptr inbounds nuw i64, ptr %4, i64 %"310_0.sroa.15.01330" + %58 = getelementptr inbounds nuw i64, ptr %4, i64 %"310_0.sroa.15.01331" %59 = load i64, ptr %58, align 4 - %60 = add i64 %"310_2.01329", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %59) + %60 = add i64 %"310_2.01330", 1 + %___future_measure513 = tail call i64 @___future_measure(i64 %59, i64 0) tail call void @___qfree(i64 %59) - %61 = icmp ult i64 %"310_2.01329", 20 - br i1 %61, label %__barray_check_bounds.exit1270, label %out_of_bounds.i1269 + %61 = icmp ult i64 %"310_2.01330", 20 + br i1 %61, label %__barray_check_bounds.exit1271, label %out_of_bounds.i1270 -cond_exit_314: ; preds = %__barray_check_bounds.exit1270 - %62 = shl nuw nsw i64 1, %"310_2.01329" +cond_exit_314: ; preds = %__barray_check_bounds.exit1271 + %62 = shl nuw nsw i64 1, %"310_2.01330" %63 = xor i64 %46, %62 store i64 %63, ptr %3, align 4 - %64 = getelementptr inbounds nuw i64, ptr %2, i64 %"310_2.01329" - store i64 %lazy_measure, ptr %64, align 4 - %65 = icmp samesign ugt i64 %"310_0.sroa.15.01330", 18 - br i1 %65, label %mask_block_ok.i, label %__barray_check_bounds.exit1274 + %64 = getelementptr inbounds nuw i64, ptr %2, i64 %"310_2.01330" + store i64 %___future_measure513, ptr %64, align 4 + %65 = icmp samesign ugt i64 %"310_0.sroa.15.01331", 18 + br i1 %65, label %mask_block_ok.i, label %__barray_check_bounds.exit1275 -loop_body538.preheader.preheader: ; preds = %mask_block_ok.i +loop_body539.preheader.preheader: ; preds = %mask_block_ok.i tail call void @heap_free(ptr nonnull %4) tail call void @heap_free(ptr nonnull %5) - br label %__barray_check_bounds.exit1278 + br label %__barray_check_bounds.exit1279 -__barray_check_bounds.exit1278: ; preds = %cond_exit_380, %loop_body538.preheader.preheader - %"376_0.sroa.15.01324" = phi i64 [ %66, %cond_exit_380 ], [ 0, %loop_body538.preheader.preheader ] - %66 = add nuw nsw i64 %"376_0.sroa.15.01324", 1 +__barray_check_bounds.exit1279: ; preds = %cond_exit_380, %loop_body539.preheader.preheader + %"376_0.sroa.15.01325" = phi i64 [ %66, %cond_exit_380 ], [ 0, %loop_body539.preheader.preheader ] + %66 = add nuw nsw i64 %"376_0.sroa.15.01325", 1 %67 = load i64, ptr %3, align 4 - %68 = lshr i64 %67, %"376_0.sroa.15.01324" + %68 = lshr i64 %67, %"376_0.sroa.15.01325" %69 = trunc i64 %68 to i1 - br i1 %69, label %panic.i1279, label %__barray_check_bounds.exit1282 + br i1 %69, label %panic.i1280, label %__barray_check_bounds.exit1283 -panic.i1279: ; preds = %__barray_check_bounds.exit1278 +panic.i1280: ; preds = %__barray_check_bounds.exit1279 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_check_bounds.exit1282: ; preds = %__barray_check_bounds.exit1278 - %70 = shl nuw nsw i64 1, %"376_0.sroa.15.01324" +__barray_check_bounds.exit1283: ; preds = %__barray_check_bounds.exit1279 + %70 = shl nuw nsw i64 1, %"376_0.sroa.15.01325" %71 = xor i64 %67, %70 store i64 %71, ptr %3, align 4 - %72 = getelementptr inbounds nuw i64, ptr %2, i64 %"376_0.sroa.15.01324" + %72 = getelementptr inbounds nuw i64, ptr %2, i64 %"376_0.sroa.15.01325" %73 = load i64, ptr %72, align 4 tail call void @___inc_future_refcount(i64 %73) %74 = load i64, ptr %3, align 4 - %75 = lshr i64 %74, %"376_0.sroa.15.01324" + %75 = lshr i64 %74, %"376_0.sroa.15.01325" %76 = trunc i64 %75 to i1 - br i1 %76, label %__barray_check_bounds.exit1286, label %panic.i1283 + br i1 %76, label %__barray_check_bounds.exit1287, label %panic.i1284 -panic.i1283: ; preds = %__barray_check_bounds.exit1282 +panic.i1284: ; preds = %__barray_check_bounds.exit1283 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_check_bounds.exit1286: ; preds = %__barray_check_bounds.exit1282 +__barray_check_bounds.exit1287: ; preds = %__barray_check_bounds.exit1283 %77 = xor i64 %74, %70 store i64 %77, ptr %3, align 4 store i64 %73, ptr %72, align 4 %read_bool = tail call i1 @___read_future_bool(i64 %73) tail call void @___dec_future_refcount(i64 %73) %78 = load i64, ptr %1, align 4 - %79 = lshr i64 %78, %"376_0.sroa.15.01324" + %79 = lshr i64 %78, %"376_0.sroa.15.01325" %80 = trunc i64 %79 to i1 - br i1 %80, label %cond_exit_380, label %panic.i1287 + br i1 %80, label %cond_exit_380, label %panic.i1288 -panic.i1287: ; preds = %__barray_check_bounds.exit1286 +panic.i1288: ; preds = %__barray_check_bounds.exit1287 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable @@ -313,55 +313,55 @@ cond_565_case_0: ; preds = %cond_exit_565 %82 = or i64 %81, -1048576 store i64 %82, ptr %3, align 4 %83 = icmp eq i64 %82, -1 - br i1 %83, label %loop_out537, label %mask_block_err.i1292 + br i1 %83, label %loop_out538, label %mask_block_err.i1293 -mask_block_err.i1292: ; preds = %cond_565_case_0 +mask_block_err.i1293: ; preds = %cond_565_case_0 tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_check_bounds.exit1296: ; preds = %cond_exit_380, %cond_exit_565 - %"562_0.01331" = phi i64 [ %84, %cond_exit_565 ], [ 0, %cond_exit_380 ] - %84 = add nuw nsw i64 %"562_0.01331", 1 +__barray_check_bounds.exit1297: ; preds = %cond_exit_380, %cond_exit_565 + %"562_0.01332" = phi i64 [ %84, %cond_exit_565 ], [ 0, %cond_exit_380 ] + %84 = add nuw nsw i64 %"562_0.01332", 1 %85 = load i64, ptr %3, align 4 - %86 = lshr i64 %85, %"562_0.01331" + %86 = lshr i64 %85, %"562_0.01332" %87 = trunc i64 %86 to i1 - br i1 %87, label %cond_exit_565, label %__barray_mask_borrow.exit1300 + br i1 %87, label %cond_exit_565, label %__barray_mask_borrow.exit1301 -__barray_mask_borrow.exit1300: ; preds = %__barray_check_bounds.exit1296 - %88 = shl nuw nsw i64 1, %"562_0.01331" +__barray_mask_borrow.exit1301: ; preds = %__barray_check_bounds.exit1297 + %88 = shl nuw nsw i64 1, %"562_0.01332" %89 = xor i64 %85, %88 store i64 %89, ptr %3, align 4 - %90 = getelementptr inbounds nuw i64, ptr %2, i64 %"562_0.01331" + %90 = getelementptr inbounds nuw i64, ptr %2, i64 %"562_0.01332" %91 = load i64, ptr %90, align 4 tail call void @___dec_future_refcount(i64 %91) br label %cond_exit_565 -cond_exit_565: ; preds = %__barray_mask_borrow.exit1300, %__barray_check_bounds.exit1296 - %92 = icmp samesign ugt i64 %"562_0.01331", 18 - br i1 %92, label %cond_565_case_0, label %__barray_check_bounds.exit1296 +cond_exit_565: ; preds = %__barray_mask_borrow.exit1301, %__barray_check_bounds.exit1297 + %92 = icmp samesign ugt i64 %"562_0.01332", 18 + br i1 %92, label %cond_565_case_0, label %__barray_check_bounds.exit1297 -cond_exit_380: ; preds = %__barray_check_bounds.exit1286 +cond_exit_380: ; preds = %__barray_check_bounds.exit1287 %93 = xor i64 %78, %70 store i64 %93, ptr %1, align 4 - %94 = getelementptr inbounds nuw i1, ptr %0, i64 %"376_0.sroa.15.01324" + %94 = getelementptr inbounds nuw i1, ptr %0, i64 %"376_0.sroa.15.01325" store i1 %read_bool, ptr %94, align 1 - %95 = icmp eq i64 %"376_0.sroa.15.01324", 19 - br i1 %95, label %__barray_check_bounds.exit1296, label %__barray_check_bounds.exit1278 + %95 = icmp eq i64 %"376_0.sroa.15.01325", 19 + br i1 %95, label %__barray_check_bounds.exit1297, label %__barray_check_bounds.exit1279 -loop_out537: ; preds = %cond_565_case_0 +loop_out538: ; preds = %cond_565_case_0 tail call void @heap_free(ptr %2) tail call void @heap_free(ptr nonnull %3) %96 = load i64, ptr %1, align 4 %97 = and i64 %96, 1048575 store i64 %97, ptr %1, align 4 %98 = icmp eq i64 %97, 0 - br i1 %98, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1301 + br i1 %98, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1302 -mask_block_err.i1301: ; preds = %loop_out537 +mask_block_err.i1302: ; preds = %loop_out538 tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") unreachable -__barray_check_none_borrowed.exit: ; preds = %loop_out537 +__barray_check_none_borrowed.exit: ; preds = %loop_out538 %99 = tail call ptr @heap_alloc(i64 20) %100 = tail call ptr @heap_alloc(i64 8) store i64 0, ptr %100, align 1 @@ -371,13 +371,13 @@ __barray_check_none_borrowed.exit: ; preds = %loop_out537 %102 = and i64 %101, 1048575 store i64 %102, ptr %1, align 4 %103 = icmp eq i64 %102, 0 - br i1 %103, label %__barray_check_none_borrowed.exit1305, label %mask_block_err.i1303 + br i1 %103, label %__barray_check_none_borrowed.exit1306, label %mask_block_err.i1304 -mask_block_err.i1303: ; preds = %__barray_check_none_borrowed.exit +mask_block_err.i1304: ; preds = %__barray_check_none_borrowed.exit tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") unreachable -__barray_check_none_borrowed.exit1305: ; preds = %__barray_check_none_borrowed.exit +__barray_check_none_borrowed.exit1306: ; preds = %__barray_check_none_borrowed.exit %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 %y_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 4 %arr_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 8 @@ -400,7 +400,7 @@ declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immar ; Function Attrs: noreturn declare void @panic(i32, ptr) local_unnamed_addr #1 -declare i64 @___lazy_measure_leaked(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -416,8 +416,6 @@ declare void @print_bool(ptr, i64, i1) local_unnamed_addr declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr - declare i1 @___read_future_bool(i64) local_unnamed_addr ; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_within_tail-sol-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_within_tail-sol-x86_64-apple-darwin.ll index 30e956b4..0fde5c16 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_within_tail-sol-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_within_tail-sol-x86_64-apple-darwin.ll @@ -40,20 +40,20 @@ __hugr__.__tk2_sol_qalloc.485.exit: ; preds = %alloca_block br label %cond_13_case_1 cond_13_case_1: ; preds = %__hugr__.__tk2_sol_qalloc.485.exit, %cond_exit_13 - %"9_2.01321" = phi i64 [ 0, %__hugr__.__tk2_sol_qalloc.485.exit ], [ %6, %cond_exit_13 ] - %6 = add nuw nsw i64 %"9_2.01321", 1 - %qalloc.i1244 = tail call i64 @___qalloc() - %not_max.not.not.i1245 = icmp eq i64 %qalloc.i1244, -1 - br i1 %not_max.not.not.i1245, label %cond_489_case_0.i1246, label %__barray_check_bounds.exit + %"9_2.01322" = phi i64 [ 0, %__hugr__.__tk2_sol_qalloc.485.exit ], [ %6, %cond_exit_13 ] + %6 = add nuw nsw i64 %"9_2.01322", 1 + %qalloc.i1245 = tail call i64 @___qalloc() + %not_max.not.not.i1246 = icmp eq i64 %qalloc.i1245, -1 + br i1 %not_max.not.not.i1246, label %cond_489_case_0.i1247, label %__barray_check_bounds.exit -cond_489_case_0.i1246: ; preds = %cond_13_case_1 +cond_489_case_0.i1247: ; preds = %cond_13_case_1 tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable __barray_check_bounds.exit: ; preds = %cond_13_case_1 - tail call void @___reset(i64 %qalloc.i1244) + tail call void @___reset(i64 %qalloc.i1245) %7 = load i64, ptr %5, align 4 - %8 = lshr i64 %7, %"9_2.01321" + %8 = lshr i64 %7, %"9_2.01322" %9 = trunc i64 %8 to i1 br i1 %9, label %cond_exit_13, label %panic.i @@ -62,20 +62,20 @@ panic.i: ; preds = %__barray_check_boun unreachable cond_exit_13: ; preds = %__barray_check_bounds.exit - %10 = shl nuw nsw i64 1, %"9_2.01321" + %10 = shl nuw nsw i64 1, %"9_2.01322" %11 = xor i64 %7, %10 store i64 %11, ptr %5, align 4 - %12 = getelementptr inbounds nuw i64, ptr %4, i64 %"9_2.01321" - store i64 %qalloc.i1244, ptr %12, align 4 + %12 = getelementptr inbounds nuw i64, ptr %4, i64 %"9_2.01322" + store i64 %qalloc.i1245, ptr %12, align 4 %exitcond = icmp eq i64 %6, 20 br i1 %exitcond, label %loop_out, label %cond_13_case_1 loop_out: ; preds = %cond_exit_13 %13 = load i64, ptr %5, align 4 %14 = trunc i64 %13 to i1 - br i1 %14, label %panic.i1248, label %__barray_mask_borrow.exit + br i1 %14, label %panic.i1249, label %__barray_mask_borrow.exit -panic.i1248: ; preds = %loop_out +panic.i1249: ; preds = %loop_out tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable @@ -90,46 +90,46 @@ __barray_mask_borrow.exit: ; preds = %loop_out tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18) %17 = load i64, ptr %5, align 4 %18 = trunc i64 %17 to i1 - br i1 %18, label %__barray_mask_return.exit1250, label %panic.i1249 + br i1 %18, label %__barray_mask_return.exit1251, label %panic.i1250 -panic.i1249: ; preds = %__barray_mask_borrow.exit +panic.i1250: ; preds = %__barray_mask_borrow.exit tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_mask_return.exit1250: ; preds = %__barray_mask_borrow.exit +__barray_mask_return.exit1251: ; preds = %__barray_mask_borrow.exit %19 = and i64 %17, -2 store i64 %19, ptr %5, align 4 store i64 %16, ptr %4, align 4 - br label %__barray_check_bounds.exit1252 + br label %__barray_check_bounds.exit1253 -__barray_check_bounds.exit1252: ; preds = %__barray_mask_return.exit1250, %__barray_mask_return.exit1268 - %20 = phi i64 [ 1, %__barray_mask_return.exit1250 ], [ %42, %__barray_mask_return.exit1268 ] - %"118_0.01322" = phi i64 [ 0, %__barray_mask_return.exit1250 ], [ %20, %__barray_mask_return.exit1268 ] +__barray_check_bounds.exit1253: ; preds = %__barray_mask_return.exit1251, %__barray_mask_return.exit1269 + %20 = phi i64 [ 1, %__barray_mask_return.exit1251 ], [ %42, %__barray_mask_return.exit1269 ] + %"118_0.01323" = phi i64 [ 0, %__barray_mask_return.exit1251 ], [ %20, %__barray_mask_return.exit1269 ] %21 = load i64, ptr %5, align 4 - %22 = lshr i64 %21, %"118_0.01322" + %22 = lshr i64 %21, %"118_0.01323" %23 = trunc i64 %22 to i1 - br i1 %23, label %panic.i1253, label %__barray_check_bounds.exit1256 + br i1 %23, label %panic.i1254, label %__barray_check_bounds.exit1257 -panic.i1253: ; preds = %__barray_check_bounds.exit1252 +panic.i1254: ; preds = %__barray_check_bounds.exit1253 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_check_bounds.exit1256: ; preds = %__barray_check_bounds.exit1252 - %24 = shl nuw nsw i64 1, %"118_0.01322" +__barray_check_bounds.exit1257: ; preds = %__barray_check_bounds.exit1253 + %24 = shl nuw nsw i64 1, %"118_0.01323" %25 = xor i64 %21, %24 store i64 %25, ptr %5, align 4 - %26 = getelementptr inbounds nuw i64, ptr %4, i64 %"118_0.01322" + %26 = getelementptr inbounds nuw i64, ptr %4, i64 %"118_0.01323" %27 = load i64, ptr %26, align 4 %28 = lshr i64 %25, %20 %29 = trunc i64 %28 to i1 - br i1 %29, label %panic.i1257, label %__barray_check_bounds.exit1262 + br i1 %29, label %panic.i1258, label %__barray_check_bounds.exit1263 -panic.i1257: ; preds = %__barray_check_bounds.exit1256 +panic.i1258: ; preds = %__barray_check_bounds.exit1257 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_check_bounds.exit1262: ; preds = %__barray_check_bounds.exit1256 - %30 = shl nuw nsw i64 2, %"118_0.01322" +__barray_check_bounds.exit1263: ; preds = %__barray_check_bounds.exit1257 + %30 = shl nuw nsw i64 2, %"118_0.01323" %31 = xor i64 %25, %30 store i64 %31, ptr %5, align 4 %32 = getelementptr inbounds nuw i64, ptr %4, i64 %20 @@ -140,78 +140,78 @@ __barray_check_bounds.exit1262: ; preds = %__barray_check_boun tail call void @___rp(i64 %27, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rz(i64 %27, double 0xBFF921FB54442D18) %34 = load i64, ptr %5, align 4 - %35 = lshr i64 %34, %"118_0.01322" + %35 = lshr i64 %34, %"118_0.01323" %36 = trunc i64 %35 to i1 - br i1 %36, label %__barray_check_bounds.exit1266, label %panic.i1263 + br i1 %36, label %__barray_check_bounds.exit1267, label %panic.i1264 -panic.i1263: ; preds = %__barray_check_bounds.exit1262 +panic.i1264: ; preds = %__barray_check_bounds.exit1263 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_check_bounds.exit1266: ; preds = %__barray_check_bounds.exit1262 +__barray_check_bounds.exit1267: ; preds = %__barray_check_bounds.exit1263 %37 = xor i64 %34, %24 store i64 %37, ptr %5, align 4 store i64 %27, ptr %26, align 4 %38 = load i64, ptr %5, align 4 %39 = lshr i64 %38, %20 %40 = trunc i64 %39 to i1 - br i1 %40, label %__barray_mask_return.exit1268, label %panic.i1267 + br i1 %40, label %__barray_mask_return.exit1269, label %panic.i1268 -panic.i1267: ; preds = %__barray_check_bounds.exit1266 +panic.i1268: ; preds = %__barray_check_bounds.exit1267 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_mask_return.exit1268: ; preds = %__barray_check_bounds.exit1266 +__barray_mask_return.exit1269: ; preds = %__barray_check_bounds.exit1267 %41 = xor i64 %38, %30 store i64 %41, ptr %5, align 4 store i64 %33, ptr %32, align 4 %42 = add nuw nsw i64 %20, 1 - %exitcond1325 = icmp eq i64 %42, 20 - br i1 %exitcond1325, label %cond_exit_189, label %__barray_check_bounds.exit1252 + %exitcond1326 = icmp eq i64 %42, 20 + br i1 %exitcond1326, label %cond_exit_189, label %__barray_check_bounds.exit1253 -cond_exit_189: ; preds = %__barray_mask_return.exit1268 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) +cond_exit_189: ; preds = %__barray_mask_return.exit1269 + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 1) tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure_leaked) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___inc_future_refcount(i64 %___future_measure) + %read_uint = tail call i64 @___read_future_uint(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) %43 = icmp eq i64 %read_uint, 2 br i1 %43, label %44, label %cond_exit_267 cond_exit_267: ; preds = %cond_exit_189 - %read_uint378 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + %read_uint378 = tail call i64 @___read_future_uint(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) %.not = icmp eq i64 %read_uint378, 2 br i1 %.not, label %cond_247_case_0, label %cond_247_case_1 44: ; preds = %cond_exit_189 - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_int(ptr nonnull @res_head_leake.F4F32972.0, i64 20, i64 1) - br label %__barray_check_bounds.exit1274.preheader + br label %__barray_check_bounds.exit1275.preheader -__barray_check_bounds.exit1274.preheader: ; preds = %cond_247_case_1, %44 - br label %__barray_check_bounds.exit1274 +__barray_check_bounds.exit1275.preheader: ; preds = %cond_247_case_1, %44 + br label %__barray_check_bounds.exit1275 cond_247_case_1: ; preds = %cond_exit_267 %45 = icmp eq i64 %read_uint378, 1 tail call void @print_bool(ptr nonnull @res_head.AFE8E005.0, i64 14, i1 %45) - br label %__barray_check_bounds.exit1274.preheader + br label %__barray_check_bounds.exit1275.preheader cond_247_case_0: ; preds = %cond_exit_267 tail call void @panic(i32 1001, ptr nonnull @e_Option.unw.32D4E82D.0) unreachable -out_of_bounds.i1269: ; preds = %.thread +out_of_bounds.i1270: ; preds = %.thread tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") unreachable -__barray_check_bounds.exit1270: ; preds = %.thread +__barray_check_bounds.exit1271: ; preds = %.thread %46 = load i64, ptr %3, align 4 - %47 = lshr i64 %46, %"310_2.01329" + %47 = lshr i64 %46, %"310_2.01330" %48 = trunc i64 %47 to i1 - br i1 %48, label %cond_exit_314, label %panic.i1271 + br i1 %48, label %cond_exit_314, label %panic.i1272 -panic.i1271: ; preds = %__barray_check_bounds.exit1270 +panic.i1272: ; preds = %__barray_check_bounds.exit1271 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable @@ -220,91 +220,91 @@ mask_block_ok.i: ; preds = %cond_exit_314 %50 = or i64 %49, -1048576 store i64 %50, ptr %5, align 4 %51 = icmp eq i64 %50, -1 - br i1 %51, label %loop_body538.preheader.preheader, label %mask_block_err.i + br i1 %51, label %loop_body539.preheader.preheader, label %mask_block_err.i mask_block_err.i: ; preds = %mask_block_ok.i tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_check_bounds.exit1274: ; preds = %__barray_check_bounds.exit1274.preheader, %cond_exit_314 - %"310_0.sroa.15.01330" = phi i64 [ %52, %cond_exit_314 ], [ 0, %__barray_check_bounds.exit1274.preheader ] - %"310_2.01329" = phi i64 [ %60, %cond_exit_314 ], [ 0, %__barray_check_bounds.exit1274.preheader ] - %52 = add nuw nsw i64 %"310_0.sroa.15.01330", 1 +__barray_check_bounds.exit1275: ; preds = %__barray_check_bounds.exit1275.preheader, %cond_exit_314 + %"310_0.sroa.15.01331" = phi i64 [ %52, %cond_exit_314 ], [ 0, %__barray_check_bounds.exit1275.preheader ] + %"310_2.01330" = phi i64 [ %60, %cond_exit_314 ], [ 0, %__barray_check_bounds.exit1275.preheader ] + %52 = add nuw nsw i64 %"310_0.sroa.15.01331", 1 %53 = load i64, ptr %5, align 4 - %54 = lshr i64 %53, %"310_0.sroa.15.01330" + %54 = lshr i64 %53, %"310_0.sroa.15.01331" %55 = trunc i64 %54 to i1 - br i1 %55, label %panic.i1275, label %.thread + br i1 %55, label %panic.i1276, label %.thread -panic.i1275: ; preds = %__barray_check_bounds.exit1274 +panic.i1276: ; preds = %__barray_check_bounds.exit1275 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -.thread: ; preds = %__barray_check_bounds.exit1274 - %56 = shl nuw nsw i64 1, %"310_0.sroa.15.01330" +.thread: ; preds = %__barray_check_bounds.exit1275 + %56 = shl nuw nsw i64 1, %"310_0.sroa.15.01331" %57 = xor i64 %53, %56 store i64 %57, ptr %5, align 4 - %58 = getelementptr inbounds nuw i64, ptr %4, i64 %"310_0.sroa.15.01330" + %58 = getelementptr inbounds nuw i64, ptr %4, i64 %"310_0.sroa.15.01331" %59 = load i64, ptr %58, align 4 - %60 = add i64 %"310_2.01329", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %59) + %60 = add i64 %"310_2.01330", 1 + %___future_measure513 = tail call i64 @___future_measure(i64 %59, i64 0) tail call void @___qfree(i64 %59) - %61 = icmp ult i64 %"310_2.01329", 20 - br i1 %61, label %__barray_check_bounds.exit1270, label %out_of_bounds.i1269 + %61 = icmp ult i64 %"310_2.01330", 20 + br i1 %61, label %__barray_check_bounds.exit1271, label %out_of_bounds.i1270 -cond_exit_314: ; preds = %__barray_check_bounds.exit1270 - %62 = shl nuw nsw i64 1, %"310_2.01329" +cond_exit_314: ; preds = %__barray_check_bounds.exit1271 + %62 = shl nuw nsw i64 1, %"310_2.01330" %63 = xor i64 %46, %62 store i64 %63, ptr %3, align 4 - %64 = getelementptr inbounds nuw i64, ptr %2, i64 %"310_2.01329" - store i64 %lazy_measure, ptr %64, align 4 - %65 = icmp samesign ugt i64 %"310_0.sroa.15.01330", 18 - br i1 %65, label %mask_block_ok.i, label %__barray_check_bounds.exit1274 + %64 = getelementptr inbounds nuw i64, ptr %2, i64 %"310_2.01330" + store i64 %___future_measure513, ptr %64, align 4 + %65 = icmp samesign ugt i64 %"310_0.sroa.15.01331", 18 + br i1 %65, label %mask_block_ok.i, label %__barray_check_bounds.exit1275 -loop_body538.preheader.preheader: ; preds = %mask_block_ok.i +loop_body539.preheader.preheader: ; preds = %mask_block_ok.i tail call void @heap_free(ptr nonnull %4) tail call void @heap_free(ptr nonnull %5) - br label %__barray_check_bounds.exit1278 + br label %__barray_check_bounds.exit1279 -__barray_check_bounds.exit1278: ; preds = %cond_exit_380, %loop_body538.preheader.preheader - %"376_0.sroa.15.01324" = phi i64 [ %66, %cond_exit_380 ], [ 0, %loop_body538.preheader.preheader ] - %66 = add nuw nsw i64 %"376_0.sroa.15.01324", 1 +__barray_check_bounds.exit1279: ; preds = %cond_exit_380, %loop_body539.preheader.preheader + %"376_0.sroa.15.01325" = phi i64 [ %66, %cond_exit_380 ], [ 0, %loop_body539.preheader.preheader ] + %66 = add nuw nsw i64 %"376_0.sroa.15.01325", 1 %67 = load i64, ptr %3, align 4 - %68 = lshr i64 %67, %"376_0.sroa.15.01324" + %68 = lshr i64 %67, %"376_0.sroa.15.01325" %69 = trunc i64 %68 to i1 - br i1 %69, label %panic.i1279, label %__barray_check_bounds.exit1282 + br i1 %69, label %panic.i1280, label %__barray_check_bounds.exit1283 -panic.i1279: ; preds = %__barray_check_bounds.exit1278 +panic.i1280: ; preds = %__barray_check_bounds.exit1279 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_check_bounds.exit1282: ; preds = %__barray_check_bounds.exit1278 - %70 = shl nuw nsw i64 1, %"376_0.sroa.15.01324" +__barray_check_bounds.exit1283: ; preds = %__barray_check_bounds.exit1279 + %70 = shl nuw nsw i64 1, %"376_0.sroa.15.01325" %71 = xor i64 %67, %70 store i64 %71, ptr %3, align 4 - %72 = getelementptr inbounds nuw i64, ptr %2, i64 %"376_0.sroa.15.01324" + %72 = getelementptr inbounds nuw i64, ptr %2, i64 %"376_0.sroa.15.01325" %73 = load i64, ptr %72, align 4 tail call void @___inc_future_refcount(i64 %73) %74 = load i64, ptr %3, align 4 - %75 = lshr i64 %74, %"376_0.sroa.15.01324" + %75 = lshr i64 %74, %"376_0.sroa.15.01325" %76 = trunc i64 %75 to i1 - br i1 %76, label %__barray_check_bounds.exit1286, label %panic.i1283 + br i1 %76, label %__barray_check_bounds.exit1287, label %panic.i1284 -panic.i1283: ; preds = %__barray_check_bounds.exit1282 +panic.i1284: ; preds = %__barray_check_bounds.exit1283 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_check_bounds.exit1286: ; preds = %__barray_check_bounds.exit1282 +__barray_check_bounds.exit1287: ; preds = %__barray_check_bounds.exit1283 %77 = xor i64 %74, %70 store i64 %77, ptr %3, align 4 store i64 %73, ptr %72, align 4 %read_bool = tail call i1 @___read_future_bool(i64 %73) tail call void @___dec_future_refcount(i64 %73) %78 = load i64, ptr %1, align 4 - %79 = lshr i64 %78, %"376_0.sroa.15.01324" + %79 = lshr i64 %78, %"376_0.sroa.15.01325" %80 = trunc i64 %79 to i1 - br i1 %80, label %cond_exit_380, label %panic.i1287 + br i1 %80, label %cond_exit_380, label %panic.i1288 -panic.i1287: ; preds = %__barray_check_bounds.exit1286 +panic.i1288: ; preds = %__barray_check_bounds.exit1287 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable @@ -313,55 +313,55 @@ cond_565_case_0: ; preds = %cond_exit_565 %82 = or i64 %81, -1048576 store i64 %82, ptr %3, align 4 %83 = icmp eq i64 %82, -1 - br i1 %83, label %loop_out537, label %mask_block_err.i1292 + br i1 %83, label %loop_out538, label %mask_block_err.i1293 -mask_block_err.i1292: ; preds = %cond_565_case_0 +mask_block_err.i1293: ; preds = %cond_565_case_0 tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_check_bounds.exit1296: ; preds = %cond_exit_380, %cond_exit_565 - %"562_0.01331" = phi i64 [ %84, %cond_exit_565 ], [ 0, %cond_exit_380 ] - %84 = add nuw nsw i64 %"562_0.01331", 1 +__barray_check_bounds.exit1297: ; preds = %cond_exit_380, %cond_exit_565 + %"562_0.01332" = phi i64 [ %84, %cond_exit_565 ], [ 0, %cond_exit_380 ] + %84 = add nuw nsw i64 %"562_0.01332", 1 %85 = load i64, ptr %3, align 4 - %86 = lshr i64 %85, %"562_0.01331" + %86 = lshr i64 %85, %"562_0.01332" %87 = trunc i64 %86 to i1 - br i1 %87, label %cond_exit_565, label %__barray_mask_borrow.exit1300 + br i1 %87, label %cond_exit_565, label %__barray_mask_borrow.exit1301 -__barray_mask_borrow.exit1300: ; preds = %__barray_check_bounds.exit1296 - %88 = shl nuw nsw i64 1, %"562_0.01331" +__barray_mask_borrow.exit1301: ; preds = %__barray_check_bounds.exit1297 + %88 = shl nuw nsw i64 1, %"562_0.01332" %89 = xor i64 %85, %88 store i64 %89, ptr %3, align 4 - %90 = getelementptr inbounds nuw i64, ptr %2, i64 %"562_0.01331" + %90 = getelementptr inbounds nuw i64, ptr %2, i64 %"562_0.01332" %91 = load i64, ptr %90, align 4 tail call void @___dec_future_refcount(i64 %91) br label %cond_exit_565 -cond_exit_565: ; preds = %__barray_mask_borrow.exit1300, %__barray_check_bounds.exit1296 - %92 = icmp samesign ugt i64 %"562_0.01331", 18 - br i1 %92, label %cond_565_case_0, label %__barray_check_bounds.exit1296 +cond_exit_565: ; preds = %__barray_mask_borrow.exit1301, %__barray_check_bounds.exit1297 + %92 = icmp samesign ugt i64 %"562_0.01332", 18 + br i1 %92, label %cond_565_case_0, label %__barray_check_bounds.exit1297 -cond_exit_380: ; preds = %__barray_check_bounds.exit1286 +cond_exit_380: ; preds = %__barray_check_bounds.exit1287 %93 = xor i64 %78, %70 store i64 %93, ptr %1, align 4 - %94 = getelementptr inbounds nuw i1, ptr %0, i64 %"376_0.sroa.15.01324" + %94 = getelementptr inbounds nuw i1, ptr %0, i64 %"376_0.sroa.15.01325" store i1 %read_bool, ptr %94, align 1 - %95 = icmp eq i64 %"376_0.sroa.15.01324", 19 - br i1 %95, label %__barray_check_bounds.exit1296, label %__barray_check_bounds.exit1278 + %95 = icmp eq i64 %"376_0.sroa.15.01325", 19 + br i1 %95, label %__barray_check_bounds.exit1297, label %__barray_check_bounds.exit1279 -loop_out537: ; preds = %cond_565_case_0 +loop_out538: ; preds = %cond_565_case_0 tail call void @heap_free(ptr %2) tail call void @heap_free(ptr nonnull %3) %96 = load i64, ptr %1, align 4 %97 = and i64 %96, 1048575 store i64 %97, ptr %1, align 4 %98 = icmp eq i64 %97, 0 - br i1 %98, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1301 + br i1 %98, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1302 -mask_block_err.i1301: ; preds = %loop_out537 +mask_block_err.i1302: ; preds = %loop_out538 tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") unreachable -__barray_check_none_borrowed.exit: ; preds = %loop_out537 +__barray_check_none_borrowed.exit: ; preds = %loop_out538 %99 = tail call ptr @heap_alloc(i64 20) %100 = tail call ptr @heap_alloc(i64 8) store i64 0, ptr %100, align 1 @@ -371,13 +371,13 @@ __barray_check_none_borrowed.exit: ; preds = %loop_out537 %102 = and i64 %101, 1048575 store i64 %102, ptr %1, align 4 %103 = icmp eq i64 %102, 0 - br i1 %103, label %__barray_check_none_borrowed.exit1305, label %mask_block_err.i1303 + br i1 %103, label %__barray_check_none_borrowed.exit1306, label %mask_block_err.i1304 -mask_block_err.i1303: ; preds = %__barray_check_none_borrowed.exit +mask_block_err.i1304: ; preds = %__barray_check_none_borrowed.exit tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") unreachable -__barray_check_none_borrowed.exit1305: ; preds = %__barray_check_none_borrowed.exit +__barray_check_none_borrowed.exit1306: ; preds = %__barray_check_none_borrowed.exit %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 %y_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 4 %arr_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 8 @@ -400,7 +400,7 @@ declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immar ; Function Attrs: noreturn declare void @panic(i32, ptr) local_unnamed_addr #1 -declare i64 @___lazy_measure_leaked(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -416,8 +416,6 @@ declare void @print_bool(ptr, i64, i1) local_unnamed_addr declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr - declare i1 @___read_future_bool(i64) local_unnamed_addr ; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_within_tail-sol-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_within_tail-sol-x86_64-unknown-linux-gnu.ll index 67e378b8..d857ab55 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_within_tail-sol-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_within_tail-sol-x86_64-unknown-linux-gnu.ll @@ -40,20 +40,20 @@ __hugr__.__tk2_sol_qalloc.485.exit: ; preds = %alloca_block br label %cond_13_case_1 cond_13_case_1: ; preds = %__hugr__.__tk2_sol_qalloc.485.exit, %cond_exit_13 - %"9_2.01321" = phi i64 [ 0, %__hugr__.__tk2_sol_qalloc.485.exit ], [ %6, %cond_exit_13 ] - %6 = add nuw nsw i64 %"9_2.01321", 1 - %qalloc.i1244 = tail call i64 @___qalloc() - %not_max.not.not.i1245 = icmp eq i64 %qalloc.i1244, -1 - br i1 %not_max.not.not.i1245, label %cond_489_case_0.i1246, label %__barray_check_bounds.exit + %"9_2.01322" = phi i64 [ 0, %__hugr__.__tk2_sol_qalloc.485.exit ], [ %6, %cond_exit_13 ] + %6 = add nuw nsw i64 %"9_2.01322", 1 + %qalloc.i1245 = tail call i64 @___qalloc() + %not_max.not.not.i1246 = icmp eq i64 %qalloc.i1245, -1 + br i1 %not_max.not.not.i1246, label %cond_489_case_0.i1247, label %__barray_check_bounds.exit -cond_489_case_0.i1246: ; preds = %cond_13_case_1 +cond_489_case_0.i1247: ; preds = %cond_13_case_1 tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable __barray_check_bounds.exit: ; preds = %cond_13_case_1 - tail call void @___reset(i64 %qalloc.i1244) + tail call void @___reset(i64 %qalloc.i1245) %7 = load i64, ptr %5, align 4 - %8 = lshr i64 %7, %"9_2.01321" + %8 = lshr i64 %7, %"9_2.01322" %9 = trunc i64 %8 to i1 br i1 %9, label %cond_exit_13, label %panic.i @@ -62,20 +62,20 @@ panic.i: ; preds = %__barray_check_boun unreachable cond_exit_13: ; preds = %__barray_check_bounds.exit - %10 = shl nuw nsw i64 1, %"9_2.01321" + %10 = shl nuw nsw i64 1, %"9_2.01322" %11 = xor i64 %7, %10 store i64 %11, ptr %5, align 4 - %12 = getelementptr inbounds nuw i64, ptr %4, i64 %"9_2.01321" - store i64 %qalloc.i1244, ptr %12, align 4 + %12 = getelementptr inbounds nuw i64, ptr %4, i64 %"9_2.01322" + store i64 %qalloc.i1245, ptr %12, align 4 %exitcond = icmp eq i64 %6, 20 br i1 %exitcond, label %loop_out, label %cond_13_case_1 loop_out: ; preds = %cond_exit_13 %13 = load i64, ptr %5, align 4 %14 = trunc i64 %13 to i1 - br i1 %14, label %panic.i1248, label %__barray_mask_borrow.exit + br i1 %14, label %panic.i1249, label %__barray_mask_borrow.exit -panic.i1248: ; preds = %loop_out +panic.i1249: ; preds = %loop_out tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable @@ -90,46 +90,46 @@ __barray_mask_borrow.exit: ; preds = %loop_out tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18) %17 = load i64, ptr %5, align 4 %18 = trunc i64 %17 to i1 - br i1 %18, label %__barray_mask_return.exit1250, label %panic.i1249 + br i1 %18, label %__barray_mask_return.exit1251, label %panic.i1250 -panic.i1249: ; preds = %__barray_mask_borrow.exit +panic.i1250: ; preds = %__barray_mask_borrow.exit tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_mask_return.exit1250: ; preds = %__barray_mask_borrow.exit +__barray_mask_return.exit1251: ; preds = %__barray_mask_borrow.exit %19 = and i64 %17, -2 store i64 %19, ptr %5, align 4 store i64 %16, ptr %4, align 4 - br label %__barray_check_bounds.exit1252 + br label %__barray_check_bounds.exit1253 -__barray_check_bounds.exit1252: ; preds = %__barray_mask_return.exit1250, %__barray_mask_return.exit1268 - %20 = phi i64 [ 1, %__barray_mask_return.exit1250 ], [ %42, %__barray_mask_return.exit1268 ] - %"118_0.01322" = phi i64 [ 0, %__barray_mask_return.exit1250 ], [ %20, %__barray_mask_return.exit1268 ] +__barray_check_bounds.exit1253: ; preds = %__barray_mask_return.exit1251, %__barray_mask_return.exit1269 + %20 = phi i64 [ 1, %__barray_mask_return.exit1251 ], [ %42, %__barray_mask_return.exit1269 ] + %"118_0.01323" = phi i64 [ 0, %__barray_mask_return.exit1251 ], [ %20, %__barray_mask_return.exit1269 ] %21 = load i64, ptr %5, align 4 - %22 = lshr i64 %21, %"118_0.01322" + %22 = lshr i64 %21, %"118_0.01323" %23 = trunc i64 %22 to i1 - br i1 %23, label %panic.i1253, label %__barray_check_bounds.exit1256 + br i1 %23, label %panic.i1254, label %__barray_check_bounds.exit1257 -panic.i1253: ; preds = %__barray_check_bounds.exit1252 +panic.i1254: ; preds = %__barray_check_bounds.exit1253 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_check_bounds.exit1256: ; preds = %__barray_check_bounds.exit1252 - %24 = shl nuw nsw i64 1, %"118_0.01322" +__barray_check_bounds.exit1257: ; preds = %__barray_check_bounds.exit1253 + %24 = shl nuw nsw i64 1, %"118_0.01323" %25 = xor i64 %21, %24 store i64 %25, ptr %5, align 4 - %26 = getelementptr inbounds nuw i64, ptr %4, i64 %"118_0.01322" + %26 = getelementptr inbounds nuw i64, ptr %4, i64 %"118_0.01323" %27 = load i64, ptr %26, align 4 %28 = lshr i64 %25, %20 %29 = trunc i64 %28 to i1 - br i1 %29, label %panic.i1257, label %__barray_check_bounds.exit1262 + br i1 %29, label %panic.i1258, label %__barray_check_bounds.exit1263 -panic.i1257: ; preds = %__barray_check_bounds.exit1256 +panic.i1258: ; preds = %__barray_check_bounds.exit1257 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_check_bounds.exit1262: ; preds = %__barray_check_bounds.exit1256 - %30 = shl nuw nsw i64 2, %"118_0.01322" +__barray_check_bounds.exit1263: ; preds = %__barray_check_bounds.exit1257 + %30 = shl nuw nsw i64 2, %"118_0.01323" %31 = xor i64 %25, %30 store i64 %31, ptr %5, align 4 %32 = getelementptr inbounds nuw i64, ptr %4, i64 %20 @@ -140,78 +140,78 @@ __barray_check_bounds.exit1262: ; preds = %__barray_check_boun tail call void @___rp(i64 %27, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rz(i64 %27, double 0xBFF921FB54442D18) %34 = load i64, ptr %5, align 4 - %35 = lshr i64 %34, %"118_0.01322" + %35 = lshr i64 %34, %"118_0.01323" %36 = trunc i64 %35 to i1 - br i1 %36, label %__barray_check_bounds.exit1266, label %panic.i1263 + br i1 %36, label %__barray_check_bounds.exit1267, label %panic.i1264 -panic.i1263: ; preds = %__barray_check_bounds.exit1262 +panic.i1264: ; preds = %__barray_check_bounds.exit1263 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_check_bounds.exit1266: ; preds = %__barray_check_bounds.exit1262 +__barray_check_bounds.exit1267: ; preds = %__barray_check_bounds.exit1263 %37 = xor i64 %34, %24 store i64 %37, ptr %5, align 4 store i64 %27, ptr %26, align 4 %38 = load i64, ptr %5, align 4 %39 = lshr i64 %38, %20 %40 = trunc i64 %39 to i1 - br i1 %40, label %__barray_mask_return.exit1268, label %panic.i1267 + br i1 %40, label %__barray_mask_return.exit1269, label %panic.i1268 -panic.i1267: ; preds = %__barray_check_bounds.exit1266 +panic.i1268: ; preds = %__barray_check_bounds.exit1267 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_mask_return.exit1268: ; preds = %__barray_check_bounds.exit1266 +__barray_mask_return.exit1269: ; preds = %__barray_check_bounds.exit1267 %41 = xor i64 %38, %30 store i64 %41, ptr %5, align 4 store i64 %33, ptr %32, align 4 %42 = add nuw nsw i64 %20, 1 - %exitcond1325 = icmp eq i64 %42, 20 - br i1 %exitcond1325, label %cond_exit_189, label %__barray_check_bounds.exit1252 + %exitcond1326 = icmp eq i64 %42, 20 + br i1 %exitcond1326, label %cond_exit_189, label %__barray_check_bounds.exit1253 -cond_exit_189: ; preds = %__barray_mask_return.exit1268 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) +cond_exit_189: ; preds = %__barray_mask_return.exit1269 + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 1) tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure_leaked) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___inc_future_refcount(i64 %___future_measure) + %read_uint = tail call i64 @___read_future_uint(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) %43 = icmp eq i64 %read_uint, 2 br i1 %43, label %44, label %cond_exit_267 cond_exit_267: ; preds = %cond_exit_189 - %read_uint378 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + %read_uint378 = tail call i64 @___read_future_uint(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) %.not = icmp eq i64 %read_uint378, 2 br i1 %.not, label %cond_247_case_0, label %cond_247_case_1 44: ; preds = %cond_exit_189 - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_int(ptr nonnull @res_head_leake.F4F32972.0, i64 20, i64 1) - br label %__barray_check_bounds.exit1274.preheader + br label %__barray_check_bounds.exit1275.preheader -__barray_check_bounds.exit1274.preheader: ; preds = %cond_247_case_1, %44 - br label %__barray_check_bounds.exit1274 +__barray_check_bounds.exit1275.preheader: ; preds = %cond_247_case_1, %44 + br label %__barray_check_bounds.exit1275 cond_247_case_1: ; preds = %cond_exit_267 %45 = icmp eq i64 %read_uint378, 1 tail call void @print_bool(ptr nonnull @res_head.AFE8E005.0, i64 14, i1 %45) - br label %__barray_check_bounds.exit1274.preheader + br label %__barray_check_bounds.exit1275.preheader cond_247_case_0: ; preds = %cond_exit_267 tail call void @panic(i32 1001, ptr nonnull @e_Option.unw.32D4E82D.0) unreachable -out_of_bounds.i1269: ; preds = %.thread +out_of_bounds.i1270: ; preds = %.thread tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") unreachable -__barray_check_bounds.exit1270: ; preds = %.thread +__barray_check_bounds.exit1271: ; preds = %.thread %46 = load i64, ptr %3, align 4 - %47 = lshr i64 %46, %"310_2.01329" + %47 = lshr i64 %46, %"310_2.01330" %48 = trunc i64 %47 to i1 - br i1 %48, label %cond_exit_314, label %panic.i1271 + br i1 %48, label %cond_exit_314, label %panic.i1272 -panic.i1271: ; preds = %__barray_check_bounds.exit1270 +panic.i1272: ; preds = %__barray_check_bounds.exit1271 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable @@ -220,91 +220,91 @@ mask_block_ok.i: ; preds = %cond_exit_314 %50 = or i64 %49, -1048576 store i64 %50, ptr %5, align 4 %51 = icmp eq i64 %50, -1 - br i1 %51, label %loop_body538.preheader.preheader, label %mask_block_err.i + br i1 %51, label %loop_body539.preheader.preheader, label %mask_block_err.i mask_block_err.i: ; preds = %mask_block_ok.i tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_check_bounds.exit1274: ; preds = %__barray_check_bounds.exit1274.preheader, %cond_exit_314 - %"310_0.sroa.15.01330" = phi i64 [ %52, %cond_exit_314 ], [ 0, %__barray_check_bounds.exit1274.preheader ] - %"310_2.01329" = phi i64 [ %60, %cond_exit_314 ], [ 0, %__barray_check_bounds.exit1274.preheader ] - %52 = add nuw nsw i64 %"310_0.sroa.15.01330", 1 +__barray_check_bounds.exit1275: ; preds = %__barray_check_bounds.exit1275.preheader, %cond_exit_314 + %"310_0.sroa.15.01331" = phi i64 [ %52, %cond_exit_314 ], [ 0, %__barray_check_bounds.exit1275.preheader ] + %"310_2.01330" = phi i64 [ %60, %cond_exit_314 ], [ 0, %__barray_check_bounds.exit1275.preheader ] + %52 = add nuw nsw i64 %"310_0.sroa.15.01331", 1 %53 = load i64, ptr %5, align 4 - %54 = lshr i64 %53, %"310_0.sroa.15.01330" + %54 = lshr i64 %53, %"310_0.sroa.15.01331" %55 = trunc i64 %54 to i1 - br i1 %55, label %panic.i1275, label %.thread + br i1 %55, label %panic.i1276, label %.thread -panic.i1275: ; preds = %__barray_check_bounds.exit1274 +panic.i1276: ; preds = %__barray_check_bounds.exit1275 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -.thread: ; preds = %__barray_check_bounds.exit1274 - %56 = shl nuw nsw i64 1, %"310_0.sroa.15.01330" +.thread: ; preds = %__barray_check_bounds.exit1275 + %56 = shl nuw nsw i64 1, %"310_0.sroa.15.01331" %57 = xor i64 %53, %56 store i64 %57, ptr %5, align 4 - %58 = getelementptr inbounds nuw i64, ptr %4, i64 %"310_0.sroa.15.01330" + %58 = getelementptr inbounds nuw i64, ptr %4, i64 %"310_0.sroa.15.01331" %59 = load i64, ptr %58, align 4 - %60 = add i64 %"310_2.01329", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %59) + %60 = add i64 %"310_2.01330", 1 + %___future_measure513 = tail call i64 @___future_measure(i64 %59, i64 0) tail call void @___qfree(i64 %59) - %61 = icmp ult i64 %"310_2.01329", 20 - br i1 %61, label %__barray_check_bounds.exit1270, label %out_of_bounds.i1269 + %61 = icmp ult i64 %"310_2.01330", 20 + br i1 %61, label %__barray_check_bounds.exit1271, label %out_of_bounds.i1270 -cond_exit_314: ; preds = %__barray_check_bounds.exit1270 - %62 = shl nuw nsw i64 1, %"310_2.01329" +cond_exit_314: ; preds = %__barray_check_bounds.exit1271 + %62 = shl nuw nsw i64 1, %"310_2.01330" %63 = xor i64 %46, %62 store i64 %63, ptr %3, align 4 - %64 = getelementptr inbounds nuw i64, ptr %2, i64 %"310_2.01329" - store i64 %lazy_measure, ptr %64, align 4 - %65 = icmp samesign ugt i64 %"310_0.sroa.15.01330", 18 - br i1 %65, label %mask_block_ok.i, label %__barray_check_bounds.exit1274 + %64 = getelementptr inbounds nuw i64, ptr %2, i64 %"310_2.01330" + store i64 %___future_measure513, ptr %64, align 4 + %65 = icmp samesign ugt i64 %"310_0.sroa.15.01331", 18 + br i1 %65, label %mask_block_ok.i, label %__barray_check_bounds.exit1275 -loop_body538.preheader.preheader: ; preds = %mask_block_ok.i +loop_body539.preheader.preheader: ; preds = %mask_block_ok.i tail call void @heap_free(ptr nonnull %4) tail call void @heap_free(ptr nonnull %5) - br label %__barray_check_bounds.exit1278 + br label %__barray_check_bounds.exit1279 -__barray_check_bounds.exit1278: ; preds = %cond_exit_380, %loop_body538.preheader.preheader - %"376_0.sroa.15.01324" = phi i64 [ %66, %cond_exit_380 ], [ 0, %loop_body538.preheader.preheader ] - %66 = add nuw nsw i64 %"376_0.sroa.15.01324", 1 +__barray_check_bounds.exit1279: ; preds = %cond_exit_380, %loop_body539.preheader.preheader + %"376_0.sroa.15.01325" = phi i64 [ %66, %cond_exit_380 ], [ 0, %loop_body539.preheader.preheader ] + %66 = add nuw nsw i64 %"376_0.sroa.15.01325", 1 %67 = load i64, ptr %3, align 4 - %68 = lshr i64 %67, %"376_0.sroa.15.01324" + %68 = lshr i64 %67, %"376_0.sroa.15.01325" %69 = trunc i64 %68 to i1 - br i1 %69, label %panic.i1279, label %__barray_check_bounds.exit1282 + br i1 %69, label %panic.i1280, label %__barray_check_bounds.exit1283 -panic.i1279: ; preds = %__barray_check_bounds.exit1278 +panic.i1280: ; preds = %__barray_check_bounds.exit1279 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_check_bounds.exit1282: ; preds = %__barray_check_bounds.exit1278 - %70 = shl nuw nsw i64 1, %"376_0.sroa.15.01324" +__barray_check_bounds.exit1283: ; preds = %__barray_check_bounds.exit1279 + %70 = shl nuw nsw i64 1, %"376_0.sroa.15.01325" %71 = xor i64 %67, %70 store i64 %71, ptr %3, align 4 - %72 = getelementptr inbounds nuw i64, ptr %2, i64 %"376_0.sroa.15.01324" + %72 = getelementptr inbounds nuw i64, ptr %2, i64 %"376_0.sroa.15.01325" %73 = load i64, ptr %72, align 4 tail call void @___inc_future_refcount(i64 %73) %74 = load i64, ptr %3, align 4 - %75 = lshr i64 %74, %"376_0.sroa.15.01324" + %75 = lshr i64 %74, %"376_0.sroa.15.01325" %76 = trunc i64 %75 to i1 - br i1 %76, label %__barray_check_bounds.exit1286, label %panic.i1283 + br i1 %76, label %__barray_check_bounds.exit1287, label %panic.i1284 -panic.i1283: ; preds = %__barray_check_bounds.exit1282 +panic.i1284: ; preds = %__barray_check_bounds.exit1283 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_check_bounds.exit1286: ; preds = %__barray_check_bounds.exit1282 +__barray_check_bounds.exit1287: ; preds = %__barray_check_bounds.exit1283 %77 = xor i64 %74, %70 store i64 %77, ptr %3, align 4 store i64 %73, ptr %72, align 4 %read_bool = tail call i1 @___read_future_bool(i64 %73) tail call void @___dec_future_refcount(i64 %73) %78 = load i64, ptr %1, align 4 - %79 = lshr i64 %78, %"376_0.sroa.15.01324" + %79 = lshr i64 %78, %"376_0.sroa.15.01325" %80 = trunc i64 %79 to i1 - br i1 %80, label %cond_exit_380, label %panic.i1287 + br i1 %80, label %cond_exit_380, label %panic.i1288 -panic.i1287: ; preds = %__barray_check_bounds.exit1286 +panic.i1288: ; preds = %__barray_check_bounds.exit1287 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable @@ -313,55 +313,55 @@ cond_565_case_0: ; preds = %cond_exit_565 %82 = or i64 %81, -1048576 store i64 %82, ptr %3, align 4 %83 = icmp eq i64 %82, -1 - br i1 %83, label %loop_out537, label %mask_block_err.i1292 + br i1 %83, label %loop_out538, label %mask_block_err.i1293 -mask_block_err.i1292: ; preds = %cond_565_case_0 +mask_block_err.i1293: ; preds = %cond_565_case_0 tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_check_bounds.exit1296: ; preds = %cond_exit_380, %cond_exit_565 - %"562_0.01331" = phi i64 [ %84, %cond_exit_565 ], [ 0, %cond_exit_380 ] - %84 = add nuw nsw i64 %"562_0.01331", 1 +__barray_check_bounds.exit1297: ; preds = %cond_exit_380, %cond_exit_565 + %"562_0.01332" = phi i64 [ %84, %cond_exit_565 ], [ 0, %cond_exit_380 ] + %84 = add nuw nsw i64 %"562_0.01332", 1 %85 = load i64, ptr %3, align 4 - %86 = lshr i64 %85, %"562_0.01331" + %86 = lshr i64 %85, %"562_0.01332" %87 = trunc i64 %86 to i1 - br i1 %87, label %cond_exit_565, label %__barray_mask_borrow.exit1300 + br i1 %87, label %cond_exit_565, label %__barray_mask_borrow.exit1301 -__barray_mask_borrow.exit1300: ; preds = %__barray_check_bounds.exit1296 - %88 = shl nuw nsw i64 1, %"562_0.01331" +__barray_mask_borrow.exit1301: ; preds = %__barray_check_bounds.exit1297 + %88 = shl nuw nsw i64 1, %"562_0.01332" %89 = xor i64 %85, %88 store i64 %89, ptr %3, align 4 - %90 = getelementptr inbounds nuw i64, ptr %2, i64 %"562_0.01331" + %90 = getelementptr inbounds nuw i64, ptr %2, i64 %"562_0.01332" %91 = load i64, ptr %90, align 4 tail call void @___dec_future_refcount(i64 %91) br label %cond_exit_565 -cond_exit_565: ; preds = %__barray_mask_borrow.exit1300, %__barray_check_bounds.exit1296 - %92 = icmp samesign ugt i64 %"562_0.01331", 18 - br i1 %92, label %cond_565_case_0, label %__barray_check_bounds.exit1296 +cond_exit_565: ; preds = %__barray_mask_borrow.exit1301, %__barray_check_bounds.exit1297 + %92 = icmp samesign ugt i64 %"562_0.01332", 18 + br i1 %92, label %cond_565_case_0, label %__barray_check_bounds.exit1297 -cond_exit_380: ; preds = %__barray_check_bounds.exit1286 +cond_exit_380: ; preds = %__barray_check_bounds.exit1287 %93 = xor i64 %78, %70 store i64 %93, ptr %1, align 4 - %94 = getelementptr inbounds nuw i1, ptr %0, i64 %"376_0.sroa.15.01324" + %94 = getelementptr inbounds nuw i1, ptr %0, i64 %"376_0.sroa.15.01325" store i1 %read_bool, ptr %94, align 1 - %95 = icmp eq i64 %"376_0.sroa.15.01324", 19 - br i1 %95, label %__barray_check_bounds.exit1296, label %__barray_check_bounds.exit1278 + %95 = icmp eq i64 %"376_0.sroa.15.01325", 19 + br i1 %95, label %__barray_check_bounds.exit1297, label %__barray_check_bounds.exit1279 -loop_out537: ; preds = %cond_565_case_0 +loop_out538: ; preds = %cond_565_case_0 tail call void @heap_free(ptr %2) tail call void @heap_free(ptr nonnull %3) %96 = load i64, ptr %1, align 4 %97 = and i64 %96, 1048575 store i64 %97, ptr %1, align 4 %98 = icmp eq i64 %97, 0 - br i1 %98, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1301 + br i1 %98, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1302 -mask_block_err.i1301: ; preds = %loop_out537 +mask_block_err.i1302: ; preds = %loop_out538 tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") unreachable -__barray_check_none_borrowed.exit: ; preds = %loop_out537 +__barray_check_none_borrowed.exit: ; preds = %loop_out538 %99 = tail call ptr @heap_alloc(i64 20) %100 = tail call ptr @heap_alloc(i64 8) store i64 0, ptr %100, align 1 @@ -371,13 +371,13 @@ __barray_check_none_borrowed.exit: ; preds = %loop_out537 %102 = and i64 %101, 1048575 store i64 %102, ptr %1, align 4 %103 = icmp eq i64 %102, 0 - br i1 %103, label %__barray_check_none_borrowed.exit1305, label %mask_block_err.i1303 + br i1 %103, label %__barray_check_none_borrowed.exit1306, label %mask_block_err.i1304 -mask_block_err.i1303: ; preds = %__barray_check_none_borrowed.exit +mask_block_err.i1304: ; preds = %__barray_check_none_borrowed.exit tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") unreachable -__barray_check_none_borrowed.exit1305: ; preds = %__barray_check_none_borrowed.exit +__barray_check_none_borrowed.exit1306: ; preds = %__barray_check_none_borrowed.exit %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 %y_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 4 %arr_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 8 @@ -400,7 +400,7 @@ declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immar ; Function Attrs: noreturn declare void @panic(i32, ptr) local_unnamed_addr #1 -declare i64 @___lazy_measure_leaked(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -416,8 +416,6 @@ declare void @print_bool(ptr, i64, i1) local_unnamed_addr declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr - declare i1 @___read_future_bool(i64) local_unnamed_addr ; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_within_tail-sol-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_within_tail-sol-x86_64-windows-gnu.ll index 6ee4afeb..55225d42 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_within_tail-sol-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[default]/leak_within_tail-sol-x86_64-windows-gnu.ll @@ -40,20 +40,20 @@ __hugr__.__tk2_sol_qalloc.485.exit: ; preds = %alloca_block br label %cond_13_case_1 cond_13_case_1: ; preds = %__hugr__.__tk2_sol_qalloc.485.exit, %cond_exit_13 - %"9_2.01321" = phi i64 [ 0, %__hugr__.__tk2_sol_qalloc.485.exit ], [ %6, %cond_exit_13 ] - %6 = add nuw nsw i64 %"9_2.01321", 1 - %qalloc.i1244 = tail call i64 @___qalloc() - %not_max.not.not.i1245 = icmp eq i64 %qalloc.i1244, -1 - br i1 %not_max.not.not.i1245, label %cond_489_case_0.i1246, label %__barray_check_bounds.exit + %"9_2.01322" = phi i64 [ 0, %__hugr__.__tk2_sol_qalloc.485.exit ], [ %6, %cond_exit_13 ] + %6 = add nuw nsw i64 %"9_2.01322", 1 + %qalloc.i1245 = tail call i64 @___qalloc() + %not_max.not.not.i1246 = icmp eq i64 %qalloc.i1245, -1 + br i1 %not_max.not.not.i1246, label %cond_489_case_0.i1247, label %__barray_check_bounds.exit -cond_489_case_0.i1246: ; preds = %cond_13_case_1 +cond_489_case_0.i1247: ; preds = %cond_13_case_1 tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable __barray_check_bounds.exit: ; preds = %cond_13_case_1 - tail call void @___reset(i64 %qalloc.i1244) + tail call void @___reset(i64 %qalloc.i1245) %7 = load i64, ptr %5, align 4 - %8 = lshr i64 %7, %"9_2.01321" + %8 = lshr i64 %7, %"9_2.01322" %9 = trunc i64 %8 to i1 br i1 %9, label %cond_exit_13, label %panic.i @@ -62,20 +62,20 @@ panic.i: ; preds = %__barray_check_boun unreachable cond_exit_13: ; preds = %__barray_check_bounds.exit - %10 = shl nuw nsw i64 1, %"9_2.01321" + %10 = shl nuw nsw i64 1, %"9_2.01322" %11 = xor i64 %7, %10 store i64 %11, ptr %5, align 4 - %12 = getelementptr inbounds nuw i64, ptr %4, i64 %"9_2.01321" - store i64 %qalloc.i1244, ptr %12, align 4 + %12 = getelementptr inbounds nuw i64, ptr %4, i64 %"9_2.01322" + store i64 %qalloc.i1245, ptr %12, align 4 %exitcond = icmp eq i64 %6, 20 br i1 %exitcond, label %loop_out, label %cond_13_case_1 loop_out: ; preds = %cond_exit_13 %13 = load i64, ptr %5, align 4 %14 = trunc i64 %13 to i1 - br i1 %14, label %panic.i1248, label %__barray_mask_borrow.exit + br i1 %14, label %panic.i1249, label %__barray_mask_borrow.exit -panic.i1248: ; preds = %loop_out +panic.i1249: ; preds = %loop_out tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable @@ -90,46 +90,46 @@ __barray_mask_borrow.exit: ; preds = %loop_out tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18) %17 = load i64, ptr %5, align 4 %18 = trunc i64 %17 to i1 - br i1 %18, label %__barray_mask_return.exit1250, label %panic.i1249 + br i1 %18, label %__barray_mask_return.exit1251, label %panic.i1250 -panic.i1249: ; preds = %__barray_mask_borrow.exit +panic.i1250: ; preds = %__barray_mask_borrow.exit tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_mask_return.exit1250: ; preds = %__barray_mask_borrow.exit +__barray_mask_return.exit1251: ; preds = %__barray_mask_borrow.exit %19 = and i64 %17, -2 store i64 %19, ptr %5, align 4 store i64 %16, ptr %4, align 4 - br label %__barray_check_bounds.exit1252 + br label %__barray_check_bounds.exit1253 -__barray_check_bounds.exit1252: ; preds = %__barray_mask_return.exit1250, %__barray_mask_return.exit1268 - %20 = phi i64 [ 1, %__barray_mask_return.exit1250 ], [ %42, %__barray_mask_return.exit1268 ] - %"118_0.01322" = phi i64 [ 0, %__barray_mask_return.exit1250 ], [ %20, %__barray_mask_return.exit1268 ] +__barray_check_bounds.exit1253: ; preds = %__barray_mask_return.exit1251, %__barray_mask_return.exit1269 + %20 = phi i64 [ 1, %__barray_mask_return.exit1251 ], [ %42, %__barray_mask_return.exit1269 ] + %"118_0.01323" = phi i64 [ 0, %__barray_mask_return.exit1251 ], [ %20, %__barray_mask_return.exit1269 ] %21 = load i64, ptr %5, align 4 - %22 = lshr i64 %21, %"118_0.01322" + %22 = lshr i64 %21, %"118_0.01323" %23 = trunc i64 %22 to i1 - br i1 %23, label %panic.i1253, label %__barray_check_bounds.exit1256 + br i1 %23, label %panic.i1254, label %__barray_check_bounds.exit1257 -panic.i1253: ; preds = %__barray_check_bounds.exit1252 +panic.i1254: ; preds = %__barray_check_bounds.exit1253 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_check_bounds.exit1256: ; preds = %__barray_check_bounds.exit1252 - %24 = shl nuw nsw i64 1, %"118_0.01322" +__barray_check_bounds.exit1257: ; preds = %__barray_check_bounds.exit1253 + %24 = shl nuw nsw i64 1, %"118_0.01323" %25 = xor i64 %21, %24 store i64 %25, ptr %5, align 4 - %26 = getelementptr inbounds nuw i64, ptr %4, i64 %"118_0.01322" + %26 = getelementptr inbounds nuw i64, ptr %4, i64 %"118_0.01323" %27 = load i64, ptr %26, align 4 %28 = lshr i64 %25, %20 %29 = trunc i64 %28 to i1 - br i1 %29, label %panic.i1257, label %__barray_check_bounds.exit1262 + br i1 %29, label %panic.i1258, label %__barray_check_bounds.exit1263 -panic.i1257: ; preds = %__barray_check_bounds.exit1256 +panic.i1258: ; preds = %__barray_check_bounds.exit1257 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_check_bounds.exit1262: ; preds = %__barray_check_bounds.exit1256 - %30 = shl nuw nsw i64 2, %"118_0.01322" +__barray_check_bounds.exit1263: ; preds = %__barray_check_bounds.exit1257 + %30 = shl nuw nsw i64 2, %"118_0.01323" %31 = xor i64 %25, %30 store i64 %31, ptr %5, align 4 %32 = getelementptr inbounds nuw i64, ptr %4, i64 %20 @@ -140,78 +140,78 @@ __barray_check_bounds.exit1262: ; preds = %__barray_check_boun tail call void @___rp(i64 %27, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rz(i64 %27, double 0xBFF921FB54442D18) %34 = load i64, ptr %5, align 4 - %35 = lshr i64 %34, %"118_0.01322" + %35 = lshr i64 %34, %"118_0.01323" %36 = trunc i64 %35 to i1 - br i1 %36, label %__barray_check_bounds.exit1266, label %panic.i1263 + br i1 %36, label %__barray_check_bounds.exit1267, label %panic.i1264 -panic.i1263: ; preds = %__barray_check_bounds.exit1262 +panic.i1264: ; preds = %__barray_check_bounds.exit1263 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_check_bounds.exit1266: ; preds = %__barray_check_bounds.exit1262 +__barray_check_bounds.exit1267: ; preds = %__barray_check_bounds.exit1263 %37 = xor i64 %34, %24 store i64 %37, ptr %5, align 4 store i64 %27, ptr %26, align 4 %38 = load i64, ptr %5, align 4 %39 = lshr i64 %38, %20 %40 = trunc i64 %39 to i1 - br i1 %40, label %__barray_mask_return.exit1268, label %panic.i1267 + br i1 %40, label %__barray_mask_return.exit1269, label %panic.i1268 -panic.i1267: ; preds = %__barray_check_bounds.exit1266 +panic.i1268: ; preds = %__barray_check_bounds.exit1267 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_mask_return.exit1268: ; preds = %__barray_check_bounds.exit1266 +__barray_mask_return.exit1269: ; preds = %__barray_check_bounds.exit1267 %41 = xor i64 %38, %30 store i64 %41, ptr %5, align 4 store i64 %33, ptr %32, align 4 %42 = add nuw nsw i64 %20, 1 - %exitcond1325 = icmp eq i64 %42, 20 - br i1 %exitcond1325, label %cond_exit_189, label %__barray_check_bounds.exit1252 + %exitcond1326 = icmp eq i64 %42, 20 + br i1 %exitcond1326, label %cond_exit_189, label %__barray_check_bounds.exit1253 -cond_exit_189: ; preds = %__barray_mask_return.exit1268 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) +cond_exit_189: ; preds = %__barray_mask_return.exit1269 + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 1) tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure_leaked) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___inc_future_refcount(i64 %___future_measure) + %read_uint = tail call i64 @___read_future_uint(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) %43 = icmp eq i64 %read_uint, 2 br i1 %43, label %44, label %cond_exit_267 cond_exit_267: ; preds = %cond_exit_189 - %read_uint378 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + %read_uint378 = tail call i64 @___read_future_uint(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) %.not = icmp eq i64 %read_uint378, 2 br i1 %.not, label %cond_247_case_0, label %cond_247_case_1 44: ; preds = %cond_exit_189 - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_int(ptr nonnull @res_head_leake.F4F32972.0, i64 20, i64 1) - br label %__barray_check_bounds.exit1274.preheader + br label %__barray_check_bounds.exit1275.preheader -__barray_check_bounds.exit1274.preheader: ; preds = %cond_247_case_1, %44 - br label %__barray_check_bounds.exit1274 +__barray_check_bounds.exit1275.preheader: ; preds = %cond_247_case_1, %44 + br label %__barray_check_bounds.exit1275 cond_247_case_1: ; preds = %cond_exit_267 %45 = icmp eq i64 %read_uint378, 1 tail call void @print_bool(ptr nonnull @res_head.AFE8E005.0, i64 14, i1 %45) - br label %__barray_check_bounds.exit1274.preheader + br label %__barray_check_bounds.exit1275.preheader cond_247_case_0: ; preds = %cond_exit_267 tail call void @panic(i32 1001, ptr nonnull @e_Option.unw.32D4E82D.0) unreachable -out_of_bounds.i1269: ; preds = %.thread +out_of_bounds.i1270: ; preds = %.thread tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") unreachable -__barray_check_bounds.exit1270: ; preds = %.thread +__barray_check_bounds.exit1271: ; preds = %.thread %46 = load i64, ptr %3, align 4 - %47 = lshr i64 %46, %"310_2.01329" + %47 = lshr i64 %46, %"310_2.01330" %48 = trunc i64 %47 to i1 - br i1 %48, label %cond_exit_314, label %panic.i1271 + br i1 %48, label %cond_exit_314, label %panic.i1272 -panic.i1271: ; preds = %__barray_check_bounds.exit1270 +panic.i1272: ; preds = %__barray_check_bounds.exit1271 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable @@ -220,91 +220,91 @@ mask_block_ok.i: ; preds = %cond_exit_314 %50 = or i64 %49, -1048576 store i64 %50, ptr %5, align 4 %51 = icmp eq i64 %50, -1 - br i1 %51, label %loop_body538.preheader.preheader, label %mask_block_err.i + br i1 %51, label %loop_body539.preheader.preheader, label %mask_block_err.i mask_block_err.i: ; preds = %mask_block_ok.i tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_check_bounds.exit1274: ; preds = %__barray_check_bounds.exit1274.preheader, %cond_exit_314 - %"310_0.sroa.15.01330" = phi i64 [ %52, %cond_exit_314 ], [ 0, %__barray_check_bounds.exit1274.preheader ] - %"310_2.01329" = phi i64 [ %60, %cond_exit_314 ], [ 0, %__barray_check_bounds.exit1274.preheader ] - %52 = add nuw nsw i64 %"310_0.sroa.15.01330", 1 +__barray_check_bounds.exit1275: ; preds = %__barray_check_bounds.exit1275.preheader, %cond_exit_314 + %"310_0.sroa.15.01331" = phi i64 [ %52, %cond_exit_314 ], [ 0, %__barray_check_bounds.exit1275.preheader ] + %"310_2.01330" = phi i64 [ %60, %cond_exit_314 ], [ 0, %__barray_check_bounds.exit1275.preheader ] + %52 = add nuw nsw i64 %"310_0.sroa.15.01331", 1 %53 = load i64, ptr %5, align 4 - %54 = lshr i64 %53, %"310_0.sroa.15.01330" + %54 = lshr i64 %53, %"310_0.sroa.15.01331" %55 = trunc i64 %54 to i1 - br i1 %55, label %panic.i1275, label %.thread + br i1 %55, label %panic.i1276, label %.thread -panic.i1275: ; preds = %__barray_check_bounds.exit1274 +panic.i1276: ; preds = %__barray_check_bounds.exit1275 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -.thread: ; preds = %__barray_check_bounds.exit1274 - %56 = shl nuw nsw i64 1, %"310_0.sroa.15.01330" +.thread: ; preds = %__barray_check_bounds.exit1275 + %56 = shl nuw nsw i64 1, %"310_0.sroa.15.01331" %57 = xor i64 %53, %56 store i64 %57, ptr %5, align 4 - %58 = getelementptr inbounds nuw i64, ptr %4, i64 %"310_0.sroa.15.01330" + %58 = getelementptr inbounds nuw i64, ptr %4, i64 %"310_0.sroa.15.01331" %59 = load i64, ptr %58, align 4 - %60 = add i64 %"310_2.01329", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %59) + %60 = add i64 %"310_2.01330", 1 + %___future_measure513 = tail call i64 @___future_measure(i64 %59, i64 0) tail call void @___qfree(i64 %59) - %61 = icmp ult i64 %"310_2.01329", 20 - br i1 %61, label %__barray_check_bounds.exit1270, label %out_of_bounds.i1269 + %61 = icmp ult i64 %"310_2.01330", 20 + br i1 %61, label %__barray_check_bounds.exit1271, label %out_of_bounds.i1270 -cond_exit_314: ; preds = %__barray_check_bounds.exit1270 - %62 = shl nuw nsw i64 1, %"310_2.01329" +cond_exit_314: ; preds = %__barray_check_bounds.exit1271 + %62 = shl nuw nsw i64 1, %"310_2.01330" %63 = xor i64 %46, %62 store i64 %63, ptr %3, align 4 - %64 = getelementptr inbounds nuw i64, ptr %2, i64 %"310_2.01329" - store i64 %lazy_measure, ptr %64, align 4 - %65 = icmp samesign ugt i64 %"310_0.sroa.15.01330", 18 - br i1 %65, label %mask_block_ok.i, label %__barray_check_bounds.exit1274 + %64 = getelementptr inbounds nuw i64, ptr %2, i64 %"310_2.01330" + store i64 %___future_measure513, ptr %64, align 4 + %65 = icmp samesign ugt i64 %"310_0.sroa.15.01331", 18 + br i1 %65, label %mask_block_ok.i, label %__barray_check_bounds.exit1275 -loop_body538.preheader.preheader: ; preds = %mask_block_ok.i +loop_body539.preheader.preheader: ; preds = %mask_block_ok.i tail call void @heap_free(ptr nonnull %4) tail call void @heap_free(ptr nonnull %5) - br label %__barray_check_bounds.exit1278 + br label %__barray_check_bounds.exit1279 -__barray_check_bounds.exit1278: ; preds = %cond_exit_380, %loop_body538.preheader.preheader - %"376_0.sroa.15.01324" = phi i64 [ %66, %cond_exit_380 ], [ 0, %loop_body538.preheader.preheader ] - %66 = add nuw nsw i64 %"376_0.sroa.15.01324", 1 +__barray_check_bounds.exit1279: ; preds = %cond_exit_380, %loop_body539.preheader.preheader + %"376_0.sroa.15.01325" = phi i64 [ %66, %cond_exit_380 ], [ 0, %loop_body539.preheader.preheader ] + %66 = add nuw nsw i64 %"376_0.sroa.15.01325", 1 %67 = load i64, ptr %3, align 4 - %68 = lshr i64 %67, %"376_0.sroa.15.01324" + %68 = lshr i64 %67, %"376_0.sroa.15.01325" %69 = trunc i64 %68 to i1 - br i1 %69, label %panic.i1279, label %__barray_check_bounds.exit1282 + br i1 %69, label %panic.i1280, label %__barray_check_bounds.exit1283 -panic.i1279: ; preds = %__barray_check_bounds.exit1278 +panic.i1280: ; preds = %__barray_check_bounds.exit1279 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_check_bounds.exit1282: ; preds = %__barray_check_bounds.exit1278 - %70 = shl nuw nsw i64 1, %"376_0.sroa.15.01324" +__barray_check_bounds.exit1283: ; preds = %__barray_check_bounds.exit1279 + %70 = shl nuw nsw i64 1, %"376_0.sroa.15.01325" %71 = xor i64 %67, %70 store i64 %71, ptr %3, align 4 - %72 = getelementptr inbounds nuw i64, ptr %2, i64 %"376_0.sroa.15.01324" + %72 = getelementptr inbounds nuw i64, ptr %2, i64 %"376_0.sroa.15.01325" %73 = load i64, ptr %72, align 4 tail call void @___inc_future_refcount(i64 %73) %74 = load i64, ptr %3, align 4 - %75 = lshr i64 %74, %"376_0.sroa.15.01324" + %75 = lshr i64 %74, %"376_0.sroa.15.01325" %76 = trunc i64 %75 to i1 - br i1 %76, label %__barray_check_bounds.exit1286, label %panic.i1283 + br i1 %76, label %__barray_check_bounds.exit1287, label %panic.i1284 -panic.i1283: ; preds = %__barray_check_bounds.exit1282 +panic.i1284: ; preds = %__barray_check_bounds.exit1283 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_check_bounds.exit1286: ; preds = %__barray_check_bounds.exit1282 +__barray_check_bounds.exit1287: ; preds = %__barray_check_bounds.exit1283 %77 = xor i64 %74, %70 store i64 %77, ptr %3, align 4 store i64 %73, ptr %72, align 4 %read_bool = tail call i1 @___read_future_bool(i64 %73) tail call void @___dec_future_refcount(i64 %73) %78 = load i64, ptr %1, align 4 - %79 = lshr i64 %78, %"376_0.sroa.15.01324" + %79 = lshr i64 %78, %"376_0.sroa.15.01325" %80 = trunc i64 %79 to i1 - br i1 %80, label %cond_exit_380, label %panic.i1287 + br i1 %80, label %cond_exit_380, label %panic.i1288 -panic.i1287: ; preds = %__barray_check_bounds.exit1286 +panic.i1288: ; preds = %__barray_check_bounds.exit1287 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable @@ -313,55 +313,55 @@ cond_565_case_0: ; preds = %cond_exit_565 %82 = or i64 %81, -1048576 store i64 %82, ptr %3, align 4 %83 = icmp eq i64 %82, -1 - br i1 %83, label %loop_out537, label %mask_block_err.i1292 + br i1 %83, label %loop_out538, label %mask_block_err.i1293 -mask_block_err.i1292: ; preds = %cond_565_case_0 +mask_block_err.i1293: ; preds = %cond_565_case_0 tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_check_bounds.exit1296: ; preds = %cond_exit_380, %cond_exit_565 - %"562_0.01331" = phi i64 [ %84, %cond_exit_565 ], [ 0, %cond_exit_380 ] - %84 = add nuw nsw i64 %"562_0.01331", 1 +__barray_check_bounds.exit1297: ; preds = %cond_exit_380, %cond_exit_565 + %"562_0.01332" = phi i64 [ %84, %cond_exit_565 ], [ 0, %cond_exit_380 ] + %84 = add nuw nsw i64 %"562_0.01332", 1 %85 = load i64, ptr %3, align 4 - %86 = lshr i64 %85, %"562_0.01331" + %86 = lshr i64 %85, %"562_0.01332" %87 = trunc i64 %86 to i1 - br i1 %87, label %cond_exit_565, label %__barray_mask_borrow.exit1300 + br i1 %87, label %cond_exit_565, label %__barray_mask_borrow.exit1301 -__barray_mask_borrow.exit1300: ; preds = %__barray_check_bounds.exit1296 - %88 = shl nuw nsw i64 1, %"562_0.01331" +__barray_mask_borrow.exit1301: ; preds = %__barray_check_bounds.exit1297 + %88 = shl nuw nsw i64 1, %"562_0.01332" %89 = xor i64 %85, %88 store i64 %89, ptr %3, align 4 - %90 = getelementptr inbounds nuw i64, ptr %2, i64 %"562_0.01331" + %90 = getelementptr inbounds nuw i64, ptr %2, i64 %"562_0.01332" %91 = load i64, ptr %90, align 4 tail call void @___dec_future_refcount(i64 %91) br label %cond_exit_565 -cond_exit_565: ; preds = %__barray_mask_borrow.exit1300, %__barray_check_bounds.exit1296 - %92 = icmp samesign ugt i64 %"562_0.01331", 18 - br i1 %92, label %cond_565_case_0, label %__barray_check_bounds.exit1296 +cond_exit_565: ; preds = %__barray_mask_borrow.exit1301, %__barray_check_bounds.exit1297 + %92 = icmp samesign ugt i64 %"562_0.01332", 18 + br i1 %92, label %cond_565_case_0, label %__barray_check_bounds.exit1297 -cond_exit_380: ; preds = %__barray_check_bounds.exit1286 +cond_exit_380: ; preds = %__barray_check_bounds.exit1287 %93 = xor i64 %78, %70 store i64 %93, ptr %1, align 4 - %94 = getelementptr inbounds nuw i1, ptr %0, i64 %"376_0.sroa.15.01324" + %94 = getelementptr inbounds nuw i1, ptr %0, i64 %"376_0.sroa.15.01325" store i1 %read_bool, ptr %94, align 1 - %95 = icmp eq i64 %"376_0.sroa.15.01324", 19 - br i1 %95, label %__barray_check_bounds.exit1296, label %__barray_check_bounds.exit1278 + %95 = icmp eq i64 %"376_0.sroa.15.01325", 19 + br i1 %95, label %__barray_check_bounds.exit1297, label %__barray_check_bounds.exit1279 -loop_out537: ; preds = %cond_565_case_0 +loop_out538: ; preds = %cond_565_case_0 tail call void @heap_free(ptr %2) tail call void @heap_free(ptr nonnull %3) %96 = load i64, ptr %1, align 4 %97 = and i64 %96, 1048575 store i64 %97, ptr %1, align 4 %98 = icmp eq i64 %97, 0 - br i1 %98, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1301 + br i1 %98, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1302 -mask_block_err.i1301: ; preds = %loop_out537 +mask_block_err.i1302: ; preds = %loop_out538 tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") unreachable -__barray_check_none_borrowed.exit: ; preds = %loop_out537 +__barray_check_none_borrowed.exit: ; preds = %loop_out538 %99 = tail call ptr @heap_alloc(i64 20) %100 = tail call ptr @heap_alloc(i64 8) store i64 0, ptr %100, align 1 @@ -371,13 +371,13 @@ __barray_check_none_borrowed.exit: ; preds = %loop_out537 %102 = and i64 %101, 1048575 store i64 %102, ptr %1, align 4 %103 = icmp eq i64 %102, 0 - br i1 %103, label %__barray_check_none_borrowed.exit1305, label %mask_block_err.i1303 + br i1 %103, label %__barray_check_none_borrowed.exit1306, label %mask_block_err.i1304 -mask_block_err.i1303: ; preds = %__barray_check_none_borrowed.exit +mask_block_err.i1304: ; preds = %__barray_check_none_borrowed.exit tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") unreachable -__barray_check_none_borrowed.exit1305: ; preds = %__barray_check_none_borrowed.exit +__barray_check_none_borrowed.exit1306: ; preds = %__barray_check_none_borrowed.exit %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 %y_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 4 %arr_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 8 @@ -400,7 +400,7 @@ declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immar ; Function Attrs: noreturn declare void @panic(i32, ptr) local_unnamed_addr #1 -declare i64 @___lazy_measure_leaked(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -416,8 +416,6 @@ declare void @print_bool(ptr, i64, i1) local_unnamed_addr declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr - declare i1 @___read_future_bool(i64) local_unnamed_addr ; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_from_head-helios-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_from_head-helios-aarch64-apple-darwin.ll index 71bec774..7bea24d3 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_from_head-helios-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_from_head-helios-aarch64-apple-darwin.ll @@ -129,22 +129,22 @@ __barray_mask_return.exit1224: ; preds = %__barray_check_boun br i1 %exitcond1279, label %cond_exit_185, label %__barray_check_bounds.exit1219 cond_exit_185: ; preds = %__barray_mask_return.exit1224 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) + %___lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure_leaked) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___inc_future_refcount(i64 %___lazy_measure_leaked) + %read_uint = tail call i64 @___read_future_uint(i64 %___lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) %29 = icmp eq i64 %read_uint, 2 br i1 %29, label %30, label %cond_exit_256 cond_exit_256: ; preds = %cond_exit_185 - %read_uint350 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + %read_uint350 = tail call i64 @___read_future_uint(i64 %___lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) %.not = icmp eq i64 %read_uint350, 2 br i1 %.not, label %cond_236_case_0, label %cond_236_case_1 30: ; preds = %cond_exit_185 - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) tail call void @print_int(ptr nonnull @res_head_leake.F4F32972.0, i64 20, i64 1) br label %__barray_check_bounds.exit1230.preheader @@ -205,7 +205,7 @@ panic.i1231: ; preds = %__barray_check_boun %44 = getelementptr inbounds nuw i64, ptr %4, i64 %"298_0.sroa.15.01284" %45 = load i64, ptr %44, align 4 %46 = add i64 %"298_2.01283", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %45) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %45) tail call void @___qfree(i64 %45) %47 = icmp ult i64 %"298_2.01283", 20 br i1 %47, label %__barray_check_bounds.exit1226, label %out_of_bounds.i1225 @@ -215,7 +215,7 @@ cond_exit_302: ; preds = %__barray_check_boun %49 = xor i64 %32, %48 store i64 %49, ptr %3, align 4 %50 = getelementptr inbounds nuw i64, ptr %2, i64 %"298_2.01283" - store i64 %lazy_measure, ptr %50, align 4 + store i64 %___lazy_measure, ptr %50, align 4 %51 = icmp samesign ugt i64 %"298_0.sroa.15.01284", 18 br i1 %51, label %mask_block_ok.i, label %__barray_check_bounds.exit1230 diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_from_head-helios-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_from_head-helios-aarch64-unknown-linux-gnu.ll index cdc73338..d665cac1 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_from_head-helios-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_from_head-helios-aarch64-unknown-linux-gnu.ll @@ -129,22 +129,22 @@ __barray_mask_return.exit1224: ; preds = %__barray_check_boun br i1 %exitcond1279, label %cond_exit_185, label %__barray_check_bounds.exit1219 cond_exit_185: ; preds = %__barray_mask_return.exit1224 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) + %___lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure_leaked) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___inc_future_refcount(i64 %___lazy_measure_leaked) + %read_uint = tail call i64 @___read_future_uint(i64 %___lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) %29 = icmp eq i64 %read_uint, 2 br i1 %29, label %30, label %cond_exit_256 cond_exit_256: ; preds = %cond_exit_185 - %read_uint350 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + %read_uint350 = tail call i64 @___read_future_uint(i64 %___lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) %.not = icmp eq i64 %read_uint350, 2 br i1 %.not, label %cond_236_case_0, label %cond_236_case_1 30: ; preds = %cond_exit_185 - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) tail call void @print_int(ptr nonnull @res_head_leake.F4F32972.0, i64 20, i64 1) br label %__barray_check_bounds.exit1230.preheader @@ -205,7 +205,7 @@ panic.i1231: ; preds = %__barray_check_boun %44 = getelementptr inbounds nuw i64, ptr %4, i64 %"298_0.sroa.15.01284" %45 = load i64, ptr %44, align 4 %46 = add i64 %"298_2.01283", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %45) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %45) tail call void @___qfree(i64 %45) %47 = icmp ult i64 %"298_2.01283", 20 br i1 %47, label %__barray_check_bounds.exit1226, label %out_of_bounds.i1225 @@ -215,7 +215,7 @@ cond_exit_302: ; preds = %__barray_check_boun %49 = xor i64 %32, %48 store i64 %49, ptr %3, align 4 %50 = getelementptr inbounds nuw i64, ptr %2, i64 %"298_2.01283" - store i64 %lazy_measure, ptr %50, align 4 + store i64 %___lazy_measure, ptr %50, align 4 %51 = icmp samesign ugt i64 %"298_0.sroa.15.01284", 18 br i1 %51, label %mask_block_ok.i, label %__barray_check_bounds.exit1230 diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_from_head-helios-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_from_head-helios-x86_64-apple-darwin.ll index 7252fad1..42b74855 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_from_head-helios-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_from_head-helios-x86_64-apple-darwin.ll @@ -129,22 +129,22 @@ __barray_mask_return.exit1224: ; preds = %__barray_check_boun br i1 %exitcond1279, label %cond_exit_185, label %__barray_check_bounds.exit1219 cond_exit_185: ; preds = %__barray_mask_return.exit1224 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) + %___lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure_leaked) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___inc_future_refcount(i64 %___lazy_measure_leaked) + %read_uint = tail call i64 @___read_future_uint(i64 %___lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) %29 = icmp eq i64 %read_uint, 2 br i1 %29, label %30, label %cond_exit_256 cond_exit_256: ; preds = %cond_exit_185 - %read_uint350 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + %read_uint350 = tail call i64 @___read_future_uint(i64 %___lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) %.not = icmp eq i64 %read_uint350, 2 br i1 %.not, label %cond_236_case_0, label %cond_236_case_1 30: ; preds = %cond_exit_185 - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) tail call void @print_int(ptr nonnull @res_head_leake.F4F32972.0, i64 20, i64 1) br label %__barray_check_bounds.exit1230.preheader @@ -205,7 +205,7 @@ panic.i1231: ; preds = %__barray_check_boun %44 = getelementptr inbounds nuw i64, ptr %4, i64 %"298_0.sroa.15.01284" %45 = load i64, ptr %44, align 4 %46 = add i64 %"298_2.01283", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %45) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %45) tail call void @___qfree(i64 %45) %47 = icmp ult i64 %"298_2.01283", 20 br i1 %47, label %__barray_check_bounds.exit1226, label %out_of_bounds.i1225 @@ -215,7 +215,7 @@ cond_exit_302: ; preds = %__barray_check_boun %49 = xor i64 %32, %48 store i64 %49, ptr %3, align 4 %50 = getelementptr inbounds nuw i64, ptr %2, i64 %"298_2.01283" - store i64 %lazy_measure, ptr %50, align 4 + store i64 %___lazy_measure, ptr %50, align 4 %51 = icmp samesign ugt i64 %"298_0.sroa.15.01284", 18 br i1 %51, label %mask_block_ok.i, label %__barray_check_bounds.exit1230 diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_from_head-helios-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_from_head-helios-x86_64-unknown-linux-gnu.ll index 1ef881c5..5076d0ff 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_from_head-helios-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_from_head-helios-x86_64-unknown-linux-gnu.ll @@ -129,22 +129,22 @@ __barray_mask_return.exit1224: ; preds = %__barray_check_boun br i1 %exitcond1279, label %cond_exit_185, label %__barray_check_bounds.exit1219 cond_exit_185: ; preds = %__barray_mask_return.exit1224 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) + %___lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure_leaked) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___inc_future_refcount(i64 %___lazy_measure_leaked) + %read_uint = tail call i64 @___read_future_uint(i64 %___lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) %29 = icmp eq i64 %read_uint, 2 br i1 %29, label %30, label %cond_exit_256 cond_exit_256: ; preds = %cond_exit_185 - %read_uint350 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + %read_uint350 = tail call i64 @___read_future_uint(i64 %___lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) %.not = icmp eq i64 %read_uint350, 2 br i1 %.not, label %cond_236_case_0, label %cond_236_case_1 30: ; preds = %cond_exit_185 - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) tail call void @print_int(ptr nonnull @res_head_leake.F4F32972.0, i64 20, i64 1) br label %__barray_check_bounds.exit1230.preheader @@ -205,7 +205,7 @@ panic.i1231: ; preds = %__barray_check_boun %44 = getelementptr inbounds nuw i64, ptr %4, i64 %"298_0.sroa.15.01284" %45 = load i64, ptr %44, align 4 %46 = add i64 %"298_2.01283", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %45) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %45) tail call void @___qfree(i64 %45) %47 = icmp ult i64 %"298_2.01283", 20 br i1 %47, label %__barray_check_bounds.exit1226, label %out_of_bounds.i1225 @@ -215,7 +215,7 @@ cond_exit_302: ; preds = %__barray_check_boun %49 = xor i64 %32, %48 store i64 %49, ptr %3, align 4 %50 = getelementptr inbounds nuw i64, ptr %2, i64 %"298_2.01283" - store i64 %lazy_measure, ptr %50, align 4 + store i64 %___lazy_measure, ptr %50, align 4 %51 = icmp samesign ugt i64 %"298_0.sroa.15.01284", 18 br i1 %51, label %mask_block_ok.i, label %__barray_check_bounds.exit1230 diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_from_head-helios-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_from_head-helios-x86_64-windows-gnu.ll index adae1b0f..4de66cd7 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_from_head-helios-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_from_head-helios-x86_64-windows-gnu.ll @@ -129,22 +129,22 @@ __barray_mask_return.exit1224: ; preds = %__barray_check_boun br i1 %exitcond1279, label %cond_exit_185, label %__barray_check_bounds.exit1219 cond_exit_185: ; preds = %__barray_mask_return.exit1224 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) + %___lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure_leaked) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___inc_future_refcount(i64 %___lazy_measure_leaked) + %read_uint = tail call i64 @___read_future_uint(i64 %___lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) %29 = icmp eq i64 %read_uint, 2 br i1 %29, label %30, label %cond_exit_256 cond_exit_256: ; preds = %cond_exit_185 - %read_uint350 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + %read_uint350 = tail call i64 @___read_future_uint(i64 %___lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) %.not = icmp eq i64 %read_uint350, 2 br i1 %.not, label %cond_236_case_0, label %cond_236_case_1 30: ; preds = %cond_exit_185 - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) tail call void @print_int(ptr nonnull @res_head_leake.F4F32972.0, i64 20, i64 1) br label %__barray_check_bounds.exit1230.preheader @@ -205,7 +205,7 @@ panic.i1231: ; preds = %__barray_check_boun %44 = getelementptr inbounds nuw i64, ptr %4, i64 %"298_0.sroa.15.01284" %45 = load i64, ptr %44, align 4 %46 = add i64 %"298_2.01283", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %45) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %45) tail call void @___qfree(i64 %45) %47 = icmp ult i64 %"298_2.01283", 20 br i1 %47, label %__barray_check_bounds.exit1226, label %out_of_bounds.i1225 @@ -215,7 +215,7 @@ cond_exit_302: ; preds = %__barray_check_boun %49 = xor i64 %32, %48 store i64 %49, ptr %3, align 4 %50 = getelementptr inbounds nuw i64, ptr %2, i64 %"298_2.01283" - store i64 %lazy_measure, ptr %50, align 4 + store i64 %___lazy_measure, ptr %50, align 4 %51 = icmp samesign ugt i64 %"298_0.sroa.15.01284", 18 br i1 %51, label %mask_block_ok.i, label %__barray_check_bounds.exit1230 diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_from_head-sol-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_from_head-sol-aarch64-apple-darwin.ll index f9316b44..4fcbba4d 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_from_head-sol-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_from_head-sol-aarch64-apple-darwin.ll @@ -48,24 +48,24 @@ loop_body: ; preds = %cond_exit_13, %__hu cond_13_case_1: ; preds = %loop_body %8 = add i64 %"9_2.0", 1 - %qalloc.i1214 = tail call i64 @___qalloc() - %not_max.not.not.i1215 = icmp eq i64 %qalloc.i1214, -1 - br i1 %not_max.not.not.i1215, label %cond_474_case_0.i1216, label %__hugr__.__tk2_sol_qalloc.470.exit1217 + %qalloc.i1215 = tail call i64 @___qalloc() + %not_max.not.not.i1216 = icmp eq i64 %qalloc.i1215, -1 + br i1 %not_max.not.not.i1216, label %cond_474_case_0.i1217, label %__hugr__.__tk2_sol_qalloc.470.exit1218 -cond_474_case_0.i1216: ; preds = %cond_13_case_1 +cond_474_case_0.i1217: ; preds = %cond_13_case_1 tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_sol_qalloc.470.exit1217: ; preds = %cond_13_case_1 - tail call void @___reset(i64 %qalloc.i1214) +__hugr__.__tk2_sol_qalloc.470.exit1218: ; preds = %cond_13_case_1 + tail call void @___reset(i64 %qalloc.i1215) %9 = icmp ult i64 %"9_2.0", 20 br i1 %9, label %__barray_check_bounds.exit, label %out_of_bounds.i -out_of_bounds.i: ; preds = %__hugr__.__tk2_sol_qalloc.470.exit1217 +out_of_bounds.i: ; preds = %__hugr__.__tk2_sol_qalloc.470.exit1218 tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") unreachable -__barray_check_bounds.exit: ; preds = %__hugr__.__tk2_sol_qalloc.470.exit1217 +__barray_check_bounds.exit: ; preds = %__hugr__.__tk2_sol_qalloc.470.exit1218 %10 = load i64, ptr %5, align 4 %11 = lshr i64 %10, %"9_2.0" %12 = trunc i64 %11 to i1 @@ -80,31 +80,31 @@ __barray_mask_return.exit: ; preds = %__barray_check_boun %14 = xor i64 %10, %13 store i64 %14, ptr %5, align 4 %15 = getelementptr inbounds nuw i64, ptr %4, i64 %"9_2.0" - store i64 %qalloc.i1214, ptr %15, align 4 + store i64 %qalloc.i1215, ptr %15, align 4 br label %cond_exit_13 cond_exit_13: ; preds = %loop_body, %__barray_mask_return.exit %"2107.0" = phi i64 [ %8, %__barray_mask_return.exit ], [ %"9_2.0", %loop_body ] %exitcond = icmp eq i64 %7, 21 - br i1 %exitcond, label %__barray_check_bounds.exit1219, label %loop_body + br i1 %exitcond, label %__barray_check_bounds.exit1220, label %loop_body -__barray_check_bounds.exit1219: ; preds = %cond_exit_13, %__barray_mask_return.exit1224 - %16 = phi i64 [ %28, %__barray_mask_return.exit1224 ], [ 1, %cond_exit_13 ] - %"114_0.01276" = phi i64 [ %16, %__barray_mask_return.exit1224 ], [ 0, %cond_exit_13 ] +__barray_check_bounds.exit1220: ; preds = %cond_exit_13, %__barray_mask_return.exit1225 + %16 = phi i64 [ %28, %__barray_mask_return.exit1225 ], [ 1, %cond_exit_13 ] + %"114_0.01277" = phi i64 [ %16, %__barray_mask_return.exit1225 ], [ 0, %cond_exit_13 ] %17 = load i64, ptr %5, align 4 - %18 = lshr i64 %17, %"114_0.01276" + %18 = lshr i64 %17, %"114_0.01277" %19 = trunc i64 %18 to i1 - br i1 %19, label %panic.i1220, label %__barray_check_bounds.exit1222 + br i1 %19, label %panic.i1221, label %__barray_check_bounds.exit1223 -panic.i1220: ; preds = %__barray_check_bounds.exit1219 +panic.i1221: ; preds = %__barray_check_bounds.exit1220 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_check_bounds.exit1222: ; preds = %__barray_check_bounds.exit1219 - %20 = shl nuw nsw i64 1, %"114_0.01276" +__barray_check_bounds.exit1223: ; preds = %__barray_check_bounds.exit1220 + %20 = shl nuw nsw i64 1, %"114_0.01277" %21 = xor i64 %17, %20 store i64 %21, ptr %5, align 4 - %22 = getelementptr inbounds nuw i64, ptr %4, i64 %"114_0.01276" + %22 = getelementptr inbounds nuw i64, ptr %4, i64 %"114_0.01277" %23 = load i64, ptr %22, align 4 tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rpp(i64 %qalloc.i, i64 %23, double 0x3FF921FB54442D18, double 0.000000e+00) @@ -112,65 +112,65 @@ __barray_check_bounds.exit1222: ; preds = %__barray_check_boun tail call void @___rp(i64 %qalloc.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18) %24 = load i64, ptr %5, align 4 - %25 = lshr i64 %24, %"114_0.01276" + %25 = lshr i64 %24, %"114_0.01277" %26 = trunc i64 %25 to i1 - br i1 %26, label %__barray_mask_return.exit1224, label %panic.i1223 + br i1 %26, label %__barray_mask_return.exit1225, label %panic.i1224 -panic.i1223: ; preds = %__barray_check_bounds.exit1222 +panic.i1224: ; preds = %__barray_check_bounds.exit1223 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_mask_return.exit1224: ; preds = %__barray_check_bounds.exit1222 +__barray_mask_return.exit1225: ; preds = %__barray_check_bounds.exit1223 %27 = xor i64 %24, %20 store i64 %27, ptr %5, align 4 store i64 %23, ptr %22, align 4 %28 = add nuw nsw i64 %16, 1 - %exitcond1279 = icmp eq i64 %28, 21 - br i1 %exitcond1279, label %cond_exit_185, label %__barray_check_bounds.exit1219 + %exitcond1280 = icmp eq i64 %28, 21 + br i1 %exitcond1280, label %cond_exit_185, label %__barray_check_bounds.exit1220 -cond_exit_185: ; preds = %__barray_mask_return.exit1224 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) +cond_exit_185: ; preds = %__barray_mask_return.exit1225 + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 1) tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure_leaked) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___inc_future_refcount(i64 %___future_measure) + %read_uint = tail call i64 @___read_future_uint(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) %29 = icmp eq i64 %read_uint, 2 br i1 %29, label %30, label %cond_exit_256 cond_exit_256: ; preds = %cond_exit_185 - %read_uint350 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + %read_uint350 = tail call i64 @___read_future_uint(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) %.not = icmp eq i64 %read_uint350, 2 br i1 %.not, label %cond_236_case_0, label %cond_236_case_1 30: ; preds = %cond_exit_185 - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_int(ptr nonnull @res_head_leake.F4F32972.0, i64 20, i64 1) - br label %__barray_check_bounds.exit1230.preheader + br label %__barray_check_bounds.exit1231.preheader -__barray_check_bounds.exit1230.preheader: ; preds = %cond_236_case_1, %30 - br label %__barray_check_bounds.exit1230 +__barray_check_bounds.exit1231.preheader: ; preds = %cond_236_case_1, %30 + br label %__barray_check_bounds.exit1231 cond_236_case_1: ; preds = %cond_exit_256 %31 = icmp eq i64 %read_uint350, 1 tail call void @print_bool(ptr nonnull @res_head.AFE8E005.0, i64 14, i1 %31) - br label %__barray_check_bounds.exit1230.preheader + br label %__barray_check_bounds.exit1231.preheader cond_236_case_0: ; preds = %cond_exit_256 tail call void @panic(i32 1001, ptr nonnull @e_Option.unw.32D4E82D.0) unreachable -out_of_bounds.i1225: ; preds = %.thread +out_of_bounds.i1226: ; preds = %.thread tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") unreachable -__barray_check_bounds.exit1226: ; preds = %.thread +__barray_check_bounds.exit1227: ; preds = %.thread %32 = load i64, ptr %3, align 4 - %33 = lshr i64 %32, %"298_2.01283" + %33 = lshr i64 %32, %"298_2.01284" %34 = trunc i64 %33 to i1 - br i1 %34, label %cond_exit_302, label %panic.i1227 + br i1 %34, label %cond_exit_302, label %panic.i1228 -panic.i1227: ; preds = %__barray_check_bounds.exit1226 +panic.i1228: ; preds = %__barray_check_bounds.exit1227 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable @@ -179,91 +179,91 @@ mask_block_ok.i: ; preds = %cond_exit_302 %36 = or i64 %35, -1048576 store i64 %36, ptr %5, align 4 %37 = icmp eq i64 %36, -1 - br i1 %37, label %loop_body510.preheader.preheader, label %mask_block_err.i + br i1 %37, label %loop_body511.preheader.preheader, label %mask_block_err.i mask_block_err.i: ; preds = %mask_block_ok.i tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_check_bounds.exit1230: ; preds = %__barray_check_bounds.exit1230.preheader, %cond_exit_302 - %"298_0.sroa.15.01284" = phi i64 [ %38, %cond_exit_302 ], [ 0, %__barray_check_bounds.exit1230.preheader ] - %"298_2.01283" = phi i64 [ %46, %cond_exit_302 ], [ 0, %__barray_check_bounds.exit1230.preheader ] - %38 = add nuw nsw i64 %"298_0.sroa.15.01284", 1 +__barray_check_bounds.exit1231: ; preds = %__barray_check_bounds.exit1231.preheader, %cond_exit_302 + %"298_0.sroa.15.01285" = phi i64 [ %38, %cond_exit_302 ], [ 0, %__barray_check_bounds.exit1231.preheader ] + %"298_2.01284" = phi i64 [ %46, %cond_exit_302 ], [ 0, %__barray_check_bounds.exit1231.preheader ] + %38 = add nuw nsw i64 %"298_0.sroa.15.01285", 1 %39 = load i64, ptr %5, align 4 - %40 = lshr i64 %39, %"298_0.sroa.15.01284" + %40 = lshr i64 %39, %"298_0.sroa.15.01285" %41 = trunc i64 %40 to i1 - br i1 %41, label %panic.i1231, label %.thread + br i1 %41, label %panic.i1232, label %.thread -panic.i1231: ; preds = %__barray_check_bounds.exit1230 +panic.i1232: ; preds = %__barray_check_bounds.exit1231 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -.thread: ; preds = %__barray_check_bounds.exit1230 - %42 = shl nuw nsw i64 1, %"298_0.sroa.15.01284" +.thread: ; preds = %__barray_check_bounds.exit1231 + %42 = shl nuw nsw i64 1, %"298_0.sroa.15.01285" %43 = xor i64 %39, %42 store i64 %43, ptr %5, align 4 - %44 = getelementptr inbounds nuw i64, ptr %4, i64 %"298_0.sroa.15.01284" + %44 = getelementptr inbounds nuw i64, ptr %4, i64 %"298_0.sroa.15.01285" %45 = load i64, ptr %44, align 4 - %46 = add i64 %"298_2.01283", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %45) + %46 = add i64 %"298_2.01284", 1 + %___future_measure485 = tail call i64 @___future_measure(i64 %45, i64 0) tail call void @___qfree(i64 %45) - %47 = icmp ult i64 %"298_2.01283", 20 - br i1 %47, label %__barray_check_bounds.exit1226, label %out_of_bounds.i1225 + %47 = icmp ult i64 %"298_2.01284", 20 + br i1 %47, label %__barray_check_bounds.exit1227, label %out_of_bounds.i1226 -cond_exit_302: ; preds = %__barray_check_bounds.exit1226 - %48 = shl nuw nsw i64 1, %"298_2.01283" +cond_exit_302: ; preds = %__barray_check_bounds.exit1227 + %48 = shl nuw nsw i64 1, %"298_2.01284" %49 = xor i64 %32, %48 store i64 %49, ptr %3, align 4 - %50 = getelementptr inbounds nuw i64, ptr %2, i64 %"298_2.01283" - store i64 %lazy_measure, ptr %50, align 4 - %51 = icmp samesign ugt i64 %"298_0.sroa.15.01284", 18 - br i1 %51, label %mask_block_ok.i, label %__barray_check_bounds.exit1230 + %50 = getelementptr inbounds nuw i64, ptr %2, i64 %"298_2.01284" + store i64 %___future_measure485, ptr %50, align 4 + %51 = icmp samesign ugt i64 %"298_0.sroa.15.01285", 18 + br i1 %51, label %mask_block_ok.i, label %__barray_check_bounds.exit1231 -loop_body510.preheader.preheader: ; preds = %mask_block_ok.i +loop_body511.preheader.preheader: ; preds = %mask_block_ok.i tail call void @heap_free(ptr nonnull %4) tail call void @heap_free(ptr nonnull %5) - br label %__barray_check_bounds.exit1234 + br label %__barray_check_bounds.exit1235 -__barray_check_bounds.exit1234: ; preds = %cond_exit_368, %loop_body510.preheader.preheader - %"364_0.sroa.15.01278" = phi i64 [ %52, %cond_exit_368 ], [ 0, %loop_body510.preheader.preheader ] - %52 = add nuw nsw i64 %"364_0.sroa.15.01278", 1 +__barray_check_bounds.exit1235: ; preds = %cond_exit_368, %loop_body511.preheader.preheader + %"364_0.sroa.15.01279" = phi i64 [ %52, %cond_exit_368 ], [ 0, %loop_body511.preheader.preheader ] + %52 = add nuw nsw i64 %"364_0.sroa.15.01279", 1 %53 = load i64, ptr %3, align 4 - %54 = lshr i64 %53, %"364_0.sroa.15.01278" + %54 = lshr i64 %53, %"364_0.sroa.15.01279" %55 = trunc i64 %54 to i1 - br i1 %55, label %panic.i1235, label %__barray_check_bounds.exit1238 + br i1 %55, label %panic.i1236, label %__barray_check_bounds.exit1239 -panic.i1235: ; preds = %__barray_check_bounds.exit1234 +panic.i1236: ; preds = %__barray_check_bounds.exit1235 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_check_bounds.exit1238: ; preds = %__barray_check_bounds.exit1234 - %56 = shl nuw nsw i64 1, %"364_0.sroa.15.01278" +__barray_check_bounds.exit1239: ; preds = %__barray_check_bounds.exit1235 + %56 = shl nuw nsw i64 1, %"364_0.sroa.15.01279" %57 = xor i64 %53, %56 store i64 %57, ptr %3, align 4 - %58 = getelementptr inbounds nuw i64, ptr %2, i64 %"364_0.sroa.15.01278" + %58 = getelementptr inbounds nuw i64, ptr %2, i64 %"364_0.sroa.15.01279" %59 = load i64, ptr %58, align 4 tail call void @___inc_future_refcount(i64 %59) %60 = load i64, ptr %3, align 4 - %61 = lshr i64 %60, %"364_0.sroa.15.01278" + %61 = lshr i64 %60, %"364_0.sroa.15.01279" %62 = trunc i64 %61 to i1 - br i1 %62, label %__barray_check_bounds.exit1242, label %panic.i1239 + br i1 %62, label %__barray_check_bounds.exit1243, label %panic.i1240 -panic.i1239: ; preds = %__barray_check_bounds.exit1238 +panic.i1240: ; preds = %__barray_check_bounds.exit1239 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_check_bounds.exit1242: ; preds = %__barray_check_bounds.exit1238 +__barray_check_bounds.exit1243: ; preds = %__barray_check_bounds.exit1239 %63 = xor i64 %60, %56 store i64 %63, ptr %3, align 4 store i64 %59, ptr %58, align 4 %read_bool = tail call i1 @___read_future_bool(i64 %59) tail call void @___dec_future_refcount(i64 %59) %64 = load i64, ptr %1, align 4 - %65 = lshr i64 %64, %"364_0.sroa.15.01278" + %65 = lshr i64 %64, %"364_0.sroa.15.01279" %66 = trunc i64 %65 to i1 - br i1 %66, label %cond_exit_368, label %panic.i1243 + br i1 %66, label %cond_exit_368, label %panic.i1244 -panic.i1243: ; preds = %__barray_check_bounds.exit1242 +panic.i1244: ; preds = %__barray_check_bounds.exit1243 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable @@ -272,55 +272,55 @@ cond_549_case_0: ; preds = %cond_exit_549 %68 = or i64 %67, -1048576 store i64 %68, ptr %3, align 4 %69 = icmp eq i64 %68, -1 - br i1 %69, label %loop_out509, label %mask_block_err.i1248 + br i1 %69, label %loop_out510, label %mask_block_err.i1249 -mask_block_err.i1248: ; preds = %cond_549_case_0 +mask_block_err.i1249: ; preds = %cond_549_case_0 tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_check_bounds.exit1252: ; preds = %cond_exit_368, %cond_exit_549 - %"546_0.01285" = phi i64 [ %70, %cond_exit_549 ], [ 0, %cond_exit_368 ] - %70 = add nuw nsw i64 %"546_0.01285", 1 +__barray_check_bounds.exit1253: ; preds = %cond_exit_368, %cond_exit_549 + %"546_0.01286" = phi i64 [ %70, %cond_exit_549 ], [ 0, %cond_exit_368 ] + %70 = add nuw nsw i64 %"546_0.01286", 1 %71 = load i64, ptr %3, align 4 - %72 = lshr i64 %71, %"546_0.01285" + %72 = lshr i64 %71, %"546_0.01286" %73 = trunc i64 %72 to i1 - br i1 %73, label %cond_exit_549, label %__barray_mask_borrow.exit1256 + br i1 %73, label %cond_exit_549, label %__barray_mask_borrow.exit1257 -__barray_mask_borrow.exit1256: ; preds = %__barray_check_bounds.exit1252 - %74 = shl nuw nsw i64 1, %"546_0.01285" +__barray_mask_borrow.exit1257: ; preds = %__barray_check_bounds.exit1253 + %74 = shl nuw nsw i64 1, %"546_0.01286" %75 = xor i64 %71, %74 store i64 %75, ptr %3, align 4 - %76 = getelementptr inbounds nuw i64, ptr %2, i64 %"546_0.01285" + %76 = getelementptr inbounds nuw i64, ptr %2, i64 %"546_0.01286" %77 = load i64, ptr %76, align 4 tail call void @___dec_future_refcount(i64 %77) br label %cond_exit_549 -cond_exit_549: ; preds = %__barray_mask_borrow.exit1256, %__barray_check_bounds.exit1252 - %78 = icmp samesign ugt i64 %"546_0.01285", 18 - br i1 %78, label %cond_549_case_0, label %__barray_check_bounds.exit1252 +cond_exit_549: ; preds = %__barray_mask_borrow.exit1257, %__barray_check_bounds.exit1253 + %78 = icmp samesign ugt i64 %"546_0.01286", 18 + br i1 %78, label %cond_549_case_0, label %__barray_check_bounds.exit1253 -cond_exit_368: ; preds = %__barray_check_bounds.exit1242 +cond_exit_368: ; preds = %__barray_check_bounds.exit1243 %79 = xor i64 %64, %56 store i64 %79, ptr %1, align 4 - %80 = getelementptr inbounds nuw i1, ptr %0, i64 %"364_0.sroa.15.01278" + %80 = getelementptr inbounds nuw i1, ptr %0, i64 %"364_0.sroa.15.01279" store i1 %read_bool, ptr %80, align 1 - %81 = icmp eq i64 %"364_0.sroa.15.01278", 19 - br i1 %81, label %__barray_check_bounds.exit1252, label %__barray_check_bounds.exit1234 + %81 = icmp eq i64 %"364_0.sroa.15.01279", 19 + br i1 %81, label %__barray_check_bounds.exit1253, label %__barray_check_bounds.exit1235 -loop_out509: ; preds = %cond_549_case_0 +loop_out510: ; preds = %cond_549_case_0 tail call void @heap_free(ptr %2) tail call void @heap_free(ptr nonnull %3) %82 = load i64, ptr %1, align 4 %83 = and i64 %82, 1048575 store i64 %83, ptr %1, align 4 %84 = icmp eq i64 %83, 0 - br i1 %84, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1257 + br i1 %84, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1258 -mask_block_err.i1257: ; preds = %loop_out509 +mask_block_err.i1258: ; preds = %loop_out510 tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") unreachable -__barray_check_none_borrowed.exit: ; preds = %loop_out509 +__barray_check_none_borrowed.exit: ; preds = %loop_out510 %85 = tail call ptr @heap_alloc(i64 20) %86 = tail call ptr @heap_alloc(i64 8) store i64 0, ptr %86, align 1 @@ -330,13 +330,13 @@ __barray_check_none_borrowed.exit: ; preds = %loop_out509 %88 = and i64 %87, 1048575 store i64 %88, ptr %1, align 4 %89 = icmp eq i64 %88, 0 - br i1 %89, label %__barray_check_none_borrowed.exit1261, label %mask_block_err.i1259 + br i1 %89, label %__barray_check_none_borrowed.exit1262, label %mask_block_err.i1260 -mask_block_err.i1259: ; preds = %__barray_check_none_borrowed.exit +mask_block_err.i1260: ; preds = %__barray_check_none_borrowed.exit tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") unreachable -__barray_check_none_borrowed.exit1261: ; preds = %__barray_check_none_borrowed.exit +__barray_check_none_borrowed.exit1262: ; preds = %__barray_check_none_borrowed.exit %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 %y_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 4 %arr_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 8 @@ -359,7 +359,7 @@ declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immar ; Function Attrs: noreturn declare void @panic(i32, ptr) local_unnamed_addr #1 -declare i64 @___lazy_measure_leaked(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -375,8 +375,6 @@ declare void @print_bool(ptr, i64, i1) local_unnamed_addr declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr - declare i1 @___read_future_bool(i64) local_unnamed_addr ; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_from_head-sol-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_from_head-sol-aarch64-unknown-linux-gnu.ll index 070d0ec1..bffeb9cf 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_from_head-sol-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_from_head-sol-aarch64-unknown-linux-gnu.ll @@ -48,24 +48,24 @@ loop_body: ; preds = %cond_exit_13, %__hu cond_13_case_1: ; preds = %loop_body %8 = add i64 %"9_2.0", 1 - %qalloc.i1214 = tail call i64 @___qalloc() - %not_max.not.not.i1215 = icmp eq i64 %qalloc.i1214, -1 - br i1 %not_max.not.not.i1215, label %cond_474_case_0.i1216, label %__hugr__.__tk2_sol_qalloc.470.exit1217 + %qalloc.i1215 = tail call i64 @___qalloc() + %not_max.not.not.i1216 = icmp eq i64 %qalloc.i1215, -1 + br i1 %not_max.not.not.i1216, label %cond_474_case_0.i1217, label %__hugr__.__tk2_sol_qalloc.470.exit1218 -cond_474_case_0.i1216: ; preds = %cond_13_case_1 +cond_474_case_0.i1217: ; preds = %cond_13_case_1 tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_sol_qalloc.470.exit1217: ; preds = %cond_13_case_1 - tail call void @___reset(i64 %qalloc.i1214) +__hugr__.__tk2_sol_qalloc.470.exit1218: ; preds = %cond_13_case_1 + tail call void @___reset(i64 %qalloc.i1215) %9 = icmp ult i64 %"9_2.0", 20 br i1 %9, label %__barray_check_bounds.exit, label %out_of_bounds.i -out_of_bounds.i: ; preds = %__hugr__.__tk2_sol_qalloc.470.exit1217 +out_of_bounds.i: ; preds = %__hugr__.__tk2_sol_qalloc.470.exit1218 tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") unreachable -__barray_check_bounds.exit: ; preds = %__hugr__.__tk2_sol_qalloc.470.exit1217 +__barray_check_bounds.exit: ; preds = %__hugr__.__tk2_sol_qalloc.470.exit1218 %10 = load i64, ptr %5, align 4 %11 = lshr i64 %10, %"9_2.0" %12 = trunc i64 %11 to i1 @@ -80,31 +80,31 @@ __barray_mask_return.exit: ; preds = %__barray_check_boun %14 = xor i64 %10, %13 store i64 %14, ptr %5, align 4 %15 = getelementptr inbounds nuw i64, ptr %4, i64 %"9_2.0" - store i64 %qalloc.i1214, ptr %15, align 4 + store i64 %qalloc.i1215, ptr %15, align 4 br label %cond_exit_13 cond_exit_13: ; preds = %loop_body, %__barray_mask_return.exit %"2107.0" = phi i64 [ %8, %__barray_mask_return.exit ], [ %"9_2.0", %loop_body ] %exitcond = icmp eq i64 %7, 21 - br i1 %exitcond, label %__barray_check_bounds.exit1219, label %loop_body + br i1 %exitcond, label %__barray_check_bounds.exit1220, label %loop_body -__barray_check_bounds.exit1219: ; preds = %cond_exit_13, %__barray_mask_return.exit1224 - %16 = phi i64 [ %28, %__barray_mask_return.exit1224 ], [ 1, %cond_exit_13 ] - %"114_0.01276" = phi i64 [ %16, %__barray_mask_return.exit1224 ], [ 0, %cond_exit_13 ] +__barray_check_bounds.exit1220: ; preds = %cond_exit_13, %__barray_mask_return.exit1225 + %16 = phi i64 [ %28, %__barray_mask_return.exit1225 ], [ 1, %cond_exit_13 ] + %"114_0.01277" = phi i64 [ %16, %__barray_mask_return.exit1225 ], [ 0, %cond_exit_13 ] %17 = load i64, ptr %5, align 4 - %18 = lshr i64 %17, %"114_0.01276" + %18 = lshr i64 %17, %"114_0.01277" %19 = trunc i64 %18 to i1 - br i1 %19, label %panic.i1220, label %__barray_check_bounds.exit1222 + br i1 %19, label %panic.i1221, label %__barray_check_bounds.exit1223 -panic.i1220: ; preds = %__barray_check_bounds.exit1219 +panic.i1221: ; preds = %__barray_check_bounds.exit1220 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_check_bounds.exit1222: ; preds = %__barray_check_bounds.exit1219 - %20 = shl nuw nsw i64 1, %"114_0.01276" +__barray_check_bounds.exit1223: ; preds = %__barray_check_bounds.exit1220 + %20 = shl nuw nsw i64 1, %"114_0.01277" %21 = xor i64 %17, %20 store i64 %21, ptr %5, align 4 - %22 = getelementptr inbounds nuw i64, ptr %4, i64 %"114_0.01276" + %22 = getelementptr inbounds nuw i64, ptr %4, i64 %"114_0.01277" %23 = load i64, ptr %22, align 4 tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rpp(i64 %qalloc.i, i64 %23, double 0x3FF921FB54442D18, double 0.000000e+00) @@ -112,65 +112,65 @@ __barray_check_bounds.exit1222: ; preds = %__barray_check_boun tail call void @___rp(i64 %qalloc.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18) %24 = load i64, ptr %5, align 4 - %25 = lshr i64 %24, %"114_0.01276" + %25 = lshr i64 %24, %"114_0.01277" %26 = trunc i64 %25 to i1 - br i1 %26, label %__barray_mask_return.exit1224, label %panic.i1223 + br i1 %26, label %__barray_mask_return.exit1225, label %panic.i1224 -panic.i1223: ; preds = %__barray_check_bounds.exit1222 +panic.i1224: ; preds = %__barray_check_bounds.exit1223 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_mask_return.exit1224: ; preds = %__barray_check_bounds.exit1222 +__barray_mask_return.exit1225: ; preds = %__barray_check_bounds.exit1223 %27 = xor i64 %24, %20 store i64 %27, ptr %5, align 4 store i64 %23, ptr %22, align 4 %28 = add nuw nsw i64 %16, 1 - %exitcond1279 = icmp eq i64 %28, 21 - br i1 %exitcond1279, label %cond_exit_185, label %__barray_check_bounds.exit1219 + %exitcond1280 = icmp eq i64 %28, 21 + br i1 %exitcond1280, label %cond_exit_185, label %__barray_check_bounds.exit1220 -cond_exit_185: ; preds = %__barray_mask_return.exit1224 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) +cond_exit_185: ; preds = %__barray_mask_return.exit1225 + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 1) tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure_leaked) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___inc_future_refcount(i64 %___future_measure) + %read_uint = tail call i64 @___read_future_uint(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) %29 = icmp eq i64 %read_uint, 2 br i1 %29, label %30, label %cond_exit_256 cond_exit_256: ; preds = %cond_exit_185 - %read_uint350 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + %read_uint350 = tail call i64 @___read_future_uint(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) %.not = icmp eq i64 %read_uint350, 2 br i1 %.not, label %cond_236_case_0, label %cond_236_case_1 30: ; preds = %cond_exit_185 - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_int(ptr nonnull @res_head_leake.F4F32972.0, i64 20, i64 1) - br label %__barray_check_bounds.exit1230.preheader + br label %__barray_check_bounds.exit1231.preheader -__barray_check_bounds.exit1230.preheader: ; preds = %cond_236_case_1, %30 - br label %__barray_check_bounds.exit1230 +__barray_check_bounds.exit1231.preheader: ; preds = %cond_236_case_1, %30 + br label %__barray_check_bounds.exit1231 cond_236_case_1: ; preds = %cond_exit_256 %31 = icmp eq i64 %read_uint350, 1 tail call void @print_bool(ptr nonnull @res_head.AFE8E005.0, i64 14, i1 %31) - br label %__barray_check_bounds.exit1230.preheader + br label %__barray_check_bounds.exit1231.preheader cond_236_case_0: ; preds = %cond_exit_256 tail call void @panic(i32 1001, ptr nonnull @e_Option.unw.32D4E82D.0) unreachable -out_of_bounds.i1225: ; preds = %.thread +out_of_bounds.i1226: ; preds = %.thread tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") unreachable -__barray_check_bounds.exit1226: ; preds = %.thread +__barray_check_bounds.exit1227: ; preds = %.thread %32 = load i64, ptr %3, align 4 - %33 = lshr i64 %32, %"298_2.01283" + %33 = lshr i64 %32, %"298_2.01284" %34 = trunc i64 %33 to i1 - br i1 %34, label %cond_exit_302, label %panic.i1227 + br i1 %34, label %cond_exit_302, label %panic.i1228 -panic.i1227: ; preds = %__barray_check_bounds.exit1226 +panic.i1228: ; preds = %__barray_check_bounds.exit1227 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable @@ -179,91 +179,91 @@ mask_block_ok.i: ; preds = %cond_exit_302 %36 = or i64 %35, -1048576 store i64 %36, ptr %5, align 4 %37 = icmp eq i64 %36, -1 - br i1 %37, label %loop_body510.preheader.preheader, label %mask_block_err.i + br i1 %37, label %loop_body511.preheader.preheader, label %mask_block_err.i mask_block_err.i: ; preds = %mask_block_ok.i tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_check_bounds.exit1230: ; preds = %__barray_check_bounds.exit1230.preheader, %cond_exit_302 - %"298_0.sroa.15.01284" = phi i64 [ %38, %cond_exit_302 ], [ 0, %__barray_check_bounds.exit1230.preheader ] - %"298_2.01283" = phi i64 [ %46, %cond_exit_302 ], [ 0, %__barray_check_bounds.exit1230.preheader ] - %38 = add nuw nsw i64 %"298_0.sroa.15.01284", 1 +__barray_check_bounds.exit1231: ; preds = %__barray_check_bounds.exit1231.preheader, %cond_exit_302 + %"298_0.sroa.15.01285" = phi i64 [ %38, %cond_exit_302 ], [ 0, %__barray_check_bounds.exit1231.preheader ] + %"298_2.01284" = phi i64 [ %46, %cond_exit_302 ], [ 0, %__barray_check_bounds.exit1231.preheader ] + %38 = add nuw nsw i64 %"298_0.sroa.15.01285", 1 %39 = load i64, ptr %5, align 4 - %40 = lshr i64 %39, %"298_0.sroa.15.01284" + %40 = lshr i64 %39, %"298_0.sroa.15.01285" %41 = trunc i64 %40 to i1 - br i1 %41, label %panic.i1231, label %.thread + br i1 %41, label %panic.i1232, label %.thread -panic.i1231: ; preds = %__barray_check_bounds.exit1230 +panic.i1232: ; preds = %__barray_check_bounds.exit1231 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -.thread: ; preds = %__barray_check_bounds.exit1230 - %42 = shl nuw nsw i64 1, %"298_0.sroa.15.01284" +.thread: ; preds = %__barray_check_bounds.exit1231 + %42 = shl nuw nsw i64 1, %"298_0.sroa.15.01285" %43 = xor i64 %39, %42 store i64 %43, ptr %5, align 4 - %44 = getelementptr inbounds nuw i64, ptr %4, i64 %"298_0.sroa.15.01284" + %44 = getelementptr inbounds nuw i64, ptr %4, i64 %"298_0.sroa.15.01285" %45 = load i64, ptr %44, align 4 - %46 = add i64 %"298_2.01283", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %45) + %46 = add i64 %"298_2.01284", 1 + %___future_measure485 = tail call i64 @___future_measure(i64 %45, i64 0) tail call void @___qfree(i64 %45) - %47 = icmp ult i64 %"298_2.01283", 20 - br i1 %47, label %__barray_check_bounds.exit1226, label %out_of_bounds.i1225 + %47 = icmp ult i64 %"298_2.01284", 20 + br i1 %47, label %__barray_check_bounds.exit1227, label %out_of_bounds.i1226 -cond_exit_302: ; preds = %__barray_check_bounds.exit1226 - %48 = shl nuw nsw i64 1, %"298_2.01283" +cond_exit_302: ; preds = %__barray_check_bounds.exit1227 + %48 = shl nuw nsw i64 1, %"298_2.01284" %49 = xor i64 %32, %48 store i64 %49, ptr %3, align 4 - %50 = getelementptr inbounds nuw i64, ptr %2, i64 %"298_2.01283" - store i64 %lazy_measure, ptr %50, align 4 - %51 = icmp samesign ugt i64 %"298_0.sroa.15.01284", 18 - br i1 %51, label %mask_block_ok.i, label %__barray_check_bounds.exit1230 + %50 = getelementptr inbounds nuw i64, ptr %2, i64 %"298_2.01284" + store i64 %___future_measure485, ptr %50, align 4 + %51 = icmp samesign ugt i64 %"298_0.sroa.15.01285", 18 + br i1 %51, label %mask_block_ok.i, label %__barray_check_bounds.exit1231 -loop_body510.preheader.preheader: ; preds = %mask_block_ok.i +loop_body511.preheader.preheader: ; preds = %mask_block_ok.i tail call void @heap_free(ptr nonnull %4) tail call void @heap_free(ptr nonnull %5) - br label %__barray_check_bounds.exit1234 + br label %__barray_check_bounds.exit1235 -__barray_check_bounds.exit1234: ; preds = %cond_exit_368, %loop_body510.preheader.preheader - %"364_0.sroa.15.01278" = phi i64 [ %52, %cond_exit_368 ], [ 0, %loop_body510.preheader.preheader ] - %52 = add nuw nsw i64 %"364_0.sroa.15.01278", 1 +__barray_check_bounds.exit1235: ; preds = %cond_exit_368, %loop_body511.preheader.preheader + %"364_0.sroa.15.01279" = phi i64 [ %52, %cond_exit_368 ], [ 0, %loop_body511.preheader.preheader ] + %52 = add nuw nsw i64 %"364_0.sroa.15.01279", 1 %53 = load i64, ptr %3, align 4 - %54 = lshr i64 %53, %"364_0.sroa.15.01278" + %54 = lshr i64 %53, %"364_0.sroa.15.01279" %55 = trunc i64 %54 to i1 - br i1 %55, label %panic.i1235, label %__barray_check_bounds.exit1238 + br i1 %55, label %panic.i1236, label %__barray_check_bounds.exit1239 -panic.i1235: ; preds = %__barray_check_bounds.exit1234 +panic.i1236: ; preds = %__barray_check_bounds.exit1235 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_check_bounds.exit1238: ; preds = %__barray_check_bounds.exit1234 - %56 = shl nuw nsw i64 1, %"364_0.sroa.15.01278" +__barray_check_bounds.exit1239: ; preds = %__barray_check_bounds.exit1235 + %56 = shl nuw nsw i64 1, %"364_0.sroa.15.01279" %57 = xor i64 %53, %56 store i64 %57, ptr %3, align 4 - %58 = getelementptr inbounds nuw i64, ptr %2, i64 %"364_0.sroa.15.01278" + %58 = getelementptr inbounds nuw i64, ptr %2, i64 %"364_0.sroa.15.01279" %59 = load i64, ptr %58, align 4 tail call void @___inc_future_refcount(i64 %59) %60 = load i64, ptr %3, align 4 - %61 = lshr i64 %60, %"364_0.sroa.15.01278" + %61 = lshr i64 %60, %"364_0.sroa.15.01279" %62 = trunc i64 %61 to i1 - br i1 %62, label %__barray_check_bounds.exit1242, label %panic.i1239 + br i1 %62, label %__barray_check_bounds.exit1243, label %panic.i1240 -panic.i1239: ; preds = %__barray_check_bounds.exit1238 +panic.i1240: ; preds = %__barray_check_bounds.exit1239 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_check_bounds.exit1242: ; preds = %__barray_check_bounds.exit1238 +__barray_check_bounds.exit1243: ; preds = %__barray_check_bounds.exit1239 %63 = xor i64 %60, %56 store i64 %63, ptr %3, align 4 store i64 %59, ptr %58, align 4 %read_bool = tail call i1 @___read_future_bool(i64 %59) tail call void @___dec_future_refcount(i64 %59) %64 = load i64, ptr %1, align 4 - %65 = lshr i64 %64, %"364_0.sroa.15.01278" + %65 = lshr i64 %64, %"364_0.sroa.15.01279" %66 = trunc i64 %65 to i1 - br i1 %66, label %cond_exit_368, label %panic.i1243 + br i1 %66, label %cond_exit_368, label %panic.i1244 -panic.i1243: ; preds = %__barray_check_bounds.exit1242 +panic.i1244: ; preds = %__barray_check_bounds.exit1243 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable @@ -272,55 +272,55 @@ cond_549_case_0: ; preds = %cond_exit_549 %68 = or i64 %67, -1048576 store i64 %68, ptr %3, align 4 %69 = icmp eq i64 %68, -1 - br i1 %69, label %loop_out509, label %mask_block_err.i1248 + br i1 %69, label %loop_out510, label %mask_block_err.i1249 -mask_block_err.i1248: ; preds = %cond_549_case_0 +mask_block_err.i1249: ; preds = %cond_549_case_0 tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_check_bounds.exit1252: ; preds = %cond_exit_368, %cond_exit_549 - %"546_0.01285" = phi i64 [ %70, %cond_exit_549 ], [ 0, %cond_exit_368 ] - %70 = add nuw nsw i64 %"546_0.01285", 1 +__barray_check_bounds.exit1253: ; preds = %cond_exit_368, %cond_exit_549 + %"546_0.01286" = phi i64 [ %70, %cond_exit_549 ], [ 0, %cond_exit_368 ] + %70 = add nuw nsw i64 %"546_0.01286", 1 %71 = load i64, ptr %3, align 4 - %72 = lshr i64 %71, %"546_0.01285" + %72 = lshr i64 %71, %"546_0.01286" %73 = trunc i64 %72 to i1 - br i1 %73, label %cond_exit_549, label %__barray_mask_borrow.exit1256 + br i1 %73, label %cond_exit_549, label %__barray_mask_borrow.exit1257 -__barray_mask_borrow.exit1256: ; preds = %__barray_check_bounds.exit1252 - %74 = shl nuw nsw i64 1, %"546_0.01285" +__barray_mask_borrow.exit1257: ; preds = %__barray_check_bounds.exit1253 + %74 = shl nuw nsw i64 1, %"546_0.01286" %75 = xor i64 %71, %74 store i64 %75, ptr %3, align 4 - %76 = getelementptr inbounds nuw i64, ptr %2, i64 %"546_0.01285" + %76 = getelementptr inbounds nuw i64, ptr %2, i64 %"546_0.01286" %77 = load i64, ptr %76, align 4 tail call void @___dec_future_refcount(i64 %77) br label %cond_exit_549 -cond_exit_549: ; preds = %__barray_mask_borrow.exit1256, %__barray_check_bounds.exit1252 - %78 = icmp samesign ugt i64 %"546_0.01285", 18 - br i1 %78, label %cond_549_case_0, label %__barray_check_bounds.exit1252 +cond_exit_549: ; preds = %__barray_mask_borrow.exit1257, %__barray_check_bounds.exit1253 + %78 = icmp samesign ugt i64 %"546_0.01286", 18 + br i1 %78, label %cond_549_case_0, label %__barray_check_bounds.exit1253 -cond_exit_368: ; preds = %__barray_check_bounds.exit1242 +cond_exit_368: ; preds = %__barray_check_bounds.exit1243 %79 = xor i64 %64, %56 store i64 %79, ptr %1, align 4 - %80 = getelementptr inbounds nuw i1, ptr %0, i64 %"364_0.sroa.15.01278" + %80 = getelementptr inbounds nuw i1, ptr %0, i64 %"364_0.sroa.15.01279" store i1 %read_bool, ptr %80, align 1 - %81 = icmp eq i64 %"364_0.sroa.15.01278", 19 - br i1 %81, label %__barray_check_bounds.exit1252, label %__barray_check_bounds.exit1234 + %81 = icmp eq i64 %"364_0.sroa.15.01279", 19 + br i1 %81, label %__barray_check_bounds.exit1253, label %__barray_check_bounds.exit1235 -loop_out509: ; preds = %cond_549_case_0 +loop_out510: ; preds = %cond_549_case_0 tail call void @heap_free(ptr %2) tail call void @heap_free(ptr nonnull %3) %82 = load i64, ptr %1, align 4 %83 = and i64 %82, 1048575 store i64 %83, ptr %1, align 4 %84 = icmp eq i64 %83, 0 - br i1 %84, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1257 + br i1 %84, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1258 -mask_block_err.i1257: ; preds = %loop_out509 +mask_block_err.i1258: ; preds = %loop_out510 tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") unreachable -__barray_check_none_borrowed.exit: ; preds = %loop_out509 +__barray_check_none_borrowed.exit: ; preds = %loop_out510 %85 = tail call ptr @heap_alloc(i64 20) %86 = tail call ptr @heap_alloc(i64 8) store i64 0, ptr %86, align 1 @@ -330,13 +330,13 @@ __barray_check_none_borrowed.exit: ; preds = %loop_out509 %88 = and i64 %87, 1048575 store i64 %88, ptr %1, align 4 %89 = icmp eq i64 %88, 0 - br i1 %89, label %__barray_check_none_borrowed.exit1261, label %mask_block_err.i1259 + br i1 %89, label %__barray_check_none_borrowed.exit1262, label %mask_block_err.i1260 -mask_block_err.i1259: ; preds = %__barray_check_none_borrowed.exit +mask_block_err.i1260: ; preds = %__barray_check_none_borrowed.exit tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") unreachable -__barray_check_none_borrowed.exit1261: ; preds = %__barray_check_none_borrowed.exit +__barray_check_none_borrowed.exit1262: ; preds = %__barray_check_none_borrowed.exit %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 %y_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 4 %arr_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 8 @@ -359,7 +359,7 @@ declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immar ; Function Attrs: noreturn declare void @panic(i32, ptr) local_unnamed_addr #1 -declare i64 @___lazy_measure_leaked(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -375,8 +375,6 @@ declare void @print_bool(ptr, i64, i1) local_unnamed_addr declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr - declare i1 @___read_future_bool(i64) local_unnamed_addr ; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_from_head-sol-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_from_head-sol-x86_64-apple-darwin.ll index e0bf789a..7cfe691b 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_from_head-sol-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_from_head-sol-x86_64-apple-darwin.ll @@ -48,24 +48,24 @@ loop_body: ; preds = %cond_exit_13, %__hu cond_13_case_1: ; preds = %loop_body %8 = add i64 %"9_2.0", 1 - %qalloc.i1214 = tail call i64 @___qalloc() - %not_max.not.not.i1215 = icmp eq i64 %qalloc.i1214, -1 - br i1 %not_max.not.not.i1215, label %cond_474_case_0.i1216, label %__hugr__.__tk2_sol_qalloc.470.exit1217 + %qalloc.i1215 = tail call i64 @___qalloc() + %not_max.not.not.i1216 = icmp eq i64 %qalloc.i1215, -1 + br i1 %not_max.not.not.i1216, label %cond_474_case_0.i1217, label %__hugr__.__tk2_sol_qalloc.470.exit1218 -cond_474_case_0.i1216: ; preds = %cond_13_case_1 +cond_474_case_0.i1217: ; preds = %cond_13_case_1 tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_sol_qalloc.470.exit1217: ; preds = %cond_13_case_1 - tail call void @___reset(i64 %qalloc.i1214) +__hugr__.__tk2_sol_qalloc.470.exit1218: ; preds = %cond_13_case_1 + tail call void @___reset(i64 %qalloc.i1215) %9 = icmp ult i64 %"9_2.0", 20 br i1 %9, label %__barray_check_bounds.exit, label %out_of_bounds.i -out_of_bounds.i: ; preds = %__hugr__.__tk2_sol_qalloc.470.exit1217 +out_of_bounds.i: ; preds = %__hugr__.__tk2_sol_qalloc.470.exit1218 tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") unreachable -__barray_check_bounds.exit: ; preds = %__hugr__.__tk2_sol_qalloc.470.exit1217 +__barray_check_bounds.exit: ; preds = %__hugr__.__tk2_sol_qalloc.470.exit1218 %10 = load i64, ptr %5, align 4 %11 = lshr i64 %10, %"9_2.0" %12 = trunc i64 %11 to i1 @@ -80,31 +80,31 @@ __barray_mask_return.exit: ; preds = %__barray_check_boun %14 = xor i64 %10, %13 store i64 %14, ptr %5, align 4 %15 = getelementptr inbounds nuw i64, ptr %4, i64 %"9_2.0" - store i64 %qalloc.i1214, ptr %15, align 4 + store i64 %qalloc.i1215, ptr %15, align 4 br label %cond_exit_13 cond_exit_13: ; preds = %loop_body, %__barray_mask_return.exit %"2107.0" = phi i64 [ %8, %__barray_mask_return.exit ], [ %"9_2.0", %loop_body ] %exitcond = icmp eq i64 %7, 21 - br i1 %exitcond, label %__barray_check_bounds.exit1219, label %loop_body + br i1 %exitcond, label %__barray_check_bounds.exit1220, label %loop_body -__barray_check_bounds.exit1219: ; preds = %cond_exit_13, %__barray_mask_return.exit1224 - %16 = phi i64 [ %28, %__barray_mask_return.exit1224 ], [ 1, %cond_exit_13 ] - %"114_0.01276" = phi i64 [ %16, %__barray_mask_return.exit1224 ], [ 0, %cond_exit_13 ] +__barray_check_bounds.exit1220: ; preds = %cond_exit_13, %__barray_mask_return.exit1225 + %16 = phi i64 [ %28, %__barray_mask_return.exit1225 ], [ 1, %cond_exit_13 ] + %"114_0.01277" = phi i64 [ %16, %__barray_mask_return.exit1225 ], [ 0, %cond_exit_13 ] %17 = load i64, ptr %5, align 4 - %18 = lshr i64 %17, %"114_0.01276" + %18 = lshr i64 %17, %"114_0.01277" %19 = trunc i64 %18 to i1 - br i1 %19, label %panic.i1220, label %__barray_check_bounds.exit1222 + br i1 %19, label %panic.i1221, label %__barray_check_bounds.exit1223 -panic.i1220: ; preds = %__barray_check_bounds.exit1219 +panic.i1221: ; preds = %__barray_check_bounds.exit1220 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_check_bounds.exit1222: ; preds = %__barray_check_bounds.exit1219 - %20 = shl nuw nsw i64 1, %"114_0.01276" +__barray_check_bounds.exit1223: ; preds = %__barray_check_bounds.exit1220 + %20 = shl nuw nsw i64 1, %"114_0.01277" %21 = xor i64 %17, %20 store i64 %21, ptr %5, align 4 - %22 = getelementptr inbounds nuw i64, ptr %4, i64 %"114_0.01276" + %22 = getelementptr inbounds nuw i64, ptr %4, i64 %"114_0.01277" %23 = load i64, ptr %22, align 4 tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rpp(i64 %qalloc.i, i64 %23, double 0x3FF921FB54442D18, double 0.000000e+00) @@ -112,65 +112,65 @@ __barray_check_bounds.exit1222: ; preds = %__barray_check_boun tail call void @___rp(i64 %qalloc.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18) %24 = load i64, ptr %5, align 4 - %25 = lshr i64 %24, %"114_0.01276" + %25 = lshr i64 %24, %"114_0.01277" %26 = trunc i64 %25 to i1 - br i1 %26, label %__barray_mask_return.exit1224, label %panic.i1223 + br i1 %26, label %__barray_mask_return.exit1225, label %panic.i1224 -panic.i1223: ; preds = %__barray_check_bounds.exit1222 +panic.i1224: ; preds = %__barray_check_bounds.exit1223 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_mask_return.exit1224: ; preds = %__barray_check_bounds.exit1222 +__barray_mask_return.exit1225: ; preds = %__barray_check_bounds.exit1223 %27 = xor i64 %24, %20 store i64 %27, ptr %5, align 4 store i64 %23, ptr %22, align 4 %28 = add nuw nsw i64 %16, 1 - %exitcond1279 = icmp eq i64 %28, 21 - br i1 %exitcond1279, label %cond_exit_185, label %__barray_check_bounds.exit1219 + %exitcond1280 = icmp eq i64 %28, 21 + br i1 %exitcond1280, label %cond_exit_185, label %__barray_check_bounds.exit1220 -cond_exit_185: ; preds = %__barray_mask_return.exit1224 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) +cond_exit_185: ; preds = %__barray_mask_return.exit1225 + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 1) tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure_leaked) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___inc_future_refcount(i64 %___future_measure) + %read_uint = tail call i64 @___read_future_uint(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) %29 = icmp eq i64 %read_uint, 2 br i1 %29, label %30, label %cond_exit_256 cond_exit_256: ; preds = %cond_exit_185 - %read_uint350 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + %read_uint350 = tail call i64 @___read_future_uint(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) %.not = icmp eq i64 %read_uint350, 2 br i1 %.not, label %cond_236_case_0, label %cond_236_case_1 30: ; preds = %cond_exit_185 - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_int(ptr nonnull @res_head_leake.F4F32972.0, i64 20, i64 1) - br label %__barray_check_bounds.exit1230.preheader + br label %__barray_check_bounds.exit1231.preheader -__barray_check_bounds.exit1230.preheader: ; preds = %cond_236_case_1, %30 - br label %__barray_check_bounds.exit1230 +__barray_check_bounds.exit1231.preheader: ; preds = %cond_236_case_1, %30 + br label %__barray_check_bounds.exit1231 cond_236_case_1: ; preds = %cond_exit_256 %31 = icmp eq i64 %read_uint350, 1 tail call void @print_bool(ptr nonnull @res_head.AFE8E005.0, i64 14, i1 %31) - br label %__barray_check_bounds.exit1230.preheader + br label %__barray_check_bounds.exit1231.preheader cond_236_case_0: ; preds = %cond_exit_256 tail call void @panic(i32 1001, ptr nonnull @e_Option.unw.32D4E82D.0) unreachable -out_of_bounds.i1225: ; preds = %.thread +out_of_bounds.i1226: ; preds = %.thread tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") unreachable -__barray_check_bounds.exit1226: ; preds = %.thread +__barray_check_bounds.exit1227: ; preds = %.thread %32 = load i64, ptr %3, align 4 - %33 = lshr i64 %32, %"298_2.01283" + %33 = lshr i64 %32, %"298_2.01284" %34 = trunc i64 %33 to i1 - br i1 %34, label %cond_exit_302, label %panic.i1227 + br i1 %34, label %cond_exit_302, label %panic.i1228 -panic.i1227: ; preds = %__barray_check_bounds.exit1226 +panic.i1228: ; preds = %__barray_check_bounds.exit1227 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable @@ -179,91 +179,91 @@ mask_block_ok.i: ; preds = %cond_exit_302 %36 = or i64 %35, -1048576 store i64 %36, ptr %5, align 4 %37 = icmp eq i64 %36, -1 - br i1 %37, label %loop_body510.preheader.preheader, label %mask_block_err.i + br i1 %37, label %loop_body511.preheader.preheader, label %mask_block_err.i mask_block_err.i: ; preds = %mask_block_ok.i tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_check_bounds.exit1230: ; preds = %__barray_check_bounds.exit1230.preheader, %cond_exit_302 - %"298_0.sroa.15.01284" = phi i64 [ %38, %cond_exit_302 ], [ 0, %__barray_check_bounds.exit1230.preheader ] - %"298_2.01283" = phi i64 [ %46, %cond_exit_302 ], [ 0, %__barray_check_bounds.exit1230.preheader ] - %38 = add nuw nsw i64 %"298_0.sroa.15.01284", 1 +__barray_check_bounds.exit1231: ; preds = %__barray_check_bounds.exit1231.preheader, %cond_exit_302 + %"298_0.sroa.15.01285" = phi i64 [ %38, %cond_exit_302 ], [ 0, %__barray_check_bounds.exit1231.preheader ] + %"298_2.01284" = phi i64 [ %46, %cond_exit_302 ], [ 0, %__barray_check_bounds.exit1231.preheader ] + %38 = add nuw nsw i64 %"298_0.sroa.15.01285", 1 %39 = load i64, ptr %5, align 4 - %40 = lshr i64 %39, %"298_0.sroa.15.01284" + %40 = lshr i64 %39, %"298_0.sroa.15.01285" %41 = trunc i64 %40 to i1 - br i1 %41, label %panic.i1231, label %.thread + br i1 %41, label %panic.i1232, label %.thread -panic.i1231: ; preds = %__barray_check_bounds.exit1230 +panic.i1232: ; preds = %__barray_check_bounds.exit1231 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -.thread: ; preds = %__barray_check_bounds.exit1230 - %42 = shl nuw nsw i64 1, %"298_0.sroa.15.01284" +.thread: ; preds = %__barray_check_bounds.exit1231 + %42 = shl nuw nsw i64 1, %"298_0.sroa.15.01285" %43 = xor i64 %39, %42 store i64 %43, ptr %5, align 4 - %44 = getelementptr inbounds nuw i64, ptr %4, i64 %"298_0.sroa.15.01284" + %44 = getelementptr inbounds nuw i64, ptr %4, i64 %"298_0.sroa.15.01285" %45 = load i64, ptr %44, align 4 - %46 = add i64 %"298_2.01283", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %45) + %46 = add i64 %"298_2.01284", 1 + %___future_measure485 = tail call i64 @___future_measure(i64 %45, i64 0) tail call void @___qfree(i64 %45) - %47 = icmp ult i64 %"298_2.01283", 20 - br i1 %47, label %__barray_check_bounds.exit1226, label %out_of_bounds.i1225 + %47 = icmp ult i64 %"298_2.01284", 20 + br i1 %47, label %__barray_check_bounds.exit1227, label %out_of_bounds.i1226 -cond_exit_302: ; preds = %__barray_check_bounds.exit1226 - %48 = shl nuw nsw i64 1, %"298_2.01283" +cond_exit_302: ; preds = %__barray_check_bounds.exit1227 + %48 = shl nuw nsw i64 1, %"298_2.01284" %49 = xor i64 %32, %48 store i64 %49, ptr %3, align 4 - %50 = getelementptr inbounds nuw i64, ptr %2, i64 %"298_2.01283" - store i64 %lazy_measure, ptr %50, align 4 - %51 = icmp samesign ugt i64 %"298_0.sroa.15.01284", 18 - br i1 %51, label %mask_block_ok.i, label %__barray_check_bounds.exit1230 + %50 = getelementptr inbounds nuw i64, ptr %2, i64 %"298_2.01284" + store i64 %___future_measure485, ptr %50, align 4 + %51 = icmp samesign ugt i64 %"298_0.sroa.15.01285", 18 + br i1 %51, label %mask_block_ok.i, label %__barray_check_bounds.exit1231 -loop_body510.preheader.preheader: ; preds = %mask_block_ok.i +loop_body511.preheader.preheader: ; preds = %mask_block_ok.i tail call void @heap_free(ptr nonnull %4) tail call void @heap_free(ptr nonnull %5) - br label %__barray_check_bounds.exit1234 + br label %__barray_check_bounds.exit1235 -__barray_check_bounds.exit1234: ; preds = %cond_exit_368, %loop_body510.preheader.preheader - %"364_0.sroa.15.01278" = phi i64 [ %52, %cond_exit_368 ], [ 0, %loop_body510.preheader.preheader ] - %52 = add nuw nsw i64 %"364_0.sroa.15.01278", 1 +__barray_check_bounds.exit1235: ; preds = %cond_exit_368, %loop_body511.preheader.preheader + %"364_0.sroa.15.01279" = phi i64 [ %52, %cond_exit_368 ], [ 0, %loop_body511.preheader.preheader ] + %52 = add nuw nsw i64 %"364_0.sroa.15.01279", 1 %53 = load i64, ptr %3, align 4 - %54 = lshr i64 %53, %"364_0.sroa.15.01278" + %54 = lshr i64 %53, %"364_0.sroa.15.01279" %55 = trunc i64 %54 to i1 - br i1 %55, label %panic.i1235, label %__barray_check_bounds.exit1238 + br i1 %55, label %panic.i1236, label %__barray_check_bounds.exit1239 -panic.i1235: ; preds = %__barray_check_bounds.exit1234 +panic.i1236: ; preds = %__barray_check_bounds.exit1235 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_check_bounds.exit1238: ; preds = %__barray_check_bounds.exit1234 - %56 = shl nuw nsw i64 1, %"364_0.sroa.15.01278" +__barray_check_bounds.exit1239: ; preds = %__barray_check_bounds.exit1235 + %56 = shl nuw nsw i64 1, %"364_0.sroa.15.01279" %57 = xor i64 %53, %56 store i64 %57, ptr %3, align 4 - %58 = getelementptr inbounds nuw i64, ptr %2, i64 %"364_0.sroa.15.01278" + %58 = getelementptr inbounds nuw i64, ptr %2, i64 %"364_0.sroa.15.01279" %59 = load i64, ptr %58, align 4 tail call void @___inc_future_refcount(i64 %59) %60 = load i64, ptr %3, align 4 - %61 = lshr i64 %60, %"364_0.sroa.15.01278" + %61 = lshr i64 %60, %"364_0.sroa.15.01279" %62 = trunc i64 %61 to i1 - br i1 %62, label %__barray_check_bounds.exit1242, label %panic.i1239 + br i1 %62, label %__barray_check_bounds.exit1243, label %panic.i1240 -panic.i1239: ; preds = %__barray_check_bounds.exit1238 +panic.i1240: ; preds = %__barray_check_bounds.exit1239 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_check_bounds.exit1242: ; preds = %__barray_check_bounds.exit1238 +__barray_check_bounds.exit1243: ; preds = %__barray_check_bounds.exit1239 %63 = xor i64 %60, %56 store i64 %63, ptr %3, align 4 store i64 %59, ptr %58, align 4 %read_bool = tail call i1 @___read_future_bool(i64 %59) tail call void @___dec_future_refcount(i64 %59) %64 = load i64, ptr %1, align 4 - %65 = lshr i64 %64, %"364_0.sroa.15.01278" + %65 = lshr i64 %64, %"364_0.sroa.15.01279" %66 = trunc i64 %65 to i1 - br i1 %66, label %cond_exit_368, label %panic.i1243 + br i1 %66, label %cond_exit_368, label %panic.i1244 -panic.i1243: ; preds = %__barray_check_bounds.exit1242 +panic.i1244: ; preds = %__barray_check_bounds.exit1243 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable @@ -272,55 +272,55 @@ cond_549_case_0: ; preds = %cond_exit_549 %68 = or i64 %67, -1048576 store i64 %68, ptr %3, align 4 %69 = icmp eq i64 %68, -1 - br i1 %69, label %loop_out509, label %mask_block_err.i1248 + br i1 %69, label %loop_out510, label %mask_block_err.i1249 -mask_block_err.i1248: ; preds = %cond_549_case_0 +mask_block_err.i1249: ; preds = %cond_549_case_0 tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_check_bounds.exit1252: ; preds = %cond_exit_368, %cond_exit_549 - %"546_0.01285" = phi i64 [ %70, %cond_exit_549 ], [ 0, %cond_exit_368 ] - %70 = add nuw nsw i64 %"546_0.01285", 1 +__barray_check_bounds.exit1253: ; preds = %cond_exit_368, %cond_exit_549 + %"546_0.01286" = phi i64 [ %70, %cond_exit_549 ], [ 0, %cond_exit_368 ] + %70 = add nuw nsw i64 %"546_0.01286", 1 %71 = load i64, ptr %3, align 4 - %72 = lshr i64 %71, %"546_0.01285" + %72 = lshr i64 %71, %"546_0.01286" %73 = trunc i64 %72 to i1 - br i1 %73, label %cond_exit_549, label %__barray_mask_borrow.exit1256 + br i1 %73, label %cond_exit_549, label %__barray_mask_borrow.exit1257 -__barray_mask_borrow.exit1256: ; preds = %__barray_check_bounds.exit1252 - %74 = shl nuw nsw i64 1, %"546_0.01285" +__barray_mask_borrow.exit1257: ; preds = %__barray_check_bounds.exit1253 + %74 = shl nuw nsw i64 1, %"546_0.01286" %75 = xor i64 %71, %74 store i64 %75, ptr %3, align 4 - %76 = getelementptr inbounds nuw i64, ptr %2, i64 %"546_0.01285" + %76 = getelementptr inbounds nuw i64, ptr %2, i64 %"546_0.01286" %77 = load i64, ptr %76, align 4 tail call void @___dec_future_refcount(i64 %77) br label %cond_exit_549 -cond_exit_549: ; preds = %__barray_mask_borrow.exit1256, %__barray_check_bounds.exit1252 - %78 = icmp samesign ugt i64 %"546_0.01285", 18 - br i1 %78, label %cond_549_case_0, label %__barray_check_bounds.exit1252 +cond_exit_549: ; preds = %__barray_mask_borrow.exit1257, %__barray_check_bounds.exit1253 + %78 = icmp samesign ugt i64 %"546_0.01286", 18 + br i1 %78, label %cond_549_case_0, label %__barray_check_bounds.exit1253 -cond_exit_368: ; preds = %__barray_check_bounds.exit1242 +cond_exit_368: ; preds = %__barray_check_bounds.exit1243 %79 = xor i64 %64, %56 store i64 %79, ptr %1, align 4 - %80 = getelementptr inbounds nuw i1, ptr %0, i64 %"364_0.sroa.15.01278" + %80 = getelementptr inbounds nuw i1, ptr %0, i64 %"364_0.sroa.15.01279" store i1 %read_bool, ptr %80, align 1 - %81 = icmp eq i64 %"364_0.sroa.15.01278", 19 - br i1 %81, label %__barray_check_bounds.exit1252, label %__barray_check_bounds.exit1234 + %81 = icmp eq i64 %"364_0.sroa.15.01279", 19 + br i1 %81, label %__barray_check_bounds.exit1253, label %__barray_check_bounds.exit1235 -loop_out509: ; preds = %cond_549_case_0 +loop_out510: ; preds = %cond_549_case_0 tail call void @heap_free(ptr %2) tail call void @heap_free(ptr nonnull %3) %82 = load i64, ptr %1, align 4 %83 = and i64 %82, 1048575 store i64 %83, ptr %1, align 4 %84 = icmp eq i64 %83, 0 - br i1 %84, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1257 + br i1 %84, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1258 -mask_block_err.i1257: ; preds = %loop_out509 +mask_block_err.i1258: ; preds = %loop_out510 tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") unreachable -__barray_check_none_borrowed.exit: ; preds = %loop_out509 +__barray_check_none_borrowed.exit: ; preds = %loop_out510 %85 = tail call ptr @heap_alloc(i64 20) %86 = tail call ptr @heap_alloc(i64 8) store i64 0, ptr %86, align 1 @@ -330,13 +330,13 @@ __barray_check_none_borrowed.exit: ; preds = %loop_out509 %88 = and i64 %87, 1048575 store i64 %88, ptr %1, align 4 %89 = icmp eq i64 %88, 0 - br i1 %89, label %__barray_check_none_borrowed.exit1261, label %mask_block_err.i1259 + br i1 %89, label %__barray_check_none_borrowed.exit1262, label %mask_block_err.i1260 -mask_block_err.i1259: ; preds = %__barray_check_none_borrowed.exit +mask_block_err.i1260: ; preds = %__barray_check_none_borrowed.exit tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") unreachable -__barray_check_none_borrowed.exit1261: ; preds = %__barray_check_none_borrowed.exit +__barray_check_none_borrowed.exit1262: ; preds = %__barray_check_none_borrowed.exit %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 %y_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 4 %arr_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 8 @@ -359,7 +359,7 @@ declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immar ; Function Attrs: noreturn declare void @panic(i32, ptr) local_unnamed_addr #1 -declare i64 @___lazy_measure_leaked(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -375,8 +375,6 @@ declare void @print_bool(ptr, i64, i1) local_unnamed_addr declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr - declare i1 @___read_future_bool(i64) local_unnamed_addr ; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_from_head-sol-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_from_head-sol-x86_64-unknown-linux-gnu.ll index 50c543a0..af17b198 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_from_head-sol-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_from_head-sol-x86_64-unknown-linux-gnu.ll @@ -48,24 +48,24 @@ loop_body: ; preds = %cond_exit_13, %__hu cond_13_case_1: ; preds = %loop_body %8 = add i64 %"9_2.0", 1 - %qalloc.i1214 = tail call i64 @___qalloc() - %not_max.not.not.i1215 = icmp eq i64 %qalloc.i1214, -1 - br i1 %not_max.not.not.i1215, label %cond_474_case_0.i1216, label %__hugr__.__tk2_sol_qalloc.470.exit1217 + %qalloc.i1215 = tail call i64 @___qalloc() + %not_max.not.not.i1216 = icmp eq i64 %qalloc.i1215, -1 + br i1 %not_max.not.not.i1216, label %cond_474_case_0.i1217, label %__hugr__.__tk2_sol_qalloc.470.exit1218 -cond_474_case_0.i1216: ; preds = %cond_13_case_1 +cond_474_case_0.i1217: ; preds = %cond_13_case_1 tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_sol_qalloc.470.exit1217: ; preds = %cond_13_case_1 - tail call void @___reset(i64 %qalloc.i1214) +__hugr__.__tk2_sol_qalloc.470.exit1218: ; preds = %cond_13_case_1 + tail call void @___reset(i64 %qalloc.i1215) %9 = icmp ult i64 %"9_2.0", 20 br i1 %9, label %__barray_check_bounds.exit, label %out_of_bounds.i -out_of_bounds.i: ; preds = %__hugr__.__tk2_sol_qalloc.470.exit1217 +out_of_bounds.i: ; preds = %__hugr__.__tk2_sol_qalloc.470.exit1218 tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") unreachable -__barray_check_bounds.exit: ; preds = %__hugr__.__tk2_sol_qalloc.470.exit1217 +__barray_check_bounds.exit: ; preds = %__hugr__.__tk2_sol_qalloc.470.exit1218 %10 = load i64, ptr %5, align 4 %11 = lshr i64 %10, %"9_2.0" %12 = trunc i64 %11 to i1 @@ -80,31 +80,31 @@ __barray_mask_return.exit: ; preds = %__barray_check_boun %14 = xor i64 %10, %13 store i64 %14, ptr %5, align 4 %15 = getelementptr inbounds nuw i64, ptr %4, i64 %"9_2.0" - store i64 %qalloc.i1214, ptr %15, align 4 + store i64 %qalloc.i1215, ptr %15, align 4 br label %cond_exit_13 cond_exit_13: ; preds = %loop_body, %__barray_mask_return.exit %"2107.0" = phi i64 [ %8, %__barray_mask_return.exit ], [ %"9_2.0", %loop_body ] %exitcond = icmp eq i64 %7, 21 - br i1 %exitcond, label %__barray_check_bounds.exit1219, label %loop_body + br i1 %exitcond, label %__barray_check_bounds.exit1220, label %loop_body -__barray_check_bounds.exit1219: ; preds = %cond_exit_13, %__barray_mask_return.exit1224 - %16 = phi i64 [ %28, %__barray_mask_return.exit1224 ], [ 1, %cond_exit_13 ] - %"114_0.01276" = phi i64 [ %16, %__barray_mask_return.exit1224 ], [ 0, %cond_exit_13 ] +__barray_check_bounds.exit1220: ; preds = %cond_exit_13, %__barray_mask_return.exit1225 + %16 = phi i64 [ %28, %__barray_mask_return.exit1225 ], [ 1, %cond_exit_13 ] + %"114_0.01277" = phi i64 [ %16, %__barray_mask_return.exit1225 ], [ 0, %cond_exit_13 ] %17 = load i64, ptr %5, align 4 - %18 = lshr i64 %17, %"114_0.01276" + %18 = lshr i64 %17, %"114_0.01277" %19 = trunc i64 %18 to i1 - br i1 %19, label %panic.i1220, label %__barray_check_bounds.exit1222 + br i1 %19, label %panic.i1221, label %__barray_check_bounds.exit1223 -panic.i1220: ; preds = %__barray_check_bounds.exit1219 +panic.i1221: ; preds = %__barray_check_bounds.exit1220 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_check_bounds.exit1222: ; preds = %__barray_check_bounds.exit1219 - %20 = shl nuw nsw i64 1, %"114_0.01276" +__barray_check_bounds.exit1223: ; preds = %__barray_check_bounds.exit1220 + %20 = shl nuw nsw i64 1, %"114_0.01277" %21 = xor i64 %17, %20 store i64 %21, ptr %5, align 4 - %22 = getelementptr inbounds nuw i64, ptr %4, i64 %"114_0.01276" + %22 = getelementptr inbounds nuw i64, ptr %4, i64 %"114_0.01277" %23 = load i64, ptr %22, align 4 tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rpp(i64 %qalloc.i, i64 %23, double 0x3FF921FB54442D18, double 0.000000e+00) @@ -112,65 +112,65 @@ __barray_check_bounds.exit1222: ; preds = %__barray_check_boun tail call void @___rp(i64 %qalloc.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18) %24 = load i64, ptr %5, align 4 - %25 = lshr i64 %24, %"114_0.01276" + %25 = lshr i64 %24, %"114_0.01277" %26 = trunc i64 %25 to i1 - br i1 %26, label %__barray_mask_return.exit1224, label %panic.i1223 + br i1 %26, label %__barray_mask_return.exit1225, label %panic.i1224 -panic.i1223: ; preds = %__barray_check_bounds.exit1222 +panic.i1224: ; preds = %__barray_check_bounds.exit1223 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_mask_return.exit1224: ; preds = %__barray_check_bounds.exit1222 +__barray_mask_return.exit1225: ; preds = %__barray_check_bounds.exit1223 %27 = xor i64 %24, %20 store i64 %27, ptr %5, align 4 store i64 %23, ptr %22, align 4 %28 = add nuw nsw i64 %16, 1 - %exitcond1279 = icmp eq i64 %28, 21 - br i1 %exitcond1279, label %cond_exit_185, label %__barray_check_bounds.exit1219 + %exitcond1280 = icmp eq i64 %28, 21 + br i1 %exitcond1280, label %cond_exit_185, label %__barray_check_bounds.exit1220 -cond_exit_185: ; preds = %__barray_mask_return.exit1224 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) +cond_exit_185: ; preds = %__barray_mask_return.exit1225 + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 1) tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure_leaked) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___inc_future_refcount(i64 %___future_measure) + %read_uint = tail call i64 @___read_future_uint(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) %29 = icmp eq i64 %read_uint, 2 br i1 %29, label %30, label %cond_exit_256 cond_exit_256: ; preds = %cond_exit_185 - %read_uint350 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + %read_uint350 = tail call i64 @___read_future_uint(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) %.not = icmp eq i64 %read_uint350, 2 br i1 %.not, label %cond_236_case_0, label %cond_236_case_1 30: ; preds = %cond_exit_185 - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_int(ptr nonnull @res_head_leake.F4F32972.0, i64 20, i64 1) - br label %__barray_check_bounds.exit1230.preheader + br label %__barray_check_bounds.exit1231.preheader -__barray_check_bounds.exit1230.preheader: ; preds = %cond_236_case_1, %30 - br label %__barray_check_bounds.exit1230 +__barray_check_bounds.exit1231.preheader: ; preds = %cond_236_case_1, %30 + br label %__barray_check_bounds.exit1231 cond_236_case_1: ; preds = %cond_exit_256 %31 = icmp eq i64 %read_uint350, 1 tail call void @print_bool(ptr nonnull @res_head.AFE8E005.0, i64 14, i1 %31) - br label %__barray_check_bounds.exit1230.preheader + br label %__barray_check_bounds.exit1231.preheader cond_236_case_0: ; preds = %cond_exit_256 tail call void @panic(i32 1001, ptr nonnull @e_Option.unw.32D4E82D.0) unreachable -out_of_bounds.i1225: ; preds = %.thread +out_of_bounds.i1226: ; preds = %.thread tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") unreachable -__barray_check_bounds.exit1226: ; preds = %.thread +__barray_check_bounds.exit1227: ; preds = %.thread %32 = load i64, ptr %3, align 4 - %33 = lshr i64 %32, %"298_2.01283" + %33 = lshr i64 %32, %"298_2.01284" %34 = trunc i64 %33 to i1 - br i1 %34, label %cond_exit_302, label %panic.i1227 + br i1 %34, label %cond_exit_302, label %panic.i1228 -panic.i1227: ; preds = %__barray_check_bounds.exit1226 +panic.i1228: ; preds = %__barray_check_bounds.exit1227 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable @@ -179,91 +179,91 @@ mask_block_ok.i: ; preds = %cond_exit_302 %36 = or i64 %35, -1048576 store i64 %36, ptr %5, align 4 %37 = icmp eq i64 %36, -1 - br i1 %37, label %loop_body510.preheader.preheader, label %mask_block_err.i + br i1 %37, label %loop_body511.preheader.preheader, label %mask_block_err.i mask_block_err.i: ; preds = %mask_block_ok.i tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_check_bounds.exit1230: ; preds = %__barray_check_bounds.exit1230.preheader, %cond_exit_302 - %"298_0.sroa.15.01284" = phi i64 [ %38, %cond_exit_302 ], [ 0, %__barray_check_bounds.exit1230.preheader ] - %"298_2.01283" = phi i64 [ %46, %cond_exit_302 ], [ 0, %__barray_check_bounds.exit1230.preheader ] - %38 = add nuw nsw i64 %"298_0.sroa.15.01284", 1 +__barray_check_bounds.exit1231: ; preds = %__barray_check_bounds.exit1231.preheader, %cond_exit_302 + %"298_0.sroa.15.01285" = phi i64 [ %38, %cond_exit_302 ], [ 0, %__barray_check_bounds.exit1231.preheader ] + %"298_2.01284" = phi i64 [ %46, %cond_exit_302 ], [ 0, %__barray_check_bounds.exit1231.preheader ] + %38 = add nuw nsw i64 %"298_0.sroa.15.01285", 1 %39 = load i64, ptr %5, align 4 - %40 = lshr i64 %39, %"298_0.sroa.15.01284" + %40 = lshr i64 %39, %"298_0.sroa.15.01285" %41 = trunc i64 %40 to i1 - br i1 %41, label %panic.i1231, label %.thread + br i1 %41, label %panic.i1232, label %.thread -panic.i1231: ; preds = %__barray_check_bounds.exit1230 +panic.i1232: ; preds = %__barray_check_bounds.exit1231 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -.thread: ; preds = %__barray_check_bounds.exit1230 - %42 = shl nuw nsw i64 1, %"298_0.sroa.15.01284" +.thread: ; preds = %__barray_check_bounds.exit1231 + %42 = shl nuw nsw i64 1, %"298_0.sroa.15.01285" %43 = xor i64 %39, %42 store i64 %43, ptr %5, align 4 - %44 = getelementptr inbounds nuw i64, ptr %4, i64 %"298_0.sroa.15.01284" + %44 = getelementptr inbounds nuw i64, ptr %4, i64 %"298_0.sroa.15.01285" %45 = load i64, ptr %44, align 4 - %46 = add i64 %"298_2.01283", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %45) + %46 = add i64 %"298_2.01284", 1 + %___future_measure485 = tail call i64 @___future_measure(i64 %45, i64 0) tail call void @___qfree(i64 %45) - %47 = icmp ult i64 %"298_2.01283", 20 - br i1 %47, label %__barray_check_bounds.exit1226, label %out_of_bounds.i1225 + %47 = icmp ult i64 %"298_2.01284", 20 + br i1 %47, label %__barray_check_bounds.exit1227, label %out_of_bounds.i1226 -cond_exit_302: ; preds = %__barray_check_bounds.exit1226 - %48 = shl nuw nsw i64 1, %"298_2.01283" +cond_exit_302: ; preds = %__barray_check_bounds.exit1227 + %48 = shl nuw nsw i64 1, %"298_2.01284" %49 = xor i64 %32, %48 store i64 %49, ptr %3, align 4 - %50 = getelementptr inbounds nuw i64, ptr %2, i64 %"298_2.01283" - store i64 %lazy_measure, ptr %50, align 4 - %51 = icmp samesign ugt i64 %"298_0.sroa.15.01284", 18 - br i1 %51, label %mask_block_ok.i, label %__barray_check_bounds.exit1230 + %50 = getelementptr inbounds nuw i64, ptr %2, i64 %"298_2.01284" + store i64 %___future_measure485, ptr %50, align 4 + %51 = icmp samesign ugt i64 %"298_0.sroa.15.01285", 18 + br i1 %51, label %mask_block_ok.i, label %__barray_check_bounds.exit1231 -loop_body510.preheader.preheader: ; preds = %mask_block_ok.i +loop_body511.preheader.preheader: ; preds = %mask_block_ok.i tail call void @heap_free(ptr nonnull %4) tail call void @heap_free(ptr nonnull %5) - br label %__barray_check_bounds.exit1234 + br label %__barray_check_bounds.exit1235 -__barray_check_bounds.exit1234: ; preds = %cond_exit_368, %loop_body510.preheader.preheader - %"364_0.sroa.15.01278" = phi i64 [ %52, %cond_exit_368 ], [ 0, %loop_body510.preheader.preheader ] - %52 = add nuw nsw i64 %"364_0.sroa.15.01278", 1 +__barray_check_bounds.exit1235: ; preds = %cond_exit_368, %loop_body511.preheader.preheader + %"364_0.sroa.15.01279" = phi i64 [ %52, %cond_exit_368 ], [ 0, %loop_body511.preheader.preheader ] + %52 = add nuw nsw i64 %"364_0.sroa.15.01279", 1 %53 = load i64, ptr %3, align 4 - %54 = lshr i64 %53, %"364_0.sroa.15.01278" + %54 = lshr i64 %53, %"364_0.sroa.15.01279" %55 = trunc i64 %54 to i1 - br i1 %55, label %panic.i1235, label %__barray_check_bounds.exit1238 + br i1 %55, label %panic.i1236, label %__barray_check_bounds.exit1239 -panic.i1235: ; preds = %__barray_check_bounds.exit1234 +panic.i1236: ; preds = %__barray_check_bounds.exit1235 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_check_bounds.exit1238: ; preds = %__barray_check_bounds.exit1234 - %56 = shl nuw nsw i64 1, %"364_0.sroa.15.01278" +__barray_check_bounds.exit1239: ; preds = %__barray_check_bounds.exit1235 + %56 = shl nuw nsw i64 1, %"364_0.sroa.15.01279" %57 = xor i64 %53, %56 store i64 %57, ptr %3, align 4 - %58 = getelementptr inbounds nuw i64, ptr %2, i64 %"364_0.sroa.15.01278" + %58 = getelementptr inbounds nuw i64, ptr %2, i64 %"364_0.sroa.15.01279" %59 = load i64, ptr %58, align 4 tail call void @___inc_future_refcount(i64 %59) %60 = load i64, ptr %3, align 4 - %61 = lshr i64 %60, %"364_0.sroa.15.01278" + %61 = lshr i64 %60, %"364_0.sroa.15.01279" %62 = trunc i64 %61 to i1 - br i1 %62, label %__barray_check_bounds.exit1242, label %panic.i1239 + br i1 %62, label %__barray_check_bounds.exit1243, label %panic.i1240 -panic.i1239: ; preds = %__barray_check_bounds.exit1238 +panic.i1240: ; preds = %__barray_check_bounds.exit1239 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_check_bounds.exit1242: ; preds = %__barray_check_bounds.exit1238 +__barray_check_bounds.exit1243: ; preds = %__barray_check_bounds.exit1239 %63 = xor i64 %60, %56 store i64 %63, ptr %3, align 4 store i64 %59, ptr %58, align 4 %read_bool = tail call i1 @___read_future_bool(i64 %59) tail call void @___dec_future_refcount(i64 %59) %64 = load i64, ptr %1, align 4 - %65 = lshr i64 %64, %"364_0.sroa.15.01278" + %65 = lshr i64 %64, %"364_0.sroa.15.01279" %66 = trunc i64 %65 to i1 - br i1 %66, label %cond_exit_368, label %panic.i1243 + br i1 %66, label %cond_exit_368, label %panic.i1244 -panic.i1243: ; preds = %__barray_check_bounds.exit1242 +panic.i1244: ; preds = %__barray_check_bounds.exit1243 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable @@ -272,55 +272,55 @@ cond_549_case_0: ; preds = %cond_exit_549 %68 = or i64 %67, -1048576 store i64 %68, ptr %3, align 4 %69 = icmp eq i64 %68, -1 - br i1 %69, label %loop_out509, label %mask_block_err.i1248 + br i1 %69, label %loop_out510, label %mask_block_err.i1249 -mask_block_err.i1248: ; preds = %cond_549_case_0 +mask_block_err.i1249: ; preds = %cond_549_case_0 tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_check_bounds.exit1252: ; preds = %cond_exit_368, %cond_exit_549 - %"546_0.01285" = phi i64 [ %70, %cond_exit_549 ], [ 0, %cond_exit_368 ] - %70 = add nuw nsw i64 %"546_0.01285", 1 +__barray_check_bounds.exit1253: ; preds = %cond_exit_368, %cond_exit_549 + %"546_0.01286" = phi i64 [ %70, %cond_exit_549 ], [ 0, %cond_exit_368 ] + %70 = add nuw nsw i64 %"546_0.01286", 1 %71 = load i64, ptr %3, align 4 - %72 = lshr i64 %71, %"546_0.01285" + %72 = lshr i64 %71, %"546_0.01286" %73 = trunc i64 %72 to i1 - br i1 %73, label %cond_exit_549, label %__barray_mask_borrow.exit1256 + br i1 %73, label %cond_exit_549, label %__barray_mask_borrow.exit1257 -__barray_mask_borrow.exit1256: ; preds = %__barray_check_bounds.exit1252 - %74 = shl nuw nsw i64 1, %"546_0.01285" +__barray_mask_borrow.exit1257: ; preds = %__barray_check_bounds.exit1253 + %74 = shl nuw nsw i64 1, %"546_0.01286" %75 = xor i64 %71, %74 store i64 %75, ptr %3, align 4 - %76 = getelementptr inbounds nuw i64, ptr %2, i64 %"546_0.01285" + %76 = getelementptr inbounds nuw i64, ptr %2, i64 %"546_0.01286" %77 = load i64, ptr %76, align 4 tail call void @___dec_future_refcount(i64 %77) br label %cond_exit_549 -cond_exit_549: ; preds = %__barray_mask_borrow.exit1256, %__barray_check_bounds.exit1252 - %78 = icmp samesign ugt i64 %"546_0.01285", 18 - br i1 %78, label %cond_549_case_0, label %__barray_check_bounds.exit1252 +cond_exit_549: ; preds = %__barray_mask_borrow.exit1257, %__barray_check_bounds.exit1253 + %78 = icmp samesign ugt i64 %"546_0.01286", 18 + br i1 %78, label %cond_549_case_0, label %__barray_check_bounds.exit1253 -cond_exit_368: ; preds = %__barray_check_bounds.exit1242 +cond_exit_368: ; preds = %__barray_check_bounds.exit1243 %79 = xor i64 %64, %56 store i64 %79, ptr %1, align 4 - %80 = getelementptr inbounds nuw i1, ptr %0, i64 %"364_0.sroa.15.01278" + %80 = getelementptr inbounds nuw i1, ptr %0, i64 %"364_0.sroa.15.01279" store i1 %read_bool, ptr %80, align 1 - %81 = icmp eq i64 %"364_0.sroa.15.01278", 19 - br i1 %81, label %__barray_check_bounds.exit1252, label %__barray_check_bounds.exit1234 + %81 = icmp eq i64 %"364_0.sroa.15.01279", 19 + br i1 %81, label %__barray_check_bounds.exit1253, label %__barray_check_bounds.exit1235 -loop_out509: ; preds = %cond_549_case_0 +loop_out510: ; preds = %cond_549_case_0 tail call void @heap_free(ptr %2) tail call void @heap_free(ptr nonnull %3) %82 = load i64, ptr %1, align 4 %83 = and i64 %82, 1048575 store i64 %83, ptr %1, align 4 %84 = icmp eq i64 %83, 0 - br i1 %84, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1257 + br i1 %84, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1258 -mask_block_err.i1257: ; preds = %loop_out509 +mask_block_err.i1258: ; preds = %loop_out510 tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") unreachable -__barray_check_none_borrowed.exit: ; preds = %loop_out509 +__barray_check_none_borrowed.exit: ; preds = %loop_out510 %85 = tail call ptr @heap_alloc(i64 20) %86 = tail call ptr @heap_alloc(i64 8) store i64 0, ptr %86, align 1 @@ -330,13 +330,13 @@ __barray_check_none_borrowed.exit: ; preds = %loop_out509 %88 = and i64 %87, 1048575 store i64 %88, ptr %1, align 4 %89 = icmp eq i64 %88, 0 - br i1 %89, label %__barray_check_none_borrowed.exit1261, label %mask_block_err.i1259 + br i1 %89, label %__barray_check_none_borrowed.exit1262, label %mask_block_err.i1260 -mask_block_err.i1259: ; preds = %__barray_check_none_borrowed.exit +mask_block_err.i1260: ; preds = %__barray_check_none_borrowed.exit tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") unreachable -__barray_check_none_borrowed.exit1261: ; preds = %__barray_check_none_borrowed.exit +__barray_check_none_borrowed.exit1262: ; preds = %__barray_check_none_borrowed.exit %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 %y_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 4 %arr_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 8 @@ -359,7 +359,7 @@ declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immar ; Function Attrs: noreturn declare void @panic(i32, ptr) local_unnamed_addr #1 -declare i64 @___lazy_measure_leaked(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -375,8 +375,6 @@ declare void @print_bool(ptr, i64, i1) local_unnamed_addr declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr - declare i1 @___read_future_bool(i64) local_unnamed_addr ; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_from_head-sol-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_from_head-sol-x86_64-windows-gnu.ll index b3374a98..4ae0d2d1 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_from_head-sol-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_from_head-sol-x86_64-windows-gnu.ll @@ -48,24 +48,24 @@ loop_body: ; preds = %cond_exit_13, %__hu cond_13_case_1: ; preds = %loop_body %8 = add i64 %"9_2.0", 1 - %qalloc.i1214 = tail call i64 @___qalloc() - %not_max.not.not.i1215 = icmp eq i64 %qalloc.i1214, -1 - br i1 %not_max.not.not.i1215, label %cond_474_case_0.i1216, label %__hugr__.__tk2_sol_qalloc.470.exit1217 + %qalloc.i1215 = tail call i64 @___qalloc() + %not_max.not.not.i1216 = icmp eq i64 %qalloc.i1215, -1 + br i1 %not_max.not.not.i1216, label %cond_474_case_0.i1217, label %__hugr__.__tk2_sol_qalloc.470.exit1218 -cond_474_case_0.i1216: ; preds = %cond_13_case_1 +cond_474_case_0.i1217: ; preds = %cond_13_case_1 tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_sol_qalloc.470.exit1217: ; preds = %cond_13_case_1 - tail call void @___reset(i64 %qalloc.i1214) +__hugr__.__tk2_sol_qalloc.470.exit1218: ; preds = %cond_13_case_1 + tail call void @___reset(i64 %qalloc.i1215) %9 = icmp ult i64 %"9_2.0", 20 br i1 %9, label %__barray_check_bounds.exit, label %out_of_bounds.i -out_of_bounds.i: ; preds = %__hugr__.__tk2_sol_qalloc.470.exit1217 +out_of_bounds.i: ; preds = %__hugr__.__tk2_sol_qalloc.470.exit1218 tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") unreachable -__barray_check_bounds.exit: ; preds = %__hugr__.__tk2_sol_qalloc.470.exit1217 +__barray_check_bounds.exit: ; preds = %__hugr__.__tk2_sol_qalloc.470.exit1218 %10 = load i64, ptr %5, align 4 %11 = lshr i64 %10, %"9_2.0" %12 = trunc i64 %11 to i1 @@ -80,31 +80,31 @@ __barray_mask_return.exit: ; preds = %__barray_check_boun %14 = xor i64 %10, %13 store i64 %14, ptr %5, align 4 %15 = getelementptr inbounds nuw i64, ptr %4, i64 %"9_2.0" - store i64 %qalloc.i1214, ptr %15, align 4 + store i64 %qalloc.i1215, ptr %15, align 4 br label %cond_exit_13 cond_exit_13: ; preds = %loop_body, %__barray_mask_return.exit %"2107.0" = phi i64 [ %8, %__barray_mask_return.exit ], [ %"9_2.0", %loop_body ] %exitcond = icmp eq i64 %7, 21 - br i1 %exitcond, label %__barray_check_bounds.exit1219, label %loop_body + br i1 %exitcond, label %__barray_check_bounds.exit1220, label %loop_body -__barray_check_bounds.exit1219: ; preds = %cond_exit_13, %__barray_mask_return.exit1224 - %16 = phi i64 [ %28, %__barray_mask_return.exit1224 ], [ 1, %cond_exit_13 ] - %"114_0.01276" = phi i64 [ %16, %__barray_mask_return.exit1224 ], [ 0, %cond_exit_13 ] +__barray_check_bounds.exit1220: ; preds = %cond_exit_13, %__barray_mask_return.exit1225 + %16 = phi i64 [ %28, %__barray_mask_return.exit1225 ], [ 1, %cond_exit_13 ] + %"114_0.01277" = phi i64 [ %16, %__barray_mask_return.exit1225 ], [ 0, %cond_exit_13 ] %17 = load i64, ptr %5, align 4 - %18 = lshr i64 %17, %"114_0.01276" + %18 = lshr i64 %17, %"114_0.01277" %19 = trunc i64 %18 to i1 - br i1 %19, label %panic.i1220, label %__barray_check_bounds.exit1222 + br i1 %19, label %panic.i1221, label %__barray_check_bounds.exit1223 -panic.i1220: ; preds = %__barray_check_bounds.exit1219 +panic.i1221: ; preds = %__barray_check_bounds.exit1220 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_check_bounds.exit1222: ; preds = %__barray_check_bounds.exit1219 - %20 = shl nuw nsw i64 1, %"114_0.01276" +__barray_check_bounds.exit1223: ; preds = %__barray_check_bounds.exit1220 + %20 = shl nuw nsw i64 1, %"114_0.01277" %21 = xor i64 %17, %20 store i64 %21, ptr %5, align 4 - %22 = getelementptr inbounds nuw i64, ptr %4, i64 %"114_0.01276" + %22 = getelementptr inbounds nuw i64, ptr %4, i64 %"114_0.01277" %23 = load i64, ptr %22, align 4 tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rpp(i64 %qalloc.i, i64 %23, double 0x3FF921FB54442D18, double 0.000000e+00) @@ -112,65 +112,65 @@ __barray_check_bounds.exit1222: ; preds = %__barray_check_boun tail call void @___rp(i64 %qalloc.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18) %24 = load i64, ptr %5, align 4 - %25 = lshr i64 %24, %"114_0.01276" + %25 = lshr i64 %24, %"114_0.01277" %26 = trunc i64 %25 to i1 - br i1 %26, label %__barray_mask_return.exit1224, label %panic.i1223 + br i1 %26, label %__barray_mask_return.exit1225, label %panic.i1224 -panic.i1223: ; preds = %__barray_check_bounds.exit1222 +panic.i1224: ; preds = %__barray_check_bounds.exit1223 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_mask_return.exit1224: ; preds = %__barray_check_bounds.exit1222 +__barray_mask_return.exit1225: ; preds = %__barray_check_bounds.exit1223 %27 = xor i64 %24, %20 store i64 %27, ptr %5, align 4 store i64 %23, ptr %22, align 4 %28 = add nuw nsw i64 %16, 1 - %exitcond1279 = icmp eq i64 %28, 21 - br i1 %exitcond1279, label %cond_exit_185, label %__barray_check_bounds.exit1219 + %exitcond1280 = icmp eq i64 %28, 21 + br i1 %exitcond1280, label %cond_exit_185, label %__barray_check_bounds.exit1220 -cond_exit_185: ; preds = %__barray_mask_return.exit1224 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) +cond_exit_185: ; preds = %__barray_mask_return.exit1225 + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 1) tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure_leaked) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___inc_future_refcount(i64 %___future_measure) + %read_uint = tail call i64 @___read_future_uint(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) %29 = icmp eq i64 %read_uint, 2 br i1 %29, label %30, label %cond_exit_256 cond_exit_256: ; preds = %cond_exit_185 - %read_uint350 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + %read_uint350 = tail call i64 @___read_future_uint(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) %.not = icmp eq i64 %read_uint350, 2 br i1 %.not, label %cond_236_case_0, label %cond_236_case_1 30: ; preds = %cond_exit_185 - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_int(ptr nonnull @res_head_leake.F4F32972.0, i64 20, i64 1) - br label %__barray_check_bounds.exit1230.preheader + br label %__barray_check_bounds.exit1231.preheader -__barray_check_bounds.exit1230.preheader: ; preds = %cond_236_case_1, %30 - br label %__barray_check_bounds.exit1230 +__barray_check_bounds.exit1231.preheader: ; preds = %cond_236_case_1, %30 + br label %__barray_check_bounds.exit1231 cond_236_case_1: ; preds = %cond_exit_256 %31 = icmp eq i64 %read_uint350, 1 tail call void @print_bool(ptr nonnull @res_head.AFE8E005.0, i64 14, i1 %31) - br label %__barray_check_bounds.exit1230.preheader + br label %__barray_check_bounds.exit1231.preheader cond_236_case_0: ; preds = %cond_exit_256 tail call void @panic(i32 1001, ptr nonnull @e_Option.unw.32D4E82D.0) unreachable -out_of_bounds.i1225: ; preds = %.thread +out_of_bounds.i1226: ; preds = %.thread tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") unreachable -__barray_check_bounds.exit1226: ; preds = %.thread +__barray_check_bounds.exit1227: ; preds = %.thread %32 = load i64, ptr %3, align 4 - %33 = lshr i64 %32, %"298_2.01283" + %33 = lshr i64 %32, %"298_2.01284" %34 = trunc i64 %33 to i1 - br i1 %34, label %cond_exit_302, label %panic.i1227 + br i1 %34, label %cond_exit_302, label %panic.i1228 -panic.i1227: ; preds = %__barray_check_bounds.exit1226 +panic.i1228: ; preds = %__barray_check_bounds.exit1227 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable @@ -179,91 +179,91 @@ mask_block_ok.i: ; preds = %cond_exit_302 %36 = or i64 %35, -1048576 store i64 %36, ptr %5, align 4 %37 = icmp eq i64 %36, -1 - br i1 %37, label %loop_body510.preheader.preheader, label %mask_block_err.i + br i1 %37, label %loop_body511.preheader.preheader, label %mask_block_err.i mask_block_err.i: ; preds = %mask_block_ok.i tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_check_bounds.exit1230: ; preds = %__barray_check_bounds.exit1230.preheader, %cond_exit_302 - %"298_0.sroa.15.01284" = phi i64 [ %38, %cond_exit_302 ], [ 0, %__barray_check_bounds.exit1230.preheader ] - %"298_2.01283" = phi i64 [ %46, %cond_exit_302 ], [ 0, %__barray_check_bounds.exit1230.preheader ] - %38 = add nuw nsw i64 %"298_0.sroa.15.01284", 1 +__barray_check_bounds.exit1231: ; preds = %__barray_check_bounds.exit1231.preheader, %cond_exit_302 + %"298_0.sroa.15.01285" = phi i64 [ %38, %cond_exit_302 ], [ 0, %__barray_check_bounds.exit1231.preheader ] + %"298_2.01284" = phi i64 [ %46, %cond_exit_302 ], [ 0, %__barray_check_bounds.exit1231.preheader ] + %38 = add nuw nsw i64 %"298_0.sroa.15.01285", 1 %39 = load i64, ptr %5, align 4 - %40 = lshr i64 %39, %"298_0.sroa.15.01284" + %40 = lshr i64 %39, %"298_0.sroa.15.01285" %41 = trunc i64 %40 to i1 - br i1 %41, label %panic.i1231, label %.thread + br i1 %41, label %panic.i1232, label %.thread -panic.i1231: ; preds = %__barray_check_bounds.exit1230 +panic.i1232: ; preds = %__barray_check_bounds.exit1231 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -.thread: ; preds = %__barray_check_bounds.exit1230 - %42 = shl nuw nsw i64 1, %"298_0.sroa.15.01284" +.thread: ; preds = %__barray_check_bounds.exit1231 + %42 = shl nuw nsw i64 1, %"298_0.sroa.15.01285" %43 = xor i64 %39, %42 store i64 %43, ptr %5, align 4 - %44 = getelementptr inbounds nuw i64, ptr %4, i64 %"298_0.sroa.15.01284" + %44 = getelementptr inbounds nuw i64, ptr %4, i64 %"298_0.sroa.15.01285" %45 = load i64, ptr %44, align 4 - %46 = add i64 %"298_2.01283", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %45) + %46 = add i64 %"298_2.01284", 1 + %___future_measure485 = tail call i64 @___future_measure(i64 %45, i64 0) tail call void @___qfree(i64 %45) - %47 = icmp ult i64 %"298_2.01283", 20 - br i1 %47, label %__barray_check_bounds.exit1226, label %out_of_bounds.i1225 + %47 = icmp ult i64 %"298_2.01284", 20 + br i1 %47, label %__barray_check_bounds.exit1227, label %out_of_bounds.i1226 -cond_exit_302: ; preds = %__barray_check_bounds.exit1226 - %48 = shl nuw nsw i64 1, %"298_2.01283" +cond_exit_302: ; preds = %__barray_check_bounds.exit1227 + %48 = shl nuw nsw i64 1, %"298_2.01284" %49 = xor i64 %32, %48 store i64 %49, ptr %3, align 4 - %50 = getelementptr inbounds nuw i64, ptr %2, i64 %"298_2.01283" - store i64 %lazy_measure, ptr %50, align 4 - %51 = icmp samesign ugt i64 %"298_0.sroa.15.01284", 18 - br i1 %51, label %mask_block_ok.i, label %__barray_check_bounds.exit1230 + %50 = getelementptr inbounds nuw i64, ptr %2, i64 %"298_2.01284" + store i64 %___future_measure485, ptr %50, align 4 + %51 = icmp samesign ugt i64 %"298_0.sroa.15.01285", 18 + br i1 %51, label %mask_block_ok.i, label %__barray_check_bounds.exit1231 -loop_body510.preheader.preheader: ; preds = %mask_block_ok.i +loop_body511.preheader.preheader: ; preds = %mask_block_ok.i tail call void @heap_free(ptr nonnull %4) tail call void @heap_free(ptr nonnull %5) - br label %__barray_check_bounds.exit1234 + br label %__barray_check_bounds.exit1235 -__barray_check_bounds.exit1234: ; preds = %cond_exit_368, %loop_body510.preheader.preheader - %"364_0.sroa.15.01278" = phi i64 [ %52, %cond_exit_368 ], [ 0, %loop_body510.preheader.preheader ] - %52 = add nuw nsw i64 %"364_0.sroa.15.01278", 1 +__barray_check_bounds.exit1235: ; preds = %cond_exit_368, %loop_body511.preheader.preheader + %"364_0.sroa.15.01279" = phi i64 [ %52, %cond_exit_368 ], [ 0, %loop_body511.preheader.preheader ] + %52 = add nuw nsw i64 %"364_0.sroa.15.01279", 1 %53 = load i64, ptr %3, align 4 - %54 = lshr i64 %53, %"364_0.sroa.15.01278" + %54 = lshr i64 %53, %"364_0.sroa.15.01279" %55 = trunc i64 %54 to i1 - br i1 %55, label %panic.i1235, label %__barray_check_bounds.exit1238 + br i1 %55, label %panic.i1236, label %__barray_check_bounds.exit1239 -panic.i1235: ; preds = %__barray_check_bounds.exit1234 +panic.i1236: ; preds = %__barray_check_bounds.exit1235 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_check_bounds.exit1238: ; preds = %__barray_check_bounds.exit1234 - %56 = shl nuw nsw i64 1, %"364_0.sroa.15.01278" +__barray_check_bounds.exit1239: ; preds = %__barray_check_bounds.exit1235 + %56 = shl nuw nsw i64 1, %"364_0.sroa.15.01279" %57 = xor i64 %53, %56 store i64 %57, ptr %3, align 4 - %58 = getelementptr inbounds nuw i64, ptr %2, i64 %"364_0.sroa.15.01278" + %58 = getelementptr inbounds nuw i64, ptr %2, i64 %"364_0.sroa.15.01279" %59 = load i64, ptr %58, align 4 tail call void @___inc_future_refcount(i64 %59) %60 = load i64, ptr %3, align 4 - %61 = lshr i64 %60, %"364_0.sroa.15.01278" + %61 = lshr i64 %60, %"364_0.sroa.15.01279" %62 = trunc i64 %61 to i1 - br i1 %62, label %__barray_check_bounds.exit1242, label %panic.i1239 + br i1 %62, label %__barray_check_bounds.exit1243, label %panic.i1240 -panic.i1239: ; preds = %__barray_check_bounds.exit1238 +panic.i1240: ; preds = %__barray_check_bounds.exit1239 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_check_bounds.exit1242: ; preds = %__barray_check_bounds.exit1238 +__barray_check_bounds.exit1243: ; preds = %__barray_check_bounds.exit1239 %63 = xor i64 %60, %56 store i64 %63, ptr %3, align 4 store i64 %59, ptr %58, align 4 %read_bool = tail call i1 @___read_future_bool(i64 %59) tail call void @___dec_future_refcount(i64 %59) %64 = load i64, ptr %1, align 4 - %65 = lshr i64 %64, %"364_0.sroa.15.01278" + %65 = lshr i64 %64, %"364_0.sroa.15.01279" %66 = trunc i64 %65 to i1 - br i1 %66, label %cond_exit_368, label %panic.i1243 + br i1 %66, label %cond_exit_368, label %panic.i1244 -panic.i1243: ; preds = %__barray_check_bounds.exit1242 +panic.i1244: ; preds = %__barray_check_bounds.exit1243 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable @@ -272,55 +272,55 @@ cond_549_case_0: ; preds = %cond_exit_549 %68 = or i64 %67, -1048576 store i64 %68, ptr %3, align 4 %69 = icmp eq i64 %68, -1 - br i1 %69, label %loop_out509, label %mask_block_err.i1248 + br i1 %69, label %loop_out510, label %mask_block_err.i1249 -mask_block_err.i1248: ; preds = %cond_549_case_0 +mask_block_err.i1249: ; preds = %cond_549_case_0 tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_check_bounds.exit1252: ; preds = %cond_exit_368, %cond_exit_549 - %"546_0.01285" = phi i64 [ %70, %cond_exit_549 ], [ 0, %cond_exit_368 ] - %70 = add nuw nsw i64 %"546_0.01285", 1 +__barray_check_bounds.exit1253: ; preds = %cond_exit_368, %cond_exit_549 + %"546_0.01286" = phi i64 [ %70, %cond_exit_549 ], [ 0, %cond_exit_368 ] + %70 = add nuw nsw i64 %"546_0.01286", 1 %71 = load i64, ptr %3, align 4 - %72 = lshr i64 %71, %"546_0.01285" + %72 = lshr i64 %71, %"546_0.01286" %73 = trunc i64 %72 to i1 - br i1 %73, label %cond_exit_549, label %__barray_mask_borrow.exit1256 + br i1 %73, label %cond_exit_549, label %__barray_mask_borrow.exit1257 -__barray_mask_borrow.exit1256: ; preds = %__barray_check_bounds.exit1252 - %74 = shl nuw nsw i64 1, %"546_0.01285" +__barray_mask_borrow.exit1257: ; preds = %__barray_check_bounds.exit1253 + %74 = shl nuw nsw i64 1, %"546_0.01286" %75 = xor i64 %71, %74 store i64 %75, ptr %3, align 4 - %76 = getelementptr inbounds nuw i64, ptr %2, i64 %"546_0.01285" + %76 = getelementptr inbounds nuw i64, ptr %2, i64 %"546_0.01286" %77 = load i64, ptr %76, align 4 tail call void @___dec_future_refcount(i64 %77) br label %cond_exit_549 -cond_exit_549: ; preds = %__barray_mask_borrow.exit1256, %__barray_check_bounds.exit1252 - %78 = icmp samesign ugt i64 %"546_0.01285", 18 - br i1 %78, label %cond_549_case_0, label %__barray_check_bounds.exit1252 +cond_exit_549: ; preds = %__barray_mask_borrow.exit1257, %__barray_check_bounds.exit1253 + %78 = icmp samesign ugt i64 %"546_0.01286", 18 + br i1 %78, label %cond_549_case_0, label %__barray_check_bounds.exit1253 -cond_exit_368: ; preds = %__barray_check_bounds.exit1242 +cond_exit_368: ; preds = %__barray_check_bounds.exit1243 %79 = xor i64 %64, %56 store i64 %79, ptr %1, align 4 - %80 = getelementptr inbounds nuw i1, ptr %0, i64 %"364_0.sroa.15.01278" + %80 = getelementptr inbounds nuw i1, ptr %0, i64 %"364_0.sroa.15.01279" store i1 %read_bool, ptr %80, align 1 - %81 = icmp eq i64 %"364_0.sroa.15.01278", 19 - br i1 %81, label %__barray_check_bounds.exit1252, label %__barray_check_bounds.exit1234 + %81 = icmp eq i64 %"364_0.sroa.15.01279", 19 + br i1 %81, label %__barray_check_bounds.exit1253, label %__barray_check_bounds.exit1235 -loop_out509: ; preds = %cond_549_case_0 +loop_out510: ; preds = %cond_549_case_0 tail call void @heap_free(ptr %2) tail call void @heap_free(ptr nonnull %3) %82 = load i64, ptr %1, align 4 %83 = and i64 %82, 1048575 store i64 %83, ptr %1, align 4 %84 = icmp eq i64 %83, 0 - br i1 %84, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1257 + br i1 %84, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1258 -mask_block_err.i1257: ; preds = %loop_out509 +mask_block_err.i1258: ; preds = %loop_out510 tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") unreachable -__barray_check_none_borrowed.exit: ; preds = %loop_out509 +__barray_check_none_borrowed.exit: ; preds = %loop_out510 %85 = tail call ptr @heap_alloc(i64 20) %86 = tail call ptr @heap_alloc(i64 8) store i64 0, ptr %86, align 1 @@ -330,13 +330,13 @@ __barray_check_none_borrowed.exit: ; preds = %loop_out509 %88 = and i64 %87, 1048575 store i64 %88, ptr %1, align 4 %89 = icmp eq i64 %88, 0 - br i1 %89, label %__barray_check_none_borrowed.exit1261, label %mask_block_err.i1259 + br i1 %89, label %__barray_check_none_borrowed.exit1262, label %mask_block_err.i1260 -mask_block_err.i1259: ; preds = %__barray_check_none_borrowed.exit +mask_block_err.i1260: ; preds = %__barray_check_none_borrowed.exit tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") unreachable -__barray_check_none_borrowed.exit1261: ; preds = %__barray_check_none_borrowed.exit +__barray_check_none_borrowed.exit1262: ; preds = %__barray_check_none_borrowed.exit %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 %y_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 4 %arr_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 8 @@ -359,7 +359,7 @@ declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immar ; Function Attrs: noreturn declare void @panic(i32, ptr) local_unnamed_addr #1 -declare i64 @___lazy_measure_leaked(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -375,8 +375,6 @@ declare void @print_bool(ptr, i64, i1) local_unnamed_addr declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr - declare i1 @___read_future_bool(i64) local_unnamed_addr ; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_within_tail-helios-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_within_tail-helios-aarch64-apple-darwin.ll index e366a73c..39a35cb5 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_within_tail-helios-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_within_tail-helios-aarch64-apple-darwin.ll @@ -170,22 +170,22 @@ __barray_mask_return.exit1268: ; preds = %__barray_check_boun br i1 %exitcond1325, label %cond_exit_189, label %__barray_check_bounds.exit1252 cond_exit_189: ; preds = %__barray_mask_return.exit1268 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) + %___lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure_leaked) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___inc_future_refcount(i64 %___lazy_measure_leaked) + %read_uint = tail call i64 @___read_future_uint(i64 %___lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) %43 = icmp eq i64 %read_uint, 2 br i1 %43, label %44, label %cond_exit_267 cond_exit_267: ; preds = %cond_exit_189 - %read_uint378 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + %read_uint378 = tail call i64 @___read_future_uint(i64 %___lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) %.not = icmp eq i64 %read_uint378, 2 br i1 %.not, label %cond_247_case_0, label %cond_247_case_1 44: ; preds = %cond_exit_189 - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) tail call void @print_int(ptr nonnull @res_head_leake.F4F32972.0, i64 20, i64 1) br label %__barray_check_bounds.exit1274.preheader @@ -246,7 +246,7 @@ panic.i1275: ; preds = %__barray_check_boun %58 = getelementptr inbounds nuw i64, ptr %4, i64 %"310_0.sroa.15.01330" %59 = load i64, ptr %58, align 4 %60 = add i64 %"310_2.01329", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %59) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %59) tail call void @___qfree(i64 %59) %61 = icmp ult i64 %"310_2.01329", 20 br i1 %61, label %__barray_check_bounds.exit1270, label %out_of_bounds.i1269 @@ -256,7 +256,7 @@ cond_exit_314: ; preds = %__barray_check_boun %63 = xor i64 %46, %62 store i64 %63, ptr %3, align 4 %64 = getelementptr inbounds nuw i64, ptr %2, i64 %"310_2.01329" - store i64 %lazy_measure, ptr %64, align 4 + store i64 %___lazy_measure, ptr %64, align 4 %65 = icmp samesign ugt i64 %"310_0.sroa.15.01330", 18 br i1 %65, label %mask_block_ok.i, label %__barray_check_bounds.exit1274 diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_within_tail-helios-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_within_tail-helios-aarch64-unknown-linux-gnu.ll index 0e8e9811..6028b59a 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_within_tail-helios-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_within_tail-helios-aarch64-unknown-linux-gnu.ll @@ -170,22 +170,22 @@ __barray_mask_return.exit1268: ; preds = %__barray_check_boun br i1 %exitcond1325, label %cond_exit_189, label %__barray_check_bounds.exit1252 cond_exit_189: ; preds = %__barray_mask_return.exit1268 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) + %___lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure_leaked) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___inc_future_refcount(i64 %___lazy_measure_leaked) + %read_uint = tail call i64 @___read_future_uint(i64 %___lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) %43 = icmp eq i64 %read_uint, 2 br i1 %43, label %44, label %cond_exit_267 cond_exit_267: ; preds = %cond_exit_189 - %read_uint378 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + %read_uint378 = tail call i64 @___read_future_uint(i64 %___lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) %.not = icmp eq i64 %read_uint378, 2 br i1 %.not, label %cond_247_case_0, label %cond_247_case_1 44: ; preds = %cond_exit_189 - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) tail call void @print_int(ptr nonnull @res_head_leake.F4F32972.0, i64 20, i64 1) br label %__barray_check_bounds.exit1274.preheader @@ -246,7 +246,7 @@ panic.i1275: ; preds = %__barray_check_boun %58 = getelementptr inbounds nuw i64, ptr %4, i64 %"310_0.sroa.15.01330" %59 = load i64, ptr %58, align 4 %60 = add i64 %"310_2.01329", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %59) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %59) tail call void @___qfree(i64 %59) %61 = icmp ult i64 %"310_2.01329", 20 br i1 %61, label %__barray_check_bounds.exit1270, label %out_of_bounds.i1269 @@ -256,7 +256,7 @@ cond_exit_314: ; preds = %__barray_check_boun %63 = xor i64 %46, %62 store i64 %63, ptr %3, align 4 %64 = getelementptr inbounds nuw i64, ptr %2, i64 %"310_2.01329" - store i64 %lazy_measure, ptr %64, align 4 + store i64 %___lazy_measure, ptr %64, align 4 %65 = icmp samesign ugt i64 %"310_0.sroa.15.01330", 18 br i1 %65, label %mask_block_ok.i, label %__barray_check_bounds.exit1274 diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_within_tail-helios-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_within_tail-helios-x86_64-apple-darwin.ll index 7ee2a97e..ad1d01e7 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_within_tail-helios-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_within_tail-helios-x86_64-apple-darwin.ll @@ -170,22 +170,22 @@ __barray_mask_return.exit1268: ; preds = %__barray_check_boun br i1 %exitcond1325, label %cond_exit_189, label %__barray_check_bounds.exit1252 cond_exit_189: ; preds = %__barray_mask_return.exit1268 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) + %___lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure_leaked) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___inc_future_refcount(i64 %___lazy_measure_leaked) + %read_uint = tail call i64 @___read_future_uint(i64 %___lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) %43 = icmp eq i64 %read_uint, 2 br i1 %43, label %44, label %cond_exit_267 cond_exit_267: ; preds = %cond_exit_189 - %read_uint378 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + %read_uint378 = tail call i64 @___read_future_uint(i64 %___lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) %.not = icmp eq i64 %read_uint378, 2 br i1 %.not, label %cond_247_case_0, label %cond_247_case_1 44: ; preds = %cond_exit_189 - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) tail call void @print_int(ptr nonnull @res_head_leake.F4F32972.0, i64 20, i64 1) br label %__barray_check_bounds.exit1274.preheader @@ -246,7 +246,7 @@ panic.i1275: ; preds = %__barray_check_boun %58 = getelementptr inbounds nuw i64, ptr %4, i64 %"310_0.sroa.15.01330" %59 = load i64, ptr %58, align 4 %60 = add i64 %"310_2.01329", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %59) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %59) tail call void @___qfree(i64 %59) %61 = icmp ult i64 %"310_2.01329", 20 br i1 %61, label %__barray_check_bounds.exit1270, label %out_of_bounds.i1269 @@ -256,7 +256,7 @@ cond_exit_314: ; preds = %__barray_check_boun %63 = xor i64 %46, %62 store i64 %63, ptr %3, align 4 %64 = getelementptr inbounds nuw i64, ptr %2, i64 %"310_2.01329" - store i64 %lazy_measure, ptr %64, align 4 + store i64 %___lazy_measure, ptr %64, align 4 %65 = icmp samesign ugt i64 %"310_0.sroa.15.01330", 18 br i1 %65, label %mask_block_ok.i, label %__barray_check_bounds.exit1274 diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_within_tail-helios-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_within_tail-helios-x86_64-unknown-linux-gnu.ll index 0a46f84e..b2aa6dea 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_within_tail-helios-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_within_tail-helios-x86_64-unknown-linux-gnu.ll @@ -170,22 +170,22 @@ __barray_mask_return.exit1268: ; preds = %__barray_check_boun br i1 %exitcond1325, label %cond_exit_189, label %__barray_check_bounds.exit1252 cond_exit_189: ; preds = %__barray_mask_return.exit1268 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) + %___lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure_leaked) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___inc_future_refcount(i64 %___lazy_measure_leaked) + %read_uint = tail call i64 @___read_future_uint(i64 %___lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) %43 = icmp eq i64 %read_uint, 2 br i1 %43, label %44, label %cond_exit_267 cond_exit_267: ; preds = %cond_exit_189 - %read_uint378 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + %read_uint378 = tail call i64 @___read_future_uint(i64 %___lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) %.not = icmp eq i64 %read_uint378, 2 br i1 %.not, label %cond_247_case_0, label %cond_247_case_1 44: ; preds = %cond_exit_189 - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) tail call void @print_int(ptr nonnull @res_head_leake.F4F32972.0, i64 20, i64 1) br label %__barray_check_bounds.exit1274.preheader @@ -246,7 +246,7 @@ panic.i1275: ; preds = %__barray_check_boun %58 = getelementptr inbounds nuw i64, ptr %4, i64 %"310_0.sroa.15.01330" %59 = load i64, ptr %58, align 4 %60 = add i64 %"310_2.01329", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %59) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %59) tail call void @___qfree(i64 %59) %61 = icmp ult i64 %"310_2.01329", 20 br i1 %61, label %__barray_check_bounds.exit1270, label %out_of_bounds.i1269 @@ -256,7 +256,7 @@ cond_exit_314: ; preds = %__barray_check_boun %63 = xor i64 %46, %62 store i64 %63, ptr %3, align 4 %64 = getelementptr inbounds nuw i64, ptr %2, i64 %"310_2.01329" - store i64 %lazy_measure, ptr %64, align 4 + store i64 %___lazy_measure, ptr %64, align 4 %65 = icmp samesign ugt i64 %"310_0.sroa.15.01330", 18 br i1 %65, label %mask_block_ok.i, label %__barray_check_bounds.exit1274 diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_within_tail-helios-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_within_tail-helios-x86_64-windows-gnu.ll index a191feea..763baa56 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_within_tail-helios-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_within_tail-helios-x86_64-windows-gnu.ll @@ -170,22 +170,22 @@ __barray_mask_return.exit1268: ; preds = %__barray_check_boun br i1 %exitcond1325, label %cond_exit_189, label %__barray_check_bounds.exit1252 cond_exit_189: ; preds = %__barray_mask_return.exit1268 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) + %___lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure_leaked) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___inc_future_refcount(i64 %___lazy_measure_leaked) + %read_uint = tail call i64 @___read_future_uint(i64 %___lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) %43 = icmp eq i64 %read_uint, 2 br i1 %43, label %44, label %cond_exit_267 cond_exit_267: ; preds = %cond_exit_189 - %read_uint378 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + %read_uint378 = tail call i64 @___read_future_uint(i64 %___lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) %.not = icmp eq i64 %read_uint378, 2 br i1 %.not, label %cond_247_case_0, label %cond_247_case_1 44: ; preds = %cond_exit_189 - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) tail call void @print_int(ptr nonnull @res_head_leake.F4F32972.0, i64 20, i64 1) br label %__barray_check_bounds.exit1274.preheader @@ -246,7 +246,7 @@ panic.i1275: ; preds = %__barray_check_boun %58 = getelementptr inbounds nuw i64, ptr %4, i64 %"310_0.sroa.15.01330" %59 = load i64, ptr %58, align 4 %60 = add i64 %"310_2.01329", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %59) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %59) tail call void @___qfree(i64 %59) %61 = icmp ult i64 %"310_2.01329", 20 br i1 %61, label %__barray_check_bounds.exit1270, label %out_of_bounds.i1269 @@ -256,7 +256,7 @@ cond_exit_314: ; preds = %__barray_check_boun %63 = xor i64 %46, %62 store i64 %63, ptr %3, align 4 %64 = getelementptr inbounds nuw i64, ptr %2, i64 %"310_2.01329" - store i64 %lazy_measure, ptr %64, align 4 + store i64 %___lazy_measure, ptr %64, align 4 %65 = icmp samesign ugt i64 %"310_0.sroa.15.01330", 18 br i1 %65, label %mask_block_ok.i, label %__barray_check_bounds.exit1274 diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_within_tail-sol-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_within_tail-sol-aarch64-apple-darwin.ll index 3fff3483..904f0004 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_within_tail-sol-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_within_tail-sol-aarch64-apple-darwin.ll @@ -40,20 +40,20 @@ __hugr__.__tk2_sol_qalloc.485.exit: ; preds = %alloca_block br label %cond_13_case_1 cond_13_case_1: ; preds = %__hugr__.__tk2_sol_qalloc.485.exit, %cond_exit_13 - %"9_2.01321" = phi i64 [ 0, %__hugr__.__tk2_sol_qalloc.485.exit ], [ %6, %cond_exit_13 ] - %6 = add nuw nsw i64 %"9_2.01321", 1 - %qalloc.i1244 = tail call i64 @___qalloc() - %not_max.not.not.i1245 = icmp eq i64 %qalloc.i1244, -1 - br i1 %not_max.not.not.i1245, label %cond_489_case_0.i1246, label %__barray_check_bounds.exit + %"9_2.01322" = phi i64 [ 0, %__hugr__.__tk2_sol_qalloc.485.exit ], [ %6, %cond_exit_13 ] + %6 = add nuw nsw i64 %"9_2.01322", 1 + %qalloc.i1245 = tail call i64 @___qalloc() + %not_max.not.not.i1246 = icmp eq i64 %qalloc.i1245, -1 + br i1 %not_max.not.not.i1246, label %cond_489_case_0.i1247, label %__barray_check_bounds.exit -cond_489_case_0.i1246: ; preds = %cond_13_case_1 +cond_489_case_0.i1247: ; preds = %cond_13_case_1 tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable __barray_check_bounds.exit: ; preds = %cond_13_case_1 - tail call void @___reset(i64 %qalloc.i1244) + tail call void @___reset(i64 %qalloc.i1245) %7 = load i64, ptr %5, align 4 - %8 = lshr i64 %7, %"9_2.01321" + %8 = lshr i64 %7, %"9_2.01322" %9 = trunc i64 %8 to i1 br i1 %9, label %cond_exit_13, label %panic.i @@ -62,20 +62,20 @@ panic.i: ; preds = %__barray_check_boun unreachable cond_exit_13: ; preds = %__barray_check_bounds.exit - %10 = shl nuw nsw i64 1, %"9_2.01321" + %10 = shl nuw nsw i64 1, %"9_2.01322" %11 = xor i64 %7, %10 store i64 %11, ptr %5, align 4 - %12 = getelementptr inbounds nuw i64, ptr %4, i64 %"9_2.01321" - store i64 %qalloc.i1244, ptr %12, align 4 + %12 = getelementptr inbounds nuw i64, ptr %4, i64 %"9_2.01322" + store i64 %qalloc.i1245, ptr %12, align 4 %exitcond = icmp eq i64 %6, 20 br i1 %exitcond, label %loop_out, label %cond_13_case_1 loop_out: ; preds = %cond_exit_13 %13 = load i64, ptr %5, align 4 %14 = trunc i64 %13 to i1 - br i1 %14, label %panic.i1248, label %__barray_mask_borrow.exit + br i1 %14, label %panic.i1249, label %__barray_mask_borrow.exit -panic.i1248: ; preds = %loop_out +panic.i1249: ; preds = %loop_out tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable @@ -90,46 +90,46 @@ __barray_mask_borrow.exit: ; preds = %loop_out tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18) %17 = load i64, ptr %5, align 4 %18 = trunc i64 %17 to i1 - br i1 %18, label %__barray_mask_return.exit1250, label %panic.i1249 + br i1 %18, label %__barray_mask_return.exit1251, label %panic.i1250 -panic.i1249: ; preds = %__barray_mask_borrow.exit +panic.i1250: ; preds = %__barray_mask_borrow.exit tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_mask_return.exit1250: ; preds = %__barray_mask_borrow.exit +__barray_mask_return.exit1251: ; preds = %__barray_mask_borrow.exit %19 = and i64 %17, -2 store i64 %19, ptr %5, align 4 store i64 %16, ptr %4, align 4 - br label %__barray_check_bounds.exit1252 + br label %__barray_check_bounds.exit1253 -__barray_check_bounds.exit1252: ; preds = %__barray_mask_return.exit1250, %__barray_mask_return.exit1268 - %20 = phi i64 [ 1, %__barray_mask_return.exit1250 ], [ %42, %__barray_mask_return.exit1268 ] - %"118_0.01322" = phi i64 [ 0, %__barray_mask_return.exit1250 ], [ %20, %__barray_mask_return.exit1268 ] +__barray_check_bounds.exit1253: ; preds = %__barray_mask_return.exit1251, %__barray_mask_return.exit1269 + %20 = phi i64 [ 1, %__barray_mask_return.exit1251 ], [ %42, %__barray_mask_return.exit1269 ] + %"118_0.01323" = phi i64 [ 0, %__barray_mask_return.exit1251 ], [ %20, %__barray_mask_return.exit1269 ] %21 = load i64, ptr %5, align 4 - %22 = lshr i64 %21, %"118_0.01322" + %22 = lshr i64 %21, %"118_0.01323" %23 = trunc i64 %22 to i1 - br i1 %23, label %panic.i1253, label %__barray_check_bounds.exit1256 + br i1 %23, label %panic.i1254, label %__barray_check_bounds.exit1257 -panic.i1253: ; preds = %__barray_check_bounds.exit1252 +panic.i1254: ; preds = %__barray_check_bounds.exit1253 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_check_bounds.exit1256: ; preds = %__barray_check_bounds.exit1252 - %24 = shl nuw nsw i64 1, %"118_0.01322" +__barray_check_bounds.exit1257: ; preds = %__barray_check_bounds.exit1253 + %24 = shl nuw nsw i64 1, %"118_0.01323" %25 = xor i64 %21, %24 store i64 %25, ptr %5, align 4 - %26 = getelementptr inbounds nuw i64, ptr %4, i64 %"118_0.01322" + %26 = getelementptr inbounds nuw i64, ptr %4, i64 %"118_0.01323" %27 = load i64, ptr %26, align 4 %28 = lshr i64 %25, %20 %29 = trunc i64 %28 to i1 - br i1 %29, label %panic.i1257, label %__barray_check_bounds.exit1262 + br i1 %29, label %panic.i1258, label %__barray_check_bounds.exit1263 -panic.i1257: ; preds = %__barray_check_bounds.exit1256 +panic.i1258: ; preds = %__barray_check_bounds.exit1257 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_check_bounds.exit1262: ; preds = %__barray_check_bounds.exit1256 - %30 = shl nuw nsw i64 2, %"118_0.01322" +__barray_check_bounds.exit1263: ; preds = %__barray_check_bounds.exit1257 + %30 = shl nuw nsw i64 2, %"118_0.01323" %31 = xor i64 %25, %30 store i64 %31, ptr %5, align 4 %32 = getelementptr inbounds nuw i64, ptr %4, i64 %20 @@ -140,78 +140,78 @@ __barray_check_bounds.exit1262: ; preds = %__barray_check_boun tail call void @___rp(i64 %27, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rz(i64 %27, double 0xBFF921FB54442D18) %34 = load i64, ptr %5, align 4 - %35 = lshr i64 %34, %"118_0.01322" + %35 = lshr i64 %34, %"118_0.01323" %36 = trunc i64 %35 to i1 - br i1 %36, label %__barray_check_bounds.exit1266, label %panic.i1263 + br i1 %36, label %__barray_check_bounds.exit1267, label %panic.i1264 -panic.i1263: ; preds = %__barray_check_bounds.exit1262 +panic.i1264: ; preds = %__barray_check_bounds.exit1263 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_check_bounds.exit1266: ; preds = %__barray_check_bounds.exit1262 +__barray_check_bounds.exit1267: ; preds = %__barray_check_bounds.exit1263 %37 = xor i64 %34, %24 store i64 %37, ptr %5, align 4 store i64 %27, ptr %26, align 4 %38 = load i64, ptr %5, align 4 %39 = lshr i64 %38, %20 %40 = trunc i64 %39 to i1 - br i1 %40, label %__barray_mask_return.exit1268, label %panic.i1267 + br i1 %40, label %__barray_mask_return.exit1269, label %panic.i1268 -panic.i1267: ; preds = %__barray_check_bounds.exit1266 +panic.i1268: ; preds = %__barray_check_bounds.exit1267 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_mask_return.exit1268: ; preds = %__barray_check_bounds.exit1266 +__barray_mask_return.exit1269: ; preds = %__barray_check_bounds.exit1267 %41 = xor i64 %38, %30 store i64 %41, ptr %5, align 4 store i64 %33, ptr %32, align 4 %42 = add nuw nsw i64 %20, 1 - %exitcond1325 = icmp eq i64 %42, 20 - br i1 %exitcond1325, label %cond_exit_189, label %__barray_check_bounds.exit1252 + %exitcond1326 = icmp eq i64 %42, 20 + br i1 %exitcond1326, label %cond_exit_189, label %__barray_check_bounds.exit1253 -cond_exit_189: ; preds = %__barray_mask_return.exit1268 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) +cond_exit_189: ; preds = %__barray_mask_return.exit1269 + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 1) tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure_leaked) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___inc_future_refcount(i64 %___future_measure) + %read_uint = tail call i64 @___read_future_uint(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) %43 = icmp eq i64 %read_uint, 2 br i1 %43, label %44, label %cond_exit_267 cond_exit_267: ; preds = %cond_exit_189 - %read_uint378 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + %read_uint378 = tail call i64 @___read_future_uint(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) %.not = icmp eq i64 %read_uint378, 2 br i1 %.not, label %cond_247_case_0, label %cond_247_case_1 44: ; preds = %cond_exit_189 - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_int(ptr nonnull @res_head_leake.F4F32972.0, i64 20, i64 1) - br label %__barray_check_bounds.exit1274.preheader + br label %__barray_check_bounds.exit1275.preheader -__barray_check_bounds.exit1274.preheader: ; preds = %cond_247_case_1, %44 - br label %__barray_check_bounds.exit1274 +__barray_check_bounds.exit1275.preheader: ; preds = %cond_247_case_1, %44 + br label %__barray_check_bounds.exit1275 cond_247_case_1: ; preds = %cond_exit_267 %45 = icmp eq i64 %read_uint378, 1 tail call void @print_bool(ptr nonnull @res_head.AFE8E005.0, i64 14, i1 %45) - br label %__barray_check_bounds.exit1274.preheader + br label %__barray_check_bounds.exit1275.preheader cond_247_case_0: ; preds = %cond_exit_267 tail call void @panic(i32 1001, ptr nonnull @e_Option.unw.32D4E82D.0) unreachable -out_of_bounds.i1269: ; preds = %.thread +out_of_bounds.i1270: ; preds = %.thread tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") unreachable -__barray_check_bounds.exit1270: ; preds = %.thread +__barray_check_bounds.exit1271: ; preds = %.thread %46 = load i64, ptr %3, align 4 - %47 = lshr i64 %46, %"310_2.01329" + %47 = lshr i64 %46, %"310_2.01330" %48 = trunc i64 %47 to i1 - br i1 %48, label %cond_exit_314, label %panic.i1271 + br i1 %48, label %cond_exit_314, label %panic.i1272 -panic.i1271: ; preds = %__barray_check_bounds.exit1270 +panic.i1272: ; preds = %__barray_check_bounds.exit1271 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable @@ -220,91 +220,91 @@ mask_block_ok.i: ; preds = %cond_exit_314 %50 = or i64 %49, -1048576 store i64 %50, ptr %5, align 4 %51 = icmp eq i64 %50, -1 - br i1 %51, label %loop_body538.preheader.preheader, label %mask_block_err.i + br i1 %51, label %loop_body539.preheader.preheader, label %mask_block_err.i mask_block_err.i: ; preds = %mask_block_ok.i tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_check_bounds.exit1274: ; preds = %__barray_check_bounds.exit1274.preheader, %cond_exit_314 - %"310_0.sroa.15.01330" = phi i64 [ %52, %cond_exit_314 ], [ 0, %__barray_check_bounds.exit1274.preheader ] - %"310_2.01329" = phi i64 [ %60, %cond_exit_314 ], [ 0, %__barray_check_bounds.exit1274.preheader ] - %52 = add nuw nsw i64 %"310_0.sroa.15.01330", 1 +__barray_check_bounds.exit1275: ; preds = %__barray_check_bounds.exit1275.preheader, %cond_exit_314 + %"310_0.sroa.15.01331" = phi i64 [ %52, %cond_exit_314 ], [ 0, %__barray_check_bounds.exit1275.preheader ] + %"310_2.01330" = phi i64 [ %60, %cond_exit_314 ], [ 0, %__barray_check_bounds.exit1275.preheader ] + %52 = add nuw nsw i64 %"310_0.sroa.15.01331", 1 %53 = load i64, ptr %5, align 4 - %54 = lshr i64 %53, %"310_0.sroa.15.01330" + %54 = lshr i64 %53, %"310_0.sroa.15.01331" %55 = trunc i64 %54 to i1 - br i1 %55, label %panic.i1275, label %.thread + br i1 %55, label %panic.i1276, label %.thread -panic.i1275: ; preds = %__barray_check_bounds.exit1274 +panic.i1276: ; preds = %__barray_check_bounds.exit1275 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -.thread: ; preds = %__barray_check_bounds.exit1274 - %56 = shl nuw nsw i64 1, %"310_0.sroa.15.01330" +.thread: ; preds = %__barray_check_bounds.exit1275 + %56 = shl nuw nsw i64 1, %"310_0.sroa.15.01331" %57 = xor i64 %53, %56 store i64 %57, ptr %5, align 4 - %58 = getelementptr inbounds nuw i64, ptr %4, i64 %"310_0.sroa.15.01330" + %58 = getelementptr inbounds nuw i64, ptr %4, i64 %"310_0.sroa.15.01331" %59 = load i64, ptr %58, align 4 - %60 = add i64 %"310_2.01329", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %59) + %60 = add i64 %"310_2.01330", 1 + %___future_measure513 = tail call i64 @___future_measure(i64 %59, i64 0) tail call void @___qfree(i64 %59) - %61 = icmp ult i64 %"310_2.01329", 20 - br i1 %61, label %__barray_check_bounds.exit1270, label %out_of_bounds.i1269 + %61 = icmp ult i64 %"310_2.01330", 20 + br i1 %61, label %__barray_check_bounds.exit1271, label %out_of_bounds.i1270 -cond_exit_314: ; preds = %__barray_check_bounds.exit1270 - %62 = shl nuw nsw i64 1, %"310_2.01329" +cond_exit_314: ; preds = %__barray_check_bounds.exit1271 + %62 = shl nuw nsw i64 1, %"310_2.01330" %63 = xor i64 %46, %62 store i64 %63, ptr %3, align 4 - %64 = getelementptr inbounds nuw i64, ptr %2, i64 %"310_2.01329" - store i64 %lazy_measure, ptr %64, align 4 - %65 = icmp samesign ugt i64 %"310_0.sroa.15.01330", 18 - br i1 %65, label %mask_block_ok.i, label %__barray_check_bounds.exit1274 + %64 = getelementptr inbounds nuw i64, ptr %2, i64 %"310_2.01330" + store i64 %___future_measure513, ptr %64, align 4 + %65 = icmp samesign ugt i64 %"310_0.sroa.15.01331", 18 + br i1 %65, label %mask_block_ok.i, label %__barray_check_bounds.exit1275 -loop_body538.preheader.preheader: ; preds = %mask_block_ok.i +loop_body539.preheader.preheader: ; preds = %mask_block_ok.i tail call void @heap_free(ptr nonnull %4) tail call void @heap_free(ptr nonnull %5) - br label %__barray_check_bounds.exit1278 + br label %__barray_check_bounds.exit1279 -__barray_check_bounds.exit1278: ; preds = %cond_exit_380, %loop_body538.preheader.preheader - %"376_0.sroa.15.01324" = phi i64 [ %66, %cond_exit_380 ], [ 0, %loop_body538.preheader.preheader ] - %66 = add nuw nsw i64 %"376_0.sroa.15.01324", 1 +__barray_check_bounds.exit1279: ; preds = %cond_exit_380, %loop_body539.preheader.preheader + %"376_0.sroa.15.01325" = phi i64 [ %66, %cond_exit_380 ], [ 0, %loop_body539.preheader.preheader ] + %66 = add nuw nsw i64 %"376_0.sroa.15.01325", 1 %67 = load i64, ptr %3, align 4 - %68 = lshr i64 %67, %"376_0.sroa.15.01324" + %68 = lshr i64 %67, %"376_0.sroa.15.01325" %69 = trunc i64 %68 to i1 - br i1 %69, label %panic.i1279, label %__barray_check_bounds.exit1282 + br i1 %69, label %panic.i1280, label %__barray_check_bounds.exit1283 -panic.i1279: ; preds = %__barray_check_bounds.exit1278 +panic.i1280: ; preds = %__barray_check_bounds.exit1279 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_check_bounds.exit1282: ; preds = %__barray_check_bounds.exit1278 - %70 = shl nuw nsw i64 1, %"376_0.sroa.15.01324" +__barray_check_bounds.exit1283: ; preds = %__barray_check_bounds.exit1279 + %70 = shl nuw nsw i64 1, %"376_0.sroa.15.01325" %71 = xor i64 %67, %70 store i64 %71, ptr %3, align 4 - %72 = getelementptr inbounds nuw i64, ptr %2, i64 %"376_0.sroa.15.01324" + %72 = getelementptr inbounds nuw i64, ptr %2, i64 %"376_0.sroa.15.01325" %73 = load i64, ptr %72, align 4 tail call void @___inc_future_refcount(i64 %73) %74 = load i64, ptr %3, align 4 - %75 = lshr i64 %74, %"376_0.sroa.15.01324" + %75 = lshr i64 %74, %"376_0.sroa.15.01325" %76 = trunc i64 %75 to i1 - br i1 %76, label %__barray_check_bounds.exit1286, label %panic.i1283 + br i1 %76, label %__barray_check_bounds.exit1287, label %panic.i1284 -panic.i1283: ; preds = %__barray_check_bounds.exit1282 +panic.i1284: ; preds = %__barray_check_bounds.exit1283 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_check_bounds.exit1286: ; preds = %__barray_check_bounds.exit1282 +__barray_check_bounds.exit1287: ; preds = %__barray_check_bounds.exit1283 %77 = xor i64 %74, %70 store i64 %77, ptr %3, align 4 store i64 %73, ptr %72, align 4 %read_bool = tail call i1 @___read_future_bool(i64 %73) tail call void @___dec_future_refcount(i64 %73) %78 = load i64, ptr %1, align 4 - %79 = lshr i64 %78, %"376_0.sroa.15.01324" + %79 = lshr i64 %78, %"376_0.sroa.15.01325" %80 = trunc i64 %79 to i1 - br i1 %80, label %cond_exit_380, label %panic.i1287 + br i1 %80, label %cond_exit_380, label %panic.i1288 -panic.i1287: ; preds = %__barray_check_bounds.exit1286 +panic.i1288: ; preds = %__barray_check_bounds.exit1287 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable @@ -313,55 +313,55 @@ cond_565_case_0: ; preds = %cond_exit_565 %82 = or i64 %81, -1048576 store i64 %82, ptr %3, align 4 %83 = icmp eq i64 %82, -1 - br i1 %83, label %loop_out537, label %mask_block_err.i1292 + br i1 %83, label %loop_out538, label %mask_block_err.i1293 -mask_block_err.i1292: ; preds = %cond_565_case_0 +mask_block_err.i1293: ; preds = %cond_565_case_0 tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_check_bounds.exit1296: ; preds = %cond_exit_380, %cond_exit_565 - %"562_0.01331" = phi i64 [ %84, %cond_exit_565 ], [ 0, %cond_exit_380 ] - %84 = add nuw nsw i64 %"562_0.01331", 1 +__barray_check_bounds.exit1297: ; preds = %cond_exit_380, %cond_exit_565 + %"562_0.01332" = phi i64 [ %84, %cond_exit_565 ], [ 0, %cond_exit_380 ] + %84 = add nuw nsw i64 %"562_0.01332", 1 %85 = load i64, ptr %3, align 4 - %86 = lshr i64 %85, %"562_0.01331" + %86 = lshr i64 %85, %"562_0.01332" %87 = trunc i64 %86 to i1 - br i1 %87, label %cond_exit_565, label %__barray_mask_borrow.exit1300 + br i1 %87, label %cond_exit_565, label %__barray_mask_borrow.exit1301 -__barray_mask_borrow.exit1300: ; preds = %__barray_check_bounds.exit1296 - %88 = shl nuw nsw i64 1, %"562_0.01331" +__barray_mask_borrow.exit1301: ; preds = %__barray_check_bounds.exit1297 + %88 = shl nuw nsw i64 1, %"562_0.01332" %89 = xor i64 %85, %88 store i64 %89, ptr %3, align 4 - %90 = getelementptr inbounds nuw i64, ptr %2, i64 %"562_0.01331" + %90 = getelementptr inbounds nuw i64, ptr %2, i64 %"562_0.01332" %91 = load i64, ptr %90, align 4 tail call void @___dec_future_refcount(i64 %91) br label %cond_exit_565 -cond_exit_565: ; preds = %__barray_mask_borrow.exit1300, %__barray_check_bounds.exit1296 - %92 = icmp samesign ugt i64 %"562_0.01331", 18 - br i1 %92, label %cond_565_case_0, label %__barray_check_bounds.exit1296 +cond_exit_565: ; preds = %__barray_mask_borrow.exit1301, %__barray_check_bounds.exit1297 + %92 = icmp samesign ugt i64 %"562_0.01332", 18 + br i1 %92, label %cond_565_case_0, label %__barray_check_bounds.exit1297 -cond_exit_380: ; preds = %__barray_check_bounds.exit1286 +cond_exit_380: ; preds = %__barray_check_bounds.exit1287 %93 = xor i64 %78, %70 store i64 %93, ptr %1, align 4 - %94 = getelementptr inbounds nuw i1, ptr %0, i64 %"376_0.sroa.15.01324" + %94 = getelementptr inbounds nuw i1, ptr %0, i64 %"376_0.sroa.15.01325" store i1 %read_bool, ptr %94, align 1 - %95 = icmp eq i64 %"376_0.sroa.15.01324", 19 - br i1 %95, label %__barray_check_bounds.exit1296, label %__barray_check_bounds.exit1278 + %95 = icmp eq i64 %"376_0.sroa.15.01325", 19 + br i1 %95, label %__barray_check_bounds.exit1297, label %__barray_check_bounds.exit1279 -loop_out537: ; preds = %cond_565_case_0 +loop_out538: ; preds = %cond_565_case_0 tail call void @heap_free(ptr %2) tail call void @heap_free(ptr nonnull %3) %96 = load i64, ptr %1, align 4 %97 = and i64 %96, 1048575 store i64 %97, ptr %1, align 4 %98 = icmp eq i64 %97, 0 - br i1 %98, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1301 + br i1 %98, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1302 -mask_block_err.i1301: ; preds = %loop_out537 +mask_block_err.i1302: ; preds = %loop_out538 tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") unreachable -__barray_check_none_borrowed.exit: ; preds = %loop_out537 +__barray_check_none_borrowed.exit: ; preds = %loop_out538 %99 = tail call ptr @heap_alloc(i64 20) %100 = tail call ptr @heap_alloc(i64 8) store i64 0, ptr %100, align 1 @@ -371,13 +371,13 @@ __barray_check_none_borrowed.exit: ; preds = %loop_out537 %102 = and i64 %101, 1048575 store i64 %102, ptr %1, align 4 %103 = icmp eq i64 %102, 0 - br i1 %103, label %__barray_check_none_borrowed.exit1305, label %mask_block_err.i1303 + br i1 %103, label %__barray_check_none_borrowed.exit1306, label %mask_block_err.i1304 -mask_block_err.i1303: ; preds = %__barray_check_none_borrowed.exit +mask_block_err.i1304: ; preds = %__barray_check_none_borrowed.exit tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") unreachable -__barray_check_none_borrowed.exit1305: ; preds = %__barray_check_none_borrowed.exit +__barray_check_none_borrowed.exit1306: ; preds = %__barray_check_none_borrowed.exit %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 %y_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 4 %arr_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 8 @@ -400,7 +400,7 @@ declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immar ; Function Attrs: noreturn declare void @panic(i32, ptr) local_unnamed_addr #1 -declare i64 @___lazy_measure_leaked(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -416,8 +416,6 @@ declare void @print_bool(ptr, i64, i1) local_unnamed_addr declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr - declare i1 @___read_future_bool(i64) local_unnamed_addr ; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_within_tail-sol-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_within_tail-sol-aarch64-unknown-linux-gnu.ll index 6b0817c5..28b6d90d 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_within_tail-sol-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_within_tail-sol-aarch64-unknown-linux-gnu.ll @@ -40,20 +40,20 @@ __hugr__.__tk2_sol_qalloc.485.exit: ; preds = %alloca_block br label %cond_13_case_1 cond_13_case_1: ; preds = %__hugr__.__tk2_sol_qalloc.485.exit, %cond_exit_13 - %"9_2.01321" = phi i64 [ 0, %__hugr__.__tk2_sol_qalloc.485.exit ], [ %6, %cond_exit_13 ] - %6 = add nuw nsw i64 %"9_2.01321", 1 - %qalloc.i1244 = tail call i64 @___qalloc() - %not_max.not.not.i1245 = icmp eq i64 %qalloc.i1244, -1 - br i1 %not_max.not.not.i1245, label %cond_489_case_0.i1246, label %__barray_check_bounds.exit + %"9_2.01322" = phi i64 [ 0, %__hugr__.__tk2_sol_qalloc.485.exit ], [ %6, %cond_exit_13 ] + %6 = add nuw nsw i64 %"9_2.01322", 1 + %qalloc.i1245 = tail call i64 @___qalloc() + %not_max.not.not.i1246 = icmp eq i64 %qalloc.i1245, -1 + br i1 %not_max.not.not.i1246, label %cond_489_case_0.i1247, label %__barray_check_bounds.exit -cond_489_case_0.i1246: ; preds = %cond_13_case_1 +cond_489_case_0.i1247: ; preds = %cond_13_case_1 tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable __barray_check_bounds.exit: ; preds = %cond_13_case_1 - tail call void @___reset(i64 %qalloc.i1244) + tail call void @___reset(i64 %qalloc.i1245) %7 = load i64, ptr %5, align 4 - %8 = lshr i64 %7, %"9_2.01321" + %8 = lshr i64 %7, %"9_2.01322" %9 = trunc i64 %8 to i1 br i1 %9, label %cond_exit_13, label %panic.i @@ -62,20 +62,20 @@ panic.i: ; preds = %__barray_check_boun unreachable cond_exit_13: ; preds = %__barray_check_bounds.exit - %10 = shl nuw nsw i64 1, %"9_2.01321" + %10 = shl nuw nsw i64 1, %"9_2.01322" %11 = xor i64 %7, %10 store i64 %11, ptr %5, align 4 - %12 = getelementptr inbounds nuw i64, ptr %4, i64 %"9_2.01321" - store i64 %qalloc.i1244, ptr %12, align 4 + %12 = getelementptr inbounds nuw i64, ptr %4, i64 %"9_2.01322" + store i64 %qalloc.i1245, ptr %12, align 4 %exitcond = icmp eq i64 %6, 20 br i1 %exitcond, label %loop_out, label %cond_13_case_1 loop_out: ; preds = %cond_exit_13 %13 = load i64, ptr %5, align 4 %14 = trunc i64 %13 to i1 - br i1 %14, label %panic.i1248, label %__barray_mask_borrow.exit + br i1 %14, label %panic.i1249, label %__barray_mask_borrow.exit -panic.i1248: ; preds = %loop_out +panic.i1249: ; preds = %loop_out tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable @@ -90,46 +90,46 @@ __barray_mask_borrow.exit: ; preds = %loop_out tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18) %17 = load i64, ptr %5, align 4 %18 = trunc i64 %17 to i1 - br i1 %18, label %__barray_mask_return.exit1250, label %panic.i1249 + br i1 %18, label %__barray_mask_return.exit1251, label %panic.i1250 -panic.i1249: ; preds = %__barray_mask_borrow.exit +panic.i1250: ; preds = %__barray_mask_borrow.exit tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_mask_return.exit1250: ; preds = %__barray_mask_borrow.exit +__barray_mask_return.exit1251: ; preds = %__barray_mask_borrow.exit %19 = and i64 %17, -2 store i64 %19, ptr %5, align 4 store i64 %16, ptr %4, align 4 - br label %__barray_check_bounds.exit1252 + br label %__barray_check_bounds.exit1253 -__barray_check_bounds.exit1252: ; preds = %__barray_mask_return.exit1250, %__barray_mask_return.exit1268 - %20 = phi i64 [ 1, %__barray_mask_return.exit1250 ], [ %42, %__barray_mask_return.exit1268 ] - %"118_0.01322" = phi i64 [ 0, %__barray_mask_return.exit1250 ], [ %20, %__barray_mask_return.exit1268 ] +__barray_check_bounds.exit1253: ; preds = %__barray_mask_return.exit1251, %__barray_mask_return.exit1269 + %20 = phi i64 [ 1, %__barray_mask_return.exit1251 ], [ %42, %__barray_mask_return.exit1269 ] + %"118_0.01323" = phi i64 [ 0, %__barray_mask_return.exit1251 ], [ %20, %__barray_mask_return.exit1269 ] %21 = load i64, ptr %5, align 4 - %22 = lshr i64 %21, %"118_0.01322" + %22 = lshr i64 %21, %"118_0.01323" %23 = trunc i64 %22 to i1 - br i1 %23, label %panic.i1253, label %__barray_check_bounds.exit1256 + br i1 %23, label %panic.i1254, label %__barray_check_bounds.exit1257 -panic.i1253: ; preds = %__barray_check_bounds.exit1252 +panic.i1254: ; preds = %__barray_check_bounds.exit1253 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_check_bounds.exit1256: ; preds = %__barray_check_bounds.exit1252 - %24 = shl nuw nsw i64 1, %"118_0.01322" +__barray_check_bounds.exit1257: ; preds = %__barray_check_bounds.exit1253 + %24 = shl nuw nsw i64 1, %"118_0.01323" %25 = xor i64 %21, %24 store i64 %25, ptr %5, align 4 - %26 = getelementptr inbounds nuw i64, ptr %4, i64 %"118_0.01322" + %26 = getelementptr inbounds nuw i64, ptr %4, i64 %"118_0.01323" %27 = load i64, ptr %26, align 4 %28 = lshr i64 %25, %20 %29 = trunc i64 %28 to i1 - br i1 %29, label %panic.i1257, label %__barray_check_bounds.exit1262 + br i1 %29, label %panic.i1258, label %__barray_check_bounds.exit1263 -panic.i1257: ; preds = %__barray_check_bounds.exit1256 +panic.i1258: ; preds = %__barray_check_bounds.exit1257 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_check_bounds.exit1262: ; preds = %__barray_check_bounds.exit1256 - %30 = shl nuw nsw i64 2, %"118_0.01322" +__barray_check_bounds.exit1263: ; preds = %__barray_check_bounds.exit1257 + %30 = shl nuw nsw i64 2, %"118_0.01323" %31 = xor i64 %25, %30 store i64 %31, ptr %5, align 4 %32 = getelementptr inbounds nuw i64, ptr %4, i64 %20 @@ -140,78 +140,78 @@ __barray_check_bounds.exit1262: ; preds = %__barray_check_boun tail call void @___rp(i64 %27, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rz(i64 %27, double 0xBFF921FB54442D18) %34 = load i64, ptr %5, align 4 - %35 = lshr i64 %34, %"118_0.01322" + %35 = lshr i64 %34, %"118_0.01323" %36 = trunc i64 %35 to i1 - br i1 %36, label %__barray_check_bounds.exit1266, label %panic.i1263 + br i1 %36, label %__barray_check_bounds.exit1267, label %panic.i1264 -panic.i1263: ; preds = %__barray_check_bounds.exit1262 +panic.i1264: ; preds = %__barray_check_bounds.exit1263 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_check_bounds.exit1266: ; preds = %__barray_check_bounds.exit1262 +__barray_check_bounds.exit1267: ; preds = %__barray_check_bounds.exit1263 %37 = xor i64 %34, %24 store i64 %37, ptr %5, align 4 store i64 %27, ptr %26, align 4 %38 = load i64, ptr %5, align 4 %39 = lshr i64 %38, %20 %40 = trunc i64 %39 to i1 - br i1 %40, label %__barray_mask_return.exit1268, label %panic.i1267 + br i1 %40, label %__barray_mask_return.exit1269, label %panic.i1268 -panic.i1267: ; preds = %__barray_check_bounds.exit1266 +panic.i1268: ; preds = %__barray_check_bounds.exit1267 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_mask_return.exit1268: ; preds = %__barray_check_bounds.exit1266 +__barray_mask_return.exit1269: ; preds = %__barray_check_bounds.exit1267 %41 = xor i64 %38, %30 store i64 %41, ptr %5, align 4 store i64 %33, ptr %32, align 4 %42 = add nuw nsw i64 %20, 1 - %exitcond1325 = icmp eq i64 %42, 20 - br i1 %exitcond1325, label %cond_exit_189, label %__barray_check_bounds.exit1252 + %exitcond1326 = icmp eq i64 %42, 20 + br i1 %exitcond1326, label %cond_exit_189, label %__barray_check_bounds.exit1253 -cond_exit_189: ; preds = %__barray_mask_return.exit1268 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) +cond_exit_189: ; preds = %__barray_mask_return.exit1269 + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 1) tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure_leaked) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___inc_future_refcount(i64 %___future_measure) + %read_uint = tail call i64 @___read_future_uint(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) %43 = icmp eq i64 %read_uint, 2 br i1 %43, label %44, label %cond_exit_267 cond_exit_267: ; preds = %cond_exit_189 - %read_uint378 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + %read_uint378 = tail call i64 @___read_future_uint(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) %.not = icmp eq i64 %read_uint378, 2 br i1 %.not, label %cond_247_case_0, label %cond_247_case_1 44: ; preds = %cond_exit_189 - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_int(ptr nonnull @res_head_leake.F4F32972.0, i64 20, i64 1) - br label %__barray_check_bounds.exit1274.preheader + br label %__barray_check_bounds.exit1275.preheader -__barray_check_bounds.exit1274.preheader: ; preds = %cond_247_case_1, %44 - br label %__barray_check_bounds.exit1274 +__barray_check_bounds.exit1275.preheader: ; preds = %cond_247_case_1, %44 + br label %__barray_check_bounds.exit1275 cond_247_case_1: ; preds = %cond_exit_267 %45 = icmp eq i64 %read_uint378, 1 tail call void @print_bool(ptr nonnull @res_head.AFE8E005.0, i64 14, i1 %45) - br label %__barray_check_bounds.exit1274.preheader + br label %__barray_check_bounds.exit1275.preheader cond_247_case_0: ; preds = %cond_exit_267 tail call void @panic(i32 1001, ptr nonnull @e_Option.unw.32D4E82D.0) unreachable -out_of_bounds.i1269: ; preds = %.thread +out_of_bounds.i1270: ; preds = %.thread tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") unreachable -__barray_check_bounds.exit1270: ; preds = %.thread +__barray_check_bounds.exit1271: ; preds = %.thread %46 = load i64, ptr %3, align 4 - %47 = lshr i64 %46, %"310_2.01329" + %47 = lshr i64 %46, %"310_2.01330" %48 = trunc i64 %47 to i1 - br i1 %48, label %cond_exit_314, label %panic.i1271 + br i1 %48, label %cond_exit_314, label %panic.i1272 -panic.i1271: ; preds = %__barray_check_bounds.exit1270 +panic.i1272: ; preds = %__barray_check_bounds.exit1271 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable @@ -220,91 +220,91 @@ mask_block_ok.i: ; preds = %cond_exit_314 %50 = or i64 %49, -1048576 store i64 %50, ptr %5, align 4 %51 = icmp eq i64 %50, -1 - br i1 %51, label %loop_body538.preheader.preheader, label %mask_block_err.i + br i1 %51, label %loop_body539.preheader.preheader, label %mask_block_err.i mask_block_err.i: ; preds = %mask_block_ok.i tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_check_bounds.exit1274: ; preds = %__barray_check_bounds.exit1274.preheader, %cond_exit_314 - %"310_0.sroa.15.01330" = phi i64 [ %52, %cond_exit_314 ], [ 0, %__barray_check_bounds.exit1274.preheader ] - %"310_2.01329" = phi i64 [ %60, %cond_exit_314 ], [ 0, %__barray_check_bounds.exit1274.preheader ] - %52 = add nuw nsw i64 %"310_0.sroa.15.01330", 1 +__barray_check_bounds.exit1275: ; preds = %__barray_check_bounds.exit1275.preheader, %cond_exit_314 + %"310_0.sroa.15.01331" = phi i64 [ %52, %cond_exit_314 ], [ 0, %__barray_check_bounds.exit1275.preheader ] + %"310_2.01330" = phi i64 [ %60, %cond_exit_314 ], [ 0, %__barray_check_bounds.exit1275.preheader ] + %52 = add nuw nsw i64 %"310_0.sroa.15.01331", 1 %53 = load i64, ptr %5, align 4 - %54 = lshr i64 %53, %"310_0.sroa.15.01330" + %54 = lshr i64 %53, %"310_0.sroa.15.01331" %55 = trunc i64 %54 to i1 - br i1 %55, label %panic.i1275, label %.thread + br i1 %55, label %panic.i1276, label %.thread -panic.i1275: ; preds = %__barray_check_bounds.exit1274 +panic.i1276: ; preds = %__barray_check_bounds.exit1275 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -.thread: ; preds = %__barray_check_bounds.exit1274 - %56 = shl nuw nsw i64 1, %"310_0.sroa.15.01330" +.thread: ; preds = %__barray_check_bounds.exit1275 + %56 = shl nuw nsw i64 1, %"310_0.sroa.15.01331" %57 = xor i64 %53, %56 store i64 %57, ptr %5, align 4 - %58 = getelementptr inbounds nuw i64, ptr %4, i64 %"310_0.sroa.15.01330" + %58 = getelementptr inbounds nuw i64, ptr %4, i64 %"310_0.sroa.15.01331" %59 = load i64, ptr %58, align 4 - %60 = add i64 %"310_2.01329", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %59) + %60 = add i64 %"310_2.01330", 1 + %___future_measure513 = tail call i64 @___future_measure(i64 %59, i64 0) tail call void @___qfree(i64 %59) - %61 = icmp ult i64 %"310_2.01329", 20 - br i1 %61, label %__barray_check_bounds.exit1270, label %out_of_bounds.i1269 + %61 = icmp ult i64 %"310_2.01330", 20 + br i1 %61, label %__barray_check_bounds.exit1271, label %out_of_bounds.i1270 -cond_exit_314: ; preds = %__barray_check_bounds.exit1270 - %62 = shl nuw nsw i64 1, %"310_2.01329" +cond_exit_314: ; preds = %__barray_check_bounds.exit1271 + %62 = shl nuw nsw i64 1, %"310_2.01330" %63 = xor i64 %46, %62 store i64 %63, ptr %3, align 4 - %64 = getelementptr inbounds nuw i64, ptr %2, i64 %"310_2.01329" - store i64 %lazy_measure, ptr %64, align 4 - %65 = icmp samesign ugt i64 %"310_0.sroa.15.01330", 18 - br i1 %65, label %mask_block_ok.i, label %__barray_check_bounds.exit1274 + %64 = getelementptr inbounds nuw i64, ptr %2, i64 %"310_2.01330" + store i64 %___future_measure513, ptr %64, align 4 + %65 = icmp samesign ugt i64 %"310_0.sroa.15.01331", 18 + br i1 %65, label %mask_block_ok.i, label %__barray_check_bounds.exit1275 -loop_body538.preheader.preheader: ; preds = %mask_block_ok.i +loop_body539.preheader.preheader: ; preds = %mask_block_ok.i tail call void @heap_free(ptr nonnull %4) tail call void @heap_free(ptr nonnull %5) - br label %__barray_check_bounds.exit1278 + br label %__barray_check_bounds.exit1279 -__barray_check_bounds.exit1278: ; preds = %cond_exit_380, %loop_body538.preheader.preheader - %"376_0.sroa.15.01324" = phi i64 [ %66, %cond_exit_380 ], [ 0, %loop_body538.preheader.preheader ] - %66 = add nuw nsw i64 %"376_0.sroa.15.01324", 1 +__barray_check_bounds.exit1279: ; preds = %cond_exit_380, %loop_body539.preheader.preheader + %"376_0.sroa.15.01325" = phi i64 [ %66, %cond_exit_380 ], [ 0, %loop_body539.preheader.preheader ] + %66 = add nuw nsw i64 %"376_0.sroa.15.01325", 1 %67 = load i64, ptr %3, align 4 - %68 = lshr i64 %67, %"376_0.sroa.15.01324" + %68 = lshr i64 %67, %"376_0.sroa.15.01325" %69 = trunc i64 %68 to i1 - br i1 %69, label %panic.i1279, label %__barray_check_bounds.exit1282 + br i1 %69, label %panic.i1280, label %__barray_check_bounds.exit1283 -panic.i1279: ; preds = %__barray_check_bounds.exit1278 +panic.i1280: ; preds = %__barray_check_bounds.exit1279 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_check_bounds.exit1282: ; preds = %__barray_check_bounds.exit1278 - %70 = shl nuw nsw i64 1, %"376_0.sroa.15.01324" +__barray_check_bounds.exit1283: ; preds = %__barray_check_bounds.exit1279 + %70 = shl nuw nsw i64 1, %"376_0.sroa.15.01325" %71 = xor i64 %67, %70 store i64 %71, ptr %3, align 4 - %72 = getelementptr inbounds nuw i64, ptr %2, i64 %"376_0.sroa.15.01324" + %72 = getelementptr inbounds nuw i64, ptr %2, i64 %"376_0.sroa.15.01325" %73 = load i64, ptr %72, align 4 tail call void @___inc_future_refcount(i64 %73) %74 = load i64, ptr %3, align 4 - %75 = lshr i64 %74, %"376_0.sroa.15.01324" + %75 = lshr i64 %74, %"376_0.sroa.15.01325" %76 = trunc i64 %75 to i1 - br i1 %76, label %__barray_check_bounds.exit1286, label %panic.i1283 + br i1 %76, label %__barray_check_bounds.exit1287, label %panic.i1284 -panic.i1283: ; preds = %__barray_check_bounds.exit1282 +panic.i1284: ; preds = %__barray_check_bounds.exit1283 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_check_bounds.exit1286: ; preds = %__barray_check_bounds.exit1282 +__barray_check_bounds.exit1287: ; preds = %__barray_check_bounds.exit1283 %77 = xor i64 %74, %70 store i64 %77, ptr %3, align 4 store i64 %73, ptr %72, align 4 %read_bool = tail call i1 @___read_future_bool(i64 %73) tail call void @___dec_future_refcount(i64 %73) %78 = load i64, ptr %1, align 4 - %79 = lshr i64 %78, %"376_0.sroa.15.01324" + %79 = lshr i64 %78, %"376_0.sroa.15.01325" %80 = trunc i64 %79 to i1 - br i1 %80, label %cond_exit_380, label %panic.i1287 + br i1 %80, label %cond_exit_380, label %panic.i1288 -panic.i1287: ; preds = %__barray_check_bounds.exit1286 +panic.i1288: ; preds = %__barray_check_bounds.exit1287 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable @@ -313,55 +313,55 @@ cond_565_case_0: ; preds = %cond_exit_565 %82 = or i64 %81, -1048576 store i64 %82, ptr %3, align 4 %83 = icmp eq i64 %82, -1 - br i1 %83, label %loop_out537, label %mask_block_err.i1292 + br i1 %83, label %loop_out538, label %mask_block_err.i1293 -mask_block_err.i1292: ; preds = %cond_565_case_0 +mask_block_err.i1293: ; preds = %cond_565_case_0 tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_check_bounds.exit1296: ; preds = %cond_exit_380, %cond_exit_565 - %"562_0.01331" = phi i64 [ %84, %cond_exit_565 ], [ 0, %cond_exit_380 ] - %84 = add nuw nsw i64 %"562_0.01331", 1 +__barray_check_bounds.exit1297: ; preds = %cond_exit_380, %cond_exit_565 + %"562_0.01332" = phi i64 [ %84, %cond_exit_565 ], [ 0, %cond_exit_380 ] + %84 = add nuw nsw i64 %"562_0.01332", 1 %85 = load i64, ptr %3, align 4 - %86 = lshr i64 %85, %"562_0.01331" + %86 = lshr i64 %85, %"562_0.01332" %87 = trunc i64 %86 to i1 - br i1 %87, label %cond_exit_565, label %__barray_mask_borrow.exit1300 + br i1 %87, label %cond_exit_565, label %__barray_mask_borrow.exit1301 -__barray_mask_borrow.exit1300: ; preds = %__barray_check_bounds.exit1296 - %88 = shl nuw nsw i64 1, %"562_0.01331" +__barray_mask_borrow.exit1301: ; preds = %__barray_check_bounds.exit1297 + %88 = shl nuw nsw i64 1, %"562_0.01332" %89 = xor i64 %85, %88 store i64 %89, ptr %3, align 4 - %90 = getelementptr inbounds nuw i64, ptr %2, i64 %"562_0.01331" + %90 = getelementptr inbounds nuw i64, ptr %2, i64 %"562_0.01332" %91 = load i64, ptr %90, align 4 tail call void @___dec_future_refcount(i64 %91) br label %cond_exit_565 -cond_exit_565: ; preds = %__barray_mask_borrow.exit1300, %__barray_check_bounds.exit1296 - %92 = icmp samesign ugt i64 %"562_0.01331", 18 - br i1 %92, label %cond_565_case_0, label %__barray_check_bounds.exit1296 +cond_exit_565: ; preds = %__barray_mask_borrow.exit1301, %__barray_check_bounds.exit1297 + %92 = icmp samesign ugt i64 %"562_0.01332", 18 + br i1 %92, label %cond_565_case_0, label %__barray_check_bounds.exit1297 -cond_exit_380: ; preds = %__barray_check_bounds.exit1286 +cond_exit_380: ; preds = %__barray_check_bounds.exit1287 %93 = xor i64 %78, %70 store i64 %93, ptr %1, align 4 - %94 = getelementptr inbounds nuw i1, ptr %0, i64 %"376_0.sroa.15.01324" + %94 = getelementptr inbounds nuw i1, ptr %0, i64 %"376_0.sroa.15.01325" store i1 %read_bool, ptr %94, align 1 - %95 = icmp eq i64 %"376_0.sroa.15.01324", 19 - br i1 %95, label %__barray_check_bounds.exit1296, label %__barray_check_bounds.exit1278 + %95 = icmp eq i64 %"376_0.sroa.15.01325", 19 + br i1 %95, label %__barray_check_bounds.exit1297, label %__barray_check_bounds.exit1279 -loop_out537: ; preds = %cond_565_case_0 +loop_out538: ; preds = %cond_565_case_0 tail call void @heap_free(ptr %2) tail call void @heap_free(ptr nonnull %3) %96 = load i64, ptr %1, align 4 %97 = and i64 %96, 1048575 store i64 %97, ptr %1, align 4 %98 = icmp eq i64 %97, 0 - br i1 %98, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1301 + br i1 %98, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1302 -mask_block_err.i1301: ; preds = %loop_out537 +mask_block_err.i1302: ; preds = %loop_out538 tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") unreachable -__barray_check_none_borrowed.exit: ; preds = %loop_out537 +__barray_check_none_borrowed.exit: ; preds = %loop_out538 %99 = tail call ptr @heap_alloc(i64 20) %100 = tail call ptr @heap_alloc(i64 8) store i64 0, ptr %100, align 1 @@ -371,13 +371,13 @@ __barray_check_none_borrowed.exit: ; preds = %loop_out537 %102 = and i64 %101, 1048575 store i64 %102, ptr %1, align 4 %103 = icmp eq i64 %102, 0 - br i1 %103, label %__barray_check_none_borrowed.exit1305, label %mask_block_err.i1303 + br i1 %103, label %__barray_check_none_borrowed.exit1306, label %mask_block_err.i1304 -mask_block_err.i1303: ; preds = %__barray_check_none_borrowed.exit +mask_block_err.i1304: ; preds = %__barray_check_none_borrowed.exit tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") unreachable -__barray_check_none_borrowed.exit1305: ; preds = %__barray_check_none_borrowed.exit +__barray_check_none_borrowed.exit1306: ; preds = %__barray_check_none_borrowed.exit %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 %y_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 4 %arr_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 8 @@ -400,7 +400,7 @@ declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immar ; Function Attrs: noreturn declare void @panic(i32, ptr) local_unnamed_addr #1 -declare i64 @___lazy_measure_leaked(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -416,8 +416,6 @@ declare void @print_bool(ptr, i64, i1) local_unnamed_addr declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr - declare i1 @___read_future_bool(i64) local_unnamed_addr ; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_within_tail-sol-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_within_tail-sol-x86_64-apple-darwin.ll index 30e956b4..0fde5c16 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_within_tail-sol-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_within_tail-sol-x86_64-apple-darwin.ll @@ -40,20 +40,20 @@ __hugr__.__tk2_sol_qalloc.485.exit: ; preds = %alloca_block br label %cond_13_case_1 cond_13_case_1: ; preds = %__hugr__.__tk2_sol_qalloc.485.exit, %cond_exit_13 - %"9_2.01321" = phi i64 [ 0, %__hugr__.__tk2_sol_qalloc.485.exit ], [ %6, %cond_exit_13 ] - %6 = add nuw nsw i64 %"9_2.01321", 1 - %qalloc.i1244 = tail call i64 @___qalloc() - %not_max.not.not.i1245 = icmp eq i64 %qalloc.i1244, -1 - br i1 %not_max.not.not.i1245, label %cond_489_case_0.i1246, label %__barray_check_bounds.exit + %"9_2.01322" = phi i64 [ 0, %__hugr__.__tk2_sol_qalloc.485.exit ], [ %6, %cond_exit_13 ] + %6 = add nuw nsw i64 %"9_2.01322", 1 + %qalloc.i1245 = tail call i64 @___qalloc() + %not_max.not.not.i1246 = icmp eq i64 %qalloc.i1245, -1 + br i1 %not_max.not.not.i1246, label %cond_489_case_0.i1247, label %__barray_check_bounds.exit -cond_489_case_0.i1246: ; preds = %cond_13_case_1 +cond_489_case_0.i1247: ; preds = %cond_13_case_1 tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable __barray_check_bounds.exit: ; preds = %cond_13_case_1 - tail call void @___reset(i64 %qalloc.i1244) + tail call void @___reset(i64 %qalloc.i1245) %7 = load i64, ptr %5, align 4 - %8 = lshr i64 %7, %"9_2.01321" + %8 = lshr i64 %7, %"9_2.01322" %9 = trunc i64 %8 to i1 br i1 %9, label %cond_exit_13, label %panic.i @@ -62,20 +62,20 @@ panic.i: ; preds = %__barray_check_boun unreachable cond_exit_13: ; preds = %__barray_check_bounds.exit - %10 = shl nuw nsw i64 1, %"9_2.01321" + %10 = shl nuw nsw i64 1, %"9_2.01322" %11 = xor i64 %7, %10 store i64 %11, ptr %5, align 4 - %12 = getelementptr inbounds nuw i64, ptr %4, i64 %"9_2.01321" - store i64 %qalloc.i1244, ptr %12, align 4 + %12 = getelementptr inbounds nuw i64, ptr %4, i64 %"9_2.01322" + store i64 %qalloc.i1245, ptr %12, align 4 %exitcond = icmp eq i64 %6, 20 br i1 %exitcond, label %loop_out, label %cond_13_case_1 loop_out: ; preds = %cond_exit_13 %13 = load i64, ptr %5, align 4 %14 = trunc i64 %13 to i1 - br i1 %14, label %panic.i1248, label %__barray_mask_borrow.exit + br i1 %14, label %panic.i1249, label %__barray_mask_borrow.exit -panic.i1248: ; preds = %loop_out +panic.i1249: ; preds = %loop_out tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable @@ -90,46 +90,46 @@ __barray_mask_borrow.exit: ; preds = %loop_out tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18) %17 = load i64, ptr %5, align 4 %18 = trunc i64 %17 to i1 - br i1 %18, label %__barray_mask_return.exit1250, label %panic.i1249 + br i1 %18, label %__barray_mask_return.exit1251, label %panic.i1250 -panic.i1249: ; preds = %__barray_mask_borrow.exit +panic.i1250: ; preds = %__barray_mask_borrow.exit tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_mask_return.exit1250: ; preds = %__barray_mask_borrow.exit +__barray_mask_return.exit1251: ; preds = %__barray_mask_borrow.exit %19 = and i64 %17, -2 store i64 %19, ptr %5, align 4 store i64 %16, ptr %4, align 4 - br label %__barray_check_bounds.exit1252 + br label %__barray_check_bounds.exit1253 -__barray_check_bounds.exit1252: ; preds = %__barray_mask_return.exit1250, %__barray_mask_return.exit1268 - %20 = phi i64 [ 1, %__barray_mask_return.exit1250 ], [ %42, %__barray_mask_return.exit1268 ] - %"118_0.01322" = phi i64 [ 0, %__barray_mask_return.exit1250 ], [ %20, %__barray_mask_return.exit1268 ] +__barray_check_bounds.exit1253: ; preds = %__barray_mask_return.exit1251, %__barray_mask_return.exit1269 + %20 = phi i64 [ 1, %__barray_mask_return.exit1251 ], [ %42, %__barray_mask_return.exit1269 ] + %"118_0.01323" = phi i64 [ 0, %__barray_mask_return.exit1251 ], [ %20, %__barray_mask_return.exit1269 ] %21 = load i64, ptr %5, align 4 - %22 = lshr i64 %21, %"118_0.01322" + %22 = lshr i64 %21, %"118_0.01323" %23 = trunc i64 %22 to i1 - br i1 %23, label %panic.i1253, label %__barray_check_bounds.exit1256 + br i1 %23, label %panic.i1254, label %__barray_check_bounds.exit1257 -panic.i1253: ; preds = %__barray_check_bounds.exit1252 +panic.i1254: ; preds = %__barray_check_bounds.exit1253 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_check_bounds.exit1256: ; preds = %__barray_check_bounds.exit1252 - %24 = shl nuw nsw i64 1, %"118_0.01322" +__barray_check_bounds.exit1257: ; preds = %__barray_check_bounds.exit1253 + %24 = shl nuw nsw i64 1, %"118_0.01323" %25 = xor i64 %21, %24 store i64 %25, ptr %5, align 4 - %26 = getelementptr inbounds nuw i64, ptr %4, i64 %"118_0.01322" + %26 = getelementptr inbounds nuw i64, ptr %4, i64 %"118_0.01323" %27 = load i64, ptr %26, align 4 %28 = lshr i64 %25, %20 %29 = trunc i64 %28 to i1 - br i1 %29, label %panic.i1257, label %__barray_check_bounds.exit1262 + br i1 %29, label %panic.i1258, label %__barray_check_bounds.exit1263 -panic.i1257: ; preds = %__barray_check_bounds.exit1256 +panic.i1258: ; preds = %__barray_check_bounds.exit1257 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_check_bounds.exit1262: ; preds = %__barray_check_bounds.exit1256 - %30 = shl nuw nsw i64 2, %"118_0.01322" +__barray_check_bounds.exit1263: ; preds = %__barray_check_bounds.exit1257 + %30 = shl nuw nsw i64 2, %"118_0.01323" %31 = xor i64 %25, %30 store i64 %31, ptr %5, align 4 %32 = getelementptr inbounds nuw i64, ptr %4, i64 %20 @@ -140,78 +140,78 @@ __barray_check_bounds.exit1262: ; preds = %__barray_check_boun tail call void @___rp(i64 %27, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rz(i64 %27, double 0xBFF921FB54442D18) %34 = load i64, ptr %5, align 4 - %35 = lshr i64 %34, %"118_0.01322" + %35 = lshr i64 %34, %"118_0.01323" %36 = trunc i64 %35 to i1 - br i1 %36, label %__barray_check_bounds.exit1266, label %panic.i1263 + br i1 %36, label %__barray_check_bounds.exit1267, label %panic.i1264 -panic.i1263: ; preds = %__barray_check_bounds.exit1262 +panic.i1264: ; preds = %__barray_check_bounds.exit1263 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_check_bounds.exit1266: ; preds = %__barray_check_bounds.exit1262 +__barray_check_bounds.exit1267: ; preds = %__barray_check_bounds.exit1263 %37 = xor i64 %34, %24 store i64 %37, ptr %5, align 4 store i64 %27, ptr %26, align 4 %38 = load i64, ptr %5, align 4 %39 = lshr i64 %38, %20 %40 = trunc i64 %39 to i1 - br i1 %40, label %__barray_mask_return.exit1268, label %panic.i1267 + br i1 %40, label %__barray_mask_return.exit1269, label %panic.i1268 -panic.i1267: ; preds = %__barray_check_bounds.exit1266 +panic.i1268: ; preds = %__barray_check_bounds.exit1267 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_mask_return.exit1268: ; preds = %__barray_check_bounds.exit1266 +__barray_mask_return.exit1269: ; preds = %__barray_check_bounds.exit1267 %41 = xor i64 %38, %30 store i64 %41, ptr %5, align 4 store i64 %33, ptr %32, align 4 %42 = add nuw nsw i64 %20, 1 - %exitcond1325 = icmp eq i64 %42, 20 - br i1 %exitcond1325, label %cond_exit_189, label %__barray_check_bounds.exit1252 + %exitcond1326 = icmp eq i64 %42, 20 + br i1 %exitcond1326, label %cond_exit_189, label %__barray_check_bounds.exit1253 -cond_exit_189: ; preds = %__barray_mask_return.exit1268 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) +cond_exit_189: ; preds = %__barray_mask_return.exit1269 + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 1) tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure_leaked) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___inc_future_refcount(i64 %___future_measure) + %read_uint = tail call i64 @___read_future_uint(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) %43 = icmp eq i64 %read_uint, 2 br i1 %43, label %44, label %cond_exit_267 cond_exit_267: ; preds = %cond_exit_189 - %read_uint378 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + %read_uint378 = tail call i64 @___read_future_uint(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) %.not = icmp eq i64 %read_uint378, 2 br i1 %.not, label %cond_247_case_0, label %cond_247_case_1 44: ; preds = %cond_exit_189 - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_int(ptr nonnull @res_head_leake.F4F32972.0, i64 20, i64 1) - br label %__barray_check_bounds.exit1274.preheader + br label %__barray_check_bounds.exit1275.preheader -__barray_check_bounds.exit1274.preheader: ; preds = %cond_247_case_1, %44 - br label %__barray_check_bounds.exit1274 +__barray_check_bounds.exit1275.preheader: ; preds = %cond_247_case_1, %44 + br label %__barray_check_bounds.exit1275 cond_247_case_1: ; preds = %cond_exit_267 %45 = icmp eq i64 %read_uint378, 1 tail call void @print_bool(ptr nonnull @res_head.AFE8E005.0, i64 14, i1 %45) - br label %__barray_check_bounds.exit1274.preheader + br label %__barray_check_bounds.exit1275.preheader cond_247_case_0: ; preds = %cond_exit_267 tail call void @panic(i32 1001, ptr nonnull @e_Option.unw.32D4E82D.0) unreachable -out_of_bounds.i1269: ; preds = %.thread +out_of_bounds.i1270: ; preds = %.thread tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") unreachable -__barray_check_bounds.exit1270: ; preds = %.thread +__barray_check_bounds.exit1271: ; preds = %.thread %46 = load i64, ptr %3, align 4 - %47 = lshr i64 %46, %"310_2.01329" + %47 = lshr i64 %46, %"310_2.01330" %48 = trunc i64 %47 to i1 - br i1 %48, label %cond_exit_314, label %panic.i1271 + br i1 %48, label %cond_exit_314, label %panic.i1272 -panic.i1271: ; preds = %__barray_check_bounds.exit1270 +panic.i1272: ; preds = %__barray_check_bounds.exit1271 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable @@ -220,91 +220,91 @@ mask_block_ok.i: ; preds = %cond_exit_314 %50 = or i64 %49, -1048576 store i64 %50, ptr %5, align 4 %51 = icmp eq i64 %50, -1 - br i1 %51, label %loop_body538.preheader.preheader, label %mask_block_err.i + br i1 %51, label %loop_body539.preheader.preheader, label %mask_block_err.i mask_block_err.i: ; preds = %mask_block_ok.i tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_check_bounds.exit1274: ; preds = %__barray_check_bounds.exit1274.preheader, %cond_exit_314 - %"310_0.sroa.15.01330" = phi i64 [ %52, %cond_exit_314 ], [ 0, %__barray_check_bounds.exit1274.preheader ] - %"310_2.01329" = phi i64 [ %60, %cond_exit_314 ], [ 0, %__barray_check_bounds.exit1274.preheader ] - %52 = add nuw nsw i64 %"310_0.sroa.15.01330", 1 +__barray_check_bounds.exit1275: ; preds = %__barray_check_bounds.exit1275.preheader, %cond_exit_314 + %"310_0.sroa.15.01331" = phi i64 [ %52, %cond_exit_314 ], [ 0, %__barray_check_bounds.exit1275.preheader ] + %"310_2.01330" = phi i64 [ %60, %cond_exit_314 ], [ 0, %__barray_check_bounds.exit1275.preheader ] + %52 = add nuw nsw i64 %"310_0.sroa.15.01331", 1 %53 = load i64, ptr %5, align 4 - %54 = lshr i64 %53, %"310_0.sroa.15.01330" + %54 = lshr i64 %53, %"310_0.sroa.15.01331" %55 = trunc i64 %54 to i1 - br i1 %55, label %panic.i1275, label %.thread + br i1 %55, label %panic.i1276, label %.thread -panic.i1275: ; preds = %__barray_check_bounds.exit1274 +panic.i1276: ; preds = %__barray_check_bounds.exit1275 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -.thread: ; preds = %__barray_check_bounds.exit1274 - %56 = shl nuw nsw i64 1, %"310_0.sroa.15.01330" +.thread: ; preds = %__barray_check_bounds.exit1275 + %56 = shl nuw nsw i64 1, %"310_0.sroa.15.01331" %57 = xor i64 %53, %56 store i64 %57, ptr %5, align 4 - %58 = getelementptr inbounds nuw i64, ptr %4, i64 %"310_0.sroa.15.01330" + %58 = getelementptr inbounds nuw i64, ptr %4, i64 %"310_0.sroa.15.01331" %59 = load i64, ptr %58, align 4 - %60 = add i64 %"310_2.01329", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %59) + %60 = add i64 %"310_2.01330", 1 + %___future_measure513 = tail call i64 @___future_measure(i64 %59, i64 0) tail call void @___qfree(i64 %59) - %61 = icmp ult i64 %"310_2.01329", 20 - br i1 %61, label %__barray_check_bounds.exit1270, label %out_of_bounds.i1269 + %61 = icmp ult i64 %"310_2.01330", 20 + br i1 %61, label %__barray_check_bounds.exit1271, label %out_of_bounds.i1270 -cond_exit_314: ; preds = %__barray_check_bounds.exit1270 - %62 = shl nuw nsw i64 1, %"310_2.01329" +cond_exit_314: ; preds = %__barray_check_bounds.exit1271 + %62 = shl nuw nsw i64 1, %"310_2.01330" %63 = xor i64 %46, %62 store i64 %63, ptr %3, align 4 - %64 = getelementptr inbounds nuw i64, ptr %2, i64 %"310_2.01329" - store i64 %lazy_measure, ptr %64, align 4 - %65 = icmp samesign ugt i64 %"310_0.sroa.15.01330", 18 - br i1 %65, label %mask_block_ok.i, label %__barray_check_bounds.exit1274 + %64 = getelementptr inbounds nuw i64, ptr %2, i64 %"310_2.01330" + store i64 %___future_measure513, ptr %64, align 4 + %65 = icmp samesign ugt i64 %"310_0.sroa.15.01331", 18 + br i1 %65, label %mask_block_ok.i, label %__barray_check_bounds.exit1275 -loop_body538.preheader.preheader: ; preds = %mask_block_ok.i +loop_body539.preheader.preheader: ; preds = %mask_block_ok.i tail call void @heap_free(ptr nonnull %4) tail call void @heap_free(ptr nonnull %5) - br label %__barray_check_bounds.exit1278 + br label %__barray_check_bounds.exit1279 -__barray_check_bounds.exit1278: ; preds = %cond_exit_380, %loop_body538.preheader.preheader - %"376_0.sroa.15.01324" = phi i64 [ %66, %cond_exit_380 ], [ 0, %loop_body538.preheader.preheader ] - %66 = add nuw nsw i64 %"376_0.sroa.15.01324", 1 +__barray_check_bounds.exit1279: ; preds = %cond_exit_380, %loop_body539.preheader.preheader + %"376_0.sroa.15.01325" = phi i64 [ %66, %cond_exit_380 ], [ 0, %loop_body539.preheader.preheader ] + %66 = add nuw nsw i64 %"376_0.sroa.15.01325", 1 %67 = load i64, ptr %3, align 4 - %68 = lshr i64 %67, %"376_0.sroa.15.01324" + %68 = lshr i64 %67, %"376_0.sroa.15.01325" %69 = trunc i64 %68 to i1 - br i1 %69, label %panic.i1279, label %__barray_check_bounds.exit1282 + br i1 %69, label %panic.i1280, label %__barray_check_bounds.exit1283 -panic.i1279: ; preds = %__barray_check_bounds.exit1278 +panic.i1280: ; preds = %__barray_check_bounds.exit1279 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_check_bounds.exit1282: ; preds = %__barray_check_bounds.exit1278 - %70 = shl nuw nsw i64 1, %"376_0.sroa.15.01324" +__barray_check_bounds.exit1283: ; preds = %__barray_check_bounds.exit1279 + %70 = shl nuw nsw i64 1, %"376_0.sroa.15.01325" %71 = xor i64 %67, %70 store i64 %71, ptr %3, align 4 - %72 = getelementptr inbounds nuw i64, ptr %2, i64 %"376_0.sroa.15.01324" + %72 = getelementptr inbounds nuw i64, ptr %2, i64 %"376_0.sroa.15.01325" %73 = load i64, ptr %72, align 4 tail call void @___inc_future_refcount(i64 %73) %74 = load i64, ptr %3, align 4 - %75 = lshr i64 %74, %"376_0.sroa.15.01324" + %75 = lshr i64 %74, %"376_0.sroa.15.01325" %76 = trunc i64 %75 to i1 - br i1 %76, label %__barray_check_bounds.exit1286, label %panic.i1283 + br i1 %76, label %__barray_check_bounds.exit1287, label %panic.i1284 -panic.i1283: ; preds = %__barray_check_bounds.exit1282 +panic.i1284: ; preds = %__barray_check_bounds.exit1283 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_check_bounds.exit1286: ; preds = %__barray_check_bounds.exit1282 +__barray_check_bounds.exit1287: ; preds = %__barray_check_bounds.exit1283 %77 = xor i64 %74, %70 store i64 %77, ptr %3, align 4 store i64 %73, ptr %72, align 4 %read_bool = tail call i1 @___read_future_bool(i64 %73) tail call void @___dec_future_refcount(i64 %73) %78 = load i64, ptr %1, align 4 - %79 = lshr i64 %78, %"376_0.sroa.15.01324" + %79 = lshr i64 %78, %"376_0.sroa.15.01325" %80 = trunc i64 %79 to i1 - br i1 %80, label %cond_exit_380, label %panic.i1287 + br i1 %80, label %cond_exit_380, label %panic.i1288 -panic.i1287: ; preds = %__barray_check_bounds.exit1286 +panic.i1288: ; preds = %__barray_check_bounds.exit1287 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable @@ -313,55 +313,55 @@ cond_565_case_0: ; preds = %cond_exit_565 %82 = or i64 %81, -1048576 store i64 %82, ptr %3, align 4 %83 = icmp eq i64 %82, -1 - br i1 %83, label %loop_out537, label %mask_block_err.i1292 + br i1 %83, label %loop_out538, label %mask_block_err.i1293 -mask_block_err.i1292: ; preds = %cond_565_case_0 +mask_block_err.i1293: ; preds = %cond_565_case_0 tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_check_bounds.exit1296: ; preds = %cond_exit_380, %cond_exit_565 - %"562_0.01331" = phi i64 [ %84, %cond_exit_565 ], [ 0, %cond_exit_380 ] - %84 = add nuw nsw i64 %"562_0.01331", 1 +__barray_check_bounds.exit1297: ; preds = %cond_exit_380, %cond_exit_565 + %"562_0.01332" = phi i64 [ %84, %cond_exit_565 ], [ 0, %cond_exit_380 ] + %84 = add nuw nsw i64 %"562_0.01332", 1 %85 = load i64, ptr %3, align 4 - %86 = lshr i64 %85, %"562_0.01331" + %86 = lshr i64 %85, %"562_0.01332" %87 = trunc i64 %86 to i1 - br i1 %87, label %cond_exit_565, label %__barray_mask_borrow.exit1300 + br i1 %87, label %cond_exit_565, label %__barray_mask_borrow.exit1301 -__barray_mask_borrow.exit1300: ; preds = %__barray_check_bounds.exit1296 - %88 = shl nuw nsw i64 1, %"562_0.01331" +__barray_mask_borrow.exit1301: ; preds = %__barray_check_bounds.exit1297 + %88 = shl nuw nsw i64 1, %"562_0.01332" %89 = xor i64 %85, %88 store i64 %89, ptr %3, align 4 - %90 = getelementptr inbounds nuw i64, ptr %2, i64 %"562_0.01331" + %90 = getelementptr inbounds nuw i64, ptr %2, i64 %"562_0.01332" %91 = load i64, ptr %90, align 4 tail call void @___dec_future_refcount(i64 %91) br label %cond_exit_565 -cond_exit_565: ; preds = %__barray_mask_borrow.exit1300, %__barray_check_bounds.exit1296 - %92 = icmp samesign ugt i64 %"562_0.01331", 18 - br i1 %92, label %cond_565_case_0, label %__barray_check_bounds.exit1296 +cond_exit_565: ; preds = %__barray_mask_borrow.exit1301, %__barray_check_bounds.exit1297 + %92 = icmp samesign ugt i64 %"562_0.01332", 18 + br i1 %92, label %cond_565_case_0, label %__barray_check_bounds.exit1297 -cond_exit_380: ; preds = %__barray_check_bounds.exit1286 +cond_exit_380: ; preds = %__barray_check_bounds.exit1287 %93 = xor i64 %78, %70 store i64 %93, ptr %1, align 4 - %94 = getelementptr inbounds nuw i1, ptr %0, i64 %"376_0.sroa.15.01324" + %94 = getelementptr inbounds nuw i1, ptr %0, i64 %"376_0.sroa.15.01325" store i1 %read_bool, ptr %94, align 1 - %95 = icmp eq i64 %"376_0.sroa.15.01324", 19 - br i1 %95, label %__barray_check_bounds.exit1296, label %__barray_check_bounds.exit1278 + %95 = icmp eq i64 %"376_0.sroa.15.01325", 19 + br i1 %95, label %__barray_check_bounds.exit1297, label %__barray_check_bounds.exit1279 -loop_out537: ; preds = %cond_565_case_0 +loop_out538: ; preds = %cond_565_case_0 tail call void @heap_free(ptr %2) tail call void @heap_free(ptr nonnull %3) %96 = load i64, ptr %1, align 4 %97 = and i64 %96, 1048575 store i64 %97, ptr %1, align 4 %98 = icmp eq i64 %97, 0 - br i1 %98, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1301 + br i1 %98, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1302 -mask_block_err.i1301: ; preds = %loop_out537 +mask_block_err.i1302: ; preds = %loop_out538 tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") unreachable -__barray_check_none_borrowed.exit: ; preds = %loop_out537 +__barray_check_none_borrowed.exit: ; preds = %loop_out538 %99 = tail call ptr @heap_alloc(i64 20) %100 = tail call ptr @heap_alloc(i64 8) store i64 0, ptr %100, align 1 @@ -371,13 +371,13 @@ __barray_check_none_borrowed.exit: ; preds = %loop_out537 %102 = and i64 %101, 1048575 store i64 %102, ptr %1, align 4 %103 = icmp eq i64 %102, 0 - br i1 %103, label %__barray_check_none_borrowed.exit1305, label %mask_block_err.i1303 + br i1 %103, label %__barray_check_none_borrowed.exit1306, label %mask_block_err.i1304 -mask_block_err.i1303: ; preds = %__barray_check_none_borrowed.exit +mask_block_err.i1304: ; preds = %__barray_check_none_borrowed.exit tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") unreachable -__barray_check_none_borrowed.exit1305: ; preds = %__barray_check_none_borrowed.exit +__barray_check_none_borrowed.exit1306: ; preds = %__barray_check_none_borrowed.exit %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 %y_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 4 %arr_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 8 @@ -400,7 +400,7 @@ declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immar ; Function Attrs: noreturn declare void @panic(i32, ptr) local_unnamed_addr #1 -declare i64 @___lazy_measure_leaked(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -416,8 +416,6 @@ declare void @print_bool(ptr, i64, i1) local_unnamed_addr declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr - declare i1 @___read_future_bool(i64) local_unnamed_addr ; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_within_tail-sol-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_within_tail-sol-x86_64-unknown-linux-gnu.ll index 67e378b8..d857ab55 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_within_tail-sol-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_within_tail-sol-x86_64-unknown-linux-gnu.ll @@ -40,20 +40,20 @@ __hugr__.__tk2_sol_qalloc.485.exit: ; preds = %alloca_block br label %cond_13_case_1 cond_13_case_1: ; preds = %__hugr__.__tk2_sol_qalloc.485.exit, %cond_exit_13 - %"9_2.01321" = phi i64 [ 0, %__hugr__.__tk2_sol_qalloc.485.exit ], [ %6, %cond_exit_13 ] - %6 = add nuw nsw i64 %"9_2.01321", 1 - %qalloc.i1244 = tail call i64 @___qalloc() - %not_max.not.not.i1245 = icmp eq i64 %qalloc.i1244, -1 - br i1 %not_max.not.not.i1245, label %cond_489_case_0.i1246, label %__barray_check_bounds.exit + %"9_2.01322" = phi i64 [ 0, %__hugr__.__tk2_sol_qalloc.485.exit ], [ %6, %cond_exit_13 ] + %6 = add nuw nsw i64 %"9_2.01322", 1 + %qalloc.i1245 = tail call i64 @___qalloc() + %not_max.not.not.i1246 = icmp eq i64 %qalloc.i1245, -1 + br i1 %not_max.not.not.i1246, label %cond_489_case_0.i1247, label %__barray_check_bounds.exit -cond_489_case_0.i1246: ; preds = %cond_13_case_1 +cond_489_case_0.i1247: ; preds = %cond_13_case_1 tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable __barray_check_bounds.exit: ; preds = %cond_13_case_1 - tail call void @___reset(i64 %qalloc.i1244) + tail call void @___reset(i64 %qalloc.i1245) %7 = load i64, ptr %5, align 4 - %8 = lshr i64 %7, %"9_2.01321" + %8 = lshr i64 %7, %"9_2.01322" %9 = trunc i64 %8 to i1 br i1 %9, label %cond_exit_13, label %panic.i @@ -62,20 +62,20 @@ panic.i: ; preds = %__barray_check_boun unreachable cond_exit_13: ; preds = %__barray_check_bounds.exit - %10 = shl nuw nsw i64 1, %"9_2.01321" + %10 = shl nuw nsw i64 1, %"9_2.01322" %11 = xor i64 %7, %10 store i64 %11, ptr %5, align 4 - %12 = getelementptr inbounds nuw i64, ptr %4, i64 %"9_2.01321" - store i64 %qalloc.i1244, ptr %12, align 4 + %12 = getelementptr inbounds nuw i64, ptr %4, i64 %"9_2.01322" + store i64 %qalloc.i1245, ptr %12, align 4 %exitcond = icmp eq i64 %6, 20 br i1 %exitcond, label %loop_out, label %cond_13_case_1 loop_out: ; preds = %cond_exit_13 %13 = load i64, ptr %5, align 4 %14 = trunc i64 %13 to i1 - br i1 %14, label %panic.i1248, label %__barray_mask_borrow.exit + br i1 %14, label %panic.i1249, label %__barray_mask_borrow.exit -panic.i1248: ; preds = %loop_out +panic.i1249: ; preds = %loop_out tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable @@ -90,46 +90,46 @@ __barray_mask_borrow.exit: ; preds = %loop_out tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18) %17 = load i64, ptr %5, align 4 %18 = trunc i64 %17 to i1 - br i1 %18, label %__barray_mask_return.exit1250, label %panic.i1249 + br i1 %18, label %__barray_mask_return.exit1251, label %panic.i1250 -panic.i1249: ; preds = %__barray_mask_borrow.exit +panic.i1250: ; preds = %__barray_mask_borrow.exit tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_mask_return.exit1250: ; preds = %__barray_mask_borrow.exit +__barray_mask_return.exit1251: ; preds = %__barray_mask_borrow.exit %19 = and i64 %17, -2 store i64 %19, ptr %5, align 4 store i64 %16, ptr %4, align 4 - br label %__barray_check_bounds.exit1252 + br label %__barray_check_bounds.exit1253 -__barray_check_bounds.exit1252: ; preds = %__barray_mask_return.exit1250, %__barray_mask_return.exit1268 - %20 = phi i64 [ 1, %__barray_mask_return.exit1250 ], [ %42, %__barray_mask_return.exit1268 ] - %"118_0.01322" = phi i64 [ 0, %__barray_mask_return.exit1250 ], [ %20, %__barray_mask_return.exit1268 ] +__barray_check_bounds.exit1253: ; preds = %__barray_mask_return.exit1251, %__barray_mask_return.exit1269 + %20 = phi i64 [ 1, %__barray_mask_return.exit1251 ], [ %42, %__barray_mask_return.exit1269 ] + %"118_0.01323" = phi i64 [ 0, %__barray_mask_return.exit1251 ], [ %20, %__barray_mask_return.exit1269 ] %21 = load i64, ptr %5, align 4 - %22 = lshr i64 %21, %"118_0.01322" + %22 = lshr i64 %21, %"118_0.01323" %23 = trunc i64 %22 to i1 - br i1 %23, label %panic.i1253, label %__barray_check_bounds.exit1256 + br i1 %23, label %panic.i1254, label %__barray_check_bounds.exit1257 -panic.i1253: ; preds = %__barray_check_bounds.exit1252 +panic.i1254: ; preds = %__barray_check_bounds.exit1253 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_check_bounds.exit1256: ; preds = %__barray_check_bounds.exit1252 - %24 = shl nuw nsw i64 1, %"118_0.01322" +__barray_check_bounds.exit1257: ; preds = %__barray_check_bounds.exit1253 + %24 = shl nuw nsw i64 1, %"118_0.01323" %25 = xor i64 %21, %24 store i64 %25, ptr %5, align 4 - %26 = getelementptr inbounds nuw i64, ptr %4, i64 %"118_0.01322" + %26 = getelementptr inbounds nuw i64, ptr %4, i64 %"118_0.01323" %27 = load i64, ptr %26, align 4 %28 = lshr i64 %25, %20 %29 = trunc i64 %28 to i1 - br i1 %29, label %panic.i1257, label %__barray_check_bounds.exit1262 + br i1 %29, label %panic.i1258, label %__barray_check_bounds.exit1263 -panic.i1257: ; preds = %__barray_check_bounds.exit1256 +panic.i1258: ; preds = %__barray_check_bounds.exit1257 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_check_bounds.exit1262: ; preds = %__barray_check_bounds.exit1256 - %30 = shl nuw nsw i64 2, %"118_0.01322" +__barray_check_bounds.exit1263: ; preds = %__barray_check_bounds.exit1257 + %30 = shl nuw nsw i64 2, %"118_0.01323" %31 = xor i64 %25, %30 store i64 %31, ptr %5, align 4 %32 = getelementptr inbounds nuw i64, ptr %4, i64 %20 @@ -140,78 +140,78 @@ __barray_check_bounds.exit1262: ; preds = %__barray_check_boun tail call void @___rp(i64 %27, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rz(i64 %27, double 0xBFF921FB54442D18) %34 = load i64, ptr %5, align 4 - %35 = lshr i64 %34, %"118_0.01322" + %35 = lshr i64 %34, %"118_0.01323" %36 = trunc i64 %35 to i1 - br i1 %36, label %__barray_check_bounds.exit1266, label %panic.i1263 + br i1 %36, label %__barray_check_bounds.exit1267, label %panic.i1264 -panic.i1263: ; preds = %__barray_check_bounds.exit1262 +panic.i1264: ; preds = %__barray_check_bounds.exit1263 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_check_bounds.exit1266: ; preds = %__barray_check_bounds.exit1262 +__barray_check_bounds.exit1267: ; preds = %__barray_check_bounds.exit1263 %37 = xor i64 %34, %24 store i64 %37, ptr %5, align 4 store i64 %27, ptr %26, align 4 %38 = load i64, ptr %5, align 4 %39 = lshr i64 %38, %20 %40 = trunc i64 %39 to i1 - br i1 %40, label %__barray_mask_return.exit1268, label %panic.i1267 + br i1 %40, label %__barray_mask_return.exit1269, label %panic.i1268 -panic.i1267: ; preds = %__barray_check_bounds.exit1266 +panic.i1268: ; preds = %__barray_check_bounds.exit1267 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_mask_return.exit1268: ; preds = %__barray_check_bounds.exit1266 +__barray_mask_return.exit1269: ; preds = %__barray_check_bounds.exit1267 %41 = xor i64 %38, %30 store i64 %41, ptr %5, align 4 store i64 %33, ptr %32, align 4 %42 = add nuw nsw i64 %20, 1 - %exitcond1325 = icmp eq i64 %42, 20 - br i1 %exitcond1325, label %cond_exit_189, label %__barray_check_bounds.exit1252 + %exitcond1326 = icmp eq i64 %42, 20 + br i1 %exitcond1326, label %cond_exit_189, label %__barray_check_bounds.exit1253 -cond_exit_189: ; preds = %__barray_mask_return.exit1268 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) +cond_exit_189: ; preds = %__barray_mask_return.exit1269 + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 1) tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure_leaked) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___inc_future_refcount(i64 %___future_measure) + %read_uint = tail call i64 @___read_future_uint(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) %43 = icmp eq i64 %read_uint, 2 br i1 %43, label %44, label %cond_exit_267 cond_exit_267: ; preds = %cond_exit_189 - %read_uint378 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + %read_uint378 = tail call i64 @___read_future_uint(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) %.not = icmp eq i64 %read_uint378, 2 br i1 %.not, label %cond_247_case_0, label %cond_247_case_1 44: ; preds = %cond_exit_189 - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_int(ptr nonnull @res_head_leake.F4F32972.0, i64 20, i64 1) - br label %__barray_check_bounds.exit1274.preheader + br label %__barray_check_bounds.exit1275.preheader -__barray_check_bounds.exit1274.preheader: ; preds = %cond_247_case_1, %44 - br label %__barray_check_bounds.exit1274 +__barray_check_bounds.exit1275.preheader: ; preds = %cond_247_case_1, %44 + br label %__barray_check_bounds.exit1275 cond_247_case_1: ; preds = %cond_exit_267 %45 = icmp eq i64 %read_uint378, 1 tail call void @print_bool(ptr nonnull @res_head.AFE8E005.0, i64 14, i1 %45) - br label %__barray_check_bounds.exit1274.preheader + br label %__barray_check_bounds.exit1275.preheader cond_247_case_0: ; preds = %cond_exit_267 tail call void @panic(i32 1001, ptr nonnull @e_Option.unw.32D4E82D.0) unreachable -out_of_bounds.i1269: ; preds = %.thread +out_of_bounds.i1270: ; preds = %.thread tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") unreachable -__barray_check_bounds.exit1270: ; preds = %.thread +__barray_check_bounds.exit1271: ; preds = %.thread %46 = load i64, ptr %3, align 4 - %47 = lshr i64 %46, %"310_2.01329" + %47 = lshr i64 %46, %"310_2.01330" %48 = trunc i64 %47 to i1 - br i1 %48, label %cond_exit_314, label %panic.i1271 + br i1 %48, label %cond_exit_314, label %panic.i1272 -panic.i1271: ; preds = %__barray_check_bounds.exit1270 +panic.i1272: ; preds = %__barray_check_bounds.exit1271 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable @@ -220,91 +220,91 @@ mask_block_ok.i: ; preds = %cond_exit_314 %50 = or i64 %49, -1048576 store i64 %50, ptr %5, align 4 %51 = icmp eq i64 %50, -1 - br i1 %51, label %loop_body538.preheader.preheader, label %mask_block_err.i + br i1 %51, label %loop_body539.preheader.preheader, label %mask_block_err.i mask_block_err.i: ; preds = %mask_block_ok.i tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_check_bounds.exit1274: ; preds = %__barray_check_bounds.exit1274.preheader, %cond_exit_314 - %"310_0.sroa.15.01330" = phi i64 [ %52, %cond_exit_314 ], [ 0, %__barray_check_bounds.exit1274.preheader ] - %"310_2.01329" = phi i64 [ %60, %cond_exit_314 ], [ 0, %__barray_check_bounds.exit1274.preheader ] - %52 = add nuw nsw i64 %"310_0.sroa.15.01330", 1 +__barray_check_bounds.exit1275: ; preds = %__barray_check_bounds.exit1275.preheader, %cond_exit_314 + %"310_0.sroa.15.01331" = phi i64 [ %52, %cond_exit_314 ], [ 0, %__barray_check_bounds.exit1275.preheader ] + %"310_2.01330" = phi i64 [ %60, %cond_exit_314 ], [ 0, %__barray_check_bounds.exit1275.preheader ] + %52 = add nuw nsw i64 %"310_0.sroa.15.01331", 1 %53 = load i64, ptr %5, align 4 - %54 = lshr i64 %53, %"310_0.sroa.15.01330" + %54 = lshr i64 %53, %"310_0.sroa.15.01331" %55 = trunc i64 %54 to i1 - br i1 %55, label %panic.i1275, label %.thread + br i1 %55, label %panic.i1276, label %.thread -panic.i1275: ; preds = %__barray_check_bounds.exit1274 +panic.i1276: ; preds = %__barray_check_bounds.exit1275 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -.thread: ; preds = %__barray_check_bounds.exit1274 - %56 = shl nuw nsw i64 1, %"310_0.sroa.15.01330" +.thread: ; preds = %__barray_check_bounds.exit1275 + %56 = shl nuw nsw i64 1, %"310_0.sroa.15.01331" %57 = xor i64 %53, %56 store i64 %57, ptr %5, align 4 - %58 = getelementptr inbounds nuw i64, ptr %4, i64 %"310_0.sroa.15.01330" + %58 = getelementptr inbounds nuw i64, ptr %4, i64 %"310_0.sroa.15.01331" %59 = load i64, ptr %58, align 4 - %60 = add i64 %"310_2.01329", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %59) + %60 = add i64 %"310_2.01330", 1 + %___future_measure513 = tail call i64 @___future_measure(i64 %59, i64 0) tail call void @___qfree(i64 %59) - %61 = icmp ult i64 %"310_2.01329", 20 - br i1 %61, label %__barray_check_bounds.exit1270, label %out_of_bounds.i1269 + %61 = icmp ult i64 %"310_2.01330", 20 + br i1 %61, label %__barray_check_bounds.exit1271, label %out_of_bounds.i1270 -cond_exit_314: ; preds = %__barray_check_bounds.exit1270 - %62 = shl nuw nsw i64 1, %"310_2.01329" +cond_exit_314: ; preds = %__barray_check_bounds.exit1271 + %62 = shl nuw nsw i64 1, %"310_2.01330" %63 = xor i64 %46, %62 store i64 %63, ptr %3, align 4 - %64 = getelementptr inbounds nuw i64, ptr %2, i64 %"310_2.01329" - store i64 %lazy_measure, ptr %64, align 4 - %65 = icmp samesign ugt i64 %"310_0.sroa.15.01330", 18 - br i1 %65, label %mask_block_ok.i, label %__barray_check_bounds.exit1274 + %64 = getelementptr inbounds nuw i64, ptr %2, i64 %"310_2.01330" + store i64 %___future_measure513, ptr %64, align 4 + %65 = icmp samesign ugt i64 %"310_0.sroa.15.01331", 18 + br i1 %65, label %mask_block_ok.i, label %__barray_check_bounds.exit1275 -loop_body538.preheader.preheader: ; preds = %mask_block_ok.i +loop_body539.preheader.preheader: ; preds = %mask_block_ok.i tail call void @heap_free(ptr nonnull %4) tail call void @heap_free(ptr nonnull %5) - br label %__barray_check_bounds.exit1278 + br label %__barray_check_bounds.exit1279 -__barray_check_bounds.exit1278: ; preds = %cond_exit_380, %loop_body538.preheader.preheader - %"376_0.sroa.15.01324" = phi i64 [ %66, %cond_exit_380 ], [ 0, %loop_body538.preheader.preheader ] - %66 = add nuw nsw i64 %"376_0.sroa.15.01324", 1 +__barray_check_bounds.exit1279: ; preds = %cond_exit_380, %loop_body539.preheader.preheader + %"376_0.sroa.15.01325" = phi i64 [ %66, %cond_exit_380 ], [ 0, %loop_body539.preheader.preheader ] + %66 = add nuw nsw i64 %"376_0.sroa.15.01325", 1 %67 = load i64, ptr %3, align 4 - %68 = lshr i64 %67, %"376_0.sroa.15.01324" + %68 = lshr i64 %67, %"376_0.sroa.15.01325" %69 = trunc i64 %68 to i1 - br i1 %69, label %panic.i1279, label %__barray_check_bounds.exit1282 + br i1 %69, label %panic.i1280, label %__barray_check_bounds.exit1283 -panic.i1279: ; preds = %__barray_check_bounds.exit1278 +panic.i1280: ; preds = %__barray_check_bounds.exit1279 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_check_bounds.exit1282: ; preds = %__barray_check_bounds.exit1278 - %70 = shl nuw nsw i64 1, %"376_0.sroa.15.01324" +__barray_check_bounds.exit1283: ; preds = %__barray_check_bounds.exit1279 + %70 = shl nuw nsw i64 1, %"376_0.sroa.15.01325" %71 = xor i64 %67, %70 store i64 %71, ptr %3, align 4 - %72 = getelementptr inbounds nuw i64, ptr %2, i64 %"376_0.sroa.15.01324" + %72 = getelementptr inbounds nuw i64, ptr %2, i64 %"376_0.sroa.15.01325" %73 = load i64, ptr %72, align 4 tail call void @___inc_future_refcount(i64 %73) %74 = load i64, ptr %3, align 4 - %75 = lshr i64 %74, %"376_0.sroa.15.01324" + %75 = lshr i64 %74, %"376_0.sroa.15.01325" %76 = trunc i64 %75 to i1 - br i1 %76, label %__barray_check_bounds.exit1286, label %panic.i1283 + br i1 %76, label %__barray_check_bounds.exit1287, label %panic.i1284 -panic.i1283: ; preds = %__barray_check_bounds.exit1282 +panic.i1284: ; preds = %__barray_check_bounds.exit1283 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_check_bounds.exit1286: ; preds = %__barray_check_bounds.exit1282 +__barray_check_bounds.exit1287: ; preds = %__barray_check_bounds.exit1283 %77 = xor i64 %74, %70 store i64 %77, ptr %3, align 4 store i64 %73, ptr %72, align 4 %read_bool = tail call i1 @___read_future_bool(i64 %73) tail call void @___dec_future_refcount(i64 %73) %78 = load i64, ptr %1, align 4 - %79 = lshr i64 %78, %"376_0.sroa.15.01324" + %79 = lshr i64 %78, %"376_0.sroa.15.01325" %80 = trunc i64 %79 to i1 - br i1 %80, label %cond_exit_380, label %panic.i1287 + br i1 %80, label %cond_exit_380, label %panic.i1288 -panic.i1287: ; preds = %__barray_check_bounds.exit1286 +panic.i1288: ; preds = %__barray_check_bounds.exit1287 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable @@ -313,55 +313,55 @@ cond_565_case_0: ; preds = %cond_exit_565 %82 = or i64 %81, -1048576 store i64 %82, ptr %3, align 4 %83 = icmp eq i64 %82, -1 - br i1 %83, label %loop_out537, label %mask_block_err.i1292 + br i1 %83, label %loop_out538, label %mask_block_err.i1293 -mask_block_err.i1292: ; preds = %cond_565_case_0 +mask_block_err.i1293: ; preds = %cond_565_case_0 tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_check_bounds.exit1296: ; preds = %cond_exit_380, %cond_exit_565 - %"562_0.01331" = phi i64 [ %84, %cond_exit_565 ], [ 0, %cond_exit_380 ] - %84 = add nuw nsw i64 %"562_0.01331", 1 +__barray_check_bounds.exit1297: ; preds = %cond_exit_380, %cond_exit_565 + %"562_0.01332" = phi i64 [ %84, %cond_exit_565 ], [ 0, %cond_exit_380 ] + %84 = add nuw nsw i64 %"562_0.01332", 1 %85 = load i64, ptr %3, align 4 - %86 = lshr i64 %85, %"562_0.01331" + %86 = lshr i64 %85, %"562_0.01332" %87 = trunc i64 %86 to i1 - br i1 %87, label %cond_exit_565, label %__barray_mask_borrow.exit1300 + br i1 %87, label %cond_exit_565, label %__barray_mask_borrow.exit1301 -__barray_mask_borrow.exit1300: ; preds = %__barray_check_bounds.exit1296 - %88 = shl nuw nsw i64 1, %"562_0.01331" +__barray_mask_borrow.exit1301: ; preds = %__barray_check_bounds.exit1297 + %88 = shl nuw nsw i64 1, %"562_0.01332" %89 = xor i64 %85, %88 store i64 %89, ptr %3, align 4 - %90 = getelementptr inbounds nuw i64, ptr %2, i64 %"562_0.01331" + %90 = getelementptr inbounds nuw i64, ptr %2, i64 %"562_0.01332" %91 = load i64, ptr %90, align 4 tail call void @___dec_future_refcount(i64 %91) br label %cond_exit_565 -cond_exit_565: ; preds = %__barray_mask_borrow.exit1300, %__barray_check_bounds.exit1296 - %92 = icmp samesign ugt i64 %"562_0.01331", 18 - br i1 %92, label %cond_565_case_0, label %__barray_check_bounds.exit1296 +cond_exit_565: ; preds = %__barray_mask_borrow.exit1301, %__barray_check_bounds.exit1297 + %92 = icmp samesign ugt i64 %"562_0.01332", 18 + br i1 %92, label %cond_565_case_0, label %__barray_check_bounds.exit1297 -cond_exit_380: ; preds = %__barray_check_bounds.exit1286 +cond_exit_380: ; preds = %__barray_check_bounds.exit1287 %93 = xor i64 %78, %70 store i64 %93, ptr %1, align 4 - %94 = getelementptr inbounds nuw i1, ptr %0, i64 %"376_0.sroa.15.01324" + %94 = getelementptr inbounds nuw i1, ptr %0, i64 %"376_0.sroa.15.01325" store i1 %read_bool, ptr %94, align 1 - %95 = icmp eq i64 %"376_0.sroa.15.01324", 19 - br i1 %95, label %__barray_check_bounds.exit1296, label %__barray_check_bounds.exit1278 + %95 = icmp eq i64 %"376_0.sroa.15.01325", 19 + br i1 %95, label %__barray_check_bounds.exit1297, label %__barray_check_bounds.exit1279 -loop_out537: ; preds = %cond_565_case_0 +loop_out538: ; preds = %cond_565_case_0 tail call void @heap_free(ptr %2) tail call void @heap_free(ptr nonnull %3) %96 = load i64, ptr %1, align 4 %97 = and i64 %96, 1048575 store i64 %97, ptr %1, align 4 %98 = icmp eq i64 %97, 0 - br i1 %98, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1301 + br i1 %98, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1302 -mask_block_err.i1301: ; preds = %loop_out537 +mask_block_err.i1302: ; preds = %loop_out538 tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") unreachable -__barray_check_none_borrowed.exit: ; preds = %loop_out537 +__barray_check_none_borrowed.exit: ; preds = %loop_out538 %99 = tail call ptr @heap_alloc(i64 20) %100 = tail call ptr @heap_alloc(i64 8) store i64 0, ptr %100, align 1 @@ -371,13 +371,13 @@ __barray_check_none_borrowed.exit: ; preds = %loop_out537 %102 = and i64 %101, 1048575 store i64 %102, ptr %1, align 4 %103 = icmp eq i64 %102, 0 - br i1 %103, label %__barray_check_none_borrowed.exit1305, label %mask_block_err.i1303 + br i1 %103, label %__barray_check_none_borrowed.exit1306, label %mask_block_err.i1304 -mask_block_err.i1303: ; preds = %__barray_check_none_borrowed.exit +mask_block_err.i1304: ; preds = %__barray_check_none_borrowed.exit tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") unreachable -__barray_check_none_borrowed.exit1305: ; preds = %__barray_check_none_borrowed.exit +__barray_check_none_borrowed.exit1306: ; preds = %__barray_check_none_borrowed.exit %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 %y_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 4 %arr_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 8 @@ -400,7 +400,7 @@ declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immar ; Function Attrs: noreturn declare void @panic(i32, ptr) local_unnamed_addr #1 -declare i64 @___lazy_measure_leaked(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -416,8 +416,6 @@ declare void @print_bool(ptr, i64, i1) local_unnamed_addr declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr - declare i1 @___read_future_bool(i64) local_unnamed_addr ; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_within_tail-sol-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_within_tail-sol-x86_64-windows-gnu.ll index 6ee4afeb..55225d42 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_within_tail-sol-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measure_leaked[legacy]/leak_within_tail-sol-x86_64-windows-gnu.ll @@ -40,20 +40,20 @@ __hugr__.__tk2_sol_qalloc.485.exit: ; preds = %alloca_block br label %cond_13_case_1 cond_13_case_1: ; preds = %__hugr__.__tk2_sol_qalloc.485.exit, %cond_exit_13 - %"9_2.01321" = phi i64 [ 0, %__hugr__.__tk2_sol_qalloc.485.exit ], [ %6, %cond_exit_13 ] - %6 = add nuw nsw i64 %"9_2.01321", 1 - %qalloc.i1244 = tail call i64 @___qalloc() - %not_max.not.not.i1245 = icmp eq i64 %qalloc.i1244, -1 - br i1 %not_max.not.not.i1245, label %cond_489_case_0.i1246, label %__barray_check_bounds.exit + %"9_2.01322" = phi i64 [ 0, %__hugr__.__tk2_sol_qalloc.485.exit ], [ %6, %cond_exit_13 ] + %6 = add nuw nsw i64 %"9_2.01322", 1 + %qalloc.i1245 = tail call i64 @___qalloc() + %not_max.not.not.i1246 = icmp eq i64 %qalloc.i1245, -1 + br i1 %not_max.not.not.i1246, label %cond_489_case_0.i1247, label %__barray_check_bounds.exit -cond_489_case_0.i1246: ; preds = %cond_13_case_1 +cond_489_case_0.i1247: ; preds = %cond_13_case_1 tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable __barray_check_bounds.exit: ; preds = %cond_13_case_1 - tail call void @___reset(i64 %qalloc.i1244) + tail call void @___reset(i64 %qalloc.i1245) %7 = load i64, ptr %5, align 4 - %8 = lshr i64 %7, %"9_2.01321" + %8 = lshr i64 %7, %"9_2.01322" %9 = trunc i64 %8 to i1 br i1 %9, label %cond_exit_13, label %panic.i @@ -62,20 +62,20 @@ panic.i: ; preds = %__barray_check_boun unreachable cond_exit_13: ; preds = %__barray_check_bounds.exit - %10 = shl nuw nsw i64 1, %"9_2.01321" + %10 = shl nuw nsw i64 1, %"9_2.01322" %11 = xor i64 %7, %10 store i64 %11, ptr %5, align 4 - %12 = getelementptr inbounds nuw i64, ptr %4, i64 %"9_2.01321" - store i64 %qalloc.i1244, ptr %12, align 4 + %12 = getelementptr inbounds nuw i64, ptr %4, i64 %"9_2.01322" + store i64 %qalloc.i1245, ptr %12, align 4 %exitcond = icmp eq i64 %6, 20 br i1 %exitcond, label %loop_out, label %cond_13_case_1 loop_out: ; preds = %cond_exit_13 %13 = load i64, ptr %5, align 4 %14 = trunc i64 %13 to i1 - br i1 %14, label %panic.i1248, label %__barray_mask_borrow.exit + br i1 %14, label %panic.i1249, label %__barray_mask_borrow.exit -panic.i1248: ; preds = %loop_out +panic.i1249: ; preds = %loop_out tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable @@ -90,46 +90,46 @@ __barray_mask_borrow.exit: ; preds = %loop_out tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18) %17 = load i64, ptr %5, align 4 %18 = trunc i64 %17 to i1 - br i1 %18, label %__barray_mask_return.exit1250, label %panic.i1249 + br i1 %18, label %__barray_mask_return.exit1251, label %panic.i1250 -panic.i1249: ; preds = %__barray_mask_borrow.exit +panic.i1250: ; preds = %__barray_mask_borrow.exit tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_mask_return.exit1250: ; preds = %__barray_mask_borrow.exit +__barray_mask_return.exit1251: ; preds = %__barray_mask_borrow.exit %19 = and i64 %17, -2 store i64 %19, ptr %5, align 4 store i64 %16, ptr %4, align 4 - br label %__barray_check_bounds.exit1252 + br label %__barray_check_bounds.exit1253 -__barray_check_bounds.exit1252: ; preds = %__barray_mask_return.exit1250, %__barray_mask_return.exit1268 - %20 = phi i64 [ 1, %__barray_mask_return.exit1250 ], [ %42, %__barray_mask_return.exit1268 ] - %"118_0.01322" = phi i64 [ 0, %__barray_mask_return.exit1250 ], [ %20, %__barray_mask_return.exit1268 ] +__barray_check_bounds.exit1253: ; preds = %__barray_mask_return.exit1251, %__barray_mask_return.exit1269 + %20 = phi i64 [ 1, %__barray_mask_return.exit1251 ], [ %42, %__barray_mask_return.exit1269 ] + %"118_0.01323" = phi i64 [ 0, %__barray_mask_return.exit1251 ], [ %20, %__barray_mask_return.exit1269 ] %21 = load i64, ptr %5, align 4 - %22 = lshr i64 %21, %"118_0.01322" + %22 = lshr i64 %21, %"118_0.01323" %23 = trunc i64 %22 to i1 - br i1 %23, label %panic.i1253, label %__barray_check_bounds.exit1256 + br i1 %23, label %panic.i1254, label %__barray_check_bounds.exit1257 -panic.i1253: ; preds = %__barray_check_bounds.exit1252 +panic.i1254: ; preds = %__barray_check_bounds.exit1253 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_check_bounds.exit1256: ; preds = %__barray_check_bounds.exit1252 - %24 = shl nuw nsw i64 1, %"118_0.01322" +__barray_check_bounds.exit1257: ; preds = %__barray_check_bounds.exit1253 + %24 = shl nuw nsw i64 1, %"118_0.01323" %25 = xor i64 %21, %24 store i64 %25, ptr %5, align 4 - %26 = getelementptr inbounds nuw i64, ptr %4, i64 %"118_0.01322" + %26 = getelementptr inbounds nuw i64, ptr %4, i64 %"118_0.01323" %27 = load i64, ptr %26, align 4 %28 = lshr i64 %25, %20 %29 = trunc i64 %28 to i1 - br i1 %29, label %panic.i1257, label %__barray_check_bounds.exit1262 + br i1 %29, label %panic.i1258, label %__barray_check_bounds.exit1263 -panic.i1257: ; preds = %__barray_check_bounds.exit1256 +panic.i1258: ; preds = %__barray_check_bounds.exit1257 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_check_bounds.exit1262: ; preds = %__barray_check_bounds.exit1256 - %30 = shl nuw nsw i64 2, %"118_0.01322" +__barray_check_bounds.exit1263: ; preds = %__barray_check_bounds.exit1257 + %30 = shl nuw nsw i64 2, %"118_0.01323" %31 = xor i64 %25, %30 store i64 %31, ptr %5, align 4 %32 = getelementptr inbounds nuw i64, ptr %4, i64 %20 @@ -140,78 +140,78 @@ __barray_check_bounds.exit1262: ; preds = %__barray_check_boun tail call void @___rp(i64 %27, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rz(i64 %27, double 0xBFF921FB54442D18) %34 = load i64, ptr %5, align 4 - %35 = lshr i64 %34, %"118_0.01322" + %35 = lshr i64 %34, %"118_0.01323" %36 = trunc i64 %35 to i1 - br i1 %36, label %__barray_check_bounds.exit1266, label %panic.i1263 + br i1 %36, label %__barray_check_bounds.exit1267, label %panic.i1264 -panic.i1263: ; preds = %__barray_check_bounds.exit1262 +panic.i1264: ; preds = %__barray_check_bounds.exit1263 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_check_bounds.exit1266: ; preds = %__barray_check_bounds.exit1262 +__barray_check_bounds.exit1267: ; preds = %__barray_check_bounds.exit1263 %37 = xor i64 %34, %24 store i64 %37, ptr %5, align 4 store i64 %27, ptr %26, align 4 %38 = load i64, ptr %5, align 4 %39 = lshr i64 %38, %20 %40 = trunc i64 %39 to i1 - br i1 %40, label %__barray_mask_return.exit1268, label %panic.i1267 + br i1 %40, label %__barray_mask_return.exit1269, label %panic.i1268 -panic.i1267: ; preds = %__barray_check_bounds.exit1266 +panic.i1268: ; preds = %__barray_check_bounds.exit1267 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_mask_return.exit1268: ; preds = %__barray_check_bounds.exit1266 +__barray_mask_return.exit1269: ; preds = %__barray_check_bounds.exit1267 %41 = xor i64 %38, %30 store i64 %41, ptr %5, align 4 store i64 %33, ptr %32, align 4 %42 = add nuw nsw i64 %20, 1 - %exitcond1325 = icmp eq i64 %42, 20 - br i1 %exitcond1325, label %cond_exit_189, label %__barray_check_bounds.exit1252 + %exitcond1326 = icmp eq i64 %42, 20 + br i1 %exitcond1326, label %cond_exit_189, label %__barray_check_bounds.exit1253 -cond_exit_189: ; preds = %__barray_mask_return.exit1268 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i) +cond_exit_189: ; preds = %__barray_mask_return.exit1269 + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 1) tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure_leaked) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___inc_future_refcount(i64 %___future_measure) + %read_uint = tail call i64 @___read_future_uint(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) %43 = icmp eq i64 %read_uint, 2 br i1 %43, label %44, label %cond_exit_267 cond_exit_267: ; preds = %cond_exit_189 - %read_uint378 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + %read_uint378 = tail call i64 @___read_future_uint(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) %.not = icmp eq i64 %read_uint378, 2 br i1 %.not, label %cond_247_case_0, label %cond_247_case_1 44: ; preds = %cond_exit_189 - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_int(ptr nonnull @res_head_leake.F4F32972.0, i64 20, i64 1) - br label %__barray_check_bounds.exit1274.preheader + br label %__barray_check_bounds.exit1275.preheader -__barray_check_bounds.exit1274.preheader: ; preds = %cond_247_case_1, %44 - br label %__barray_check_bounds.exit1274 +__barray_check_bounds.exit1275.preheader: ; preds = %cond_247_case_1, %44 + br label %__barray_check_bounds.exit1275 cond_247_case_1: ; preds = %cond_exit_267 %45 = icmp eq i64 %read_uint378, 1 tail call void @print_bool(ptr nonnull @res_head.AFE8E005.0, i64 14, i1 %45) - br label %__barray_check_bounds.exit1274.preheader + br label %__barray_check_bounds.exit1275.preheader cond_247_case_0: ; preds = %cond_exit_267 tail call void @panic(i32 1001, ptr nonnull @e_Option.unw.32D4E82D.0) unreachable -out_of_bounds.i1269: ; preds = %.thread +out_of_bounds.i1270: ; preds = %.thread tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") unreachable -__barray_check_bounds.exit1270: ; preds = %.thread +__barray_check_bounds.exit1271: ; preds = %.thread %46 = load i64, ptr %3, align 4 - %47 = lshr i64 %46, %"310_2.01329" + %47 = lshr i64 %46, %"310_2.01330" %48 = trunc i64 %47 to i1 - br i1 %48, label %cond_exit_314, label %panic.i1271 + br i1 %48, label %cond_exit_314, label %panic.i1272 -panic.i1271: ; preds = %__barray_check_bounds.exit1270 +panic.i1272: ; preds = %__barray_check_bounds.exit1271 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable @@ -220,91 +220,91 @@ mask_block_ok.i: ; preds = %cond_exit_314 %50 = or i64 %49, -1048576 store i64 %50, ptr %5, align 4 %51 = icmp eq i64 %50, -1 - br i1 %51, label %loop_body538.preheader.preheader, label %mask_block_err.i + br i1 %51, label %loop_body539.preheader.preheader, label %mask_block_err.i mask_block_err.i: ; preds = %mask_block_ok.i tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_check_bounds.exit1274: ; preds = %__barray_check_bounds.exit1274.preheader, %cond_exit_314 - %"310_0.sroa.15.01330" = phi i64 [ %52, %cond_exit_314 ], [ 0, %__barray_check_bounds.exit1274.preheader ] - %"310_2.01329" = phi i64 [ %60, %cond_exit_314 ], [ 0, %__barray_check_bounds.exit1274.preheader ] - %52 = add nuw nsw i64 %"310_0.sroa.15.01330", 1 +__barray_check_bounds.exit1275: ; preds = %__barray_check_bounds.exit1275.preheader, %cond_exit_314 + %"310_0.sroa.15.01331" = phi i64 [ %52, %cond_exit_314 ], [ 0, %__barray_check_bounds.exit1275.preheader ] + %"310_2.01330" = phi i64 [ %60, %cond_exit_314 ], [ 0, %__barray_check_bounds.exit1275.preheader ] + %52 = add nuw nsw i64 %"310_0.sroa.15.01331", 1 %53 = load i64, ptr %5, align 4 - %54 = lshr i64 %53, %"310_0.sroa.15.01330" + %54 = lshr i64 %53, %"310_0.sroa.15.01331" %55 = trunc i64 %54 to i1 - br i1 %55, label %panic.i1275, label %.thread + br i1 %55, label %panic.i1276, label %.thread -panic.i1275: ; preds = %__barray_check_bounds.exit1274 +panic.i1276: ; preds = %__barray_check_bounds.exit1275 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -.thread: ; preds = %__barray_check_bounds.exit1274 - %56 = shl nuw nsw i64 1, %"310_0.sroa.15.01330" +.thread: ; preds = %__barray_check_bounds.exit1275 + %56 = shl nuw nsw i64 1, %"310_0.sroa.15.01331" %57 = xor i64 %53, %56 store i64 %57, ptr %5, align 4 - %58 = getelementptr inbounds nuw i64, ptr %4, i64 %"310_0.sroa.15.01330" + %58 = getelementptr inbounds nuw i64, ptr %4, i64 %"310_0.sroa.15.01331" %59 = load i64, ptr %58, align 4 - %60 = add i64 %"310_2.01329", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %59) + %60 = add i64 %"310_2.01330", 1 + %___future_measure513 = tail call i64 @___future_measure(i64 %59, i64 0) tail call void @___qfree(i64 %59) - %61 = icmp ult i64 %"310_2.01329", 20 - br i1 %61, label %__barray_check_bounds.exit1270, label %out_of_bounds.i1269 + %61 = icmp ult i64 %"310_2.01330", 20 + br i1 %61, label %__barray_check_bounds.exit1271, label %out_of_bounds.i1270 -cond_exit_314: ; preds = %__barray_check_bounds.exit1270 - %62 = shl nuw nsw i64 1, %"310_2.01329" +cond_exit_314: ; preds = %__barray_check_bounds.exit1271 + %62 = shl nuw nsw i64 1, %"310_2.01330" %63 = xor i64 %46, %62 store i64 %63, ptr %3, align 4 - %64 = getelementptr inbounds nuw i64, ptr %2, i64 %"310_2.01329" - store i64 %lazy_measure, ptr %64, align 4 - %65 = icmp samesign ugt i64 %"310_0.sroa.15.01330", 18 - br i1 %65, label %mask_block_ok.i, label %__barray_check_bounds.exit1274 + %64 = getelementptr inbounds nuw i64, ptr %2, i64 %"310_2.01330" + store i64 %___future_measure513, ptr %64, align 4 + %65 = icmp samesign ugt i64 %"310_0.sroa.15.01331", 18 + br i1 %65, label %mask_block_ok.i, label %__barray_check_bounds.exit1275 -loop_body538.preheader.preheader: ; preds = %mask_block_ok.i +loop_body539.preheader.preheader: ; preds = %mask_block_ok.i tail call void @heap_free(ptr nonnull %4) tail call void @heap_free(ptr nonnull %5) - br label %__barray_check_bounds.exit1278 + br label %__barray_check_bounds.exit1279 -__barray_check_bounds.exit1278: ; preds = %cond_exit_380, %loop_body538.preheader.preheader - %"376_0.sroa.15.01324" = phi i64 [ %66, %cond_exit_380 ], [ 0, %loop_body538.preheader.preheader ] - %66 = add nuw nsw i64 %"376_0.sroa.15.01324", 1 +__barray_check_bounds.exit1279: ; preds = %cond_exit_380, %loop_body539.preheader.preheader + %"376_0.sroa.15.01325" = phi i64 [ %66, %cond_exit_380 ], [ 0, %loop_body539.preheader.preheader ] + %66 = add nuw nsw i64 %"376_0.sroa.15.01325", 1 %67 = load i64, ptr %3, align 4 - %68 = lshr i64 %67, %"376_0.sroa.15.01324" + %68 = lshr i64 %67, %"376_0.sroa.15.01325" %69 = trunc i64 %68 to i1 - br i1 %69, label %panic.i1279, label %__barray_check_bounds.exit1282 + br i1 %69, label %panic.i1280, label %__barray_check_bounds.exit1283 -panic.i1279: ; preds = %__barray_check_bounds.exit1278 +panic.i1280: ; preds = %__barray_check_bounds.exit1279 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_check_bounds.exit1282: ; preds = %__barray_check_bounds.exit1278 - %70 = shl nuw nsw i64 1, %"376_0.sroa.15.01324" +__barray_check_bounds.exit1283: ; preds = %__barray_check_bounds.exit1279 + %70 = shl nuw nsw i64 1, %"376_0.sroa.15.01325" %71 = xor i64 %67, %70 store i64 %71, ptr %3, align 4 - %72 = getelementptr inbounds nuw i64, ptr %2, i64 %"376_0.sroa.15.01324" + %72 = getelementptr inbounds nuw i64, ptr %2, i64 %"376_0.sroa.15.01325" %73 = load i64, ptr %72, align 4 tail call void @___inc_future_refcount(i64 %73) %74 = load i64, ptr %3, align 4 - %75 = lshr i64 %74, %"376_0.sroa.15.01324" + %75 = lshr i64 %74, %"376_0.sroa.15.01325" %76 = trunc i64 %75 to i1 - br i1 %76, label %__barray_check_bounds.exit1286, label %panic.i1283 + br i1 %76, label %__barray_check_bounds.exit1287, label %panic.i1284 -panic.i1283: ; preds = %__barray_check_bounds.exit1282 +panic.i1284: ; preds = %__barray_check_bounds.exit1283 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_check_bounds.exit1286: ; preds = %__barray_check_bounds.exit1282 +__barray_check_bounds.exit1287: ; preds = %__barray_check_bounds.exit1283 %77 = xor i64 %74, %70 store i64 %77, ptr %3, align 4 store i64 %73, ptr %72, align 4 %read_bool = tail call i1 @___read_future_bool(i64 %73) tail call void @___dec_future_refcount(i64 %73) %78 = load i64, ptr %1, align 4 - %79 = lshr i64 %78, %"376_0.sroa.15.01324" + %79 = lshr i64 %78, %"376_0.sroa.15.01325" %80 = trunc i64 %79 to i1 - br i1 %80, label %cond_exit_380, label %panic.i1287 + br i1 %80, label %cond_exit_380, label %panic.i1288 -panic.i1287: ; preds = %__barray_check_bounds.exit1286 +panic.i1288: ; preds = %__barray_check_bounds.exit1287 tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable @@ -313,55 +313,55 @@ cond_565_case_0: ; preds = %cond_exit_565 %82 = or i64 %81, -1048576 store i64 %82, ptr %3, align 4 %83 = icmp eq i64 %82, -1 - br i1 %83, label %loop_out537, label %mask_block_err.i1292 + br i1 %83, label %loop_out538, label %mask_block_err.i1293 -mask_block_err.i1292: ; preds = %cond_565_case_0 +mask_block_err.i1293: ; preds = %cond_565_case_0 tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_check_bounds.exit1296: ; preds = %cond_exit_380, %cond_exit_565 - %"562_0.01331" = phi i64 [ %84, %cond_exit_565 ], [ 0, %cond_exit_380 ] - %84 = add nuw nsw i64 %"562_0.01331", 1 +__barray_check_bounds.exit1297: ; preds = %cond_exit_380, %cond_exit_565 + %"562_0.01332" = phi i64 [ %84, %cond_exit_565 ], [ 0, %cond_exit_380 ] + %84 = add nuw nsw i64 %"562_0.01332", 1 %85 = load i64, ptr %3, align 4 - %86 = lshr i64 %85, %"562_0.01331" + %86 = lshr i64 %85, %"562_0.01332" %87 = trunc i64 %86 to i1 - br i1 %87, label %cond_exit_565, label %__barray_mask_borrow.exit1300 + br i1 %87, label %cond_exit_565, label %__barray_mask_borrow.exit1301 -__barray_mask_borrow.exit1300: ; preds = %__barray_check_bounds.exit1296 - %88 = shl nuw nsw i64 1, %"562_0.01331" +__barray_mask_borrow.exit1301: ; preds = %__barray_check_bounds.exit1297 + %88 = shl nuw nsw i64 1, %"562_0.01332" %89 = xor i64 %85, %88 store i64 %89, ptr %3, align 4 - %90 = getelementptr inbounds nuw i64, ptr %2, i64 %"562_0.01331" + %90 = getelementptr inbounds nuw i64, ptr %2, i64 %"562_0.01332" %91 = load i64, ptr %90, align 4 tail call void @___dec_future_refcount(i64 %91) br label %cond_exit_565 -cond_exit_565: ; preds = %__barray_mask_borrow.exit1300, %__barray_check_bounds.exit1296 - %92 = icmp samesign ugt i64 %"562_0.01331", 18 - br i1 %92, label %cond_565_case_0, label %__barray_check_bounds.exit1296 +cond_exit_565: ; preds = %__barray_mask_borrow.exit1301, %__barray_check_bounds.exit1297 + %92 = icmp samesign ugt i64 %"562_0.01332", 18 + br i1 %92, label %cond_565_case_0, label %__barray_check_bounds.exit1297 -cond_exit_380: ; preds = %__barray_check_bounds.exit1286 +cond_exit_380: ; preds = %__barray_check_bounds.exit1287 %93 = xor i64 %78, %70 store i64 %93, ptr %1, align 4 - %94 = getelementptr inbounds nuw i1, ptr %0, i64 %"376_0.sroa.15.01324" + %94 = getelementptr inbounds nuw i1, ptr %0, i64 %"376_0.sroa.15.01325" store i1 %read_bool, ptr %94, align 1 - %95 = icmp eq i64 %"376_0.sroa.15.01324", 19 - br i1 %95, label %__barray_check_bounds.exit1296, label %__barray_check_bounds.exit1278 + %95 = icmp eq i64 %"376_0.sroa.15.01325", 19 + br i1 %95, label %__barray_check_bounds.exit1297, label %__barray_check_bounds.exit1279 -loop_out537: ; preds = %cond_565_case_0 +loop_out538: ; preds = %cond_565_case_0 tail call void @heap_free(ptr %2) tail call void @heap_free(ptr nonnull %3) %96 = load i64, ptr %1, align 4 %97 = and i64 %96, 1048575 store i64 %97, ptr %1, align 4 %98 = icmp eq i64 %97, 0 - br i1 %98, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1301 + br i1 %98, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1302 -mask_block_err.i1301: ; preds = %loop_out537 +mask_block_err.i1302: ; preds = %loop_out538 tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") unreachable -__barray_check_none_borrowed.exit: ; preds = %loop_out537 +__barray_check_none_borrowed.exit: ; preds = %loop_out538 %99 = tail call ptr @heap_alloc(i64 20) %100 = tail call ptr @heap_alloc(i64 8) store i64 0, ptr %100, align 1 @@ -371,13 +371,13 @@ __barray_check_none_borrowed.exit: ; preds = %loop_out537 %102 = and i64 %101, 1048575 store i64 %102, ptr %1, align 4 %103 = icmp eq i64 %102, 0 - br i1 %103, label %__barray_check_none_borrowed.exit1305, label %mask_block_err.i1303 + br i1 %103, label %__barray_check_none_borrowed.exit1306, label %mask_block_err.i1304 -mask_block_err.i1303: ; preds = %__barray_check_none_borrowed.exit +mask_block_err.i1304: ; preds = %__barray_check_none_borrowed.exit tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") unreachable -__barray_check_none_borrowed.exit1305: ; preds = %__barray_check_none_borrowed.exit +__barray_check_none_borrowed.exit1306: ; preds = %__barray_check_none_borrowed.exit %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 %y_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 4 %arr_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 8 @@ -400,7 +400,7 @@ declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immar ; Function Attrs: noreturn declare void @panic(i32, ptr) local_unnamed_addr #1 -declare i64 @___lazy_measure_leaked(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -416,8 +416,6 @@ declare void @print_bool(ptr, i64, i1) local_unnamed_addr declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr - declare i1 @___read_future_bool(i64) local_unnamed_addr ; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output/measurement_output-helios-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output/measurement_output-helios-aarch64-apple-darwin.ll index 631968f2..532c2638 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output/measurement_output-helios-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output/measurement_output-helios-aarch64-apple-darwin.ll @@ -52,10 +52,10 @@ cond_277_case_0.i387: ; preds = %__hugr__.__tk2_heli __hugr__.__tk2_helios_qalloc.273.exit388: ; preds = %__hugr__.__tk2_helios_qalloc.273.exit384 tail call void @___reset(i64 %qalloc.i385) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) br i1 %read_bool, label %1, label %0 0: ; preds = %__hugr__.__tk2_helios_qalloc.273.exit388 @@ -76,40 +76,40 @@ __hugr__.__tk2_helios_qalloc.273.exit388: ; preds = %__hugr__.__tk2_heli 2: ; preds = %0, %1 tail call void @___rz(i64 %qalloc.i381, double 0xBFF921FB54442D18) - %lazy_measure46 = tail call i64 @___lazy_measure(i64 %qalloc.i377) + %___lazy_measure46 = tail call i64 @___lazy_measure(i64 %qalloc.i377) tail call void @___qfree(i64 %qalloc.i377) - %read_bool48 = tail call i1 @___read_future_bool(i64 %lazy_measure46) - tail call void @___dec_future_refcount(i64 %lazy_measure46) + %read_bool48 = tail call i1 @___read_future_bool(i64 %___lazy_measure46) + tail call void @___dec_future_refcount(i64 %___lazy_measure46) br i1 %read_bool48, label %cond_exit_76, label %cond_exit_141 cond_exit_141: ; preds = %2 - %lazy_measure_leaked126 = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i381) + %___lazy_measure_leaked126 = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i381) tail call void @___qfree(i64 %qalloc.i381) - %read_uint133 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked126) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked126) + %read_uint133 = tail call i64 @___read_future_uint(i64 %___lazy_measure_leaked126) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked126) %.not.not = icmp eq i64 %read_uint133, 2 %3 = icmp eq i64 %read_uint133, 1 %"250_0.0" = zext i1 %3 to i64 %"255_0.0" = select i1 %.not.not, i64 2, i64 %"250_0.0" tail call void @print_int(ptr nonnull @res_q2.798C5BAD.0, i64 11, i64 %"255_0.0") - %lazy_measure273 = tail call i64 @___lazy_measure(i64 %qalloc.i385) + %___lazy_measure273 = tail call i64 @___lazy_measure(i64 %qalloc.i385) tail call void @___qfree(i64 %qalloc.i385) - %read_bool275 = tail call i1 @___read_future_bool(i64 %lazy_measure273) - tail call void @___dec_future_refcount(i64 %lazy_measure273) + %read_bool275 = tail call i1 @___read_future_bool(i64 %___lazy_measure273) + tail call void @___dec_future_refcount(i64 %___lazy_measure273) tail call void @print_bool(ptr nonnull @res_q3.C33BF3D1.0, i64 12, i1 %read_bool275) br label %5 cond_exit_76: ; preds = %2 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i385) + %___lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i385) tail call void @___qfree(i64 %qalloc.i385) - %lazy_measure60 = tail call i64 @___lazy_measure(i64 %qalloc.i381) + %___lazy_measure60 = tail call i64 @___lazy_measure(i64 %qalloc.i381) tail call void @___qfree(i64 %qalloc.i381) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + %read_uint = tail call i64 @___read_future_uint(i64 %___lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) %.not.not376 = icmp eq i64 %read_uint, 2 %4 = icmp eq i64 %read_uint, 1 - %read_bool117 = tail call i1 @___read_future_bool(i64 %lazy_measure60) - tail call void @___dec_future_refcount(i64 %lazy_measure60) + %read_bool117 = tail call i1 @___read_future_bool(i64 %___lazy_measure60) + tail call void @___dec_future_refcount(i64 %___lazy_measure60) tail call void @print_bool(ptr nonnull @res_q2.2A5B30FD.0, i64 12, i1 %read_bool117) %"205_0.0" = zext i1 %4 to i64 %"210_0.0" = select i1 %.not.not376, i64 2, i64 %"205_0.0" diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output/measurement_output-helios-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output/measurement_output-helios-aarch64-unknown-linux-gnu.ll index 5946fc4a..139d8e65 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output/measurement_output-helios-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output/measurement_output-helios-aarch64-unknown-linux-gnu.ll @@ -52,10 +52,10 @@ cond_277_case_0.i387: ; preds = %__hugr__.__tk2_heli __hugr__.__tk2_helios_qalloc.273.exit388: ; preds = %__hugr__.__tk2_helios_qalloc.273.exit384 tail call void @___reset(i64 %qalloc.i385) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) br i1 %read_bool, label %1, label %0 0: ; preds = %__hugr__.__tk2_helios_qalloc.273.exit388 @@ -76,40 +76,40 @@ __hugr__.__tk2_helios_qalloc.273.exit388: ; preds = %__hugr__.__tk2_heli 2: ; preds = %0, %1 tail call void @___rz(i64 %qalloc.i381, double 0xBFF921FB54442D18) - %lazy_measure46 = tail call i64 @___lazy_measure(i64 %qalloc.i377) + %___lazy_measure46 = tail call i64 @___lazy_measure(i64 %qalloc.i377) tail call void @___qfree(i64 %qalloc.i377) - %read_bool48 = tail call i1 @___read_future_bool(i64 %lazy_measure46) - tail call void @___dec_future_refcount(i64 %lazy_measure46) + %read_bool48 = tail call i1 @___read_future_bool(i64 %___lazy_measure46) + tail call void @___dec_future_refcount(i64 %___lazy_measure46) br i1 %read_bool48, label %cond_exit_76, label %cond_exit_141 cond_exit_141: ; preds = %2 - %lazy_measure_leaked126 = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i381) + %___lazy_measure_leaked126 = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i381) tail call void @___qfree(i64 %qalloc.i381) - %read_uint133 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked126) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked126) + %read_uint133 = tail call i64 @___read_future_uint(i64 %___lazy_measure_leaked126) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked126) %.not.not = icmp eq i64 %read_uint133, 2 %3 = icmp eq i64 %read_uint133, 1 %"250_0.0" = zext i1 %3 to i64 %"255_0.0" = select i1 %.not.not, i64 2, i64 %"250_0.0" tail call void @print_int(ptr nonnull @res_q2.798C5BAD.0, i64 11, i64 %"255_0.0") - %lazy_measure273 = tail call i64 @___lazy_measure(i64 %qalloc.i385) + %___lazy_measure273 = tail call i64 @___lazy_measure(i64 %qalloc.i385) tail call void @___qfree(i64 %qalloc.i385) - %read_bool275 = tail call i1 @___read_future_bool(i64 %lazy_measure273) - tail call void @___dec_future_refcount(i64 %lazy_measure273) + %read_bool275 = tail call i1 @___read_future_bool(i64 %___lazy_measure273) + tail call void @___dec_future_refcount(i64 %___lazy_measure273) tail call void @print_bool(ptr nonnull @res_q3.C33BF3D1.0, i64 12, i1 %read_bool275) br label %5 cond_exit_76: ; preds = %2 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i385) + %___lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i385) tail call void @___qfree(i64 %qalloc.i385) - %lazy_measure60 = tail call i64 @___lazy_measure(i64 %qalloc.i381) + %___lazy_measure60 = tail call i64 @___lazy_measure(i64 %qalloc.i381) tail call void @___qfree(i64 %qalloc.i381) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + %read_uint = tail call i64 @___read_future_uint(i64 %___lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) %.not.not376 = icmp eq i64 %read_uint, 2 %4 = icmp eq i64 %read_uint, 1 - %read_bool117 = tail call i1 @___read_future_bool(i64 %lazy_measure60) - tail call void @___dec_future_refcount(i64 %lazy_measure60) + %read_bool117 = tail call i1 @___read_future_bool(i64 %___lazy_measure60) + tail call void @___dec_future_refcount(i64 %___lazy_measure60) tail call void @print_bool(ptr nonnull @res_q2.2A5B30FD.0, i64 12, i1 %read_bool117) %"205_0.0" = zext i1 %4 to i64 %"210_0.0" = select i1 %.not.not376, i64 2, i64 %"205_0.0" diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output/measurement_output-helios-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output/measurement_output-helios-x86_64-apple-darwin.ll index 9fa91928..f54ad3fd 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output/measurement_output-helios-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output/measurement_output-helios-x86_64-apple-darwin.ll @@ -52,10 +52,10 @@ cond_277_case_0.i387: ; preds = %__hugr__.__tk2_heli __hugr__.__tk2_helios_qalloc.273.exit388: ; preds = %__hugr__.__tk2_helios_qalloc.273.exit384 tail call void @___reset(i64 %qalloc.i385) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) br i1 %read_bool, label %1, label %0 0: ; preds = %__hugr__.__tk2_helios_qalloc.273.exit388 @@ -76,40 +76,40 @@ __hugr__.__tk2_helios_qalloc.273.exit388: ; preds = %__hugr__.__tk2_heli 2: ; preds = %0, %1 tail call void @___rz(i64 %qalloc.i381, double 0xBFF921FB54442D18) - %lazy_measure46 = tail call i64 @___lazy_measure(i64 %qalloc.i377) + %___lazy_measure46 = tail call i64 @___lazy_measure(i64 %qalloc.i377) tail call void @___qfree(i64 %qalloc.i377) - %read_bool48 = tail call i1 @___read_future_bool(i64 %lazy_measure46) - tail call void @___dec_future_refcount(i64 %lazy_measure46) + %read_bool48 = tail call i1 @___read_future_bool(i64 %___lazy_measure46) + tail call void @___dec_future_refcount(i64 %___lazy_measure46) br i1 %read_bool48, label %cond_exit_76, label %cond_exit_141 cond_exit_141: ; preds = %2 - %lazy_measure_leaked126 = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i381) + %___lazy_measure_leaked126 = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i381) tail call void @___qfree(i64 %qalloc.i381) - %read_uint133 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked126) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked126) + %read_uint133 = tail call i64 @___read_future_uint(i64 %___lazy_measure_leaked126) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked126) %.not.not = icmp eq i64 %read_uint133, 2 %3 = icmp eq i64 %read_uint133, 1 %"250_0.0" = zext i1 %3 to i64 %"255_0.0" = select i1 %.not.not, i64 2, i64 %"250_0.0" tail call void @print_int(ptr nonnull @res_q2.798C5BAD.0, i64 11, i64 %"255_0.0") - %lazy_measure273 = tail call i64 @___lazy_measure(i64 %qalloc.i385) + %___lazy_measure273 = tail call i64 @___lazy_measure(i64 %qalloc.i385) tail call void @___qfree(i64 %qalloc.i385) - %read_bool275 = tail call i1 @___read_future_bool(i64 %lazy_measure273) - tail call void @___dec_future_refcount(i64 %lazy_measure273) + %read_bool275 = tail call i1 @___read_future_bool(i64 %___lazy_measure273) + tail call void @___dec_future_refcount(i64 %___lazy_measure273) tail call void @print_bool(ptr nonnull @res_q3.C33BF3D1.0, i64 12, i1 %read_bool275) br label %5 cond_exit_76: ; preds = %2 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i385) + %___lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i385) tail call void @___qfree(i64 %qalloc.i385) - %lazy_measure60 = tail call i64 @___lazy_measure(i64 %qalloc.i381) + %___lazy_measure60 = tail call i64 @___lazy_measure(i64 %qalloc.i381) tail call void @___qfree(i64 %qalloc.i381) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + %read_uint = tail call i64 @___read_future_uint(i64 %___lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) %.not.not376 = icmp eq i64 %read_uint, 2 %4 = icmp eq i64 %read_uint, 1 - %read_bool117 = tail call i1 @___read_future_bool(i64 %lazy_measure60) - tail call void @___dec_future_refcount(i64 %lazy_measure60) + %read_bool117 = tail call i1 @___read_future_bool(i64 %___lazy_measure60) + tail call void @___dec_future_refcount(i64 %___lazy_measure60) tail call void @print_bool(ptr nonnull @res_q2.2A5B30FD.0, i64 12, i1 %read_bool117) %"205_0.0" = zext i1 %4 to i64 %"210_0.0" = select i1 %.not.not376, i64 2, i64 %"205_0.0" diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output/measurement_output-helios-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output/measurement_output-helios-x86_64-unknown-linux-gnu.ll index 2ac0f83b..57ed3d0b 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output/measurement_output-helios-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output/measurement_output-helios-x86_64-unknown-linux-gnu.ll @@ -52,10 +52,10 @@ cond_277_case_0.i387: ; preds = %__hugr__.__tk2_heli __hugr__.__tk2_helios_qalloc.273.exit388: ; preds = %__hugr__.__tk2_helios_qalloc.273.exit384 tail call void @___reset(i64 %qalloc.i385) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) br i1 %read_bool, label %1, label %0 0: ; preds = %__hugr__.__tk2_helios_qalloc.273.exit388 @@ -76,40 +76,40 @@ __hugr__.__tk2_helios_qalloc.273.exit388: ; preds = %__hugr__.__tk2_heli 2: ; preds = %0, %1 tail call void @___rz(i64 %qalloc.i381, double 0xBFF921FB54442D18) - %lazy_measure46 = tail call i64 @___lazy_measure(i64 %qalloc.i377) + %___lazy_measure46 = tail call i64 @___lazy_measure(i64 %qalloc.i377) tail call void @___qfree(i64 %qalloc.i377) - %read_bool48 = tail call i1 @___read_future_bool(i64 %lazy_measure46) - tail call void @___dec_future_refcount(i64 %lazy_measure46) + %read_bool48 = tail call i1 @___read_future_bool(i64 %___lazy_measure46) + tail call void @___dec_future_refcount(i64 %___lazy_measure46) br i1 %read_bool48, label %cond_exit_76, label %cond_exit_141 cond_exit_141: ; preds = %2 - %lazy_measure_leaked126 = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i381) + %___lazy_measure_leaked126 = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i381) tail call void @___qfree(i64 %qalloc.i381) - %read_uint133 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked126) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked126) + %read_uint133 = tail call i64 @___read_future_uint(i64 %___lazy_measure_leaked126) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked126) %.not.not = icmp eq i64 %read_uint133, 2 %3 = icmp eq i64 %read_uint133, 1 %"250_0.0" = zext i1 %3 to i64 %"255_0.0" = select i1 %.not.not, i64 2, i64 %"250_0.0" tail call void @print_int(ptr nonnull @res_q2.798C5BAD.0, i64 11, i64 %"255_0.0") - %lazy_measure273 = tail call i64 @___lazy_measure(i64 %qalloc.i385) + %___lazy_measure273 = tail call i64 @___lazy_measure(i64 %qalloc.i385) tail call void @___qfree(i64 %qalloc.i385) - %read_bool275 = tail call i1 @___read_future_bool(i64 %lazy_measure273) - tail call void @___dec_future_refcount(i64 %lazy_measure273) + %read_bool275 = tail call i1 @___read_future_bool(i64 %___lazy_measure273) + tail call void @___dec_future_refcount(i64 %___lazy_measure273) tail call void @print_bool(ptr nonnull @res_q3.C33BF3D1.0, i64 12, i1 %read_bool275) br label %5 cond_exit_76: ; preds = %2 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i385) + %___lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i385) tail call void @___qfree(i64 %qalloc.i385) - %lazy_measure60 = tail call i64 @___lazy_measure(i64 %qalloc.i381) + %___lazy_measure60 = tail call i64 @___lazy_measure(i64 %qalloc.i381) tail call void @___qfree(i64 %qalloc.i381) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + %read_uint = tail call i64 @___read_future_uint(i64 %___lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) %.not.not376 = icmp eq i64 %read_uint, 2 %4 = icmp eq i64 %read_uint, 1 - %read_bool117 = tail call i1 @___read_future_bool(i64 %lazy_measure60) - tail call void @___dec_future_refcount(i64 %lazy_measure60) + %read_bool117 = tail call i1 @___read_future_bool(i64 %___lazy_measure60) + tail call void @___dec_future_refcount(i64 %___lazy_measure60) tail call void @print_bool(ptr nonnull @res_q2.2A5B30FD.0, i64 12, i1 %read_bool117) %"205_0.0" = zext i1 %4 to i64 %"210_0.0" = select i1 %.not.not376, i64 2, i64 %"205_0.0" diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output/measurement_output-helios-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output/measurement_output-helios-x86_64-windows-gnu.ll index 47211776..776f23c7 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output/measurement_output-helios-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output/measurement_output-helios-x86_64-windows-gnu.ll @@ -52,10 +52,10 @@ cond_277_case_0.i387: ; preds = %__hugr__.__tk2_heli __hugr__.__tk2_helios_qalloc.273.exit388: ; preds = %__hugr__.__tk2_helios_qalloc.273.exit384 tail call void @___reset(i64 %qalloc.i385) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) br i1 %read_bool, label %1, label %0 0: ; preds = %__hugr__.__tk2_helios_qalloc.273.exit388 @@ -76,40 +76,40 @@ __hugr__.__tk2_helios_qalloc.273.exit388: ; preds = %__hugr__.__tk2_heli 2: ; preds = %0, %1 tail call void @___rz(i64 %qalloc.i381, double 0xBFF921FB54442D18) - %lazy_measure46 = tail call i64 @___lazy_measure(i64 %qalloc.i377) + %___lazy_measure46 = tail call i64 @___lazy_measure(i64 %qalloc.i377) tail call void @___qfree(i64 %qalloc.i377) - %read_bool48 = tail call i1 @___read_future_bool(i64 %lazy_measure46) - tail call void @___dec_future_refcount(i64 %lazy_measure46) + %read_bool48 = tail call i1 @___read_future_bool(i64 %___lazy_measure46) + tail call void @___dec_future_refcount(i64 %___lazy_measure46) br i1 %read_bool48, label %cond_exit_76, label %cond_exit_141 cond_exit_141: ; preds = %2 - %lazy_measure_leaked126 = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i381) + %___lazy_measure_leaked126 = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i381) tail call void @___qfree(i64 %qalloc.i381) - %read_uint133 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked126) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked126) + %read_uint133 = tail call i64 @___read_future_uint(i64 %___lazy_measure_leaked126) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked126) %.not.not = icmp eq i64 %read_uint133, 2 %3 = icmp eq i64 %read_uint133, 1 %"250_0.0" = zext i1 %3 to i64 %"255_0.0" = select i1 %.not.not, i64 2, i64 %"250_0.0" tail call void @print_int(ptr nonnull @res_q2.798C5BAD.0, i64 11, i64 %"255_0.0") - %lazy_measure273 = tail call i64 @___lazy_measure(i64 %qalloc.i385) + %___lazy_measure273 = tail call i64 @___lazy_measure(i64 %qalloc.i385) tail call void @___qfree(i64 %qalloc.i385) - %read_bool275 = tail call i1 @___read_future_bool(i64 %lazy_measure273) - tail call void @___dec_future_refcount(i64 %lazy_measure273) + %read_bool275 = tail call i1 @___read_future_bool(i64 %___lazy_measure273) + tail call void @___dec_future_refcount(i64 %___lazy_measure273) tail call void @print_bool(ptr nonnull @res_q3.C33BF3D1.0, i64 12, i1 %read_bool275) br label %5 cond_exit_76: ; preds = %2 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i385) + %___lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i385) tail call void @___qfree(i64 %qalloc.i385) - %lazy_measure60 = tail call i64 @___lazy_measure(i64 %qalloc.i381) + %___lazy_measure60 = tail call i64 @___lazy_measure(i64 %qalloc.i381) tail call void @___qfree(i64 %qalloc.i381) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + %read_uint = tail call i64 @___read_future_uint(i64 %___lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) %.not.not376 = icmp eq i64 %read_uint, 2 %4 = icmp eq i64 %read_uint, 1 - %read_bool117 = tail call i1 @___read_future_bool(i64 %lazy_measure60) - tail call void @___dec_future_refcount(i64 %lazy_measure60) + %read_bool117 = tail call i1 @___read_future_bool(i64 %___lazy_measure60) + tail call void @___dec_future_refcount(i64 %___lazy_measure60) tail call void @print_bool(ptr nonnull @res_q2.2A5B30FD.0, i64 12, i1 %read_bool117) %"205_0.0" = zext i1 %4 to i64 %"210_0.0" = select i1 %.not.not376, i64 2, i64 %"205_0.0" diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output/measurement_output-sol-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output/measurement_output-sol-aarch64-apple-darwin.ll index dc8d9145..eecc54f0 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output/measurement_output-sol-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output/measurement_output-sol-aarch64-apple-darwin.ll @@ -22,101 +22,101 @@ cond_277_case_0.i: ; preds = %alloca_block __hugr__.__tk2_sol_qalloc.273.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i, double 0x400921FB54442D18, double 0.000000e+00) - %qalloc.i377 = tail call i64 @___qalloc() - %not_max.not.not.i378 = icmp eq i64 %qalloc.i377, -1 - br i1 %not_max.not.not.i378, label %cond_277_case_0.i379, label %__hugr__.__tk2_sol_qalloc.273.exit380 + %qalloc.i378 = tail call i64 @___qalloc() + %not_max.not.not.i379 = icmp eq i64 %qalloc.i378, -1 + br i1 %not_max.not.not.i379, label %cond_277_case_0.i380, label %__hugr__.__tk2_sol_qalloc.273.exit381 -cond_277_case_0.i379: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit +cond_277_case_0.i380: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_sol_qalloc.273.exit380: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit - tail call void @___reset(i64 %qalloc.i377) - %qalloc.i381 = tail call i64 @___qalloc() - %not_max.not.not.i382 = icmp eq i64 %qalloc.i381, -1 - br i1 %not_max.not.not.i382, label %cond_277_case_0.i383, label %__hugr__.__tk2_sol_qalloc.273.exit384 +__hugr__.__tk2_sol_qalloc.273.exit381: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit + tail call void @___reset(i64 %qalloc.i378) + %qalloc.i382 = tail call i64 @___qalloc() + %not_max.not.not.i383 = icmp eq i64 %qalloc.i382, -1 + br i1 %not_max.not.not.i383, label %cond_277_case_0.i384, label %__hugr__.__tk2_sol_qalloc.273.exit385 -cond_277_case_0.i383: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit380 +cond_277_case_0.i384: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit381 tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_sol_qalloc.273.exit384: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit380 - tail call void @___reset(i64 %qalloc.i381) - %qalloc.i385 = tail call i64 @___qalloc() - %not_max.not.not.i386 = icmp eq i64 %qalloc.i385, -1 - br i1 %not_max.not.not.i386, label %cond_277_case_0.i387, label %__hugr__.__tk2_sol_qalloc.273.exit388 +__hugr__.__tk2_sol_qalloc.273.exit385: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit381 + tail call void @___reset(i64 %qalloc.i382) + %qalloc.i386 = tail call i64 @___qalloc() + %not_max.not.not.i387 = icmp eq i64 %qalloc.i386, -1 + br i1 %not_max.not.not.i387, label %cond_277_case_0.i388, label %__hugr__.__tk2_sol_qalloc.273.exit389 -cond_277_case_0.i387: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit384 +cond_277_case_0.i388: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit385 tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_sol_qalloc.273.exit388: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit384 - tail call void @___reset(i64 %qalloc.i385) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) +__hugr__.__tk2_sol_qalloc.273.exit389: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit385 + tail call void @___reset(i64 %qalloc.i386) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) br i1 %read_bool, label %1, label %0 -0: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit388 - tail call void @___rp(i64 %qalloc.i385, double 0x400921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %qalloc.i377, double 0x400921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rp(i64 %qalloc.i381, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rp(i64 %qalloc.i377, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rpp(i64 %qalloc.i377, i64 %qalloc.i381, double 0x3FF921FB54442D18, double 0xC00921FB54442D18) - tail call void @___rp(i64 %qalloc.i381, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %qalloc.i381, double 0xBFF921FB54442D18) +0: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit389 + tail call void @___rp(i64 %qalloc.i386, double 0x400921FB54442D18, double 0.000000e+00) + tail call void @___rp(i64 %qalloc.i378, double 0x400921FB54442D18, double 0x3FF921FB54442D18) + tail call void @___rp(i64 %qalloc.i382, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) + tail call void @___rp(i64 %qalloc.i378, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) + tail call void @___rpp(i64 %qalloc.i378, i64 %qalloc.i382, double 0x3FF921FB54442D18, double 0xC00921FB54442D18) + tail call void @___rp(i64 %qalloc.i382, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) + tail call void @___rz(i64 %qalloc.i382, double 0xBFF921FB54442D18) br label %2 -1: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit388 - tail call void @___rz(i64 %qalloc.i385, double 0x400921FB54442D18) - tail call void @___rp(i64 %qalloc.i377, double 0x400921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %qalloc.i377, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rpp(i64 %qalloc.i377, i64 %qalloc.i381, double 0x3FF921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %qalloc.i381, double 0xBFF921FB54442D18, double 0.000000e+00) +1: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit389 + tail call void @___rz(i64 %qalloc.i386, double 0x400921FB54442D18) + tail call void @___rp(i64 %qalloc.i378, double 0x400921FB54442D18, double 0.000000e+00) + tail call void @___rp(i64 %qalloc.i378, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) + tail call void @___rpp(i64 %qalloc.i378, i64 %qalloc.i382, double 0x3FF921FB54442D18, double 0.000000e+00) + tail call void @___rp(i64 %qalloc.i382, double 0xBFF921FB54442D18, double 0.000000e+00) br label %2 2: ; preds = %0, %1 %.sink = phi double [ 0x3FF921FB54442D18, %0 ], [ 0xBFF921FB54442D18, %1 ] - tail call void @___rp(i64 %qalloc.i377, double %.sink, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %qalloc.i377, double 0xBFF921FB54442D18) - %lazy_measure46 = tail call i64 @___lazy_measure(i64 %qalloc.i377) - tail call void @___qfree(i64 %qalloc.i377) - %read_bool48 = tail call i1 @___read_future_bool(i64 %lazy_measure46) - tail call void @___dec_future_refcount(i64 %lazy_measure46) + tail call void @___rp(i64 %qalloc.i378, double %.sink, double 0x3FF921FB54442D18) + tail call void @___rz(i64 %qalloc.i378, double 0xBFF921FB54442D18) + %___future_measure46 = tail call i64 @___future_measure(i64 %qalloc.i378, i64 0) + tail call void @___qfree(i64 %qalloc.i378) + %read_bool48 = tail call i1 @___read_future_bool(i64 %___future_measure46) + tail call void @___dec_future_refcount(i64 %___future_measure46) br i1 %read_bool48, label %cond_exit_76, label %cond_exit_141 cond_exit_141: ; preds = %2 - %lazy_measure_leaked126 = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i381) - tail call void @___qfree(i64 %qalloc.i381) - %read_uint133 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked126) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked126) - %.not.not = icmp eq i64 %read_uint133, 2 - %3 = icmp eq i64 %read_uint133, 1 + %___future_measure127 = tail call i64 @___future_measure(i64 %qalloc.i382, i64 1) + tail call void @___qfree(i64 %qalloc.i382) + %read_uint134 = tail call i64 @___read_future_uint(i64 %___future_measure127) + tail call void @___dec_future_refcount(i64 %___future_measure127) + %.not.not = icmp eq i64 %read_uint134, 2 + %3 = icmp eq i64 %read_uint134, 1 %"250_0.0" = zext i1 %3 to i64 %"255_0.0" = select i1 %.not.not, i64 2, i64 %"250_0.0" tail call void @print_int(ptr nonnull @res_q2.798C5BAD.0, i64 11, i64 %"255_0.0") - %lazy_measure273 = tail call i64 @___lazy_measure(i64 %qalloc.i385) - tail call void @___qfree(i64 %qalloc.i385) - %read_bool275 = tail call i1 @___read_future_bool(i64 %lazy_measure273) - tail call void @___dec_future_refcount(i64 %lazy_measure273) - tail call void @print_bool(ptr nonnull @res_q3.C33BF3D1.0, i64 12, i1 %read_bool275) + %___future_measure274 = tail call i64 @___future_measure(i64 %qalloc.i386, i64 0) + tail call void @___qfree(i64 %qalloc.i386) + %read_bool276 = tail call i1 @___read_future_bool(i64 %___future_measure274) + tail call void @___dec_future_refcount(i64 %___future_measure274) + tail call void @print_bool(ptr nonnull @res_q3.C33BF3D1.0, i64 12, i1 %read_bool276) br label %5 cond_exit_76: ; preds = %2 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i385) - tail call void @___qfree(i64 %qalloc.i385) - %lazy_measure60 = tail call i64 @___lazy_measure(i64 %qalloc.i381) - tail call void @___qfree(i64 %qalloc.i381) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - %.not.not376 = icmp eq i64 %read_uint, 2 + %___future_measure59 = tail call i64 @___future_measure(i64 %qalloc.i386, i64 1) + tail call void @___qfree(i64 %qalloc.i386) + %___future_measure61 = tail call i64 @___future_measure(i64 %qalloc.i382, i64 0) + tail call void @___qfree(i64 %qalloc.i382) + %read_uint = tail call i64 @___read_future_uint(i64 %___future_measure59) + tail call void @___dec_future_refcount(i64 %___future_measure59) + %.not.not377 = icmp eq i64 %read_uint, 2 %4 = icmp eq i64 %read_uint, 1 - %read_bool117 = tail call i1 @___read_future_bool(i64 %lazy_measure60) - tail call void @___dec_future_refcount(i64 %lazy_measure60) - tail call void @print_bool(ptr nonnull @res_q2.2A5B30FD.0, i64 12, i1 %read_bool117) + %read_bool118 = tail call i1 @___read_future_bool(i64 %___future_measure61) + tail call void @___dec_future_refcount(i64 %___future_measure61) + tail call void @print_bool(ptr nonnull @res_q2.2A5B30FD.0, i64 12, i1 %read_bool118) %"205_0.0" = zext i1 %4 to i64 - %"210_0.0" = select i1 %.not.not376, i64 2, i64 %"205_0.0" + %"210_0.0" = select i1 %.not.not377, i64 2, i64 %"205_0.0" tail call void @print_int(ptr nonnull @res_q3.D71179D6.0, i64 11, i64 %"210_0.0") br label %5 @@ -124,7 +124,7 @@ cond_exit_76: ; preds = %2 ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -132,8 +132,6 @@ declare i1 @___read_future_bool(i64) local_unnamed_addr declare void @___dec_future_refcount(i64) local_unnamed_addr -declare i64 @___lazy_measure_leaked(i64) local_unnamed_addr - declare i64 @___read_future_uint(i64) local_unnamed_addr declare void @print_bool(ptr, i64, i1) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output/measurement_output-sol-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output/measurement_output-sol-aarch64-unknown-linux-gnu.ll index d32ac253..ab1e250a 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output/measurement_output-sol-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output/measurement_output-sol-aarch64-unknown-linux-gnu.ll @@ -22,101 +22,101 @@ cond_277_case_0.i: ; preds = %alloca_block __hugr__.__tk2_sol_qalloc.273.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i, double 0x400921FB54442D18, double 0.000000e+00) - %qalloc.i377 = tail call i64 @___qalloc() - %not_max.not.not.i378 = icmp eq i64 %qalloc.i377, -1 - br i1 %not_max.not.not.i378, label %cond_277_case_0.i379, label %__hugr__.__tk2_sol_qalloc.273.exit380 + %qalloc.i378 = tail call i64 @___qalloc() + %not_max.not.not.i379 = icmp eq i64 %qalloc.i378, -1 + br i1 %not_max.not.not.i379, label %cond_277_case_0.i380, label %__hugr__.__tk2_sol_qalloc.273.exit381 -cond_277_case_0.i379: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit +cond_277_case_0.i380: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_sol_qalloc.273.exit380: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit - tail call void @___reset(i64 %qalloc.i377) - %qalloc.i381 = tail call i64 @___qalloc() - %not_max.not.not.i382 = icmp eq i64 %qalloc.i381, -1 - br i1 %not_max.not.not.i382, label %cond_277_case_0.i383, label %__hugr__.__tk2_sol_qalloc.273.exit384 +__hugr__.__tk2_sol_qalloc.273.exit381: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit + tail call void @___reset(i64 %qalloc.i378) + %qalloc.i382 = tail call i64 @___qalloc() + %not_max.not.not.i383 = icmp eq i64 %qalloc.i382, -1 + br i1 %not_max.not.not.i383, label %cond_277_case_0.i384, label %__hugr__.__tk2_sol_qalloc.273.exit385 -cond_277_case_0.i383: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit380 +cond_277_case_0.i384: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit381 tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_sol_qalloc.273.exit384: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit380 - tail call void @___reset(i64 %qalloc.i381) - %qalloc.i385 = tail call i64 @___qalloc() - %not_max.not.not.i386 = icmp eq i64 %qalloc.i385, -1 - br i1 %not_max.not.not.i386, label %cond_277_case_0.i387, label %__hugr__.__tk2_sol_qalloc.273.exit388 +__hugr__.__tk2_sol_qalloc.273.exit385: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit381 + tail call void @___reset(i64 %qalloc.i382) + %qalloc.i386 = tail call i64 @___qalloc() + %not_max.not.not.i387 = icmp eq i64 %qalloc.i386, -1 + br i1 %not_max.not.not.i387, label %cond_277_case_0.i388, label %__hugr__.__tk2_sol_qalloc.273.exit389 -cond_277_case_0.i387: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit384 +cond_277_case_0.i388: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit385 tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_sol_qalloc.273.exit388: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit384 - tail call void @___reset(i64 %qalloc.i385) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) +__hugr__.__tk2_sol_qalloc.273.exit389: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit385 + tail call void @___reset(i64 %qalloc.i386) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) br i1 %read_bool, label %1, label %0 -0: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit388 - tail call void @___rp(i64 %qalloc.i385, double 0x400921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %qalloc.i377, double 0x400921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rp(i64 %qalloc.i381, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rp(i64 %qalloc.i377, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rpp(i64 %qalloc.i377, i64 %qalloc.i381, double 0x3FF921FB54442D18, double 0xC00921FB54442D18) - tail call void @___rp(i64 %qalloc.i381, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %qalloc.i381, double 0xBFF921FB54442D18) +0: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit389 + tail call void @___rp(i64 %qalloc.i386, double 0x400921FB54442D18, double 0.000000e+00) + tail call void @___rp(i64 %qalloc.i378, double 0x400921FB54442D18, double 0x3FF921FB54442D18) + tail call void @___rp(i64 %qalloc.i382, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) + tail call void @___rp(i64 %qalloc.i378, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) + tail call void @___rpp(i64 %qalloc.i378, i64 %qalloc.i382, double 0x3FF921FB54442D18, double 0xC00921FB54442D18) + tail call void @___rp(i64 %qalloc.i382, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) + tail call void @___rz(i64 %qalloc.i382, double 0xBFF921FB54442D18) br label %2 -1: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit388 - tail call void @___rz(i64 %qalloc.i385, double 0x400921FB54442D18) - tail call void @___rp(i64 %qalloc.i377, double 0x400921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %qalloc.i377, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rpp(i64 %qalloc.i377, i64 %qalloc.i381, double 0x3FF921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %qalloc.i381, double 0xBFF921FB54442D18, double 0.000000e+00) +1: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit389 + tail call void @___rz(i64 %qalloc.i386, double 0x400921FB54442D18) + tail call void @___rp(i64 %qalloc.i378, double 0x400921FB54442D18, double 0.000000e+00) + tail call void @___rp(i64 %qalloc.i378, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) + tail call void @___rpp(i64 %qalloc.i378, i64 %qalloc.i382, double 0x3FF921FB54442D18, double 0.000000e+00) + tail call void @___rp(i64 %qalloc.i382, double 0xBFF921FB54442D18, double 0.000000e+00) br label %2 2: ; preds = %0, %1 %.sink = phi double [ 0x3FF921FB54442D18, %0 ], [ 0xBFF921FB54442D18, %1 ] - tail call void @___rp(i64 %qalloc.i377, double %.sink, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %qalloc.i377, double 0xBFF921FB54442D18) - %lazy_measure46 = tail call i64 @___lazy_measure(i64 %qalloc.i377) - tail call void @___qfree(i64 %qalloc.i377) - %read_bool48 = tail call i1 @___read_future_bool(i64 %lazy_measure46) - tail call void @___dec_future_refcount(i64 %lazy_measure46) + tail call void @___rp(i64 %qalloc.i378, double %.sink, double 0x3FF921FB54442D18) + tail call void @___rz(i64 %qalloc.i378, double 0xBFF921FB54442D18) + %___future_measure46 = tail call i64 @___future_measure(i64 %qalloc.i378, i64 0) + tail call void @___qfree(i64 %qalloc.i378) + %read_bool48 = tail call i1 @___read_future_bool(i64 %___future_measure46) + tail call void @___dec_future_refcount(i64 %___future_measure46) br i1 %read_bool48, label %cond_exit_76, label %cond_exit_141 cond_exit_141: ; preds = %2 - %lazy_measure_leaked126 = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i381) - tail call void @___qfree(i64 %qalloc.i381) - %read_uint133 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked126) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked126) - %.not.not = icmp eq i64 %read_uint133, 2 - %3 = icmp eq i64 %read_uint133, 1 + %___future_measure127 = tail call i64 @___future_measure(i64 %qalloc.i382, i64 1) + tail call void @___qfree(i64 %qalloc.i382) + %read_uint134 = tail call i64 @___read_future_uint(i64 %___future_measure127) + tail call void @___dec_future_refcount(i64 %___future_measure127) + %.not.not = icmp eq i64 %read_uint134, 2 + %3 = icmp eq i64 %read_uint134, 1 %"250_0.0" = zext i1 %3 to i64 %"255_0.0" = select i1 %.not.not, i64 2, i64 %"250_0.0" tail call void @print_int(ptr nonnull @res_q2.798C5BAD.0, i64 11, i64 %"255_0.0") - %lazy_measure273 = tail call i64 @___lazy_measure(i64 %qalloc.i385) - tail call void @___qfree(i64 %qalloc.i385) - %read_bool275 = tail call i1 @___read_future_bool(i64 %lazy_measure273) - tail call void @___dec_future_refcount(i64 %lazy_measure273) - tail call void @print_bool(ptr nonnull @res_q3.C33BF3D1.0, i64 12, i1 %read_bool275) + %___future_measure274 = tail call i64 @___future_measure(i64 %qalloc.i386, i64 0) + tail call void @___qfree(i64 %qalloc.i386) + %read_bool276 = tail call i1 @___read_future_bool(i64 %___future_measure274) + tail call void @___dec_future_refcount(i64 %___future_measure274) + tail call void @print_bool(ptr nonnull @res_q3.C33BF3D1.0, i64 12, i1 %read_bool276) br label %5 cond_exit_76: ; preds = %2 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i385) - tail call void @___qfree(i64 %qalloc.i385) - %lazy_measure60 = tail call i64 @___lazy_measure(i64 %qalloc.i381) - tail call void @___qfree(i64 %qalloc.i381) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - %.not.not376 = icmp eq i64 %read_uint, 2 + %___future_measure59 = tail call i64 @___future_measure(i64 %qalloc.i386, i64 1) + tail call void @___qfree(i64 %qalloc.i386) + %___future_measure61 = tail call i64 @___future_measure(i64 %qalloc.i382, i64 0) + tail call void @___qfree(i64 %qalloc.i382) + %read_uint = tail call i64 @___read_future_uint(i64 %___future_measure59) + tail call void @___dec_future_refcount(i64 %___future_measure59) + %.not.not377 = icmp eq i64 %read_uint, 2 %4 = icmp eq i64 %read_uint, 1 - %read_bool117 = tail call i1 @___read_future_bool(i64 %lazy_measure60) - tail call void @___dec_future_refcount(i64 %lazy_measure60) - tail call void @print_bool(ptr nonnull @res_q2.2A5B30FD.0, i64 12, i1 %read_bool117) + %read_bool118 = tail call i1 @___read_future_bool(i64 %___future_measure61) + tail call void @___dec_future_refcount(i64 %___future_measure61) + tail call void @print_bool(ptr nonnull @res_q2.2A5B30FD.0, i64 12, i1 %read_bool118) %"205_0.0" = zext i1 %4 to i64 - %"210_0.0" = select i1 %.not.not376, i64 2, i64 %"205_0.0" + %"210_0.0" = select i1 %.not.not377, i64 2, i64 %"205_0.0" tail call void @print_int(ptr nonnull @res_q3.D71179D6.0, i64 11, i64 %"210_0.0") br label %5 @@ -124,7 +124,7 @@ cond_exit_76: ; preds = %2 ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -132,8 +132,6 @@ declare i1 @___read_future_bool(i64) local_unnamed_addr declare void @___dec_future_refcount(i64) local_unnamed_addr -declare i64 @___lazy_measure_leaked(i64) local_unnamed_addr - declare i64 @___read_future_uint(i64) local_unnamed_addr declare void @print_bool(ptr, i64, i1) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output/measurement_output-sol-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output/measurement_output-sol-x86_64-apple-darwin.ll index 4a13ea6a..7daf58f3 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output/measurement_output-sol-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output/measurement_output-sol-x86_64-apple-darwin.ll @@ -22,101 +22,101 @@ cond_277_case_0.i: ; preds = %alloca_block __hugr__.__tk2_sol_qalloc.273.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i, double 0x400921FB54442D18, double 0.000000e+00) - %qalloc.i377 = tail call i64 @___qalloc() - %not_max.not.not.i378 = icmp eq i64 %qalloc.i377, -1 - br i1 %not_max.not.not.i378, label %cond_277_case_0.i379, label %__hugr__.__tk2_sol_qalloc.273.exit380 + %qalloc.i378 = tail call i64 @___qalloc() + %not_max.not.not.i379 = icmp eq i64 %qalloc.i378, -1 + br i1 %not_max.not.not.i379, label %cond_277_case_0.i380, label %__hugr__.__tk2_sol_qalloc.273.exit381 -cond_277_case_0.i379: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit +cond_277_case_0.i380: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_sol_qalloc.273.exit380: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit - tail call void @___reset(i64 %qalloc.i377) - %qalloc.i381 = tail call i64 @___qalloc() - %not_max.not.not.i382 = icmp eq i64 %qalloc.i381, -1 - br i1 %not_max.not.not.i382, label %cond_277_case_0.i383, label %__hugr__.__tk2_sol_qalloc.273.exit384 +__hugr__.__tk2_sol_qalloc.273.exit381: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit + tail call void @___reset(i64 %qalloc.i378) + %qalloc.i382 = tail call i64 @___qalloc() + %not_max.not.not.i383 = icmp eq i64 %qalloc.i382, -1 + br i1 %not_max.not.not.i383, label %cond_277_case_0.i384, label %__hugr__.__tk2_sol_qalloc.273.exit385 -cond_277_case_0.i383: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit380 +cond_277_case_0.i384: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit381 tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_sol_qalloc.273.exit384: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit380 - tail call void @___reset(i64 %qalloc.i381) - %qalloc.i385 = tail call i64 @___qalloc() - %not_max.not.not.i386 = icmp eq i64 %qalloc.i385, -1 - br i1 %not_max.not.not.i386, label %cond_277_case_0.i387, label %__hugr__.__tk2_sol_qalloc.273.exit388 +__hugr__.__tk2_sol_qalloc.273.exit385: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit381 + tail call void @___reset(i64 %qalloc.i382) + %qalloc.i386 = tail call i64 @___qalloc() + %not_max.not.not.i387 = icmp eq i64 %qalloc.i386, -1 + br i1 %not_max.not.not.i387, label %cond_277_case_0.i388, label %__hugr__.__tk2_sol_qalloc.273.exit389 -cond_277_case_0.i387: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit384 +cond_277_case_0.i388: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit385 tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_sol_qalloc.273.exit388: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit384 - tail call void @___reset(i64 %qalloc.i385) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) +__hugr__.__tk2_sol_qalloc.273.exit389: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit385 + tail call void @___reset(i64 %qalloc.i386) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) br i1 %read_bool, label %1, label %0 -0: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit388 - tail call void @___rp(i64 %qalloc.i385, double 0x400921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %qalloc.i377, double 0x400921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rp(i64 %qalloc.i381, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rp(i64 %qalloc.i377, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rpp(i64 %qalloc.i377, i64 %qalloc.i381, double 0x3FF921FB54442D18, double 0xC00921FB54442D18) - tail call void @___rp(i64 %qalloc.i381, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %qalloc.i381, double 0xBFF921FB54442D18) +0: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit389 + tail call void @___rp(i64 %qalloc.i386, double 0x400921FB54442D18, double 0.000000e+00) + tail call void @___rp(i64 %qalloc.i378, double 0x400921FB54442D18, double 0x3FF921FB54442D18) + tail call void @___rp(i64 %qalloc.i382, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) + tail call void @___rp(i64 %qalloc.i378, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) + tail call void @___rpp(i64 %qalloc.i378, i64 %qalloc.i382, double 0x3FF921FB54442D18, double 0xC00921FB54442D18) + tail call void @___rp(i64 %qalloc.i382, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) + tail call void @___rz(i64 %qalloc.i382, double 0xBFF921FB54442D18) br label %2 -1: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit388 - tail call void @___rz(i64 %qalloc.i385, double 0x400921FB54442D18) - tail call void @___rp(i64 %qalloc.i377, double 0x400921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %qalloc.i377, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rpp(i64 %qalloc.i377, i64 %qalloc.i381, double 0x3FF921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %qalloc.i381, double 0xBFF921FB54442D18, double 0.000000e+00) +1: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit389 + tail call void @___rz(i64 %qalloc.i386, double 0x400921FB54442D18) + tail call void @___rp(i64 %qalloc.i378, double 0x400921FB54442D18, double 0.000000e+00) + tail call void @___rp(i64 %qalloc.i378, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) + tail call void @___rpp(i64 %qalloc.i378, i64 %qalloc.i382, double 0x3FF921FB54442D18, double 0.000000e+00) + tail call void @___rp(i64 %qalloc.i382, double 0xBFF921FB54442D18, double 0.000000e+00) br label %2 2: ; preds = %0, %1 %.sink = phi double [ 0x3FF921FB54442D18, %0 ], [ 0xBFF921FB54442D18, %1 ] - tail call void @___rp(i64 %qalloc.i377, double %.sink, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %qalloc.i377, double 0xBFF921FB54442D18) - %lazy_measure46 = tail call i64 @___lazy_measure(i64 %qalloc.i377) - tail call void @___qfree(i64 %qalloc.i377) - %read_bool48 = tail call i1 @___read_future_bool(i64 %lazy_measure46) - tail call void @___dec_future_refcount(i64 %lazy_measure46) + tail call void @___rp(i64 %qalloc.i378, double %.sink, double 0x3FF921FB54442D18) + tail call void @___rz(i64 %qalloc.i378, double 0xBFF921FB54442D18) + %___future_measure46 = tail call i64 @___future_measure(i64 %qalloc.i378, i64 0) + tail call void @___qfree(i64 %qalloc.i378) + %read_bool48 = tail call i1 @___read_future_bool(i64 %___future_measure46) + tail call void @___dec_future_refcount(i64 %___future_measure46) br i1 %read_bool48, label %cond_exit_76, label %cond_exit_141 cond_exit_141: ; preds = %2 - %lazy_measure_leaked126 = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i381) - tail call void @___qfree(i64 %qalloc.i381) - %read_uint133 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked126) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked126) - %.not.not = icmp eq i64 %read_uint133, 2 - %3 = icmp eq i64 %read_uint133, 1 + %___future_measure127 = tail call i64 @___future_measure(i64 %qalloc.i382, i64 1) + tail call void @___qfree(i64 %qalloc.i382) + %read_uint134 = tail call i64 @___read_future_uint(i64 %___future_measure127) + tail call void @___dec_future_refcount(i64 %___future_measure127) + %.not.not = icmp eq i64 %read_uint134, 2 + %3 = icmp eq i64 %read_uint134, 1 %"250_0.0" = zext i1 %3 to i64 %"255_0.0" = select i1 %.not.not, i64 2, i64 %"250_0.0" tail call void @print_int(ptr nonnull @res_q2.798C5BAD.0, i64 11, i64 %"255_0.0") - %lazy_measure273 = tail call i64 @___lazy_measure(i64 %qalloc.i385) - tail call void @___qfree(i64 %qalloc.i385) - %read_bool275 = tail call i1 @___read_future_bool(i64 %lazy_measure273) - tail call void @___dec_future_refcount(i64 %lazy_measure273) - tail call void @print_bool(ptr nonnull @res_q3.C33BF3D1.0, i64 12, i1 %read_bool275) + %___future_measure274 = tail call i64 @___future_measure(i64 %qalloc.i386, i64 0) + tail call void @___qfree(i64 %qalloc.i386) + %read_bool276 = tail call i1 @___read_future_bool(i64 %___future_measure274) + tail call void @___dec_future_refcount(i64 %___future_measure274) + tail call void @print_bool(ptr nonnull @res_q3.C33BF3D1.0, i64 12, i1 %read_bool276) br label %5 cond_exit_76: ; preds = %2 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i385) - tail call void @___qfree(i64 %qalloc.i385) - %lazy_measure60 = tail call i64 @___lazy_measure(i64 %qalloc.i381) - tail call void @___qfree(i64 %qalloc.i381) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - %.not.not376 = icmp eq i64 %read_uint, 2 + %___future_measure59 = tail call i64 @___future_measure(i64 %qalloc.i386, i64 1) + tail call void @___qfree(i64 %qalloc.i386) + %___future_measure61 = tail call i64 @___future_measure(i64 %qalloc.i382, i64 0) + tail call void @___qfree(i64 %qalloc.i382) + %read_uint = tail call i64 @___read_future_uint(i64 %___future_measure59) + tail call void @___dec_future_refcount(i64 %___future_measure59) + %.not.not377 = icmp eq i64 %read_uint, 2 %4 = icmp eq i64 %read_uint, 1 - %read_bool117 = tail call i1 @___read_future_bool(i64 %lazy_measure60) - tail call void @___dec_future_refcount(i64 %lazy_measure60) - tail call void @print_bool(ptr nonnull @res_q2.2A5B30FD.0, i64 12, i1 %read_bool117) + %read_bool118 = tail call i1 @___read_future_bool(i64 %___future_measure61) + tail call void @___dec_future_refcount(i64 %___future_measure61) + tail call void @print_bool(ptr nonnull @res_q2.2A5B30FD.0, i64 12, i1 %read_bool118) %"205_0.0" = zext i1 %4 to i64 - %"210_0.0" = select i1 %.not.not376, i64 2, i64 %"205_0.0" + %"210_0.0" = select i1 %.not.not377, i64 2, i64 %"205_0.0" tail call void @print_int(ptr nonnull @res_q3.D71179D6.0, i64 11, i64 %"210_0.0") br label %5 @@ -124,7 +124,7 @@ cond_exit_76: ; preds = %2 ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -132,8 +132,6 @@ declare i1 @___read_future_bool(i64) local_unnamed_addr declare void @___dec_future_refcount(i64) local_unnamed_addr -declare i64 @___lazy_measure_leaked(i64) local_unnamed_addr - declare i64 @___read_future_uint(i64) local_unnamed_addr declare void @print_bool(ptr, i64, i1) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output/measurement_output-sol-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output/measurement_output-sol-x86_64-unknown-linux-gnu.ll index bffb9df6..4d9256d3 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output/measurement_output-sol-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output/measurement_output-sol-x86_64-unknown-linux-gnu.ll @@ -22,101 +22,101 @@ cond_277_case_0.i: ; preds = %alloca_block __hugr__.__tk2_sol_qalloc.273.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i, double 0x400921FB54442D18, double 0.000000e+00) - %qalloc.i377 = tail call i64 @___qalloc() - %not_max.not.not.i378 = icmp eq i64 %qalloc.i377, -1 - br i1 %not_max.not.not.i378, label %cond_277_case_0.i379, label %__hugr__.__tk2_sol_qalloc.273.exit380 + %qalloc.i378 = tail call i64 @___qalloc() + %not_max.not.not.i379 = icmp eq i64 %qalloc.i378, -1 + br i1 %not_max.not.not.i379, label %cond_277_case_0.i380, label %__hugr__.__tk2_sol_qalloc.273.exit381 -cond_277_case_0.i379: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit +cond_277_case_0.i380: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_sol_qalloc.273.exit380: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit - tail call void @___reset(i64 %qalloc.i377) - %qalloc.i381 = tail call i64 @___qalloc() - %not_max.not.not.i382 = icmp eq i64 %qalloc.i381, -1 - br i1 %not_max.not.not.i382, label %cond_277_case_0.i383, label %__hugr__.__tk2_sol_qalloc.273.exit384 +__hugr__.__tk2_sol_qalloc.273.exit381: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit + tail call void @___reset(i64 %qalloc.i378) + %qalloc.i382 = tail call i64 @___qalloc() + %not_max.not.not.i383 = icmp eq i64 %qalloc.i382, -1 + br i1 %not_max.not.not.i383, label %cond_277_case_0.i384, label %__hugr__.__tk2_sol_qalloc.273.exit385 -cond_277_case_0.i383: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit380 +cond_277_case_0.i384: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit381 tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_sol_qalloc.273.exit384: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit380 - tail call void @___reset(i64 %qalloc.i381) - %qalloc.i385 = tail call i64 @___qalloc() - %not_max.not.not.i386 = icmp eq i64 %qalloc.i385, -1 - br i1 %not_max.not.not.i386, label %cond_277_case_0.i387, label %__hugr__.__tk2_sol_qalloc.273.exit388 +__hugr__.__tk2_sol_qalloc.273.exit385: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit381 + tail call void @___reset(i64 %qalloc.i382) + %qalloc.i386 = tail call i64 @___qalloc() + %not_max.not.not.i387 = icmp eq i64 %qalloc.i386, -1 + br i1 %not_max.not.not.i387, label %cond_277_case_0.i388, label %__hugr__.__tk2_sol_qalloc.273.exit389 -cond_277_case_0.i387: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit384 +cond_277_case_0.i388: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit385 tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_sol_qalloc.273.exit388: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit384 - tail call void @___reset(i64 %qalloc.i385) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) +__hugr__.__tk2_sol_qalloc.273.exit389: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit385 + tail call void @___reset(i64 %qalloc.i386) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) br i1 %read_bool, label %1, label %0 -0: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit388 - tail call void @___rp(i64 %qalloc.i385, double 0x400921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %qalloc.i377, double 0x400921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rp(i64 %qalloc.i381, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rp(i64 %qalloc.i377, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rpp(i64 %qalloc.i377, i64 %qalloc.i381, double 0x3FF921FB54442D18, double 0xC00921FB54442D18) - tail call void @___rp(i64 %qalloc.i381, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %qalloc.i381, double 0xBFF921FB54442D18) +0: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit389 + tail call void @___rp(i64 %qalloc.i386, double 0x400921FB54442D18, double 0.000000e+00) + tail call void @___rp(i64 %qalloc.i378, double 0x400921FB54442D18, double 0x3FF921FB54442D18) + tail call void @___rp(i64 %qalloc.i382, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) + tail call void @___rp(i64 %qalloc.i378, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) + tail call void @___rpp(i64 %qalloc.i378, i64 %qalloc.i382, double 0x3FF921FB54442D18, double 0xC00921FB54442D18) + tail call void @___rp(i64 %qalloc.i382, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) + tail call void @___rz(i64 %qalloc.i382, double 0xBFF921FB54442D18) br label %2 -1: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit388 - tail call void @___rz(i64 %qalloc.i385, double 0x400921FB54442D18) - tail call void @___rp(i64 %qalloc.i377, double 0x400921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %qalloc.i377, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rpp(i64 %qalloc.i377, i64 %qalloc.i381, double 0x3FF921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %qalloc.i381, double 0xBFF921FB54442D18, double 0.000000e+00) +1: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit389 + tail call void @___rz(i64 %qalloc.i386, double 0x400921FB54442D18) + tail call void @___rp(i64 %qalloc.i378, double 0x400921FB54442D18, double 0.000000e+00) + tail call void @___rp(i64 %qalloc.i378, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) + tail call void @___rpp(i64 %qalloc.i378, i64 %qalloc.i382, double 0x3FF921FB54442D18, double 0.000000e+00) + tail call void @___rp(i64 %qalloc.i382, double 0xBFF921FB54442D18, double 0.000000e+00) br label %2 2: ; preds = %0, %1 %.sink = phi double [ 0x3FF921FB54442D18, %0 ], [ 0xBFF921FB54442D18, %1 ] - tail call void @___rp(i64 %qalloc.i377, double %.sink, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %qalloc.i377, double 0xBFF921FB54442D18) - %lazy_measure46 = tail call i64 @___lazy_measure(i64 %qalloc.i377) - tail call void @___qfree(i64 %qalloc.i377) - %read_bool48 = tail call i1 @___read_future_bool(i64 %lazy_measure46) - tail call void @___dec_future_refcount(i64 %lazy_measure46) + tail call void @___rp(i64 %qalloc.i378, double %.sink, double 0x3FF921FB54442D18) + tail call void @___rz(i64 %qalloc.i378, double 0xBFF921FB54442D18) + %___future_measure46 = tail call i64 @___future_measure(i64 %qalloc.i378, i64 0) + tail call void @___qfree(i64 %qalloc.i378) + %read_bool48 = tail call i1 @___read_future_bool(i64 %___future_measure46) + tail call void @___dec_future_refcount(i64 %___future_measure46) br i1 %read_bool48, label %cond_exit_76, label %cond_exit_141 cond_exit_141: ; preds = %2 - %lazy_measure_leaked126 = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i381) - tail call void @___qfree(i64 %qalloc.i381) - %read_uint133 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked126) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked126) - %.not.not = icmp eq i64 %read_uint133, 2 - %3 = icmp eq i64 %read_uint133, 1 + %___future_measure127 = tail call i64 @___future_measure(i64 %qalloc.i382, i64 1) + tail call void @___qfree(i64 %qalloc.i382) + %read_uint134 = tail call i64 @___read_future_uint(i64 %___future_measure127) + tail call void @___dec_future_refcount(i64 %___future_measure127) + %.not.not = icmp eq i64 %read_uint134, 2 + %3 = icmp eq i64 %read_uint134, 1 %"250_0.0" = zext i1 %3 to i64 %"255_0.0" = select i1 %.not.not, i64 2, i64 %"250_0.0" tail call void @print_int(ptr nonnull @res_q2.798C5BAD.0, i64 11, i64 %"255_0.0") - %lazy_measure273 = tail call i64 @___lazy_measure(i64 %qalloc.i385) - tail call void @___qfree(i64 %qalloc.i385) - %read_bool275 = tail call i1 @___read_future_bool(i64 %lazy_measure273) - tail call void @___dec_future_refcount(i64 %lazy_measure273) - tail call void @print_bool(ptr nonnull @res_q3.C33BF3D1.0, i64 12, i1 %read_bool275) + %___future_measure274 = tail call i64 @___future_measure(i64 %qalloc.i386, i64 0) + tail call void @___qfree(i64 %qalloc.i386) + %read_bool276 = tail call i1 @___read_future_bool(i64 %___future_measure274) + tail call void @___dec_future_refcount(i64 %___future_measure274) + tail call void @print_bool(ptr nonnull @res_q3.C33BF3D1.0, i64 12, i1 %read_bool276) br label %5 cond_exit_76: ; preds = %2 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i385) - tail call void @___qfree(i64 %qalloc.i385) - %lazy_measure60 = tail call i64 @___lazy_measure(i64 %qalloc.i381) - tail call void @___qfree(i64 %qalloc.i381) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - %.not.not376 = icmp eq i64 %read_uint, 2 + %___future_measure59 = tail call i64 @___future_measure(i64 %qalloc.i386, i64 1) + tail call void @___qfree(i64 %qalloc.i386) + %___future_measure61 = tail call i64 @___future_measure(i64 %qalloc.i382, i64 0) + tail call void @___qfree(i64 %qalloc.i382) + %read_uint = tail call i64 @___read_future_uint(i64 %___future_measure59) + tail call void @___dec_future_refcount(i64 %___future_measure59) + %.not.not377 = icmp eq i64 %read_uint, 2 %4 = icmp eq i64 %read_uint, 1 - %read_bool117 = tail call i1 @___read_future_bool(i64 %lazy_measure60) - tail call void @___dec_future_refcount(i64 %lazy_measure60) - tail call void @print_bool(ptr nonnull @res_q2.2A5B30FD.0, i64 12, i1 %read_bool117) + %read_bool118 = tail call i1 @___read_future_bool(i64 %___future_measure61) + tail call void @___dec_future_refcount(i64 %___future_measure61) + tail call void @print_bool(ptr nonnull @res_q2.2A5B30FD.0, i64 12, i1 %read_bool118) %"205_0.0" = zext i1 %4 to i64 - %"210_0.0" = select i1 %.not.not376, i64 2, i64 %"205_0.0" + %"210_0.0" = select i1 %.not.not377, i64 2, i64 %"205_0.0" tail call void @print_int(ptr nonnull @res_q3.D71179D6.0, i64 11, i64 %"210_0.0") br label %5 @@ -124,7 +124,7 @@ cond_exit_76: ; preds = %2 ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -132,8 +132,6 @@ declare i1 @___read_future_bool(i64) local_unnamed_addr declare void @___dec_future_refcount(i64) local_unnamed_addr -declare i64 @___lazy_measure_leaked(i64) local_unnamed_addr - declare i64 @___read_future_uint(i64) local_unnamed_addr declare void @print_bool(ptr, i64, i1) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output/measurement_output-sol-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output/measurement_output-sol-x86_64-windows-gnu.ll index 84ddc015..f30c6a87 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output/measurement_output-sol-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output/measurement_output-sol-x86_64-windows-gnu.ll @@ -22,101 +22,101 @@ cond_277_case_0.i: ; preds = %alloca_block __hugr__.__tk2_sol_qalloc.273.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i, double 0x400921FB54442D18, double 0.000000e+00) - %qalloc.i377 = tail call i64 @___qalloc() - %not_max.not.not.i378 = icmp eq i64 %qalloc.i377, -1 - br i1 %not_max.not.not.i378, label %cond_277_case_0.i379, label %__hugr__.__tk2_sol_qalloc.273.exit380 + %qalloc.i378 = tail call i64 @___qalloc() + %not_max.not.not.i379 = icmp eq i64 %qalloc.i378, -1 + br i1 %not_max.not.not.i379, label %cond_277_case_0.i380, label %__hugr__.__tk2_sol_qalloc.273.exit381 -cond_277_case_0.i379: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit +cond_277_case_0.i380: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_sol_qalloc.273.exit380: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit - tail call void @___reset(i64 %qalloc.i377) - %qalloc.i381 = tail call i64 @___qalloc() - %not_max.not.not.i382 = icmp eq i64 %qalloc.i381, -1 - br i1 %not_max.not.not.i382, label %cond_277_case_0.i383, label %__hugr__.__tk2_sol_qalloc.273.exit384 +__hugr__.__tk2_sol_qalloc.273.exit381: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit + tail call void @___reset(i64 %qalloc.i378) + %qalloc.i382 = tail call i64 @___qalloc() + %not_max.not.not.i383 = icmp eq i64 %qalloc.i382, -1 + br i1 %not_max.not.not.i383, label %cond_277_case_0.i384, label %__hugr__.__tk2_sol_qalloc.273.exit385 -cond_277_case_0.i383: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit380 +cond_277_case_0.i384: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit381 tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_sol_qalloc.273.exit384: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit380 - tail call void @___reset(i64 %qalloc.i381) - %qalloc.i385 = tail call i64 @___qalloc() - %not_max.not.not.i386 = icmp eq i64 %qalloc.i385, -1 - br i1 %not_max.not.not.i386, label %cond_277_case_0.i387, label %__hugr__.__tk2_sol_qalloc.273.exit388 +__hugr__.__tk2_sol_qalloc.273.exit385: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit381 + tail call void @___reset(i64 %qalloc.i382) + %qalloc.i386 = tail call i64 @___qalloc() + %not_max.not.not.i387 = icmp eq i64 %qalloc.i386, -1 + br i1 %not_max.not.not.i387, label %cond_277_case_0.i388, label %__hugr__.__tk2_sol_qalloc.273.exit389 -cond_277_case_0.i387: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit384 +cond_277_case_0.i388: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit385 tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_sol_qalloc.273.exit388: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit384 - tail call void @___reset(i64 %qalloc.i385) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) +__hugr__.__tk2_sol_qalloc.273.exit389: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit385 + tail call void @___reset(i64 %qalloc.i386) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) br i1 %read_bool, label %1, label %0 -0: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit388 - tail call void @___rp(i64 %qalloc.i385, double 0x400921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %qalloc.i377, double 0x400921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rp(i64 %qalloc.i381, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rp(i64 %qalloc.i377, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rpp(i64 %qalloc.i377, i64 %qalloc.i381, double 0x3FF921FB54442D18, double 0xC00921FB54442D18) - tail call void @___rp(i64 %qalloc.i381, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %qalloc.i381, double 0xBFF921FB54442D18) +0: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit389 + tail call void @___rp(i64 %qalloc.i386, double 0x400921FB54442D18, double 0.000000e+00) + tail call void @___rp(i64 %qalloc.i378, double 0x400921FB54442D18, double 0x3FF921FB54442D18) + tail call void @___rp(i64 %qalloc.i382, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) + tail call void @___rp(i64 %qalloc.i378, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) + tail call void @___rpp(i64 %qalloc.i378, i64 %qalloc.i382, double 0x3FF921FB54442D18, double 0xC00921FB54442D18) + tail call void @___rp(i64 %qalloc.i382, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) + tail call void @___rz(i64 %qalloc.i382, double 0xBFF921FB54442D18) br label %2 -1: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit388 - tail call void @___rz(i64 %qalloc.i385, double 0x400921FB54442D18) - tail call void @___rp(i64 %qalloc.i377, double 0x400921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %qalloc.i377, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rpp(i64 %qalloc.i377, i64 %qalloc.i381, double 0x3FF921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %qalloc.i381, double 0xBFF921FB54442D18, double 0.000000e+00) +1: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit389 + tail call void @___rz(i64 %qalloc.i386, double 0x400921FB54442D18) + tail call void @___rp(i64 %qalloc.i378, double 0x400921FB54442D18, double 0.000000e+00) + tail call void @___rp(i64 %qalloc.i378, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) + tail call void @___rpp(i64 %qalloc.i378, i64 %qalloc.i382, double 0x3FF921FB54442D18, double 0.000000e+00) + tail call void @___rp(i64 %qalloc.i382, double 0xBFF921FB54442D18, double 0.000000e+00) br label %2 2: ; preds = %0, %1 %.sink = phi double [ 0x3FF921FB54442D18, %0 ], [ 0xBFF921FB54442D18, %1 ] - tail call void @___rp(i64 %qalloc.i377, double %.sink, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %qalloc.i377, double 0xBFF921FB54442D18) - %lazy_measure46 = tail call i64 @___lazy_measure(i64 %qalloc.i377) - tail call void @___qfree(i64 %qalloc.i377) - %read_bool48 = tail call i1 @___read_future_bool(i64 %lazy_measure46) - tail call void @___dec_future_refcount(i64 %lazy_measure46) + tail call void @___rp(i64 %qalloc.i378, double %.sink, double 0x3FF921FB54442D18) + tail call void @___rz(i64 %qalloc.i378, double 0xBFF921FB54442D18) + %___future_measure46 = tail call i64 @___future_measure(i64 %qalloc.i378, i64 0) + tail call void @___qfree(i64 %qalloc.i378) + %read_bool48 = tail call i1 @___read_future_bool(i64 %___future_measure46) + tail call void @___dec_future_refcount(i64 %___future_measure46) br i1 %read_bool48, label %cond_exit_76, label %cond_exit_141 cond_exit_141: ; preds = %2 - %lazy_measure_leaked126 = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i381) - tail call void @___qfree(i64 %qalloc.i381) - %read_uint133 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked126) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked126) - %.not.not = icmp eq i64 %read_uint133, 2 - %3 = icmp eq i64 %read_uint133, 1 + %___future_measure127 = tail call i64 @___future_measure(i64 %qalloc.i382, i64 1) + tail call void @___qfree(i64 %qalloc.i382) + %read_uint134 = tail call i64 @___read_future_uint(i64 %___future_measure127) + tail call void @___dec_future_refcount(i64 %___future_measure127) + %.not.not = icmp eq i64 %read_uint134, 2 + %3 = icmp eq i64 %read_uint134, 1 %"250_0.0" = zext i1 %3 to i64 %"255_0.0" = select i1 %.not.not, i64 2, i64 %"250_0.0" tail call void @print_int(ptr nonnull @res_q2.798C5BAD.0, i64 11, i64 %"255_0.0") - %lazy_measure273 = tail call i64 @___lazy_measure(i64 %qalloc.i385) - tail call void @___qfree(i64 %qalloc.i385) - %read_bool275 = tail call i1 @___read_future_bool(i64 %lazy_measure273) - tail call void @___dec_future_refcount(i64 %lazy_measure273) - tail call void @print_bool(ptr nonnull @res_q3.C33BF3D1.0, i64 12, i1 %read_bool275) + %___future_measure274 = tail call i64 @___future_measure(i64 %qalloc.i386, i64 0) + tail call void @___qfree(i64 %qalloc.i386) + %read_bool276 = tail call i1 @___read_future_bool(i64 %___future_measure274) + tail call void @___dec_future_refcount(i64 %___future_measure274) + tail call void @print_bool(ptr nonnull @res_q3.C33BF3D1.0, i64 12, i1 %read_bool276) br label %5 cond_exit_76: ; preds = %2 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i385) - tail call void @___qfree(i64 %qalloc.i385) - %lazy_measure60 = tail call i64 @___lazy_measure(i64 %qalloc.i381) - tail call void @___qfree(i64 %qalloc.i381) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - %.not.not376 = icmp eq i64 %read_uint, 2 + %___future_measure59 = tail call i64 @___future_measure(i64 %qalloc.i386, i64 1) + tail call void @___qfree(i64 %qalloc.i386) + %___future_measure61 = tail call i64 @___future_measure(i64 %qalloc.i382, i64 0) + tail call void @___qfree(i64 %qalloc.i382) + %read_uint = tail call i64 @___read_future_uint(i64 %___future_measure59) + tail call void @___dec_future_refcount(i64 %___future_measure59) + %.not.not377 = icmp eq i64 %read_uint, 2 %4 = icmp eq i64 %read_uint, 1 - %read_bool117 = tail call i1 @___read_future_bool(i64 %lazy_measure60) - tail call void @___dec_future_refcount(i64 %lazy_measure60) - tail call void @print_bool(ptr nonnull @res_q2.2A5B30FD.0, i64 12, i1 %read_bool117) + %read_bool118 = tail call i1 @___read_future_bool(i64 %___future_measure61) + tail call void @___dec_future_refcount(i64 %___future_measure61) + tail call void @print_bool(ptr nonnull @res_q2.2A5B30FD.0, i64 12, i1 %read_bool118) %"205_0.0" = zext i1 %4 to i64 - %"210_0.0" = select i1 %.not.not376, i64 2, i64 %"205_0.0" + %"210_0.0" = select i1 %.not.not377, i64 2, i64 %"205_0.0" tail call void @print_int(ptr nonnull @res_q3.D71179D6.0, i64 11, i64 %"210_0.0") br label %5 @@ -124,7 +124,7 @@ cond_exit_76: ; preds = %2 ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -132,8 +132,6 @@ declare i1 @___read_future_bool(i64) local_unnamed_addr declare void @___dec_future_refcount(i64) local_unnamed_addr -declare i64 @___lazy_measure_leaked(i64) local_unnamed_addr - declare i64 @___read_future_uint(i64) local_unnamed_addr declare void @print_bool(ptr, i64, i1) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output_multishot/measurement_output_multishot-helios-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output_multishot/measurement_output_multishot-helios-aarch64-apple-darwin.ll index 631968f2..532c2638 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output_multishot/measurement_output_multishot-helios-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output_multishot/measurement_output_multishot-helios-aarch64-apple-darwin.ll @@ -52,10 +52,10 @@ cond_277_case_0.i387: ; preds = %__hugr__.__tk2_heli __hugr__.__tk2_helios_qalloc.273.exit388: ; preds = %__hugr__.__tk2_helios_qalloc.273.exit384 tail call void @___reset(i64 %qalloc.i385) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) br i1 %read_bool, label %1, label %0 0: ; preds = %__hugr__.__tk2_helios_qalloc.273.exit388 @@ -76,40 +76,40 @@ __hugr__.__tk2_helios_qalloc.273.exit388: ; preds = %__hugr__.__tk2_heli 2: ; preds = %0, %1 tail call void @___rz(i64 %qalloc.i381, double 0xBFF921FB54442D18) - %lazy_measure46 = tail call i64 @___lazy_measure(i64 %qalloc.i377) + %___lazy_measure46 = tail call i64 @___lazy_measure(i64 %qalloc.i377) tail call void @___qfree(i64 %qalloc.i377) - %read_bool48 = tail call i1 @___read_future_bool(i64 %lazy_measure46) - tail call void @___dec_future_refcount(i64 %lazy_measure46) + %read_bool48 = tail call i1 @___read_future_bool(i64 %___lazy_measure46) + tail call void @___dec_future_refcount(i64 %___lazy_measure46) br i1 %read_bool48, label %cond_exit_76, label %cond_exit_141 cond_exit_141: ; preds = %2 - %lazy_measure_leaked126 = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i381) + %___lazy_measure_leaked126 = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i381) tail call void @___qfree(i64 %qalloc.i381) - %read_uint133 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked126) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked126) + %read_uint133 = tail call i64 @___read_future_uint(i64 %___lazy_measure_leaked126) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked126) %.not.not = icmp eq i64 %read_uint133, 2 %3 = icmp eq i64 %read_uint133, 1 %"250_0.0" = zext i1 %3 to i64 %"255_0.0" = select i1 %.not.not, i64 2, i64 %"250_0.0" tail call void @print_int(ptr nonnull @res_q2.798C5BAD.0, i64 11, i64 %"255_0.0") - %lazy_measure273 = tail call i64 @___lazy_measure(i64 %qalloc.i385) + %___lazy_measure273 = tail call i64 @___lazy_measure(i64 %qalloc.i385) tail call void @___qfree(i64 %qalloc.i385) - %read_bool275 = tail call i1 @___read_future_bool(i64 %lazy_measure273) - tail call void @___dec_future_refcount(i64 %lazy_measure273) + %read_bool275 = tail call i1 @___read_future_bool(i64 %___lazy_measure273) + tail call void @___dec_future_refcount(i64 %___lazy_measure273) tail call void @print_bool(ptr nonnull @res_q3.C33BF3D1.0, i64 12, i1 %read_bool275) br label %5 cond_exit_76: ; preds = %2 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i385) + %___lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i385) tail call void @___qfree(i64 %qalloc.i385) - %lazy_measure60 = tail call i64 @___lazy_measure(i64 %qalloc.i381) + %___lazy_measure60 = tail call i64 @___lazy_measure(i64 %qalloc.i381) tail call void @___qfree(i64 %qalloc.i381) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + %read_uint = tail call i64 @___read_future_uint(i64 %___lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) %.not.not376 = icmp eq i64 %read_uint, 2 %4 = icmp eq i64 %read_uint, 1 - %read_bool117 = tail call i1 @___read_future_bool(i64 %lazy_measure60) - tail call void @___dec_future_refcount(i64 %lazy_measure60) + %read_bool117 = tail call i1 @___read_future_bool(i64 %___lazy_measure60) + tail call void @___dec_future_refcount(i64 %___lazy_measure60) tail call void @print_bool(ptr nonnull @res_q2.2A5B30FD.0, i64 12, i1 %read_bool117) %"205_0.0" = zext i1 %4 to i64 %"210_0.0" = select i1 %.not.not376, i64 2, i64 %"205_0.0" diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output_multishot/measurement_output_multishot-helios-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output_multishot/measurement_output_multishot-helios-aarch64-unknown-linux-gnu.ll index 5946fc4a..139d8e65 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output_multishot/measurement_output_multishot-helios-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output_multishot/measurement_output_multishot-helios-aarch64-unknown-linux-gnu.ll @@ -52,10 +52,10 @@ cond_277_case_0.i387: ; preds = %__hugr__.__tk2_heli __hugr__.__tk2_helios_qalloc.273.exit388: ; preds = %__hugr__.__tk2_helios_qalloc.273.exit384 tail call void @___reset(i64 %qalloc.i385) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) br i1 %read_bool, label %1, label %0 0: ; preds = %__hugr__.__tk2_helios_qalloc.273.exit388 @@ -76,40 +76,40 @@ __hugr__.__tk2_helios_qalloc.273.exit388: ; preds = %__hugr__.__tk2_heli 2: ; preds = %0, %1 tail call void @___rz(i64 %qalloc.i381, double 0xBFF921FB54442D18) - %lazy_measure46 = tail call i64 @___lazy_measure(i64 %qalloc.i377) + %___lazy_measure46 = tail call i64 @___lazy_measure(i64 %qalloc.i377) tail call void @___qfree(i64 %qalloc.i377) - %read_bool48 = tail call i1 @___read_future_bool(i64 %lazy_measure46) - tail call void @___dec_future_refcount(i64 %lazy_measure46) + %read_bool48 = tail call i1 @___read_future_bool(i64 %___lazy_measure46) + tail call void @___dec_future_refcount(i64 %___lazy_measure46) br i1 %read_bool48, label %cond_exit_76, label %cond_exit_141 cond_exit_141: ; preds = %2 - %lazy_measure_leaked126 = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i381) + %___lazy_measure_leaked126 = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i381) tail call void @___qfree(i64 %qalloc.i381) - %read_uint133 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked126) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked126) + %read_uint133 = tail call i64 @___read_future_uint(i64 %___lazy_measure_leaked126) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked126) %.not.not = icmp eq i64 %read_uint133, 2 %3 = icmp eq i64 %read_uint133, 1 %"250_0.0" = zext i1 %3 to i64 %"255_0.0" = select i1 %.not.not, i64 2, i64 %"250_0.0" tail call void @print_int(ptr nonnull @res_q2.798C5BAD.0, i64 11, i64 %"255_0.0") - %lazy_measure273 = tail call i64 @___lazy_measure(i64 %qalloc.i385) + %___lazy_measure273 = tail call i64 @___lazy_measure(i64 %qalloc.i385) tail call void @___qfree(i64 %qalloc.i385) - %read_bool275 = tail call i1 @___read_future_bool(i64 %lazy_measure273) - tail call void @___dec_future_refcount(i64 %lazy_measure273) + %read_bool275 = tail call i1 @___read_future_bool(i64 %___lazy_measure273) + tail call void @___dec_future_refcount(i64 %___lazy_measure273) tail call void @print_bool(ptr nonnull @res_q3.C33BF3D1.0, i64 12, i1 %read_bool275) br label %5 cond_exit_76: ; preds = %2 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i385) + %___lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i385) tail call void @___qfree(i64 %qalloc.i385) - %lazy_measure60 = tail call i64 @___lazy_measure(i64 %qalloc.i381) + %___lazy_measure60 = tail call i64 @___lazy_measure(i64 %qalloc.i381) tail call void @___qfree(i64 %qalloc.i381) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + %read_uint = tail call i64 @___read_future_uint(i64 %___lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) %.not.not376 = icmp eq i64 %read_uint, 2 %4 = icmp eq i64 %read_uint, 1 - %read_bool117 = tail call i1 @___read_future_bool(i64 %lazy_measure60) - tail call void @___dec_future_refcount(i64 %lazy_measure60) + %read_bool117 = tail call i1 @___read_future_bool(i64 %___lazy_measure60) + tail call void @___dec_future_refcount(i64 %___lazy_measure60) tail call void @print_bool(ptr nonnull @res_q2.2A5B30FD.0, i64 12, i1 %read_bool117) %"205_0.0" = zext i1 %4 to i64 %"210_0.0" = select i1 %.not.not376, i64 2, i64 %"205_0.0" diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output_multishot/measurement_output_multishot-helios-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output_multishot/measurement_output_multishot-helios-x86_64-apple-darwin.ll index 9fa91928..f54ad3fd 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output_multishot/measurement_output_multishot-helios-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output_multishot/measurement_output_multishot-helios-x86_64-apple-darwin.ll @@ -52,10 +52,10 @@ cond_277_case_0.i387: ; preds = %__hugr__.__tk2_heli __hugr__.__tk2_helios_qalloc.273.exit388: ; preds = %__hugr__.__tk2_helios_qalloc.273.exit384 tail call void @___reset(i64 %qalloc.i385) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) br i1 %read_bool, label %1, label %0 0: ; preds = %__hugr__.__tk2_helios_qalloc.273.exit388 @@ -76,40 +76,40 @@ __hugr__.__tk2_helios_qalloc.273.exit388: ; preds = %__hugr__.__tk2_heli 2: ; preds = %0, %1 tail call void @___rz(i64 %qalloc.i381, double 0xBFF921FB54442D18) - %lazy_measure46 = tail call i64 @___lazy_measure(i64 %qalloc.i377) + %___lazy_measure46 = tail call i64 @___lazy_measure(i64 %qalloc.i377) tail call void @___qfree(i64 %qalloc.i377) - %read_bool48 = tail call i1 @___read_future_bool(i64 %lazy_measure46) - tail call void @___dec_future_refcount(i64 %lazy_measure46) + %read_bool48 = tail call i1 @___read_future_bool(i64 %___lazy_measure46) + tail call void @___dec_future_refcount(i64 %___lazy_measure46) br i1 %read_bool48, label %cond_exit_76, label %cond_exit_141 cond_exit_141: ; preds = %2 - %lazy_measure_leaked126 = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i381) + %___lazy_measure_leaked126 = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i381) tail call void @___qfree(i64 %qalloc.i381) - %read_uint133 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked126) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked126) + %read_uint133 = tail call i64 @___read_future_uint(i64 %___lazy_measure_leaked126) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked126) %.not.not = icmp eq i64 %read_uint133, 2 %3 = icmp eq i64 %read_uint133, 1 %"250_0.0" = zext i1 %3 to i64 %"255_0.0" = select i1 %.not.not, i64 2, i64 %"250_0.0" tail call void @print_int(ptr nonnull @res_q2.798C5BAD.0, i64 11, i64 %"255_0.0") - %lazy_measure273 = tail call i64 @___lazy_measure(i64 %qalloc.i385) + %___lazy_measure273 = tail call i64 @___lazy_measure(i64 %qalloc.i385) tail call void @___qfree(i64 %qalloc.i385) - %read_bool275 = tail call i1 @___read_future_bool(i64 %lazy_measure273) - tail call void @___dec_future_refcount(i64 %lazy_measure273) + %read_bool275 = tail call i1 @___read_future_bool(i64 %___lazy_measure273) + tail call void @___dec_future_refcount(i64 %___lazy_measure273) tail call void @print_bool(ptr nonnull @res_q3.C33BF3D1.0, i64 12, i1 %read_bool275) br label %5 cond_exit_76: ; preds = %2 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i385) + %___lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i385) tail call void @___qfree(i64 %qalloc.i385) - %lazy_measure60 = tail call i64 @___lazy_measure(i64 %qalloc.i381) + %___lazy_measure60 = tail call i64 @___lazy_measure(i64 %qalloc.i381) tail call void @___qfree(i64 %qalloc.i381) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + %read_uint = tail call i64 @___read_future_uint(i64 %___lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) %.not.not376 = icmp eq i64 %read_uint, 2 %4 = icmp eq i64 %read_uint, 1 - %read_bool117 = tail call i1 @___read_future_bool(i64 %lazy_measure60) - tail call void @___dec_future_refcount(i64 %lazy_measure60) + %read_bool117 = tail call i1 @___read_future_bool(i64 %___lazy_measure60) + tail call void @___dec_future_refcount(i64 %___lazy_measure60) tail call void @print_bool(ptr nonnull @res_q2.2A5B30FD.0, i64 12, i1 %read_bool117) %"205_0.0" = zext i1 %4 to i64 %"210_0.0" = select i1 %.not.not376, i64 2, i64 %"205_0.0" diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output_multishot/measurement_output_multishot-helios-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output_multishot/measurement_output_multishot-helios-x86_64-unknown-linux-gnu.ll index 2ac0f83b..57ed3d0b 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output_multishot/measurement_output_multishot-helios-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output_multishot/measurement_output_multishot-helios-x86_64-unknown-linux-gnu.ll @@ -52,10 +52,10 @@ cond_277_case_0.i387: ; preds = %__hugr__.__tk2_heli __hugr__.__tk2_helios_qalloc.273.exit388: ; preds = %__hugr__.__tk2_helios_qalloc.273.exit384 tail call void @___reset(i64 %qalloc.i385) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) br i1 %read_bool, label %1, label %0 0: ; preds = %__hugr__.__tk2_helios_qalloc.273.exit388 @@ -76,40 +76,40 @@ __hugr__.__tk2_helios_qalloc.273.exit388: ; preds = %__hugr__.__tk2_heli 2: ; preds = %0, %1 tail call void @___rz(i64 %qalloc.i381, double 0xBFF921FB54442D18) - %lazy_measure46 = tail call i64 @___lazy_measure(i64 %qalloc.i377) + %___lazy_measure46 = tail call i64 @___lazy_measure(i64 %qalloc.i377) tail call void @___qfree(i64 %qalloc.i377) - %read_bool48 = tail call i1 @___read_future_bool(i64 %lazy_measure46) - tail call void @___dec_future_refcount(i64 %lazy_measure46) + %read_bool48 = tail call i1 @___read_future_bool(i64 %___lazy_measure46) + tail call void @___dec_future_refcount(i64 %___lazy_measure46) br i1 %read_bool48, label %cond_exit_76, label %cond_exit_141 cond_exit_141: ; preds = %2 - %lazy_measure_leaked126 = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i381) + %___lazy_measure_leaked126 = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i381) tail call void @___qfree(i64 %qalloc.i381) - %read_uint133 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked126) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked126) + %read_uint133 = tail call i64 @___read_future_uint(i64 %___lazy_measure_leaked126) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked126) %.not.not = icmp eq i64 %read_uint133, 2 %3 = icmp eq i64 %read_uint133, 1 %"250_0.0" = zext i1 %3 to i64 %"255_0.0" = select i1 %.not.not, i64 2, i64 %"250_0.0" tail call void @print_int(ptr nonnull @res_q2.798C5BAD.0, i64 11, i64 %"255_0.0") - %lazy_measure273 = tail call i64 @___lazy_measure(i64 %qalloc.i385) + %___lazy_measure273 = tail call i64 @___lazy_measure(i64 %qalloc.i385) tail call void @___qfree(i64 %qalloc.i385) - %read_bool275 = tail call i1 @___read_future_bool(i64 %lazy_measure273) - tail call void @___dec_future_refcount(i64 %lazy_measure273) + %read_bool275 = tail call i1 @___read_future_bool(i64 %___lazy_measure273) + tail call void @___dec_future_refcount(i64 %___lazy_measure273) tail call void @print_bool(ptr nonnull @res_q3.C33BF3D1.0, i64 12, i1 %read_bool275) br label %5 cond_exit_76: ; preds = %2 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i385) + %___lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i385) tail call void @___qfree(i64 %qalloc.i385) - %lazy_measure60 = tail call i64 @___lazy_measure(i64 %qalloc.i381) + %___lazy_measure60 = tail call i64 @___lazy_measure(i64 %qalloc.i381) tail call void @___qfree(i64 %qalloc.i381) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + %read_uint = tail call i64 @___read_future_uint(i64 %___lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) %.not.not376 = icmp eq i64 %read_uint, 2 %4 = icmp eq i64 %read_uint, 1 - %read_bool117 = tail call i1 @___read_future_bool(i64 %lazy_measure60) - tail call void @___dec_future_refcount(i64 %lazy_measure60) + %read_bool117 = tail call i1 @___read_future_bool(i64 %___lazy_measure60) + tail call void @___dec_future_refcount(i64 %___lazy_measure60) tail call void @print_bool(ptr nonnull @res_q2.2A5B30FD.0, i64 12, i1 %read_bool117) %"205_0.0" = zext i1 %4 to i64 %"210_0.0" = select i1 %.not.not376, i64 2, i64 %"205_0.0" diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output_multishot/measurement_output_multishot-helios-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output_multishot/measurement_output_multishot-helios-x86_64-windows-gnu.ll index 47211776..776f23c7 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output_multishot/measurement_output_multishot-helios-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output_multishot/measurement_output_multishot-helios-x86_64-windows-gnu.ll @@ -52,10 +52,10 @@ cond_277_case_0.i387: ; preds = %__hugr__.__tk2_heli __hugr__.__tk2_helios_qalloc.273.exit388: ; preds = %__hugr__.__tk2_helios_qalloc.273.exit384 tail call void @___reset(i64 %qalloc.i385) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) br i1 %read_bool, label %1, label %0 0: ; preds = %__hugr__.__tk2_helios_qalloc.273.exit388 @@ -76,40 +76,40 @@ __hugr__.__tk2_helios_qalloc.273.exit388: ; preds = %__hugr__.__tk2_heli 2: ; preds = %0, %1 tail call void @___rz(i64 %qalloc.i381, double 0xBFF921FB54442D18) - %lazy_measure46 = tail call i64 @___lazy_measure(i64 %qalloc.i377) + %___lazy_measure46 = tail call i64 @___lazy_measure(i64 %qalloc.i377) tail call void @___qfree(i64 %qalloc.i377) - %read_bool48 = tail call i1 @___read_future_bool(i64 %lazy_measure46) - tail call void @___dec_future_refcount(i64 %lazy_measure46) + %read_bool48 = tail call i1 @___read_future_bool(i64 %___lazy_measure46) + tail call void @___dec_future_refcount(i64 %___lazy_measure46) br i1 %read_bool48, label %cond_exit_76, label %cond_exit_141 cond_exit_141: ; preds = %2 - %lazy_measure_leaked126 = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i381) + %___lazy_measure_leaked126 = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i381) tail call void @___qfree(i64 %qalloc.i381) - %read_uint133 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked126) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked126) + %read_uint133 = tail call i64 @___read_future_uint(i64 %___lazy_measure_leaked126) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked126) %.not.not = icmp eq i64 %read_uint133, 2 %3 = icmp eq i64 %read_uint133, 1 %"250_0.0" = zext i1 %3 to i64 %"255_0.0" = select i1 %.not.not, i64 2, i64 %"250_0.0" tail call void @print_int(ptr nonnull @res_q2.798C5BAD.0, i64 11, i64 %"255_0.0") - %lazy_measure273 = tail call i64 @___lazy_measure(i64 %qalloc.i385) + %___lazy_measure273 = tail call i64 @___lazy_measure(i64 %qalloc.i385) tail call void @___qfree(i64 %qalloc.i385) - %read_bool275 = tail call i1 @___read_future_bool(i64 %lazy_measure273) - tail call void @___dec_future_refcount(i64 %lazy_measure273) + %read_bool275 = tail call i1 @___read_future_bool(i64 %___lazy_measure273) + tail call void @___dec_future_refcount(i64 %___lazy_measure273) tail call void @print_bool(ptr nonnull @res_q3.C33BF3D1.0, i64 12, i1 %read_bool275) br label %5 cond_exit_76: ; preds = %2 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i385) + %___lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i385) tail call void @___qfree(i64 %qalloc.i385) - %lazy_measure60 = tail call i64 @___lazy_measure(i64 %qalloc.i381) + %___lazy_measure60 = tail call i64 @___lazy_measure(i64 %qalloc.i381) tail call void @___qfree(i64 %qalloc.i381) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) + %read_uint = tail call i64 @___read_future_uint(i64 %___lazy_measure_leaked) + tail call void @___dec_future_refcount(i64 %___lazy_measure_leaked) %.not.not376 = icmp eq i64 %read_uint, 2 %4 = icmp eq i64 %read_uint, 1 - %read_bool117 = tail call i1 @___read_future_bool(i64 %lazy_measure60) - tail call void @___dec_future_refcount(i64 %lazy_measure60) + %read_bool117 = tail call i1 @___read_future_bool(i64 %___lazy_measure60) + tail call void @___dec_future_refcount(i64 %___lazy_measure60) tail call void @print_bool(ptr nonnull @res_q2.2A5B30FD.0, i64 12, i1 %read_bool117) %"205_0.0" = zext i1 %4 to i64 %"210_0.0" = select i1 %.not.not376, i64 2, i64 %"205_0.0" diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output_multishot/measurement_output_multishot-sol-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output_multishot/measurement_output_multishot-sol-aarch64-apple-darwin.ll index dc8d9145..eecc54f0 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output_multishot/measurement_output_multishot-sol-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output_multishot/measurement_output_multishot-sol-aarch64-apple-darwin.ll @@ -22,101 +22,101 @@ cond_277_case_0.i: ; preds = %alloca_block __hugr__.__tk2_sol_qalloc.273.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i, double 0x400921FB54442D18, double 0.000000e+00) - %qalloc.i377 = tail call i64 @___qalloc() - %not_max.not.not.i378 = icmp eq i64 %qalloc.i377, -1 - br i1 %not_max.not.not.i378, label %cond_277_case_0.i379, label %__hugr__.__tk2_sol_qalloc.273.exit380 + %qalloc.i378 = tail call i64 @___qalloc() + %not_max.not.not.i379 = icmp eq i64 %qalloc.i378, -1 + br i1 %not_max.not.not.i379, label %cond_277_case_0.i380, label %__hugr__.__tk2_sol_qalloc.273.exit381 -cond_277_case_0.i379: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit +cond_277_case_0.i380: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_sol_qalloc.273.exit380: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit - tail call void @___reset(i64 %qalloc.i377) - %qalloc.i381 = tail call i64 @___qalloc() - %not_max.not.not.i382 = icmp eq i64 %qalloc.i381, -1 - br i1 %not_max.not.not.i382, label %cond_277_case_0.i383, label %__hugr__.__tk2_sol_qalloc.273.exit384 +__hugr__.__tk2_sol_qalloc.273.exit381: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit + tail call void @___reset(i64 %qalloc.i378) + %qalloc.i382 = tail call i64 @___qalloc() + %not_max.not.not.i383 = icmp eq i64 %qalloc.i382, -1 + br i1 %not_max.not.not.i383, label %cond_277_case_0.i384, label %__hugr__.__tk2_sol_qalloc.273.exit385 -cond_277_case_0.i383: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit380 +cond_277_case_0.i384: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit381 tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_sol_qalloc.273.exit384: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit380 - tail call void @___reset(i64 %qalloc.i381) - %qalloc.i385 = tail call i64 @___qalloc() - %not_max.not.not.i386 = icmp eq i64 %qalloc.i385, -1 - br i1 %not_max.not.not.i386, label %cond_277_case_0.i387, label %__hugr__.__tk2_sol_qalloc.273.exit388 +__hugr__.__tk2_sol_qalloc.273.exit385: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit381 + tail call void @___reset(i64 %qalloc.i382) + %qalloc.i386 = tail call i64 @___qalloc() + %not_max.not.not.i387 = icmp eq i64 %qalloc.i386, -1 + br i1 %not_max.not.not.i387, label %cond_277_case_0.i388, label %__hugr__.__tk2_sol_qalloc.273.exit389 -cond_277_case_0.i387: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit384 +cond_277_case_0.i388: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit385 tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_sol_qalloc.273.exit388: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit384 - tail call void @___reset(i64 %qalloc.i385) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) +__hugr__.__tk2_sol_qalloc.273.exit389: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit385 + tail call void @___reset(i64 %qalloc.i386) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) br i1 %read_bool, label %1, label %0 -0: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit388 - tail call void @___rp(i64 %qalloc.i385, double 0x400921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %qalloc.i377, double 0x400921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rp(i64 %qalloc.i381, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rp(i64 %qalloc.i377, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rpp(i64 %qalloc.i377, i64 %qalloc.i381, double 0x3FF921FB54442D18, double 0xC00921FB54442D18) - tail call void @___rp(i64 %qalloc.i381, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %qalloc.i381, double 0xBFF921FB54442D18) +0: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit389 + tail call void @___rp(i64 %qalloc.i386, double 0x400921FB54442D18, double 0.000000e+00) + tail call void @___rp(i64 %qalloc.i378, double 0x400921FB54442D18, double 0x3FF921FB54442D18) + tail call void @___rp(i64 %qalloc.i382, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) + tail call void @___rp(i64 %qalloc.i378, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) + tail call void @___rpp(i64 %qalloc.i378, i64 %qalloc.i382, double 0x3FF921FB54442D18, double 0xC00921FB54442D18) + tail call void @___rp(i64 %qalloc.i382, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) + tail call void @___rz(i64 %qalloc.i382, double 0xBFF921FB54442D18) br label %2 -1: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit388 - tail call void @___rz(i64 %qalloc.i385, double 0x400921FB54442D18) - tail call void @___rp(i64 %qalloc.i377, double 0x400921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %qalloc.i377, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rpp(i64 %qalloc.i377, i64 %qalloc.i381, double 0x3FF921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %qalloc.i381, double 0xBFF921FB54442D18, double 0.000000e+00) +1: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit389 + tail call void @___rz(i64 %qalloc.i386, double 0x400921FB54442D18) + tail call void @___rp(i64 %qalloc.i378, double 0x400921FB54442D18, double 0.000000e+00) + tail call void @___rp(i64 %qalloc.i378, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) + tail call void @___rpp(i64 %qalloc.i378, i64 %qalloc.i382, double 0x3FF921FB54442D18, double 0.000000e+00) + tail call void @___rp(i64 %qalloc.i382, double 0xBFF921FB54442D18, double 0.000000e+00) br label %2 2: ; preds = %0, %1 %.sink = phi double [ 0x3FF921FB54442D18, %0 ], [ 0xBFF921FB54442D18, %1 ] - tail call void @___rp(i64 %qalloc.i377, double %.sink, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %qalloc.i377, double 0xBFF921FB54442D18) - %lazy_measure46 = tail call i64 @___lazy_measure(i64 %qalloc.i377) - tail call void @___qfree(i64 %qalloc.i377) - %read_bool48 = tail call i1 @___read_future_bool(i64 %lazy_measure46) - tail call void @___dec_future_refcount(i64 %lazy_measure46) + tail call void @___rp(i64 %qalloc.i378, double %.sink, double 0x3FF921FB54442D18) + tail call void @___rz(i64 %qalloc.i378, double 0xBFF921FB54442D18) + %___future_measure46 = tail call i64 @___future_measure(i64 %qalloc.i378, i64 0) + tail call void @___qfree(i64 %qalloc.i378) + %read_bool48 = tail call i1 @___read_future_bool(i64 %___future_measure46) + tail call void @___dec_future_refcount(i64 %___future_measure46) br i1 %read_bool48, label %cond_exit_76, label %cond_exit_141 cond_exit_141: ; preds = %2 - %lazy_measure_leaked126 = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i381) - tail call void @___qfree(i64 %qalloc.i381) - %read_uint133 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked126) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked126) - %.not.not = icmp eq i64 %read_uint133, 2 - %3 = icmp eq i64 %read_uint133, 1 + %___future_measure127 = tail call i64 @___future_measure(i64 %qalloc.i382, i64 1) + tail call void @___qfree(i64 %qalloc.i382) + %read_uint134 = tail call i64 @___read_future_uint(i64 %___future_measure127) + tail call void @___dec_future_refcount(i64 %___future_measure127) + %.not.not = icmp eq i64 %read_uint134, 2 + %3 = icmp eq i64 %read_uint134, 1 %"250_0.0" = zext i1 %3 to i64 %"255_0.0" = select i1 %.not.not, i64 2, i64 %"250_0.0" tail call void @print_int(ptr nonnull @res_q2.798C5BAD.0, i64 11, i64 %"255_0.0") - %lazy_measure273 = tail call i64 @___lazy_measure(i64 %qalloc.i385) - tail call void @___qfree(i64 %qalloc.i385) - %read_bool275 = tail call i1 @___read_future_bool(i64 %lazy_measure273) - tail call void @___dec_future_refcount(i64 %lazy_measure273) - tail call void @print_bool(ptr nonnull @res_q3.C33BF3D1.0, i64 12, i1 %read_bool275) + %___future_measure274 = tail call i64 @___future_measure(i64 %qalloc.i386, i64 0) + tail call void @___qfree(i64 %qalloc.i386) + %read_bool276 = tail call i1 @___read_future_bool(i64 %___future_measure274) + tail call void @___dec_future_refcount(i64 %___future_measure274) + tail call void @print_bool(ptr nonnull @res_q3.C33BF3D1.0, i64 12, i1 %read_bool276) br label %5 cond_exit_76: ; preds = %2 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i385) - tail call void @___qfree(i64 %qalloc.i385) - %lazy_measure60 = tail call i64 @___lazy_measure(i64 %qalloc.i381) - tail call void @___qfree(i64 %qalloc.i381) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - %.not.not376 = icmp eq i64 %read_uint, 2 + %___future_measure59 = tail call i64 @___future_measure(i64 %qalloc.i386, i64 1) + tail call void @___qfree(i64 %qalloc.i386) + %___future_measure61 = tail call i64 @___future_measure(i64 %qalloc.i382, i64 0) + tail call void @___qfree(i64 %qalloc.i382) + %read_uint = tail call i64 @___read_future_uint(i64 %___future_measure59) + tail call void @___dec_future_refcount(i64 %___future_measure59) + %.not.not377 = icmp eq i64 %read_uint, 2 %4 = icmp eq i64 %read_uint, 1 - %read_bool117 = tail call i1 @___read_future_bool(i64 %lazy_measure60) - tail call void @___dec_future_refcount(i64 %lazy_measure60) - tail call void @print_bool(ptr nonnull @res_q2.2A5B30FD.0, i64 12, i1 %read_bool117) + %read_bool118 = tail call i1 @___read_future_bool(i64 %___future_measure61) + tail call void @___dec_future_refcount(i64 %___future_measure61) + tail call void @print_bool(ptr nonnull @res_q2.2A5B30FD.0, i64 12, i1 %read_bool118) %"205_0.0" = zext i1 %4 to i64 - %"210_0.0" = select i1 %.not.not376, i64 2, i64 %"205_0.0" + %"210_0.0" = select i1 %.not.not377, i64 2, i64 %"205_0.0" tail call void @print_int(ptr nonnull @res_q3.D71179D6.0, i64 11, i64 %"210_0.0") br label %5 @@ -124,7 +124,7 @@ cond_exit_76: ; preds = %2 ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -132,8 +132,6 @@ declare i1 @___read_future_bool(i64) local_unnamed_addr declare void @___dec_future_refcount(i64) local_unnamed_addr -declare i64 @___lazy_measure_leaked(i64) local_unnamed_addr - declare i64 @___read_future_uint(i64) local_unnamed_addr declare void @print_bool(ptr, i64, i1) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output_multishot/measurement_output_multishot-sol-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output_multishot/measurement_output_multishot-sol-aarch64-unknown-linux-gnu.ll index d32ac253..ab1e250a 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output_multishot/measurement_output_multishot-sol-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output_multishot/measurement_output_multishot-sol-aarch64-unknown-linux-gnu.ll @@ -22,101 +22,101 @@ cond_277_case_0.i: ; preds = %alloca_block __hugr__.__tk2_sol_qalloc.273.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i, double 0x400921FB54442D18, double 0.000000e+00) - %qalloc.i377 = tail call i64 @___qalloc() - %not_max.not.not.i378 = icmp eq i64 %qalloc.i377, -1 - br i1 %not_max.not.not.i378, label %cond_277_case_0.i379, label %__hugr__.__tk2_sol_qalloc.273.exit380 + %qalloc.i378 = tail call i64 @___qalloc() + %not_max.not.not.i379 = icmp eq i64 %qalloc.i378, -1 + br i1 %not_max.not.not.i379, label %cond_277_case_0.i380, label %__hugr__.__tk2_sol_qalloc.273.exit381 -cond_277_case_0.i379: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit +cond_277_case_0.i380: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_sol_qalloc.273.exit380: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit - tail call void @___reset(i64 %qalloc.i377) - %qalloc.i381 = tail call i64 @___qalloc() - %not_max.not.not.i382 = icmp eq i64 %qalloc.i381, -1 - br i1 %not_max.not.not.i382, label %cond_277_case_0.i383, label %__hugr__.__tk2_sol_qalloc.273.exit384 +__hugr__.__tk2_sol_qalloc.273.exit381: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit + tail call void @___reset(i64 %qalloc.i378) + %qalloc.i382 = tail call i64 @___qalloc() + %not_max.not.not.i383 = icmp eq i64 %qalloc.i382, -1 + br i1 %not_max.not.not.i383, label %cond_277_case_0.i384, label %__hugr__.__tk2_sol_qalloc.273.exit385 -cond_277_case_0.i383: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit380 +cond_277_case_0.i384: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit381 tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_sol_qalloc.273.exit384: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit380 - tail call void @___reset(i64 %qalloc.i381) - %qalloc.i385 = tail call i64 @___qalloc() - %not_max.not.not.i386 = icmp eq i64 %qalloc.i385, -1 - br i1 %not_max.not.not.i386, label %cond_277_case_0.i387, label %__hugr__.__tk2_sol_qalloc.273.exit388 +__hugr__.__tk2_sol_qalloc.273.exit385: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit381 + tail call void @___reset(i64 %qalloc.i382) + %qalloc.i386 = tail call i64 @___qalloc() + %not_max.not.not.i387 = icmp eq i64 %qalloc.i386, -1 + br i1 %not_max.not.not.i387, label %cond_277_case_0.i388, label %__hugr__.__tk2_sol_qalloc.273.exit389 -cond_277_case_0.i387: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit384 +cond_277_case_0.i388: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit385 tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_sol_qalloc.273.exit388: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit384 - tail call void @___reset(i64 %qalloc.i385) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) +__hugr__.__tk2_sol_qalloc.273.exit389: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit385 + tail call void @___reset(i64 %qalloc.i386) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) br i1 %read_bool, label %1, label %0 -0: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit388 - tail call void @___rp(i64 %qalloc.i385, double 0x400921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %qalloc.i377, double 0x400921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rp(i64 %qalloc.i381, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rp(i64 %qalloc.i377, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rpp(i64 %qalloc.i377, i64 %qalloc.i381, double 0x3FF921FB54442D18, double 0xC00921FB54442D18) - tail call void @___rp(i64 %qalloc.i381, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %qalloc.i381, double 0xBFF921FB54442D18) +0: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit389 + tail call void @___rp(i64 %qalloc.i386, double 0x400921FB54442D18, double 0.000000e+00) + tail call void @___rp(i64 %qalloc.i378, double 0x400921FB54442D18, double 0x3FF921FB54442D18) + tail call void @___rp(i64 %qalloc.i382, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) + tail call void @___rp(i64 %qalloc.i378, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) + tail call void @___rpp(i64 %qalloc.i378, i64 %qalloc.i382, double 0x3FF921FB54442D18, double 0xC00921FB54442D18) + tail call void @___rp(i64 %qalloc.i382, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) + tail call void @___rz(i64 %qalloc.i382, double 0xBFF921FB54442D18) br label %2 -1: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit388 - tail call void @___rz(i64 %qalloc.i385, double 0x400921FB54442D18) - tail call void @___rp(i64 %qalloc.i377, double 0x400921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %qalloc.i377, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rpp(i64 %qalloc.i377, i64 %qalloc.i381, double 0x3FF921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %qalloc.i381, double 0xBFF921FB54442D18, double 0.000000e+00) +1: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit389 + tail call void @___rz(i64 %qalloc.i386, double 0x400921FB54442D18) + tail call void @___rp(i64 %qalloc.i378, double 0x400921FB54442D18, double 0.000000e+00) + tail call void @___rp(i64 %qalloc.i378, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) + tail call void @___rpp(i64 %qalloc.i378, i64 %qalloc.i382, double 0x3FF921FB54442D18, double 0.000000e+00) + tail call void @___rp(i64 %qalloc.i382, double 0xBFF921FB54442D18, double 0.000000e+00) br label %2 2: ; preds = %0, %1 %.sink = phi double [ 0x3FF921FB54442D18, %0 ], [ 0xBFF921FB54442D18, %1 ] - tail call void @___rp(i64 %qalloc.i377, double %.sink, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %qalloc.i377, double 0xBFF921FB54442D18) - %lazy_measure46 = tail call i64 @___lazy_measure(i64 %qalloc.i377) - tail call void @___qfree(i64 %qalloc.i377) - %read_bool48 = tail call i1 @___read_future_bool(i64 %lazy_measure46) - tail call void @___dec_future_refcount(i64 %lazy_measure46) + tail call void @___rp(i64 %qalloc.i378, double %.sink, double 0x3FF921FB54442D18) + tail call void @___rz(i64 %qalloc.i378, double 0xBFF921FB54442D18) + %___future_measure46 = tail call i64 @___future_measure(i64 %qalloc.i378, i64 0) + tail call void @___qfree(i64 %qalloc.i378) + %read_bool48 = tail call i1 @___read_future_bool(i64 %___future_measure46) + tail call void @___dec_future_refcount(i64 %___future_measure46) br i1 %read_bool48, label %cond_exit_76, label %cond_exit_141 cond_exit_141: ; preds = %2 - %lazy_measure_leaked126 = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i381) - tail call void @___qfree(i64 %qalloc.i381) - %read_uint133 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked126) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked126) - %.not.not = icmp eq i64 %read_uint133, 2 - %3 = icmp eq i64 %read_uint133, 1 + %___future_measure127 = tail call i64 @___future_measure(i64 %qalloc.i382, i64 1) + tail call void @___qfree(i64 %qalloc.i382) + %read_uint134 = tail call i64 @___read_future_uint(i64 %___future_measure127) + tail call void @___dec_future_refcount(i64 %___future_measure127) + %.not.not = icmp eq i64 %read_uint134, 2 + %3 = icmp eq i64 %read_uint134, 1 %"250_0.0" = zext i1 %3 to i64 %"255_0.0" = select i1 %.not.not, i64 2, i64 %"250_0.0" tail call void @print_int(ptr nonnull @res_q2.798C5BAD.0, i64 11, i64 %"255_0.0") - %lazy_measure273 = tail call i64 @___lazy_measure(i64 %qalloc.i385) - tail call void @___qfree(i64 %qalloc.i385) - %read_bool275 = tail call i1 @___read_future_bool(i64 %lazy_measure273) - tail call void @___dec_future_refcount(i64 %lazy_measure273) - tail call void @print_bool(ptr nonnull @res_q3.C33BF3D1.0, i64 12, i1 %read_bool275) + %___future_measure274 = tail call i64 @___future_measure(i64 %qalloc.i386, i64 0) + tail call void @___qfree(i64 %qalloc.i386) + %read_bool276 = tail call i1 @___read_future_bool(i64 %___future_measure274) + tail call void @___dec_future_refcount(i64 %___future_measure274) + tail call void @print_bool(ptr nonnull @res_q3.C33BF3D1.0, i64 12, i1 %read_bool276) br label %5 cond_exit_76: ; preds = %2 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i385) - tail call void @___qfree(i64 %qalloc.i385) - %lazy_measure60 = tail call i64 @___lazy_measure(i64 %qalloc.i381) - tail call void @___qfree(i64 %qalloc.i381) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - %.not.not376 = icmp eq i64 %read_uint, 2 + %___future_measure59 = tail call i64 @___future_measure(i64 %qalloc.i386, i64 1) + tail call void @___qfree(i64 %qalloc.i386) + %___future_measure61 = tail call i64 @___future_measure(i64 %qalloc.i382, i64 0) + tail call void @___qfree(i64 %qalloc.i382) + %read_uint = tail call i64 @___read_future_uint(i64 %___future_measure59) + tail call void @___dec_future_refcount(i64 %___future_measure59) + %.not.not377 = icmp eq i64 %read_uint, 2 %4 = icmp eq i64 %read_uint, 1 - %read_bool117 = tail call i1 @___read_future_bool(i64 %lazy_measure60) - tail call void @___dec_future_refcount(i64 %lazy_measure60) - tail call void @print_bool(ptr nonnull @res_q2.2A5B30FD.0, i64 12, i1 %read_bool117) + %read_bool118 = tail call i1 @___read_future_bool(i64 %___future_measure61) + tail call void @___dec_future_refcount(i64 %___future_measure61) + tail call void @print_bool(ptr nonnull @res_q2.2A5B30FD.0, i64 12, i1 %read_bool118) %"205_0.0" = zext i1 %4 to i64 - %"210_0.0" = select i1 %.not.not376, i64 2, i64 %"205_0.0" + %"210_0.0" = select i1 %.not.not377, i64 2, i64 %"205_0.0" tail call void @print_int(ptr nonnull @res_q3.D71179D6.0, i64 11, i64 %"210_0.0") br label %5 @@ -124,7 +124,7 @@ cond_exit_76: ; preds = %2 ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -132,8 +132,6 @@ declare i1 @___read_future_bool(i64) local_unnamed_addr declare void @___dec_future_refcount(i64) local_unnamed_addr -declare i64 @___lazy_measure_leaked(i64) local_unnamed_addr - declare i64 @___read_future_uint(i64) local_unnamed_addr declare void @print_bool(ptr, i64, i1) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output_multishot/measurement_output_multishot-sol-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output_multishot/measurement_output_multishot-sol-x86_64-apple-darwin.ll index 4a13ea6a..7daf58f3 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output_multishot/measurement_output_multishot-sol-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output_multishot/measurement_output_multishot-sol-x86_64-apple-darwin.ll @@ -22,101 +22,101 @@ cond_277_case_0.i: ; preds = %alloca_block __hugr__.__tk2_sol_qalloc.273.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i, double 0x400921FB54442D18, double 0.000000e+00) - %qalloc.i377 = tail call i64 @___qalloc() - %not_max.not.not.i378 = icmp eq i64 %qalloc.i377, -1 - br i1 %not_max.not.not.i378, label %cond_277_case_0.i379, label %__hugr__.__tk2_sol_qalloc.273.exit380 + %qalloc.i378 = tail call i64 @___qalloc() + %not_max.not.not.i379 = icmp eq i64 %qalloc.i378, -1 + br i1 %not_max.not.not.i379, label %cond_277_case_0.i380, label %__hugr__.__tk2_sol_qalloc.273.exit381 -cond_277_case_0.i379: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit +cond_277_case_0.i380: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_sol_qalloc.273.exit380: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit - tail call void @___reset(i64 %qalloc.i377) - %qalloc.i381 = tail call i64 @___qalloc() - %not_max.not.not.i382 = icmp eq i64 %qalloc.i381, -1 - br i1 %not_max.not.not.i382, label %cond_277_case_0.i383, label %__hugr__.__tk2_sol_qalloc.273.exit384 +__hugr__.__tk2_sol_qalloc.273.exit381: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit + tail call void @___reset(i64 %qalloc.i378) + %qalloc.i382 = tail call i64 @___qalloc() + %not_max.not.not.i383 = icmp eq i64 %qalloc.i382, -1 + br i1 %not_max.not.not.i383, label %cond_277_case_0.i384, label %__hugr__.__tk2_sol_qalloc.273.exit385 -cond_277_case_0.i383: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit380 +cond_277_case_0.i384: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit381 tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_sol_qalloc.273.exit384: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit380 - tail call void @___reset(i64 %qalloc.i381) - %qalloc.i385 = tail call i64 @___qalloc() - %not_max.not.not.i386 = icmp eq i64 %qalloc.i385, -1 - br i1 %not_max.not.not.i386, label %cond_277_case_0.i387, label %__hugr__.__tk2_sol_qalloc.273.exit388 +__hugr__.__tk2_sol_qalloc.273.exit385: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit381 + tail call void @___reset(i64 %qalloc.i382) + %qalloc.i386 = tail call i64 @___qalloc() + %not_max.not.not.i387 = icmp eq i64 %qalloc.i386, -1 + br i1 %not_max.not.not.i387, label %cond_277_case_0.i388, label %__hugr__.__tk2_sol_qalloc.273.exit389 -cond_277_case_0.i387: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit384 +cond_277_case_0.i388: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit385 tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_sol_qalloc.273.exit388: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit384 - tail call void @___reset(i64 %qalloc.i385) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) +__hugr__.__tk2_sol_qalloc.273.exit389: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit385 + tail call void @___reset(i64 %qalloc.i386) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) br i1 %read_bool, label %1, label %0 -0: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit388 - tail call void @___rp(i64 %qalloc.i385, double 0x400921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %qalloc.i377, double 0x400921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rp(i64 %qalloc.i381, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rp(i64 %qalloc.i377, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rpp(i64 %qalloc.i377, i64 %qalloc.i381, double 0x3FF921FB54442D18, double 0xC00921FB54442D18) - tail call void @___rp(i64 %qalloc.i381, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %qalloc.i381, double 0xBFF921FB54442D18) +0: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit389 + tail call void @___rp(i64 %qalloc.i386, double 0x400921FB54442D18, double 0.000000e+00) + tail call void @___rp(i64 %qalloc.i378, double 0x400921FB54442D18, double 0x3FF921FB54442D18) + tail call void @___rp(i64 %qalloc.i382, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) + tail call void @___rp(i64 %qalloc.i378, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) + tail call void @___rpp(i64 %qalloc.i378, i64 %qalloc.i382, double 0x3FF921FB54442D18, double 0xC00921FB54442D18) + tail call void @___rp(i64 %qalloc.i382, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) + tail call void @___rz(i64 %qalloc.i382, double 0xBFF921FB54442D18) br label %2 -1: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit388 - tail call void @___rz(i64 %qalloc.i385, double 0x400921FB54442D18) - tail call void @___rp(i64 %qalloc.i377, double 0x400921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %qalloc.i377, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rpp(i64 %qalloc.i377, i64 %qalloc.i381, double 0x3FF921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %qalloc.i381, double 0xBFF921FB54442D18, double 0.000000e+00) +1: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit389 + tail call void @___rz(i64 %qalloc.i386, double 0x400921FB54442D18) + tail call void @___rp(i64 %qalloc.i378, double 0x400921FB54442D18, double 0.000000e+00) + tail call void @___rp(i64 %qalloc.i378, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) + tail call void @___rpp(i64 %qalloc.i378, i64 %qalloc.i382, double 0x3FF921FB54442D18, double 0.000000e+00) + tail call void @___rp(i64 %qalloc.i382, double 0xBFF921FB54442D18, double 0.000000e+00) br label %2 2: ; preds = %0, %1 %.sink = phi double [ 0x3FF921FB54442D18, %0 ], [ 0xBFF921FB54442D18, %1 ] - tail call void @___rp(i64 %qalloc.i377, double %.sink, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %qalloc.i377, double 0xBFF921FB54442D18) - %lazy_measure46 = tail call i64 @___lazy_measure(i64 %qalloc.i377) - tail call void @___qfree(i64 %qalloc.i377) - %read_bool48 = tail call i1 @___read_future_bool(i64 %lazy_measure46) - tail call void @___dec_future_refcount(i64 %lazy_measure46) + tail call void @___rp(i64 %qalloc.i378, double %.sink, double 0x3FF921FB54442D18) + tail call void @___rz(i64 %qalloc.i378, double 0xBFF921FB54442D18) + %___future_measure46 = tail call i64 @___future_measure(i64 %qalloc.i378, i64 0) + tail call void @___qfree(i64 %qalloc.i378) + %read_bool48 = tail call i1 @___read_future_bool(i64 %___future_measure46) + tail call void @___dec_future_refcount(i64 %___future_measure46) br i1 %read_bool48, label %cond_exit_76, label %cond_exit_141 cond_exit_141: ; preds = %2 - %lazy_measure_leaked126 = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i381) - tail call void @___qfree(i64 %qalloc.i381) - %read_uint133 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked126) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked126) - %.not.not = icmp eq i64 %read_uint133, 2 - %3 = icmp eq i64 %read_uint133, 1 + %___future_measure127 = tail call i64 @___future_measure(i64 %qalloc.i382, i64 1) + tail call void @___qfree(i64 %qalloc.i382) + %read_uint134 = tail call i64 @___read_future_uint(i64 %___future_measure127) + tail call void @___dec_future_refcount(i64 %___future_measure127) + %.not.not = icmp eq i64 %read_uint134, 2 + %3 = icmp eq i64 %read_uint134, 1 %"250_0.0" = zext i1 %3 to i64 %"255_0.0" = select i1 %.not.not, i64 2, i64 %"250_0.0" tail call void @print_int(ptr nonnull @res_q2.798C5BAD.0, i64 11, i64 %"255_0.0") - %lazy_measure273 = tail call i64 @___lazy_measure(i64 %qalloc.i385) - tail call void @___qfree(i64 %qalloc.i385) - %read_bool275 = tail call i1 @___read_future_bool(i64 %lazy_measure273) - tail call void @___dec_future_refcount(i64 %lazy_measure273) - tail call void @print_bool(ptr nonnull @res_q3.C33BF3D1.0, i64 12, i1 %read_bool275) + %___future_measure274 = tail call i64 @___future_measure(i64 %qalloc.i386, i64 0) + tail call void @___qfree(i64 %qalloc.i386) + %read_bool276 = tail call i1 @___read_future_bool(i64 %___future_measure274) + tail call void @___dec_future_refcount(i64 %___future_measure274) + tail call void @print_bool(ptr nonnull @res_q3.C33BF3D1.0, i64 12, i1 %read_bool276) br label %5 cond_exit_76: ; preds = %2 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i385) - tail call void @___qfree(i64 %qalloc.i385) - %lazy_measure60 = tail call i64 @___lazy_measure(i64 %qalloc.i381) - tail call void @___qfree(i64 %qalloc.i381) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - %.not.not376 = icmp eq i64 %read_uint, 2 + %___future_measure59 = tail call i64 @___future_measure(i64 %qalloc.i386, i64 1) + tail call void @___qfree(i64 %qalloc.i386) + %___future_measure61 = tail call i64 @___future_measure(i64 %qalloc.i382, i64 0) + tail call void @___qfree(i64 %qalloc.i382) + %read_uint = tail call i64 @___read_future_uint(i64 %___future_measure59) + tail call void @___dec_future_refcount(i64 %___future_measure59) + %.not.not377 = icmp eq i64 %read_uint, 2 %4 = icmp eq i64 %read_uint, 1 - %read_bool117 = tail call i1 @___read_future_bool(i64 %lazy_measure60) - tail call void @___dec_future_refcount(i64 %lazy_measure60) - tail call void @print_bool(ptr nonnull @res_q2.2A5B30FD.0, i64 12, i1 %read_bool117) + %read_bool118 = tail call i1 @___read_future_bool(i64 %___future_measure61) + tail call void @___dec_future_refcount(i64 %___future_measure61) + tail call void @print_bool(ptr nonnull @res_q2.2A5B30FD.0, i64 12, i1 %read_bool118) %"205_0.0" = zext i1 %4 to i64 - %"210_0.0" = select i1 %.not.not376, i64 2, i64 %"205_0.0" + %"210_0.0" = select i1 %.not.not377, i64 2, i64 %"205_0.0" tail call void @print_int(ptr nonnull @res_q3.D71179D6.0, i64 11, i64 %"210_0.0") br label %5 @@ -124,7 +124,7 @@ cond_exit_76: ; preds = %2 ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -132,8 +132,6 @@ declare i1 @___read_future_bool(i64) local_unnamed_addr declare void @___dec_future_refcount(i64) local_unnamed_addr -declare i64 @___lazy_measure_leaked(i64) local_unnamed_addr - declare i64 @___read_future_uint(i64) local_unnamed_addr declare void @print_bool(ptr, i64, i1) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output_multishot/measurement_output_multishot-sol-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output_multishot/measurement_output_multishot-sol-x86_64-unknown-linux-gnu.ll index bffb9df6..4d9256d3 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output_multishot/measurement_output_multishot-sol-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output_multishot/measurement_output_multishot-sol-x86_64-unknown-linux-gnu.ll @@ -22,101 +22,101 @@ cond_277_case_0.i: ; preds = %alloca_block __hugr__.__tk2_sol_qalloc.273.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i, double 0x400921FB54442D18, double 0.000000e+00) - %qalloc.i377 = tail call i64 @___qalloc() - %not_max.not.not.i378 = icmp eq i64 %qalloc.i377, -1 - br i1 %not_max.not.not.i378, label %cond_277_case_0.i379, label %__hugr__.__tk2_sol_qalloc.273.exit380 + %qalloc.i378 = tail call i64 @___qalloc() + %not_max.not.not.i379 = icmp eq i64 %qalloc.i378, -1 + br i1 %not_max.not.not.i379, label %cond_277_case_0.i380, label %__hugr__.__tk2_sol_qalloc.273.exit381 -cond_277_case_0.i379: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit +cond_277_case_0.i380: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_sol_qalloc.273.exit380: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit - tail call void @___reset(i64 %qalloc.i377) - %qalloc.i381 = tail call i64 @___qalloc() - %not_max.not.not.i382 = icmp eq i64 %qalloc.i381, -1 - br i1 %not_max.not.not.i382, label %cond_277_case_0.i383, label %__hugr__.__tk2_sol_qalloc.273.exit384 +__hugr__.__tk2_sol_qalloc.273.exit381: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit + tail call void @___reset(i64 %qalloc.i378) + %qalloc.i382 = tail call i64 @___qalloc() + %not_max.not.not.i383 = icmp eq i64 %qalloc.i382, -1 + br i1 %not_max.not.not.i383, label %cond_277_case_0.i384, label %__hugr__.__tk2_sol_qalloc.273.exit385 -cond_277_case_0.i383: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit380 +cond_277_case_0.i384: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit381 tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_sol_qalloc.273.exit384: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit380 - tail call void @___reset(i64 %qalloc.i381) - %qalloc.i385 = tail call i64 @___qalloc() - %not_max.not.not.i386 = icmp eq i64 %qalloc.i385, -1 - br i1 %not_max.not.not.i386, label %cond_277_case_0.i387, label %__hugr__.__tk2_sol_qalloc.273.exit388 +__hugr__.__tk2_sol_qalloc.273.exit385: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit381 + tail call void @___reset(i64 %qalloc.i382) + %qalloc.i386 = tail call i64 @___qalloc() + %not_max.not.not.i387 = icmp eq i64 %qalloc.i386, -1 + br i1 %not_max.not.not.i387, label %cond_277_case_0.i388, label %__hugr__.__tk2_sol_qalloc.273.exit389 -cond_277_case_0.i387: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit384 +cond_277_case_0.i388: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit385 tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_sol_qalloc.273.exit388: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit384 - tail call void @___reset(i64 %qalloc.i385) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) +__hugr__.__tk2_sol_qalloc.273.exit389: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit385 + tail call void @___reset(i64 %qalloc.i386) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) br i1 %read_bool, label %1, label %0 -0: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit388 - tail call void @___rp(i64 %qalloc.i385, double 0x400921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %qalloc.i377, double 0x400921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rp(i64 %qalloc.i381, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rp(i64 %qalloc.i377, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rpp(i64 %qalloc.i377, i64 %qalloc.i381, double 0x3FF921FB54442D18, double 0xC00921FB54442D18) - tail call void @___rp(i64 %qalloc.i381, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %qalloc.i381, double 0xBFF921FB54442D18) +0: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit389 + tail call void @___rp(i64 %qalloc.i386, double 0x400921FB54442D18, double 0.000000e+00) + tail call void @___rp(i64 %qalloc.i378, double 0x400921FB54442D18, double 0x3FF921FB54442D18) + tail call void @___rp(i64 %qalloc.i382, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) + tail call void @___rp(i64 %qalloc.i378, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) + tail call void @___rpp(i64 %qalloc.i378, i64 %qalloc.i382, double 0x3FF921FB54442D18, double 0xC00921FB54442D18) + tail call void @___rp(i64 %qalloc.i382, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) + tail call void @___rz(i64 %qalloc.i382, double 0xBFF921FB54442D18) br label %2 -1: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit388 - tail call void @___rz(i64 %qalloc.i385, double 0x400921FB54442D18) - tail call void @___rp(i64 %qalloc.i377, double 0x400921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %qalloc.i377, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rpp(i64 %qalloc.i377, i64 %qalloc.i381, double 0x3FF921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %qalloc.i381, double 0xBFF921FB54442D18, double 0.000000e+00) +1: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit389 + tail call void @___rz(i64 %qalloc.i386, double 0x400921FB54442D18) + tail call void @___rp(i64 %qalloc.i378, double 0x400921FB54442D18, double 0.000000e+00) + tail call void @___rp(i64 %qalloc.i378, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) + tail call void @___rpp(i64 %qalloc.i378, i64 %qalloc.i382, double 0x3FF921FB54442D18, double 0.000000e+00) + tail call void @___rp(i64 %qalloc.i382, double 0xBFF921FB54442D18, double 0.000000e+00) br label %2 2: ; preds = %0, %1 %.sink = phi double [ 0x3FF921FB54442D18, %0 ], [ 0xBFF921FB54442D18, %1 ] - tail call void @___rp(i64 %qalloc.i377, double %.sink, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %qalloc.i377, double 0xBFF921FB54442D18) - %lazy_measure46 = tail call i64 @___lazy_measure(i64 %qalloc.i377) - tail call void @___qfree(i64 %qalloc.i377) - %read_bool48 = tail call i1 @___read_future_bool(i64 %lazy_measure46) - tail call void @___dec_future_refcount(i64 %lazy_measure46) + tail call void @___rp(i64 %qalloc.i378, double %.sink, double 0x3FF921FB54442D18) + tail call void @___rz(i64 %qalloc.i378, double 0xBFF921FB54442D18) + %___future_measure46 = tail call i64 @___future_measure(i64 %qalloc.i378, i64 0) + tail call void @___qfree(i64 %qalloc.i378) + %read_bool48 = tail call i1 @___read_future_bool(i64 %___future_measure46) + tail call void @___dec_future_refcount(i64 %___future_measure46) br i1 %read_bool48, label %cond_exit_76, label %cond_exit_141 cond_exit_141: ; preds = %2 - %lazy_measure_leaked126 = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i381) - tail call void @___qfree(i64 %qalloc.i381) - %read_uint133 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked126) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked126) - %.not.not = icmp eq i64 %read_uint133, 2 - %3 = icmp eq i64 %read_uint133, 1 + %___future_measure127 = tail call i64 @___future_measure(i64 %qalloc.i382, i64 1) + tail call void @___qfree(i64 %qalloc.i382) + %read_uint134 = tail call i64 @___read_future_uint(i64 %___future_measure127) + tail call void @___dec_future_refcount(i64 %___future_measure127) + %.not.not = icmp eq i64 %read_uint134, 2 + %3 = icmp eq i64 %read_uint134, 1 %"250_0.0" = zext i1 %3 to i64 %"255_0.0" = select i1 %.not.not, i64 2, i64 %"250_0.0" tail call void @print_int(ptr nonnull @res_q2.798C5BAD.0, i64 11, i64 %"255_0.0") - %lazy_measure273 = tail call i64 @___lazy_measure(i64 %qalloc.i385) - tail call void @___qfree(i64 %qalloc.i385) - %read_bool275 = tail call i1 @___read_future_bool(i64 %lazy_measure273) - tail call void @___dec_future_refcount(i64 %lazy_measure273) - tail call void @print_bool(ptr nonnull @res_q3.C33BF3D1.0, i64 12, i1 %read_bool275) + %___future_measure274 = tail call i64 @___future_measure(i64 %qalloc.i386, i64 0) + tail call void @___qfree(i64 %qalloc.i386) + %read_bool276 = tail call i1 @___read_future_bool(i64 %___future_measure274) + tail call void @___dec_future_refcount(i64 %___future_measure274) + tail call void @print_bool(ptr nonnull @res_q3.C33BF3D1.0, i64 12, i1 %read_bool276) br label %5 cond_exit_76: ; preds = %2 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i385) - tail call void @___qfree(i64 %qalloc.i385) - %lazy_measure60 = tail call i64 @___lazy_measure(i64 %qalloc.i381) - tail call void @___qfree(i64 %qalloc.i381) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - %.not.not376 = icmp eq i64 %read_uint, 2 + %___future_measure59 = tail call i64 @___future_measure(i64 %qalloc.i386, i64 1) + tail call void @___qfree(i64 %qalloc.i386) + %___future_measure61 = tail call i64 @___future_measure(i64 %qalloc.i382, i64 0) + tail call void @___qfree(i64 %qalloc.i382) + %read_uint = tail call i64 @___read_future_uint(i64 %___future_measure59) + tail call void @___dec_future_refcount(i64 %___future_measure59) + %.not.not377 = icmp eq i64 %read_uint, 2 %4 = icmp eq i64 %read_uint, 1 - %read_bool117 = tail call i1 @___read_future_bool(i64 %lazy_measure60) - tail call void @___dec_future_refcount(i64 %lazy_measure60) - tail call void @print_bool(ptr nonnull @res_q2.2A5B30FD.0, i64 12, i1 %read_bool117) + %read_bool118 = tail call i1 @___read_future_bool(i64 %___future_measure61) + tail call void @___dec_future_refcount(i64 %___future_measure61) + tail call void @print_bool(ptr nonnull @res_q2.2A5B30FD.0, i64 12, i1 %read_bool118) %"205_0.0" = zext i1 %4 to i64 - %"210_0.0" = select i1 %.not.not376, i64 2, i64 %"205_0.0" + %"210_0.0" = select i1 %.not.not377, i64 2, i64 %"205_0.0" tail call void @print_int(ptr nonnull @res_q3.D71179D6.0, i64 11, i64 %"210_0.0") br label %5 @@ -124,7 +124,7 @@ cond_exit_76: ; preds = %2 ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -132,8 +132,6 @@ declare i1 @___read_future_bool(i64) local_unnamed_addr declare void @___dec_future_refcount(i64) local_unnamed_addr -declare i64 @___lazy_measure_leaked(i64) local_unnamed_addr - declare i64 @___read_future_uint(i64) local_unnamed_addr declare void @print_bool(ptr, i64, i1) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output_multishot/measurement_output_multishot-sol-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output_multishot/measurement_output_multishot-sol-x86_64-windows-gnu.ll index 84ddc015..f30c6a87 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output_multishot/measurement_output_multishot-sol-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_measurement_output_multishot/measurement_output_multishot-sol-x86_64-windows-gnu.ll @@ -22,101 +22,101 @@ cond_277_case_0.i: ; preds = %alloca_block __hugr__.__tk2_sol_qalloc.273.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i, double 0x400921FB54442D18, double 0.000000e+00) - %qalloc.i377 = tail call i64 @___qalloc() - %not_max.not.not.i378 = icmp eq i64 %qalloc.i377, -1 - br i1 %not_max.not.not.i378, label %cond_277_case_0.i379, label %__hugr__.__tk2_sol_qalloc.273.exit380 + %qalloc.i378 = tail call i64 @___qalloc() + %not_max.not.not.i379 = icmp eq i64 %qalloc.i378, -1 + br i1 %not_max.not.not.i379, label %cond_277_case_0.i380, label %__hugr__.__tk2_sol_qalloc.273.exit381 -cond_277_case_0.i379: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit +cond_277_case_0.i380: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_sol_qalloc.273.exit380: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit - tail call void @___reset(i64 %qalloc.i377) - %qalloc.i381 = tail call i64 @___qalloc() - %not_max.not.not.i382 = icmp eq i64 %qalloc.i381, -1 - br i1 %not_max.not.not.i382, label %cond_277_case_0.i383, label %__hugr__.__tk2_sol_qalloc.273.exit384 +__hugr__.__tk2_sol_qalloc.273.exit381: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit + tail call void @___reset(i64 %qalloc.i378) + %qalloc.i382 = tail call i64 @___qalloc() + %not_max.not.not.i383 = icmp eq i64 %qalloc.i382, -1 + br i1 %not_max.not.not.i383, label %cond_277_case_0.i384, label %__hugr__.__tk2_sol_qalloc.273.exit385 -cond_277_case_0.i383: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit380 +cond_277_case_0.i384: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit381 tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_sol_qalloc.273.exit384: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit380 - tail call void @___reset(i64 %qalloc.i381) - %qalloc.i385 = tail call i64 @___qalloc() - %not_max.not.not.i386 = icmp eq i64 %qalloc.i385, -1 - br i1 %not_max.not.not.i386, label %cond_277_case_0.i387, label %__hugr__.__tk2_sol_qalloc.273.exit388 +__hugr__.__tk2_sol_qalloc.273.exit385: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit381 + tail call void @___reset(i64 %qalloc.i382) + %qalloc.i386 = tail call i64 @___qalloc() + %not_max.not.not.i387 = icmp eq i64 %qalloc.i386, -1 + br i1 %not_max.not.not.i387, label %cond_277_case_0.i388, label %__hugr__.__tk2_sol_qalloc.273.exit389 -cond_277_case_0.i387: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit384 +cond_277_case_0.i388: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit385 tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable -__hugr__.__tk2_sol_qalloc.273.exit388: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit384 - tail call void @___reset(i64 %qalloc.i385) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) +__hugr__.__tk2_sol_qalloc.273.exit389: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit385 + tail call void @___reset(i64 %qalloc.i386) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) br i1 %read_bool, label %1, label %0 -0: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit388 - tail call void @___rp(i64 %qalloc.i385, double 0x400921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %qalloc.i377, double 0x400921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rp(i64 %qalloc.i381, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rp(i64 %qalloc.i377, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rpp(i64 %qalloc.i377, i64 %qalloc.i381, double 0x3FF921FB54442D18, double 0xC00921FB54442D18) - tail call void @___rp(i64 %qalloc.i381, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %qalloc.i381, double 0xBFF921FB54442D18) +0: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit389 + tail call void @___rp(i64 %qalloc.i386, double 0x400921FB54442D18, double 0.000000e+00) + tail call void @___rp(i64 %qalloc.i378, double 0x400921FB54442D18, double 0x3FF921FB54442D18) + tail call void @___rp(i64 %qalloc.i382, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) + tail call void @___rp(i64 %qalloc.i378, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) + tail call void @___rpp(i64 %qalloc.i378, i64 %qalloc.i382, double 0x3FF921FB54442D18, double 0xC00921FB54442D18) + tail call void @___rp(i64 %qalloc.i382, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) + tail call void @___rz(i64 %qalloc.i382, double 0xBFF921FB54442D18) br label %2 -1: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit388 - tail call void @___rz(i64 %qalloc.i385, double 0x400921FB54442D18) - tail call void @___rp(i64 %qalloc.i377, double 0x400921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %qalloc.i377, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rpp(i64 %qalloc.i377, i64 %qalloc.i381, double 0x3FF921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %qalloc.i381, double 0xBFF921FB54442D18, double 0.000000e+00) +1: ; preds = %__hugr__.__tk2_sol_qalloc.273.exit389 + tail call void @___rz(i64 %qalloc.i386, double 0x400921FB54442D18) + tail call void @___rp(i64 %qalloc.i378, double 0x400921FB54442D18, double 0.000000e+00) + tail call void @___rp(i64 %qalloc.i378, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) + tail call void @___rpp(i64 %qalloc.i378, i64 %qalloc.i382, double 0x3FF921FB54442D18, double 0.000000e+00) + tail call void @___rp(i64 %qalloc.i382, double 0xBFF921FB54442D18, double 0.000000e+00) br label %2 2: ; preds = %0, %1 %.sink = phi double [ 0x3FF921FB54442D18, %0 ], [ 0xBFF921FB54442D18, %1 ] - tail call void @___rp(i64 %qalloc.i377, double %.sink, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %qalloc.i377, double 0xBFF921FB54442D18) - %lazy_measure46 = tail call i64 @___lazy_measure(i64 %qalloc.i377) - tail call void @___qfree(i64 %qalloc.i377) - %read_bool48 = tail call i1 @___read_future_bool(i64 %lazy_measure46) - tail call void @___dec_future_refcount(i64 %lazy_measure46) + tail call void @___rp(i64 %qalloc.i378, double %.sink, double 0x3FF921FB54442D18) + tail call void @___rz(i64 %qalloc.i378, double 0xBFF921FB54442D18) + %___future_measure46 = tail call i64 @___future_measure(i64 %qalloc.i378, i64 0) + tail call void @___qfree(i64 %qalloc.i378) + %read_bool48 = tail call i1 @___read_future_bool(i64 %___future_measure46) + tail call void @___dec_future_refcount(i64 %___future_measure46) br i1 %read_bool48, label %cond_exit_76, label %cond_exit_141 cond_exit_141: ; preds = %2 - %lazy_measure_leaked126 = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i381) - tail call void @___qfree(i64 %qalloc.i381) - %read_uint133 = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked126) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked126) - %.not.not = icmp eq i64 %read_uint133, 2 - %3 = icmp eq i64 %read_uint133, 1 + %___future_measure127 = tail call i64 @___future_measure(i64 %qalloc.i382, i64 1) + tail call void @___qfree(i64 %qalloc.i382) + %read_uint134 = tail call i64 @___read_future_uint(i64 %___future_measure127) + tail call void @___dec_future_refcount(i64 %___future_measure127) + %.not.not = icmp eq i64 %read_uint134, 2 + %3 = icmp eq i64 %read_uint134, 1 %"250_0.0" = zext i1 %3 to i64 %"255_0.0" = select i1 %.not.not, i64 2, i64 %"250_0.0" tail call void @print_int(ptr nonnull @res_q2.798C5BAD.0, i64 11, i64 %"255_0.0") - %lazy_measure273 = tail call i64 @___lazy_measure(i64 %qalloc.i385) - tail call void @___qfree(i64 %qalloc.i385) - %read_bool275 = tail call i1 @___read_future_bool(i64 %lazy_measure273) - tail call void @___dec_future_refcount(i64 %lazy_measure273) - tail call void @print_bool(ptr nonnull @res_q3.C33BF3D1.0, i64 12, i1 %read_bool275) + %___future_measure274 = tail call i64 @___future_measure(i64 %qalloc.i386, i64 0) + tail call void @___qfree(i64 %qalloc.i386) + %read_bool276 = tail call i1 @___read_future_bool(i64 %___future_measure274) + tail call void @___dec_future_refcount(i64 %___future_measure274) + tail call void @print_bool(ptr nonnull @res_q3.C33BF3D1.0, i64 12, i1 %read_bool276) br label %5 cond_exit_76: ; preds = %2 - %lazy_measure_leaked = tail call i64 @___lazy_measure_leaked(i64 %qalloc.i385) - tail call void @___qfree(i64 %qalloc.i385) - %lazy_measure60 = tail call i64 @___lazy_measure(i64 %qalloc.i381) - tail call void @___qfree(i64 %qalloc.i381) - %read_uint = tail call i64 @___read_future_uint(i64 %lazy_measure_leaked) - tail call void @___dec_future_refcount(i64 %lazy_measure_leaked) - %.not.not376 = icmp eq i64 %read_uint, 2 + %___future_measure59 = tail call i64 @___future_measure(i64 %qalloc.i386, i64 1) + tail call void @___qfree(i64 %qalloc.i386) + %___future_measure61 = tail call i64 @___future_measure(i64 %qalloc.i382, i64 0) + tail call void @___qfree(i64 %qalloc.i382) + %read_uint = tail call i64 @___read_future_uint(i64 %___future_measure59) + tail call void @___dec_future_refcount(i64 %___future_measure59) + %.not.not377 = icmp eq i64 %read_uint, 2 %4 = icmp eq i64 %read_uint, 1 - %read_bool117 = tail call i1 @___read_future_bool(i64 %lazy_measure60) - tail call void @___dec_future_refcount(i64 %lazy_measure60) - tail call void @print_bool(ptr nonnull @res_q2.2A5B30FD.0, i64 12, i1 %read_bool117) + %read_bool118 = tail call i1 @___read_future_bool(i64 %___future_measure61) + tail call void @___dec_future_refcount(i64 %___future_measure61) + tail call void @print_bool(ptr nonnull @res_q2.2A5B30FD.0, i64 12, i1 %read_bool118) %"205_0.0" = zext i1 %4 to i64 - %"210_0.0" = select i1 %.not.not376, i64 2, i64 %"205_0.0" + %"210_0.0" = select i1 %.not.not377, i64 2, i64 %"205_0.0" tail call void @print_int(ptr nonnull @res_q3.D71179D6.0, i64 11, i64 %"210_0.0") br label %5 @@ -124,7 +124,7 @@ cond_exit_76: ; preds = %2 ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -132,8 +132,6 @@ declare i1 @___read_future_bool(i64) local_unnamed_addr declare void @___dec_future_refcount(i64) local_unnamed_addr -declare i64 @___lazy_measure_leaked(i64) local_unnamed_addr - declare i64 @___read_future_uint(i64) local_unnamed_addr declare void @print_bool(ptr, i64, i1) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics/metrics-helios-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics/metrics-helios-aarch64-apple-darwin.ll index df2bb845..78780549 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics/metrics-helios-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics/metrics-helios-aarch64-apple-darwin.ll @@ -187,7 +187,7 @@ panic.i850: ; preds = %cond_exit_137.1, %c %39 = or disjoint i64 %37, 1 store i64 %39, ptr %5, align 4 %40 = load i64, ptr %4, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %40) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %40) tail call void @___qfree(i64 %40) %41 = load i64, ptr %3, align 4 %42 = trunc i64 %41 to i1 @@ -196,7 +196,7 @@ panic.i850: ; preds = %cond_exit_137.1, %c cond_exit_137: ; preds = %.thread %43 = and i64 %41, -2 store i64 %43, ptr %3, align 4 - store i64 %lazy_measure, ptr %2, align 4 + store i64 %___lazy_measure, ptr %2, align 4 %44 = load i64, ptr %5, align 4 %45 = and i64 %44, 2 %.not916 = icmp eq i64 %45, 0 @@ -207,7 +207,7 @@ cond_exit_137: ; preds = %.thread store i64 %46, ptr %5, align 4 %47 = getelementptr inbounds nuw i8, ptr %4, i64 8 %48 = load i64, ptr %47, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %48) + %___lazy_measure.1 = tail call i64 @___lazy_measure(i64 %48) tail call void @___qfree(i64 %48) %49 = load i64, ptr %3, align 4 %50 = and i64 %49, 2 @@ -218,7 +218,7 @@ cond_exit_137.1: ; preds = %.thread.1 %51 = and i64 %49, -3 store i64 %51, ptr %3, align 4 %52 = getelementptr inbounds nuw i8, ptr %2, i64 8 - store i64 %lazy_measure.1, ptr %52, align 4 + store i64 %___lazy_measure.1, ptr %52, align 4 %53 = load i64, ptr %5, align 4 %54 = and i64 %53, 4 %.not918 = icmp eq i64 %54, 0 @@ -229,7 +229,7 @@ cond_exit_137.1: ; preds = %.thread.1 store i64 %55, ptr %5, align 4 %56 = getelementptr inbounds nuw i8, ptr %4, i64 16 %57 = load i64, ptr %56, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %57) + %___lazy_measure.2 = tail call i64 @___lazy_measure(i64 %57) tail call void @___qfree(i64 %57) %58 = load i64, ptr %3, align 4 %59 = and i64 %58, 4 @@ -240,7 +240,7 @@ cond_exit_137.2: ; preds = %.thread.2 %60 = and i64 %58, -5 store i64 %60, ptr %3, align 4 %61 = getelementptr inbounds nuw i8, ptr %2, i64 16 - store i64 %lazy_measure.2, ptr %61, align 4 + store i64 %___lazy_measure.2, ptr %61, align 4 %62 = load i64, ptr %5, align 4 %63 = or i64 %62, -8 store i64 %63, ptr %5, align 4 diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics/metrics-helios-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics/metrics-helios-aarch64-unknown-linux-gnu.ll index bc26a9a7..f104577e 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics/metrics-helios-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics/metrics-helios-aarch64-unknown-linux-gnu.ll @@ -187,7 +187,7 @@ panic.i850: ; preds = %cond_exit_137.1, %c %39 = or disjoint i64 %37, 1 store i64 %39, ptr %5, align 4 %40 = load i64, ptr %4, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %40) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %40) tail call void @___qfree(i64 %40) %41 = load i64, ptr %3, align 4 %42 = trunc i64 %41 to i1 @@ -196,7 +196,7 @@ panic.i850: ; preds = %cond_exit_137.1, %c cond_exit_137: ; preds = %.thread %43 = and i64 %41, -2 store i64 %43, ptr %3, align 4 - store i64 %lazy_measure, ptr %2, align 4 + store i64 %___lazy_measure, ptr %2, align 4 %44 = load i64, ptr %5, align 4 %45 = and i64 %44, 2 %.not916 = icmp eq i64 %45, 0 @@ -207,7 +207,7 @@ cond_exit_137: ; preds = %.thread store i64 %46, ptr %5, align 4 %47 = getelementptr inbounds nuw i8, ptr %4, i64 8 %48 = load i64, ptr %47, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %48) + %___lazy_measure.1 = tail call i64 @___lazy_measure(i64 %48) tail call void @___qfree(i64 %48) %49 = load i64, ptr %3, align 4 %50 = and i64 %49, 2 @@ -218,7 +218,7 @@ cond_exit_137.1: ; preds = %.thread.1 %51 = and i64 %49, -3 store i64 %51, ptr %3, align 4 %52 = getelementptr inbounds nuw i8, ptr %2, i64 8 - store i64 %lazy_measure.1, ptr %52, align 4 + store i64 %___lazy_measure.1, ptr %52, align 4 %53 = load i64, ptr %5, align 4 %54 = and i64 %53, 4 %.not918 = icmp eq i64 %54, 0 @@ -229,7 +229,7 @@ cond_exit_137.1: ; preds = %.thread.1 store i64 %55, ptr %5, align 4 %56 = getelementptr inbounds nuw i8, ptr %4, i64 16 %57 = load i64, ptr %56, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %57) + %___lazy_measure.2 = tail call i64 @___lazy_measure(i64 %57) tail call void @___qfree(i64 %57) %58 = load i64, ptr %3, align 4 %59 = and i64 %58, 4 @@ -240,7 +240,7 @@ cond_exit_137.2: ; preds = %.thread.2 %60 = and i64 %58, -5 store i64 %60, ptr %3, align 4 %61 = getelementptr inbounds nuw i8, ptr %2, i64 16 - store i64 %lazy_measure.2, ptr %61, align 4 + store i64 %___lazy_measure.2, ptr %61, align 4 %62 = load i64, ptr %5, align 4 %63 = or i64 %62, -8 store i64 %63, ptr %5, align 4 diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics/metrics-helios-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics/metrics-helios-x86_64-apple-darwin.ll index a3bd39e6..b530a81c 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics/metrics-helios-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics/metrics-helios-x86_64-apple-darwin.ll @@ -187,7 +187,7 @@ panic.i850: ; preds = %cond_exit_137.1, %c %39 = or disjoint i64 %37, 1 store i64 %39, ptr %5, align 4 %40 = load i64, ptr %4, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %40) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %40) tail call void @___qfree(i64 %40) %41 = load i64, ptr %3, align 4 %42 = trunc i64 %41 to i1 @@ -196,7 +196,7 @@ panic.i850: ; preds = %cond_exit_137.1, %c cond_exit_137: ; preds = %.thread %43 = and i64 %41, -2 store i64 %43, ptr %3, align 4 - store i64 %lazy_measure, ptr %2, align 4 + store i64 %___lazy_measure, ptr %2, align 4 %44 = load i64, ptr %5, align 4 %45 = and i64 %44, 2 %.not916 = icmp eq i64 %45, 0 @@ -207,7 +207,7 @@ cond_exit_137: ; preds = %.thread store i64 %46, ptr %5, align 4 %47 = getelementptr inbounds nuw i8, ptr %4, i64 8 %48 = load i64, ptr %47, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %48) + %___lazy_measure.1 = tail call i64 @___lazy_measure(i64 %48) tail call void @___qfree(i64 %48) %49 = load i64, ptr %3, align 4 %50 = and i64 %49, 2 @@ -218,7 +218,7 @@ cond_exit_137.1: ; preds = %.thread.1 %51 = and i64 %49, -3 store i64 %51, ptr %3, align 4 %52 = getelementptr inbounds nuw i8, ptr %2, i64 8 - store i64 %lazy_measure.1, ptr %52, align 4 + store i64 %___lazy_measure.1, ptr %52, align 4 %53 = load i64, ptr %5, align 4 %54 = and i64 %53, 4 %.not918 = icmp eq i64 %54, 0 @@ -229,7 +229,7 @@ cond_exit_137.1: ; preds = %.thread.1 store i64 %55, ptr %5, align 4 %56 = getelementptr inbounds nuw i8, ptr %4, i64 16 %57 = load i64, ptr %56, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %57) + %___lazy_measure.2 = tail call i64 @___lazy_measure(i64 %57) tail call void @___qfree(i64 %57) %58 = load i64, ptr %3, align 4 %59 = and i64 %58, 4 @@ -240,7 +240,7 @@ cond_exit_137.2: ; preds = %.thread.2 %60 = and i64 %58, -5 store i64 %60, ptr %3, align 4 %61 = getelementptr inbounds nuw i8, ptr %2, i64 16 - store i64 %lazy_measure.2, ptr %61, align 4 + store i64 %___lazy_measure.2, ptr %61, align 4 %62 = load i64, ptr %5, align 4 %63 = or i64 %62, -8 store i64 %63, ptr %5, align 4 diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics/metrics-helios-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics/metrics-helios-x86_64-unknown-linux-gnu.ll index 860f9124..3118cf35 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics/metrics-helios-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics/metrics-helios-x86_64-unknown-linux-gnu.ll @@ -187,7 +187,7 @@ panic.i850: ; preds = %cond_exit_137.1, %c %39 = or disjoint i64 %37, 1 store i64 %39, ptr %5, align 4 %40 = load i64, ptr %4, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %40) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %40) tail call void @___qfree(i64 %40) %41 = load i64, ptr %3, align 4 %42 = trunc i64 %41 to i1 @@ -196,7 +196,7 @@ panic.i850: ; preds = %cond_exit_137.1, %c cond_exit_137: ; preds = %.thread %43 = and i64 %41, -2 store i64 %43, ptr %3, align 4 - store i64 %lazy_measure, ptr %2, align 4 + store i64 %___lazy_measure, ptr %2, align 4 %44 = load i64, ptr %5, align 4 %45 = and i64 %44, 2 %.not916 = icmp eq i64 %45, 0 @@ -207,7 +207,7 @@ cond_exit_137: ; preds = %.thread store i64 %46, ptr %5, align 4 %47 = getelementptr inbounds nuw i8, ptr %4, i64 8 %48 = load i64, ptr %47, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %48) + %___lazy_measure.1 = tail call i64 @___lazy_measure(i64 %48) tail call void @___qfree(i64 %48) %49 = load i64, ptr %3, align 4 %50 = and i64 %49, 2 @@ -218,7 +218,7 @@ cond_exit_137.1: ; preds = %.thread.1 %51 = and i64 %49, -3 store i64 %51, ptr %3, align 4 %52 = getelementptr inbounds nuw i8, ptr %2, i64 8 - store i64 %lazy_measure.1, ptr %52, align 4 + store i64 %___lazy_measure.1, ptr %52, align 4 %53 = load i64, ptr %5, align 4 %54 = and i64 %53, 4 %.not918 = icmp eq i64 %54, 0 @@ -229,7 +229,7 @@ cond_exit_137.1: ; preds = %.thread.1 store i64 %55, ptr %5, align 4 %56 = getelementptr inbounds nuw i8, ptr %4, i64 16 %57 = load i64, ptr %56, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %57) + %___lazy_measure.2 = tail call i64 @___lazy_measure(i64 %57) tail call void @___qfree(i64 %57) %58 = load i64, ptr %3, align 4 %59 = and i64 %58, 4 @@ -240,7 +240,7 @@ cond_exit_137.2: ; preds = %.thread.2 %60 = and i64 %58, -5 store i64 %60, ptr %3, align 4 %61 = getelementptr inbounds nuw i8, ptr %2, i64 16 - store i64 %lazy_measure.2, ptr %61, align 4 + store i64 %___lazy_measure.2, ptr %61, align 4 %62 = load i64, ptr %5, align 4 %63 = or i64 %62, -8 store i64 %63, ptr %5, align 4 diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics/metrics-helios-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics/metrics-helios-x86_64-windows-gnu.ll index 159548e0..c4e3090b 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics/metrics-helios-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics/metrics-helios-x86_64-windows-gnu.ll @@ -187,7 +187,7 @@ panic.i850: ; preds = %cond_exit_137.1, %c %39 = or disjoint i64 %37, 1 store i64 %39, ptr %5, align 4 %40 = load i64, ptr %4, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %40) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %40) tail call void @___qfree(i64 %40) %41 = load i64, ptr %3, align 4 %42 = trunc i64 %41 to i1 @@ -196,7 +196,7 @@ panic.i850: ; preds = %cond_exit_137.1, %c cond_exit_137: ; preds = %.thread %43 = and i64 %41, -2 store i64 %43, ptr %3, align 4 - store i64 %lazy_measure, ptr %2, align 4 + store i64 %___lazy_measure, ptr %2, align 4 %44 = load i64, ptr %5, align 4 %45 = and i64 %44, 2 %.not916 = icmp eq i64 %45, 0 @@ -207,7 +207,7 @@ cond_exit_137: ; preds = %.thread store i64 %46, ptr %5, align 4 %47 = getelementptr inbounds nuw i8, ptr %4, i64 8 %48 = load i64, ptr %47, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %48) + %___lazy_measure.1 = tail call i64 @___lazy_measure(i64 %48) tail call void @___qfree(i64 %48) %49 = load i64, ptr %3, align 4 %50 = and i64 %49, 2 @@ -218,7 +218,7 @@ cond_exit_137.1: ; preds = %.thread.1 %51 = and i64 %49, -3 store i64 %51, ptr %3, align 4 %52 = getelementptr inbounds nuw i8, ptr %2, i64 8 - store i64 %lazy_measure.1, ptr %52, align 4 + store i64 %___lazy_measure.1, ptr %52, align 4 %53 = load i64, ptr %5, align 4 %54 = and i64 %53, 4 %.not918 = icmp eq i64 %54, 0 @@ -229,7 +229,7 @@ cond_exit_137.1: ; preds = %.thread.1 store i64 %55, ptr %5, align 4 %56 = getelementptr inbounds nuw i8, ptr %4, i64 16 %57 = load i64, ptr %56, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %57) + %___lazy_measure.2 = tail call i64 @___lazy_measure(i64 %57) tail call void @___qfree(i64 %57) %58 = load i64, ptr %3, align 4 %59 = and i64 %58, 4 @@ -240,7 +240,7 @@ cond_exit_137.2: ; preds = %.thread.2 %60 = and i64 %58, -5 store i64 %60, ptr %3, align 4 %61 = getelementptr inbounds nuw i8, ptr %2, i64 16 - store i64 %lazy_measure.2, ptr %61, align 4 + store i64 %___lazy_measure.2, ptr %61, align 4 %62 = load i64, ptr %5, align 4 %63 = or i64 %62, -8 store i64 %63, ptr %5, align 4 diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics/metrics-sol-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics/metrics-sol-aarch64-apple-darwin.ll index 35784a36..71ea11d1 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics/metrics-sol-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics/metrics-sol-aarch64-apple-darwin.ll @@ -194,7 +194,7 @@ panic.i850: ; preds = %cond_exit_137.1, %c %39 = or disjoint i64 %37, 1 store i64 %39, ptr %5, align 4 %40 = load i64, ptr %4, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %40) + %___future_measure = tail call i64 @___future_measure(i64 %40, i64 0) tail call void @___qfree(i64 %40) %41 = load i64, ptr %3, align 4 %42 = trunc i64 %41 to i1 @@ -203,7 +203,7 @@ panic.i850: ; preds = %cond_exit_137.1, %c cond_exit_137: ; preds = %.thread %43 = and i64 %41, -2 store i64 %43, ptr %3, align 4 - store i64 %lazy_measure, ptr %2, align 4 + store i64 %___future_measure, ptr %2, align 4 %44 = load i64, ptr %5, align 4 %45 = and i64 %44, 2 %.not916 = icmp eq i64 %45, 0 @@ -214,7 +214,7 @@ cond_exit_137: ; preds = %.thread store i64 %46, ptr %5, align 4 %47 = getelementptr inbounds nuw i8, ptr %4, i64 8 %48 = load i64, ptr %47, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %48) + %___future_measure.1 = tail call i64 @___future_measure(i64 %48, i64 0) tail call void @___qfree(i64 %48) %49 = load i64, ptr %3, align 4 %50 = and i64 %49, 2 @@ -225,7 +225,7 @@ cond_exit_137.1: ; preds = %.thread.1 %51 = and i64 %49, -3 store i64 %51, ptr %3, align 4 %52 = getelementptr inbounds nuw i8, ptr %2, i64 8 - store i64 %lazy_measure.1, ptr %52, align 4 + store i64 %___future_measure.1, ptr %52, align 4 %53 = load i64, ptr %5, align 4 %54 = and i64 %53, 4 %.not918 = icmp eq i64 %54, 0 @@ -236,7 +236,7 @@ cond_exit_137.1: ; preds = %.thread.1 store i64 %55, ptr %5, align 4 %56 = getelementptr inbounds nuw i8, ptr %4, i64 16 %57 = load i64, ptr %56, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %57) + %___future_measure.2 = tail call i64 @___future_measure(i64 %57, i64 0) tail call void @___qfree(i64 %57) %58 = load i64, ptr %3, align 4 %59 = and i64 %58, 4 @@ -247,7 +247,7 @@ cond_exit_137.2: ; preds = %.thread.2 %60 = and i64 %58, -5 store i64 %60, ptr %3, align 4 %61 = getelementptr inbounds nuw i8, ptr %2, i64 16 - store i64 %lazy_measure.2, ptr %61, align 4 + store i64 %___future_measure.2, ptr %61, align 4 %62 = load i64, ptr %5, align 4 %63 = or i64 %62, -8 store i64 %63, ptr %5, align 4 @@ -465,7 +465,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics/metrics-sol-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics/metrics-sol-aarch64-unknown-linux-gnu.ll index 6e546134..9ea823a2 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics/metrics-sol-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics/metrics-sol-aarch64-unknown-linux-gnu.ll @@ -194,7 +194,7 @@ panic.i850: ; preds = %cond_exit_137.1, %c %39 = or disjoint i64 %37, 1 store i64 %39, ptr %5, align 4 %40 = load i64, ptr %4, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %40) + %___future_measure = tail call i64 @___future_measure(i64 %40, i64 0) tail call void @___qfree(i64 %40) %41 = load i64, ptr %3, align 4 %42 = trunc i64 %41 to i1 @@ -203,7 +203,7 @@ panic.i850: ; preds = %cond_exit_137.1, %c cond_exit_137: ; preds = %.thread %43 = and i64 %41, -2 store i64 %43, ptr %3, align 4 - store i64 %lazy_measure, ptr %2, align 4 + store i64 %___future_measure, ptr %2, align 4 %44 = load i64, ptr %5, align 4 %45 = and i64 %44, 2 %.not916 = icmp eq i64 %45, 0 @@ -214,7 +214,7 @@ cond_exit_137: ; preds = %.thread store i64 %46, ptr %5, align 4 %47 = getelementptr inbounds nuw i8, ptr %4, i64 8 %48 = load i64, ptr %47, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %48) + %___future_measure.1 = tail call i64 @___future_measure(i64 %48, i64 0) tail call void @___qfree(i64 %48) %49 = load i64, ptr %3, align 4 %50 = and i64 %49, 2 @@ -225,7 +225,7 @@ cond_exit_137.1: ; preds = %.thread.1 %51 = and i64 %49, -3 store i64 %51, ptr %3, align 4 %52 = getelementptr inbounds nuw i8, ptr %2, i64 8 - store i64 %lazy_measure.1, ptr %52, align 4 + store i64 %___future_measure.1, ptr %52, align 4 %53 = load i64, ptr %5, align 4 %54 = and i64 %53, 4 %.not918 = icmp eq i64 %54, 0 @@ -236,7 +236,7 @@ cond_exit_137.1: ; preds = %.thread.1 store i64 %55, ptr %5, align 4 %56 = getelementptr inbounds nuw i8, ptr %4, i64 16 %57 = load i64, ptr %56, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %57) + %___future_measure.2 = tail call i64 @___future_measure(i64 %57, i64 0) tail call void @___qfree(i64 %57) %58 = load i64, ptr %3, align 4 %59 = and i64 %58, 4 @@ -247,7 +247,7 @@ cond_exit_137.2: ; preds = %.thread.2 %60 = and i64 %58, -5 store i64 %60, ptr %3, align 4 %61 = getelementptr inbounds nuw i8, ptr %2, i64 16 - store i64 %lazy_measure.2, ptr %61, align 4 + store i64 %___future_measure.2, ptr %61, align 4 %62 = load i64, ptr %5, align 4 %63 = or i64 %62, -8 store i64 %63, ptr %5, align 4 @@ -465,7 +465,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics/metrics-sol-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics/metrics-sol-x86_64-apple-darwin.ll index e135786c..2e207a13 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics/metrics-sol-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics/metrics-sol-x86_64-apple-darwin.ll @@ -194,7 +194,7 @@ panic.i850: ; preds = %cond_exit_137.1, %c %39 = or disjoint i64 %37, 1 store i64 %39, ptr %5, align 4 %40 = load i64, ptr %4, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %40) + %___future_measure = tail call i64 @___future_measure(i64 %40, i64 0) tail call void @___qfree(i64 %40) %41 = load i64, ptr %3, align 4 %42 = trunc i64 %41 to i1 @@ -203,7 +203,7 @@ panic.i850: ; preds = %cond_exit_137.1, %c cond_exit_137: ; preds = %.thread %43 = and i64 %41, -2 store i64 %43, ptr %3, align 4 - store i64 %lazy_measure, ptr %2, align 4 + store i64 %___future_measure, ptr %2, align 4 %44 = load i64, ptr %5, align 4 %45 = and i64 %44, 2 %.not916 = icmp eq i64 %45, 0 @@ -214,7 +214,7 @@ cond_exit_137: ; preds = %.thread store i64 %46, ptr %5, align 4 %47 = getelementptr inbounds nuw i8, ptr %4, i64 8 %48 = load i64, ptr %47, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %48) + %___future_measure.1 = tail call i64 @___future_measure(i64 %48, i64 0) tail call void @___qfree(i64 %48) %49 = load i64, ptr %3, align 4 %50 = and i64 %49, 2 @@ -225,7 +225,7 @@ cond_exit_137.1: ; preds = %.thread.1 %51 = and i64 %49, -3 store i64 %51, ptr %3, align 4 %52 = getelementptr inbounds nuw i8, ptr %2, i64 8 - store i64 %lazy_measure.1, ptr %52, align 4 + store i64 %___future_measure.1, ptr %52, align 4 %53 = load i64, ptr %5, align 4 %54 = and i64 %53, 4 %.not918 = icmp eq i64 %54, 0 @@ -236,7 +236,7 @@ cond_exit_137.1: ; preds = %.thread.1 store i64 %55, ptr %5, align 4 %56 = getelementptr inbounds nuw i8, ptr %4, i64 16 %57 = load i64, ptr %56, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %57) + %___future_measure.2 = tail call i64 @___future_measure(i64 %57, i64 0) tail call void @___qfree(i64 %57) %58 = load i64, ptr %3, align 4 %59 = and i64 %58, 4 @@ -247,7 +247,7 @@ cond_exit_137.2: ; preds = %.thread.2 %60 = and i64 %58, -5 store i64 %60, ptr %3, align 4 %61 = getelementptr inbounds nuw i8, ptr %2, i64 16 - store i64 %lazy_measure.2, ptr %61, align 4 + store i64 %___future_measure.2, ptr %61, align 4 %62 = load i64, ptr %5, align 4 %63 = or i64 %62, -8 store i64 %63, ptr %5, align 4 @@ -465,7 +465,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics/metrics-sol-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics/metrics-sol-x86_64-unknown-linux-gnu.ll index 99a310d4..88fc7e7e 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics/metrics-sol-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics/metrics-sol-x86_64-unknown-linux-gnu.ll @@ -194,7 +194,7 @@ panic.i850: ; preds = %cond_exit_137.1, %c %39 = or disjoint i64 %37, 1 store i64 %39, ptr %5, align 4 %40 = load i64, ptr %4, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %40) + %___future_measure = tail call i64 @___future_measure(i64 %40, i64 0) tail call void @___qfree(i64 %40) %41 = load i64, ptr %3, align 4 %42 = trunc i64 %41 to i1 @@ -203,7 +203,7 @@ panic.i850: ; preds = %cond_exit_137.1, %c cond_exit_137: ; preds = %.thread %43 = and i64 %41, -2 store i64 %43, ptr %3, align 4 - store i64 %lazy_measure, ptr %2, align 4 + store i64 %___future_measure, ptr %2, align 4 %44 = load i64, ptr %5, align 4 %45 = and i64 %44, 2 %.not916 = icmp eq i64 %45, 0 @@ -214,7 +214,7 @@ cond_exit_137: ; preds = %.thread store i64 %46, ptr %5, align 4 %47 = getelementptr inbounds nuw i8, ptr %4, i64 8 %48 = load i64, ptr %47, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %48) + %___future_measure.1 = tail call i64 @___future_measure(i64 %48, i64 0) tail call void @___qfree(i64 %48) %49 = load i64, ptr %3, align 4 %50 = and i64 %49, 2 @@ -225,7 +225,7 @@ cond_exit_137.1: ; preds = %.thread.1 %51 = and i64 %49, -3 store i64 %51, ptr %3, align 4 %52 = getelementptr inbounds nuw i8, ptr %2, i64 8 - store i64 %lazy_measure.1, ptr %52, align 4 + store i64 %___future_measure.1, ptr %52, align 4 %53 = load i64, ptr %5, align 4 %54 = and i64 %53, 4 %.not918 = icmp eq i64 %54, 0 @@ -236,7 +236,7 @@ cond_exit_137.1: ; preds = %.thread.1 store i64 %55, ptr %5, align 4 %56 = getelementptr inbounds nuw i8, ptr %4, i64 16 %57 = load i64, ptr %56, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %57) + %___future_measure.2 = tail call i64 @___future_measure(i64 %57, i64 0) tail call void @___qfree(i64 %57) %58 = load i64, ptr %3, align 4 %59 = and i64 %58, 4 @@ -247,7 +247,7 @@ cond_exit_137.2: ; preds = %.thread.2 %60 = and i64 %58, -5 store i64 %60, ptr %3, align 4 %61 = getelementptr inbounds nuw i8, ptr %2, i64 16 - store i64 %lazy_measure.2, ptr %61, align 4 + store i64 %___future_measure.2, ptr %61, align 4 %62 = load i64, ptr %5, align 4 %63 = or i64 %62, -8 store i64 %63, ptr %5, align 4 @@ -465,7 +465,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics/metrics-sol-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics/metrics-sol-x86_64-windows-gnu.ll index 0da6e542..23bb49e4 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics/metrics-sol-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics/metrics-sol-x86_64-windows-gnu.ll @@ -194,7 +194,7 @@ panic.i850: ; preds = %cond_exit_137.1, %c %39 = or disjoint i64 %37, 1 store i64 %39, ptr %5, align 4 %40 = load i64, ptr %4, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %40) + %___future_measure = tail call i64 @___future_measure(i64 %40, i64 0) tail call void @___qfree(i64 %40) %41 = load i64, ptr %3, align 4 %42 = trunc i64 %41 to i1 @@ -203,7 +203,7 @@ panic.i850: ; preds = %cond_exit_137.1, %c cond_exit_137: ; preds = %.thread %43 = and i64 %41, -2 store i64 %43, ptr %3, align 4 - store i64 %lazy_measure, ptr %2, align 4 + store i64 %___future_measure, ptr %2, align 4 %44 = load i64, ptr %5, align 4 %45 = and i64 %44, 2 %.not916 = icmp eq i64 %45, 0 @@ -214,7 +214,7 @@ cond_exit_137: ; preds = %.thread store i64 %46, ptr %5, align 4 %47 = getelementptr inbounds nuw i8, ptr %4, i64 8 %48 = load i64, ptr %47, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %48) + %___future_measure.1 = tail call i64 @___future_measure(i64 %48, i64 0) tail call void @___qfree(i64 %48) %49 = load i64, ptr %3, align 4 %50 = and i64 %49, 2 @@ -225,7 +225,7 @@ cond_exit_137.1: ; preds = %.thread.1 %51 = and i64 %49, -3 store i64 %51, ptr %3, align 4 %52 = getelementptr inbounds nuw i8, ptr %2, i64 8 - store i64 %lazy_measure.1, ptr %52, align 4 + store i64 %___future_measure.1, ptr %52, align 4 %53 = load i64, ptr %5, align 4 %54 = and i64 %53, 4 %.not918 = icmp eq i64 %54, 0 @@ -236,7 +236,7 @@ cond_exit_137.1: ; preds = %.thread.1 store i64 %55, ptr %5, align 4 %56 = getelementptr inbounds nuw i8, ptr %4, i64 16 %57 = load i64, ptr %56, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %57) + %___future_measure.2 = tail call i64 @___future_measure(i64 %57, i64 0) tail call void @___qfree(i64 %57) %58 = load i64, ptr %3, align 4 %59 = and i64 %58, 4 @@ -247,7 +247,7 @@ cond_exit_137.2: ; preds = %.thread.2 %60 = and i64 %58, -5 store i64 %60, ptr %3, align 4 %61 = getelementptr inbounds nuw i8, ptr %2, i64 16 - store i64 %lazy_measure.2, ptr %61, align 4 + store i64 %___future_measure.2, ptr %61, align 4 %62 = load i64, ptr %5, align 4 %63 = or i64 %62, -8 store i64 %63, ptr %5, align 4 @@ -465,7 +465,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics_on_exit/metrics_on_exit-helios-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics_on_exit/metrics_on_exit-helios-aarch64-apple-darwin.ll index 07c64f33..fd6c17b9 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics_on_exit/metrics_on_exit-helios-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics_on_exit/metrics_on_exit-helios-aarch64-apple-darwin.ll @@ -15,10 +15,10 @@ alloca_block: %2 = tail call fastcc i64 @__hugr__.__tk2_helios_qalloc.26() %3 = tail call fastcc i64 @__hugr__.__tk2_helios_qalloc.26() %4 = tail call fastcc i64 @__hugr__.__tk2_helios_toffoli.52(i64 %0, i64 %2, i64 %3) - %lazy_measure = tail call i64 @___lazy_measure(i64 %4) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %4) tail call void @___qfree(i64 %4) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) tail call void @panic(i32 0, ptr nonnull @"s_Testing ex.5E6E1E51.0") unreachable diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics_on_exit/metrics_on_exit-helios-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics_on_exit/metrics_on_exit-helios-aarch64-unknown-linux-gnu.ll index 39d99532..857cccd2 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics_on_exit/metrics_on_exit-helios-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics_on_exit/metrics_on_exit-helios-aarch64-unknown-linux-gnu.ll @@ -15,10 +15,10 @@ alloca_block: %2 = tail call fastcc i64 @__hugr__.__tk2_helios_qalloc.26() %3 = tail call fastcc i64 @__hugr__.__tk2_helios_qalloc.26() %4 = tail call fastcc i64 @__hugr__.__tk2_helios_toffoli.52(i64 %0, i64 %2, i64 %3) - %lazy_measure = tail call i64 @___lazy_measure(i64 %4) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %4) tail call void @___qfree(i64 %4) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) tail call void @panic(i32 0, ptr nonnull @"s_Testing ex.5E6E1E51.0") unreachable diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics_on_exit/metrics_on_exit-helios-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics_on_exit/metrics_on_exit-helios-x86_64-apple-darwin.ll index 489abacd..22f368ba 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics_on_exit/metrics_on_exit-helios-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics_on_exit/metrics_on_exit-helios-x86_64-apple-darwin.ll @@ -15,10 +15,10 @@ alloca_block: %2 = tail call fastcc i64 @__hugr__.__tk2_helios_qalloc.26() %3 = tail call fastcc i64 @__hugr__.__tk2_helios_qalloc.26() %4 = tail call fastcc i64 @__hugr__.__tk2_helios_toffoli.52(i64 %0, i64 %2, i64 %3) - %lazy_measure = tail call i64 @___lazy_measure(i64 %4) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %4) tail call void @___qfree(i64 %4) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) tail call void @panic(i32 0, ptr nonnull @"s_Testing ex.5E6E1E51.0") unreachable diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics_on_exit/metrics_on_exit-helios-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics_on_exit/metrics_on_exit-helios-x86_64-unknown-linux-gnu.ll index fd8b8dc9..8cc55eaa 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics_on_exit/metrics_on_exit-helios-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics_on_exit/metrics_on_exit-helios-x86_64-unknown-linux-gnu.ll @@ -15,10 +15,10 @@ alloca_block: %2 = tail call fastcc i64 @__hugr__.__tk2_helios_qalloc.26() %3 = tail call fastcc i64 @__hugr__.__tk2_helios_qalloc.26() %4 = tail call fastcc i64 @__hugr__.__tk2_helios_toffoli.52(i64 %0, i64 %2, i64 %3) - %lazy_measure = tail call i64 @___lazy_measure(i64 %4) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %4) tail call void @___qfree(i64 %4) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) tail call void @panic(i32 0, ptr nonnull @"s_Testing ex.5E6E1E51.0") unreachable diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics_on_exit/metrics_on_exit-helios-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics_on_exit/metrics_on_exit-helios-x86_64-windows-gnu.ll index 7264ecfc..c9a18299 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics_on_exit/metrics_on_exit-helios-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics_on_exit/metrics_on_exit-helios-x86_64-windows-gnu.ll @@ -15,10 +15,10 @@ alloca_block: %2 = tail call fastcc i64 @__hugr__.__tk2_helios_qalloc.26() %3 = tail call fastcc i64 @__hugr__.__tk2_helios_qalloc.26() %4 = tail call fastcc i64 @__hugr__.__tk2_helios_toffoli.52(i64 %0, i64 %2, i64 %3) - %lazy_measure = tail call i64 @___lazy_measure(i64 %4) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %4) tail call void @___qfree(i64 %4) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) tail call void @panic(i32 0, ptr nonnull @"s_Testing ex.5E6E1E51.0") unreachable diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics_on_exit/metrics_on_exit-sol-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics_on_exit/metrics_on_exit-sol-aarch64-apple-darwin.ll index aab72dc4..dff7d898 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics_on_exit/metrics_on_exit-sol-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics_on_exit/metrics_on_exit-sol-aarch64-apple-darwin.ll @@ -15,10 +15,10 @@ alloca_block: %2 = tail call fastcc i64 @__hugr__.__tk2_sol_qalloc.26() %3 = tail call fastcc i64 @__hugr__.__tk2_sol_qalloc.26() %4 = tail call fastcc i64 @__hugr__.__tk2_sol_toffoli.52(i64 %0, i64 %2, i64 %3) - %lazy_measure = tail call i64 @___lazy_measure(i64 %4) + %___future_measure = tail call i64 @___future_measure(i64 %4, i64 0) tail call void @___qfree(i64 %4) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) tail call void @panic(i32 0, ptr nonnull @"s_Testing ex.5E6E1E51.0") unreachable @@ -73,7 +73,7 @@ alloca_block: ret i64 %0 } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics_on_exit/metrics_on_exit-sol-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics_on_exit/metrics_on_exit-sol-aarch64-unknown-linux-gnu.ll index 1028b437..25f911e5 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics_on_exit/metrics_on_exit-sol-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics_on_exit/metrics_on_exit-sol-aarch64-unknown-linux-gnu.ll @@ -15,10 +15,10 @@ alloca_block: %2 = tail call fastcc i64 @__hugr__.__tk2_sol_qalloc.26() %3 = tail call fastcc i64 @__hugr__.__tk2_sol_qalloc.26() %4 = tail call fastcc i64 @__hugr__.__tk2_sol_toffoli.52(i64 %0, i64 %2, i64 %3) - %lazy_measure = tail call i64 @___lazy_measure(i64 %4) + %___future_measure = tail call i64 @___future_measure(i64 %4, i64 0) tail call void @___qfree(i64 %4) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) tail call void @panic(i32 0, ptr nonnull @"s_Testing ex.5E6E1E51.0") unreachable @@ -73,7 +73,7 @@ alloca_block: ret i64 %0 } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics_on_exit/metrics_on_exit-sol-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics_on_exit/metrics_on_exit-sol-x86_64-apple-darwin.ll index 589869a1..b6258a24 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics_on_exit/metrics_on_exit-sol-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics_on_exit/metrics_on_exit-sol-x86_64-apple-darwin.ll @@ -15,10 +15,10 @@ alloca_block: %2 = tail call fastcc i64 @__hugr__.__tk2_sol_qalloc.26() %3 = tail call fastcc i64 @__hugr__.__tk2_sol_qalloc.26() %4 = tail call fastcc i64 @__hugr__.__tk2_sol_toffoli.52(i64 %0, i64 %2, i64 %3) - %lazy_measure = tail call i64 @___lazy_measure(i64 %4) + %___future_measure = tail call i64 @___future_measure(i64 %4, i64 0) tail call void @___qfree(i64 %4) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) tail call void @panic(i32 0, ptr nonnull @"s_Testing ex.5E6E1E51.0") unreachable @@ -73,7 +73,7 @@ alloca_block: ret i64 %0 } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics_on_exit/metrics_on_exit-sol-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics_on_exit/metrics_on_exit-sol-x86_64-unknown-linux-gnu.ll index 877ce620..1e3ddcbb 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics_on_exit/metrics_on_exit-sol-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics_on_exit/metrics_on_exit-sol-x86_64-unknown-linux-gnu.ll @@ -15,10 +15,10 @@ alloca_block: %2 = tail call fastcc i64 @__hugr__.__tk2_sol_qalloc.26() %3 = tail call fastcc i64 @__hugr__.__tk2_sol_qalloc.26() %4 = tail call fastcc i64 @__hugr__.__tk2_sol_toffoli.52(i64 %0, i64 %2, i64 %3) - %lazy_measure = tail call i64 @___lazy_measure(i64 %4) + %___future_measure = tail call i64 @___future_measure(i64 %4, i64 0) tail call void @___qfree(i64 %4) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) tail call void @panic(i32 0, ptr nonnull @"s_Testing ex.5E6E1E51.0") unreachable @@ -73,7 +73,7 @@ alloca_block: ret i64 %0 } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics_on_exit/metrics_on_exit-sol-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics_on_exit/metrics_on_exit-sol-x86_64-windows-gnu.ll index fa9676df..4b397d72 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics_on_exit/metrics_on_exit-sol-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_metrics_on_exit/metrics_on_exit-sol-x86_64-windows-gnu.ll @@ -15,10 +15,10 @@ alloca_block: %2 = tail call fastcc i64 @__hugr__.__tk2_sol_qalloc.26() %3 = tail call fastcc i64 @__hugr__.__tk2_sol_qalloc.26() %4 = tail call fastcc i64 @__hugr__.__tk2_sol_toffoli.52(i64 %0, i64 %2, i64 %3) - %lazy_measure = tail call i64 @___lazy_measure(i64 %4) + %___future_measure = tail call i64 @___future_measure(i64 %4, i64 0) tail call void @___qfree(i64 %4) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) tail call void @panic(i32 0, ptr nonnull @"s_Testing ex.5E6E1E51.0") unreachable @@ -73,7 +73,7 @@ alloca_block: ret i64 %0 } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_no_results/no_results-helios-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_no_results/no_results-helios-aarch64-apple-darwin.ll index bdfb5415..ad4bdf1d 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_no_results/no_results-helios-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_no_results/no_results-helios-aarch64-apple-darwin.ll @@ -19,9 +19,9 @@ __hugr__.__tk2_helios_qalloc.7.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - tail call void @___dec_future_refcount(i64 %lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_no_results/no_results-helios-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_no_results/no_results-helios-aarch64-unknown-linux-gnu.ll index 2b45126b..f199bacb 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_no_results/no_results-helios-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_no_results/no_results-helios-aarch64-unknown-linux-gnu.ll @@ -19,9 +19,9 @@ __hugr__.__tk2_helios_qalloc.7.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - tail call void @___dec_future_refcount(i64 %lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_no_results/no_results-helios-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_no_results/no_results-helios-x86_64-apple-darwin.ll index 95ac9b61..021ccc01 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_no_results/no_results-helios-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_no_results/no_results-helios-x86_64-apple-darwin.ll @@ -19,9 +19,9 @@ __hugr__.__tk2_helios_qalloc.7.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - tail call void @___dec_future_refcount(i64 %lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_no_results/no_results-helios-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_no_results/no_results-helios-x86_64-unknown-linux-gnu.ll index 54556a3e..d914d373 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_no_results/no_results-helios-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_no_results/no_results-helios-x86_64-unknown-linux-gnu.ll @@ -19,9 +19,9 @@ __hugr__.__tk2_helios_qalloc.7.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - tail call void @___dec_future_refcount(i64 %lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_no_results/no_results-helios-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_no_results/no_results-helios-x86_64-windows-gnu.ll index 1656f032..86274993 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_no_results/no_results-helios-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_no_results/no_results-helios-x86_64-windows-gnu.ll @@ -19,9 +19,9 @@ __hugr__.__tk2_helios_qalloc.7.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - tail call void @___dec_future_refcount(i64 %lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_no_results/no_results-sol-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_no_results/no_results-sol-aarch64-apple-darwin.ll index ba58d738..366a8f90 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_no_results/no_results-sol-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_no_results/no_results-sol-aarch64-apple-darwin.ll @@ -19,13 +19,13 @@ __hugr__.__tk2_sol_qalloc.7.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - tail call void @___dec_future_refcount(i64 %lazy_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_no_results/no_results-sol-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_no_results/no_results-sol-aarch64-unknown-linux-gnu.ll index 088e6dcd..811b9dec 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_no_results/no_results-sol-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_no_results/no_results-sol-aarch64-unknown-linux-gnu.ll @@ -19,13 +19,13 @@ __hugr__.__tk2_sol_qalloc.7.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - tail call void @___dec_future_refcount(i64 %lazy_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_no_results/no_results-sol-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_no_results/no_results-sol-x86_64-apple-darwin.ll index be411884..acba04dd 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_no_results/no_results-sol-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_no_results/no_results-sol-x86_64-apple-darwin.ll @@ -19,13 +19,13 @@ __hugr__.__tk2_sol_qalloc.7.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - tail call void @___dec_future_refcount(i64 %lazy_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_no_results/no_results-sol-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_no_results/no_results-sol-x86_64-unknown-linux-gnu.ll index 53406a7e..51413f04 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_no_results/no_results-sol-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_no_results/no_results-sol-x86_64-unknown-linux-gnu.ll @@ -19,13 +19,13 @@ __hugr__.__tk2_sol_qalloc.7.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - tail call void @___dec_future_refcount(i64 %lazy_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_no_results/no_results-sol-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_no_results/no_results-sol-x86_64-windows-gnu.ll index f04cb2da..7bcf3894 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_no_results/no_results-sol-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_no_results/no_results-sol-x86_64-windows-gnu.ll @@ -19,13 +19,13 @@ __hugr__.__tk2_sol_qalloc.7.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - tail call void @___dec_future_refcount(i64 %lazy_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_panic/panic-helios-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_panic/panic-helios-aarch64-apple-darwin.ll index 0c961d3e..3ed85a64 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_panic/panic-helios-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_panic/panic-helios-aarch64-apple-darwin.ll @@ -21,10 +21,10 @@ __hugr__.__tk2_helios_qalloc.32.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) br i1 %read_bool, label %1, label %0 0: ; preds = %__hugr__.__tk2_helios_qalloc.32.exit diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_panic/panic-helios-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_panic/panic-helios-aarch64-unknown-linux-gnu.ll index 2fefffd7..71e91b0e 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_panic/panic-helios-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_panic/panic-helios-aarch64-unknown-linux-gnu.ll @@ -21,10 +21,10 @@ __hugr__.__tk2_helios_qalloc.32.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) br i1 %read_bool, label %1, label %0 0: ; preds = %__hugr__.__tk2_helios_qalloc.32.exit diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_panic/panic-helios-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_panic/panic-helios-x86_64-apple-darwin.ll index f95ebc14..054b879a 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_panic/panic-helios-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_panic/panic-helios-x86_64-apple-darwin.ll @@ -21,10 +21,10 @@ __hugr__.__tk2_helios_qalloc.32.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) br i1 %read_bool, label %1, label %0 0: ; preds = %__hugr__.__tk2_helios_qalloc.32.exit diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_panic/panic-helios-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_panic/panic-helios-x86_64-unknown-linux-gnu.ll index f59902e7..8e493665 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_panic/panic-helios-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_panic/panic-helios-x86_64-unknown-linux-gnu.ll @@ -21,10 +21,10 @@ __hugr__.__tk2_helios_qalloc.32.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) br i1 %read_bool, label %1, label %0 0: ; preds = %__hugr__.__tk2_helios_qalloc.32.exit diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_panic/panic-helios-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_panic/panic-helios-x86_64-windows-gnu.ll index 62a09e02..99c0133c 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_panic/panic-helios-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_panic/panic-helios-x86_64-windows-gnu.ll @@ -21,10 +21,10 @@ __hugr__.__tk2_helios_qalloc.32.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) br i1 %read_bool, label %1, label %0 0: ; preds = %__hugr__.__tk2_helios_qalloc.32.exit diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_panic/panic-sol-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_panic/panic-sol-aarch64-apple-darwin.ll index e98c236e..91da8990 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_panic/panic-sol-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_panic/panic-sol-aarch64-apple-darwin.ll @@ -21,10 +21,10 @@ __hugr__.__tk2_sol_qalloc.32.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) br i1 %read_bool, label %1, label %0 0: ; preds = %__hugr__.__tk2_sol_qalloc.32.exit @@ -36,7 +36,7 @@ __hugr__.__tk2_sol_qalloc.32.exit: ; preds = %alloca_block unreachable } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_panic/panic-sol-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_panic/panic-sol-aarch64-unknown-linux-gnu.ll index 931e2eb8..3b08b394 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_panic/panic-sol-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_panic/panic-sol-aarch64-unknown-linux-gnu.ll @@ -21,10 +21,10 @@ __hugr__.__tk2_sol_qalloc.32.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) br i1 %read_bool, label %1, label %0 0: ; preds = %__hugr__.__tk2_sol_qalloc.32.exit @@ -36,7 +36,7 @@ __hugr__.__tk2_sol_qalloc.32.exit: ; preds = %alloca_block unreachable } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_panic/panic-sol-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_panic/panic-sol-x86_64-apple-darwin.ll index 21fa8787..b306c4ba 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_panic/panic-sol-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_panic/panic-sol-x86_64-apple-darwin.ll @@ -21,10 +21,10 @@ __hugr__.__tk2_sol_qalloc.32.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) br i1 %read_bool, label %1, label %0 0: ; preds = %__hugr__.__tk2_sol_qalloc.32.exit @@ -36,7 +36,7 @@ __hugr__.__tk2_sol_qalloc.32.exit: ; preds = %alloca_block unreachable } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_panic/panic-sol-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_panic/panic-sol-x86_64-unknown-linux-gnu.ll index 74082299..247eb68c 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_panic/panic-sol-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_panic/panic-sol-x86_64-unknown-linux-gnu.ll @@ -21,10 +21,10 @@ __hugr__.__tk2_sol_qalloc.32.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) br i1 %read_bool, label %1, label %0 0: ; preds = %__hugr__.__tk2_sol_qalloc.32.exit @@ -36,7 +36,7 @@ __hugr__.__tk2_sol_qalloc.32.exit: ; preds = %alloca_block unreachable } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_panic/panic-sol-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_panic/panic-sol-x86_64-windows-gnu.ll index 4de6fbba..f48c3716 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_panic/panic-sol-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_panic/panic-sol-x86_64-windows-gnu.ll @@ -21,10 +21,10 @@ __hugr__.__tk2_sol_qalloc.32.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) br i1 %read_bool, label %1, label %0 0: ; preds = %__hugr__.__tk2_sol_qalloc.32.exit @@ -36,7 +36,7 @@ __hugr__.__tk2_sol_qalloc.32.exit: ; preds = %alloca_block unreachable } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_print_array/flip_n4_arr-helios-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_print_array/flip_n4_arr-helios-aarch64-apple-darwin.ll index 8f5d2be2..ca982fb6 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_print_array/flip_n4_arr-helios-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_print_array/flip_n4_arr-helios-aarch64-apple-darwin.ll @@ -349,7 +349,7 @@ panic.i1621: ; preds = %__barray_check_boun %89 = getelementptr inbounds nuw i64, ptr %8, i64 %"363_0.sroa.15.01730" %90 = load i64, ptr %89, align 4 %91 = add i64 %"363_2.01729", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %90) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %90) tail call void @___qfree(i64 %90) %92 = icmp ult i64 %"363_2.01729", 10 br i1 %92, label %__barray_check_bounds.exit1616, label %out_of_bounds.i1615 @@ -359,7 +359,7 @@ cond_exit_367: ; preds = %__barray_check_boun %94 = xor i64 %77, %93 store i64 %94, ptr %3, align 4 %95 = getelementptr inbounds nuw i64, ptr %2, i64 %"363_2.01729" - store i64 %lazy_measure, ptr %95, align 4 + store i64 %___lazy_measure, ptr %95, align 4 %96 = icmp samesign ugt i64 %"363_0.sroa.15.01730", 8 br i1 %96, label %mask_block_ok.i, label %__barray_check_bounds.exit1620 diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_print_array/flip_n4_arr-helios-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_print_array/flip_n4_arr-helios-aarch64-unknown-linux-gnu.ll index 50d784ee..be440da5 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_print_array/flip_n4_arr-helios-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_print_array/flip_n4_arr-helios-aarch64-unknown-linux-gnu.ll @@ -349,7 +349,7 @@ panic.i1621: ; preds = %__barray_check_boun %89 = getelementptr inbounds nuw i64, ptr %8, i64 %"363_0.sroa.15.01730" %90 = load i64, ptr %89, align 4 %91 = add i64 %"363_2.01729", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %90) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %90) tail call void @___qfree(i64 %90) %92 = icmp ult i64 %"363_2.01729", 10 br i1 %92, label %__barray_check_bounds.exit1616, label %out_of_bounds.i1615 @@ -359,7 +359,7 @@ cond_exit_367: ; preds = %__barray_check_boun %94 = xor i64 %77, %93 store i64 %94, ptr %3, align 4 %95 = getelementptr inbounds nuw i64, ptr %2, i64 %"363_2.01729" - store i64 %lazy_measure, ptr %95, align 4 + store i64 %___lazy_measure, ptr %95, align 4 %96 = icmp samesign ugt i64 %"363_0.sroa.15.01730", 8 br i1 %96, label %mask_block_ok.i, label %__barray_check_bounds.exit1620 diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_print_array/flip_n4_arr-helios-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_print_array/flip_n4_arr-helios-x86_64-apple-darwin.ll index 9fba0962..be30d9a3 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_print_array/flip_n4_arr-helios-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_print_array/flip_n4_arr-helios-x86_64-apple-darwin.ll @@ -352,7 +352,7 @@ panic.i1621: ; preds = %__barray_check_boun %92 = getelementptr inbounds nuw i64, ptr %8, i64 %"363_0.sroa.15.01722" %93 = load i64, ptr %92, align 4 %94 = add i64 %"363_2.01721", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %93) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %93) tail call void @___qfree(i64 %93) %95 = icmp ult i64 %"363_2.01721", 10 br i1 %95, label %__barray_check_bounds.exit1616, label %out_of_bounds.i1615 @@ -362,7 +362,7 @@ cond_exit_367: ; preds = %__barray_check_boun %97 = xor i64 %80, %96 store i64 %97, ptr %3, align 4 %98 = getelementptr inbounds nuw i64, ptr %2, i64 %"363_2.01721" - store i64 %lazy_measure, ptr %98, align 4 + store i64 %___lazy_measure, ptr %98, align 4 %99 = icmp samesign ugt i64 %"363_0.sroa.15.01722", 8 br i1 %99, label %mask_block_ok.i, label %__barray_check_bounds.exit1620 diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_print_array/flip_n4_arr-helios-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_print_array/flip_n4_arr-helios-x86_64-unknown-linux-gnu.ll index 660d4c70..7f57991c 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_print_array/flip_n4_arr-helios-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_print_array/flip_n4_arr-helios-x86_64-unknown-linux-gnu.ll @@ -352,7 +352,7 @@ panic.i1621: ; preds = %__barray_check_boun %92 = getelementptr inbounds nuw i64, ptr %8, i64 %"363_0.sroa.15.01722" %93 = load i64, ptr %92, align 4 %94 = add i64 %"363_2.01721", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %93) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %93) tail call void @___qfree(i64 %93) %95 = icmp ult i64 %"363_2.01721", 10 br i1 %95, label %__barray_check_bounds.exit1616, label %out_of_bounds.i1615 @@ -362,7 +362,7 @@ cond_exit_367: ; preds = %__barray_check_boun %97 = xor i64 %80, %96 store i64 %97, ptr %3, align 4 %98 = getelementptr inbounds nuw i64, ptr %2, i64 %"363_2.01721" - store i64 %lazy_measure, ptr %98, align 4 + store i64 %___lazy_measure, ptr %98, align 4 %99 = icmp samesign ugt i64 %"363_0.sroa.15.01722", 8 br i1 %99, label %mask_block_ok.i, label %__barray_check_bounds.exit1620 diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_print_array/flip_n4_arr-helios-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_print_array/flip_n4_arr-helios-x86_64-windows-gnu.ll index 23e421a7..d4dfd283 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_print_array/flip_n4_arr-helios-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_print_array/flip_n4_arr-helios-x86_64-windows-gnu.ll @@ -352,7 +352,7 @@ panic.i1621: ; preds = %__barray_check_boun %92 = getelementptr inbounds nuw i64, ptr %8, i64 %"363_0.sroa.15.01722" %93 = load i64, ptr %92, align 4 %94 = add i64 %"363_2.01721", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %93) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %93) tail call void @___qfree(i64 %93) %95 = icmp ult i64 %"363_2.01721", 10 br i1 %95, label %__barray_check_bounds.exit1616, label %out_of_bounds.i1615 @@ -362,7 +362,7 @@ cond_exit_367: ; preds = %__barray_check_boun %97 = xor i64 %80, %96 store i64 %97, ptr %3, align 4 %98 = getelementptr inbounds nuw i64, ptr %2, i64 %"363_2.01721" - store i64 %lazy_measure, ptr %98, align 4 + store i64 %___lazy_measure, ptr %98, align 4 %99 = icmp samesign ugt i64 %"363_0.sroa.15.01722", 8 br i1 %99, label %mask_block_ok.i, label %__barray_check_bounds.exit1620 diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_print_array/flip_n4_arr-sol-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_print_array/flip_n4_arr-sol-aarch64-apple-darwin.ll index c5ba3570..58883774 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_print_array/flip_n4_arr-sol-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_print_array/flip_n4_arr-sol-aarch64-apple-darwin.ll @@ -349,7 +349,7 @@ panic.i1621: ; preds = %__barray_check_boun %89 = getelementptr inbounds nuw i64, ptr %8, i64 %"363_0.sroa.15.01730" %90 = load i64, ptr %89, align 4 %91 = add i64 %"363_2.01729", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %90) + %___future_measure = tail call i64 @___future_measure(i64 %90, i64 0) tail call void @___qfree(i64 %90) %92 = icmp ult i64 %"363_2.01729", 10 br i1 %92, label %__barray_check_bounds.exit1616, label %out_of_bounds.i1615 @@ -359,7 +359,7 @@ cond_exit_367: ; preds = %__barray_check_boun %94 = xor i64 %77, %93 store i64 %94, ptr %3, align 4 %95 = getelementptr inbounds nuw i64, ptr %2, i64 %"363_2.01729" - store i64 %lazy_measure, ptr %95, align 4 + store i64 %___future_measure, ptr %95, align 4 %96 = icmp samesign ugt i64 %"363_0.sroa.15.01730", 8 br i1 %96, label %mask_block_ok.i, label %__barray_check_bounds.exit1620 @@ -768,7 +768,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #1 declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_print_array/flip_n4_arr-sol-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_print_array/flip_n4_arr-sol-aarch64-unknown-linux-gnu.ll index d6d7bc0d..8b8b8345 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_print_array/flip_n4_arr-sol-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_print_array/flip_n4_arr-sol-aarch64-unknown-linux-gnu.ll @@ -349,7 +349,7 @@ panic.i1621: ; preds = %__barray_check_boun %89 = getelementptr inbounds nuw i64, ptr %8, i64 %"363_0.sroa.15.01730" %90 = load i64, ptr %89, align 4 %91 = add i64 %"363_2.01729", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %90) + %___future_measure = tail call i64 @___future_measure(i64 %90, i64 0) tail call void @___qfree(i64 %90) %92 = icmp ult i64 %"363_2.01729", 10 br i1 %92, label %__barray_check_bounds.exit1616, label %out_of_bounds.i1615 @@ -359,7 +359,7 @@ cond_exit_367: ; preds = %__barray_check_boun %94 = xor i64 %77, %93 store i64 %94, ptr %3, align 4 %95 = getelementptr inbounds nuw i64, ptr %2, i64 %"363_2.01729" - store i64 %lazy_measure, ptr %95, align 4 + store i64 %___future_measure, ptr %95, align 4 %96 = icmp samesign ugt i64 %"363_0.sroa.15.01730", 8 br i1 %96, label %mask_block_ok.i, label %__barray_check_bounds.exit1620 @@ -768,7 +768,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #1 declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_print_array/flip_n4_arr-sol-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_print_array/flip_n4_arr-sol-x86_64-apple-darwin.ll index b269d724..fa94c29c 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_print_array/flip_n4_arr-sol-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_print_array/flip_n4_arr-sol-x86_64-apple-darwin.ll @@ -352,7 +352,7 @@ panic.i1621: ; preds = %__barray_check_boun %92 = getelementptr inbounds nuw i64, ptr %8, i64 %"363_0.sroa.15.01722" %93 = load i64, ptr %92, align 4 %94 = add i64 %"363_2.01721", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %93) + %___future_measure = tail call i64 @___future_measure(i64 %93, i64 0) tail call void @___qfree(i64 %93) %95 = icmp ult i64 %"363_2.01721", 10 br i1 %95, label %__barray_check_bounds.exit1616, label %out_of_bounds.i1615 @@ -362,7 +362,7 @@ cond_exit_367: ; preds = %__barray_check_boun %97 = xor i64 %80, %96 store i64 %97, ptr %3, align 4 %98 = getelementptr inbounds nuw i64, ptr %2, i64 %"363_2.01721" - store i64 %lazy_measure, ptr %98, align 4 + store i64 %___future_measure, ptr %98, align 4 %99 = icmp samesign ugt i64 %"363_0.sroa.15.01722", 8 br i1 %99, label %mask_block_ok.i, label %__barray_check_bounds.exit1620 @@ -786,7 +786,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #1 declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_print_array/flip_n4_arr-sol-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_print_array/flip_n4_arr-sol-x86_64-unknown-linux-gnu.ll index ba359326..050f3355 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_print_array/flip_n4_arr-sol-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_print_array/flip_n4_arr-sol-x86_64-unknown-linux-gnu.ll @@ -352,7 +352,7 @@ panic.i1621: ; preds = %__barray_check_boun %92 = getelementptr inbounds nuw i64, ptr %8, i64 %"363_0.sroa.15.01722" %93 = load i64, ptr %92, align 4 %94 = add i64 %"363_2.01721", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %93) + %___future_measure = tail call i64 @___future_measure(i64 %93, i64 0) tail call void @___qfree(i64 %93) %95 = icmp ult i64 %"363_2.01721", 10 br i1 %95, label %__barray_check_bounds.exit1616, label %out_of_bounds.i1615 @@ -362,7 +362,7 @@ cond_exit_367: ; preds = %__barray_check_boun %97 = xor i64 %80, %96 store i64 %97, ptr %3, align 4 %98 = getelementptr inbounds nuw i64, ptr %2, i64 %"363_2.01721" - store i64 %lazy_measure, ptr %98, align 4 + store i64 %___future_measure, ptr %98, align 4 %99 = icmp samesign ugt i64 %"363_0.sroa.15.01722", 8 br i1 %99, label %mask_block_ok.i, label %__barray_check_bounds.exit1620 @@ -786,7 +786,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #1 declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_print_array/flip_n4_arr-sol-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_print_array/flip_n4_arr-sol-x86_64-windows-gnu.ll index fd30fe24..aae9e142 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_print_array/flip_n4_arr-sol-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_print_array/flip_n4_arr-sol-x86_64-windows-gnu.ll @@ -352,7 +352,7 @@ panic.i1621: ; preds = %__barray_check_boun %92 = getelementptr inbounds nuw i64, ptr %8, i64 %"363_0.sroa.15.01722" %93 = load i64, ptr %92, align 4 %94 = add i64 %"363_2.01721", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %93) + %___future_measure = tail call i64 @___future_measure(i64 %93, i64 0) tail call void @___qfree(i64 %93) %95 = icmp ult i64 %"363_2.01721", 10 br i1 %95, label %__barray_check_bounds.exit1616, label %out_of_bounds.i1615 @@ -362,7 +362,7 @@ cond_exit_367: ; preds = %__barray_check_boun %97 = xor i64 %80, %96 store i64 %97, ptr %3, align 4 %98 = getelementptr inbounds nuw i64, ptr %2, i64 %"363_2.01721" - store i64 %lazy_measure, ptr %98, align 4 + store i64 %___future_measure, ptr %98, align 4 %99 = icmp samesign ugt i64 %"363_0.sroa.15.01722", 8 br i1 %99, label %mask_block_ok.i, label %__barray_check_bounds.exit1620 @@ -786,7 +786,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #1 declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rng/rng-helios-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rng/rng-helios-aarch64-apple-darwin.ll index 89719611..d3949a22 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rng/rng-helios-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rng/rng-helios-aarch64-apple-darwin.ll @@ -13,19 +13,19 @@ target triple = "aarch64-apple-darwin" define void @__hugr__.__main__.main.1() local_unnamed_addr { alloca_block: - tail call void @random_seed(i64 84) tail call void @random_seed(i64 42) %rint = tail call i32 @random_int() - %rint24 = tail call i32 @random_int() + %rint23 = tail call i32 @random_int() %rfloat = tail call double @random_float() %rintb = tail call i32 @random_rng(i32 100) %0 = sext i32 %rintb to i64 - %1 = sext i32 %rint24 to i64 + %1 = sext i32 %rint23 to i64 %2 = sext i32 %rint to i64 tail call void @print_int(ptr nonnull @res_rint.B928E41E.0, i64 13, i64 %2) tail call void @print_int(ptr nonnull @res_rint1.0884EC03.0, i64 14, i64 %1) tail call void @print_float(ptr nonnull @res_rfloat.F0E4DD2C.0, i64 17, double %rfloat) tail call void @print_int(ptr nonnull @res_rint_bnd.CB1E6B0D.0, i64 17, i64 %0) + tail call void @random_seed(i64 84) %rint65 = tail call i32 @random_int() %rfloat67 = tail call double @random_float() %rintb70 = tail call i32 @random_rng(i32 200) diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rng/rng-helios-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rng/rng-helios-aarch64-unknown-linux-gnu.ll index 4c8ba3d8..b219557e 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rng/rng-helios-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rng/rng-helios-aarch64-unknown-linux-gnu.ll @@ -13,19 +13,19 @@ target triple = "aarch64-unknown-linux-gnu" define void @__hugr__.__main__.main.1() local_unnamed_addr { alloca_block: - tail call void @random_seed(i64 84) tail call void @random_seed(i64 42) %rint = tail call i32 @random_int() - %rint24 = tail call i32 @random_int() + %rint23 = tail call i32 @random_int() %rfloat = tail call double @random_float() %rintb = tail call i32 @random_rng(i32 100) %0 = sext i32 %rintb to i64 - %1 = sext i32 %rint24 to i64 + %1 = sext i32 %rint23 to i64 %2 = sext i32 %rint to i64 tail call void @print_int(ptr nonnull @res_rint.B928E41E.0, i64 13, i64 %2) tail call void @print_int(ptr nonnull @res_rint1.0884EC03.0, i64 14, i64 %1) tail call void @print_float(ptr nonnull @res_rfloat.F0E4DD2C.0, i64 17, double %rfloat) tail call void @print_int(ptr nonnull @res_rint_bnd.CB1E6B0D.0, i64 17, i64 %0) + tail call void @random_seed(i64 84) %rint65 = tail call i32 @random_int() %rfloat67 = tail call double @random_float() %rintb70 = tail call i32 @random_rng(i32 200) diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rng/rng-helios-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rng/rng-helios-x86_64-apple-darwin.ll index 55cd7576..0c7435d6 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rng/rng-helios-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rng/rng-helios-x86_64-apple-darwin.ll @@ -13,19 +13,19 @@ target triple = "x86_64-apple-darwin" define void @__hugr__.__main__.main.1() local_unnamed_addr { alloca_block: - tail call void @random_seed(i64 84) tail call void @random_seed(i64 42) %rint = tail call i32 @random_int() - %rint24 = tail call i32 @random_int() + %rint23 = tail call i32 @random_int() %rfloat = tail call double @random_float() %rintb = tail call i32 @random_rng(i32 100) %0 = sext i32 %rintb to i64 - %1 = sext i32 %rint24 to i64 + %1 = sext i32 %rint23 to i64 %2 = sext i32 %rint to i64 tail call void @print_int(ptr nonnull @res_rint.B928E41E.0, i64 13, i64 %2) tail call void @print_int(ptr nonnull @res_rint1.0884EC03.0, i64 14, i64 %1) tail call void @print_float(ptr nonnull @res_rfloat.F0E4DD2C.0, i64 17, double %rfloat) tail call void @print_int(ptr nonnull @res_rint_bnd.CB1E6B0D.0, i64 17, i64 %0) + tail call void @random_seed(i64 84) %rint65 = tail call i32 @random_int() %rfloat67 = tail call double @random_float() %rintb70 = tail call i32 @random_rng(i32 200) diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rng/rng-helios-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rng/rng-helios-x86_64-unknown-linux-gnu.ll index af9fcd4e..3f46cf47 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rng/rng-helios-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rng/rng-helios-x86_64-unknown-linux-gnu.ll @@ -13,19 +13,19 @@ target triple = "x86_64-unknown-linux-gnu" define void @__hugr__.__main__.main.1() local_unnamed_addr { alloca_block: - tail call void @random_seed(i64 84) tail call void @random_seed(i64 42) %rint = tail call i32 @random_int() - %rint24 = tail call i32 @random_int() + %rint23 = tail call i32 @random_int() %rfloat = tail call double @random_float() %rintb = tail call i32 @random_rng(i32 100) %0 = sext i32 %rintb to i64 - %1 = sext i32 %rint24 to i64 + %1 = sext i32 %rint23 to i64 %2 = sext i32 %rint to i64 tail call void @print_int(ptr nonnull @res_rint.B928E41E.0, i64 13, i64 %2) tail call void @print_int(ptr nonnull @res_rint1.0884EC03.0, i64 14, i64 %1) tail call void @print_float(ptr nonnull @res_rfloat.F0E4DD2C.0, i64 17, double %rfloat) tail call void @print_int(ptr nonnull @res_rint_bnd.CB1E6B0D.0, i64 17, i64 %0) + tail call void @random_seed(i64 84) %rint65 = tail call i32 @random_int() %rfloat67 = tail call double @random_float() %rintb70 = tail call i32 @random_rng(i32 200) diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rng/rng-helios-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rng/rng-helios-x86_64-windows-gnu.ll index b98c48f8..6b5b558d 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rng/rng-helios-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rng/rng-helios-x86_64-windows-gnu.ll @@ -13,19 +13,19 @@ target triple = "x86_64-windows-gnu" define void @__hugr__.__main__.main.1() local_unnamed_addr { alloca_block: - tail call void @random_seed(i64 84) tail call void @random_seed(i64 42) %rint = tail call i32 @random_int() - %rint24 = tail call i32 @random_int() + %rint23 = tail call i32 @random_int() %rfloat = tail call double @random_float() %rintb = tail call i32 @random_rng(i32 100) %0 = sext i32 %rintb to i64 - %1 = sext i32 %rint24 to i64 + %1 = sext i32 %rint23 to i64 %2 = sext i32 %rint to i64 tail call void @print_int(ptr nonnull @res_rint.B928E41E.0, i64 13, i64 %2) tail call void @print_int(ptr nonnull @res_rint1.0884EC03.0, i64 14, i64 %1) tail call void @print_float(ptr nonnull @res_rfloat.F0E4DD2C.0, i64 17, double %rfloat) tail call void @print_int(ptr nonnull @res_rint_bnd.CB1E6B0D.0, i64 17, i64 %0) + tail call void @random_seed(i64 84) %rint65 = tail call i32 @random_int() %rfloat67 = tail call double @random_float() %rintb70 = tail call i32 @random_rng(i32 200) diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rng/rng-sol-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rng/rng-sol-aarch64-apple-darwin.ll index 89719611..d3949a22 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rng/rng-sol-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rng/rng-sol-aarch64-apple-darwin.ll @@ -13,19 +13,19 @@ target triple = "aarch64-apple-darwin" define void @__hugr__.__main__.main.1() local_unnamed_addr { alloca_block: - tail call void @random_seed(i64 84) tail call void @random_seed(i64 42) %rint = tail call i32 @random_int() - %rint24 = tail call i32 @random_int() + %rint23 = tail call i32 @random_int() %rfloat = tail call double @random_float() %rintb = tail call i32 @random_rng(i32 100) %0 = sext i32 %rintb to i64 - %1 = sext i32 %rint24 to i64 + %1 = sext i32 %rint23 to i64 %2 = sext i32 %rint to i64 tail call void @print_int(ptr nonnull @res_rint.B928E41E.0, i64 13, i64 %2) tail call void @print_int(ptr nonnull @res_rint1.0884EC03.0, i64 14, i64 %1) tail call void @print_float(ptr nonnull @res_rfloat.F0E4DD2C.0, i64 17, double %rfloat) tail call void @print_int(ptr nonnull @res_rint_bnd.CB1E6B0D.0, i64 17, i64 %0) + tail call void @random_seed(i64 84) %rint65 = tail call i32 @random_int() %rfloat67 = tail call double @random_float() %rintb70 = tail call i32 @random_rng(i32 200) diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rng/rng-sol-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rng/rng-sol-aarch64-unknown-linux-gnu.ll index 4c8ba3d8..b219557e 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rng/rng-sol-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rng/rng-sol-aarch64-unknown-linux-gnu.ll @@ -13,19 +13,19 @@ target triple = "aarch64-unknown-linux-gnu" define void @__hugr__.__main__.main.1() local_unnamed_addr { alloca_block: - tail call void @random_seed(i64 84) tail call void @random_seed(i64 42) %rint = tail call i32 @random_int() - %rint24 = tail call i32 @random_int() + %rint23 = tail call i32 @random_int() %rfloat = tail call double @random_float() %rintb = tail call i32 @random_rng(i32 100) %0 = sext i32 %rintb to i64 - %1 = sext i32 %rint24 to i64 + %1 = sext i32 %rint23 to i64 %2 = sext i32 %rint to i64 tail call void @print_int(ptr nonnull @res_rint.B928E41E.0, i64 13, i64 %2) tail call void @print_int(ptr nonnull @res_rint1.0884EC03.0, i64 14, i64 %1) tail call void @print_float(ptr nonnull @res_rfloat.F0E4DD2C.0, i64 17, double %rfloat) tail call void @print_int(ptr nonnull @res_rint_bnd.CB1E6B0D.0, i64 17, i64 %0) + tail call void @random_seed(i64 84) %rint65 = tail call i32 @random_int() %rfloat67 = tail call double @random_float() %rintb70 = tail call i32 @random_rng(i32 200) diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rng/rng-sol-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rng/rng-sol-x86_64-apple-darwin.ll index 55cd7576..0c7435d6 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rng/rng-sol-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rng/rng-sol-x86_64-apple-darwin.ll @@ -13,19 +13,19 @@ target triple = "x86_64-apple-darwin" define void @__hugr__.__main__.main.1() local_unnamed_addr { alloca_block: - tail call void @random_seed(i64 84) tail call void @random_seed(i64 42) %rint = tail call i32 @random_int() - %rint24 = tail call i32 @random_int() + %rint23 = tail call i32 @random_int() %rfloat = tail call double @random_float() %rintb = tail call i32 @random_rng(i32 100) %0 = sext i32 %rintb to i64 - %1 = sext i32 %rint24 to i64 + %1 = sext i32 %rint23 to i64 %2 = sext i32 %rint to i64 tail call void @print_int(ptr nonnull @res_rint.B928E41E.0, i64 13, i64 %2) tail call void @print_int(ptr nonnull @res_rint1.0884EC03.0, i64 14, i64 %1) tail call void @print_float(ptr nonnull @res_rfloat.F0E4DD2C.0, i64 17, double %rfloat) tail call void @print_int(ptr nonnull @res_rint_bnd.CB1E6B0D.0, i64 17, i64 %0) + tail call void @random_seed(i64 84) %rint65 = tail call i32 @random_int() %rfloat67 = tail call double @random_float() %rintb70 = tail call i32 @random_rng(i32 200) diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rng/rng-sol-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rng/rng-sol-x86_64-unknown-linux-gnu.ll index af9fcd4e..3f46cf47 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rng/rng-sol-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rng/rng-sol-x86_64-unknown-linux-gnu.ll @@ -13,19 +13,19 @@ target triple = "x86_64-unknown-linux-gnu" define void @__hugr__.__main__.main.1() local_unnamed_addr { alloca_block: - tail call void @random_seed(i64 84) tail call void @random_seed(i64 42) %rint = tail call i32 @random_int() - %rint24 = tail call i32 @random_int() + %rint23 = tail call i32 @random_int() %rfloat = tail call double @random_float() %rintb = tail call i32 @random_rng(i32 100) %0 = sext i32 %rintb to i64 - %1 = sext i32 %rint24 to i64 + %1 = sext i32 %rint23 to i64 %2 = sext i32 %rint to i64 tail call void @print_int(ptr nonnull @res_rint.B928E41E.0, i64 13, i64 %2) tail call void @print_int(ptr nonnull @res_rint1.0884EC03.0, i64 14, i64 %1) tail call void @print_float(ptr nonnull @res_rfloat.F0E4DD2C.0, i64 17, double %rfloat) tail call void @print_int(ptr nonnull @res_rint_bnd.CB1E6B0D.0, i64 17, i64 %0) + tail call void @random_seed(i64 84) %rint65 = tail call i32 @random_int() %rfloat67 = tail call double @random_float() %rintb70 = tail call i32 @random_rng(i32 200) diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rng/rng-sol-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rng/rng-sol-x86_64-windows-gnu.ll index b98c48f8..6b5b558d 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rng/rng-sol-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rng/rng-sol-x86_64-windows-gnu.ll @@ -13,19 +13,19 @@ target triple = "x86_64-windows-gnu" define void @__hugr__.__main__.main.1() local_unnamed_addr { alloca_block: - tail call void @random_seed(i64 84) tail call void @random_seed(i64 42) %rint = tail call i32 @random_int() - %rint24 = tail call i32 @random_int() + %rint23 = tail call i32 @random_int() %rfloat = tail call double @random_float() %rintb = tail call i32 @random_rng(i32 100) %0 = sext i32 %rintb to i64 - %1 = sext i32 %rint24 to i64 + %1 = sext i32 %rint23 to i64 %2 = sext i32 %rint to i64 tail call void @print_int(ptr nonnull @res_rint.B928E41E.0, i64 13, i64 %2) tail call void @print_int(ptr nonnull @res_rint1.0884EC03.0, i64 14, i64 %1) tail call void @print_float(ptr nonnull @res_rfloat.F0E4DD2C.0, i64 17, double %rfloat) tail call void @print_int(ptr nonnull @res_rint_bnd.CB1E6B0D.0, i64 17, i64 %0) + tail call void @random_seed(i64 84) %rint65 = tail call i32 @random_int() %rfloat67 = tail call double @random_float() %rintb70 = tail call i32 @random_rng(i32 200) diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rus/repeat_until_success-helios-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rus/repeat_until_success-helios-aarch64-apple-darwin.ll index fcaf7e69..9a3866ce 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rus/repeat_until_success-helios-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rus/repeat_until_success-helios-aarch64-apple-darwin.ll @@ -50,10 +50,10 @@ __hugr__.__tk2_helios_qalloc.44.exit73: ; preds = %__hugr__.__tk2_heli tail call void @___rxy(i64 %qalloc.i6678, double 0x3FF921FB54442D18, double 0x400921FB54442D18) tail call void @___rz(i64 %qalloc.i6678, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i6678, double 0x3FE921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i6678) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i6678) tail call void @___qfree(i64 %qalloc.i6678) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) br i1 %read_bool, label %1, label %0 0: ; preds = %__hugr__.__tk2_helios_qalloc.44.exit73 @@ -74,10 +74,10 @@ __hugr__.__tk2_helios_qalloc.44.exit73: ; preds = %__hugr__.__tk2_heli tail call void @___rxy(i64 %qalloc.i70, double 0x3FF921FB54442D18, double 0x400921FB54442D18) tail call void @___rz(i64 %qalloc.i70, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i70, double 0x3FE921FB54442D18) - %lazy_measure33 = tail call i64 @___lazy_measure(i64 %qalloc.i70) + %___lazy_measure33 = tail call i64 @___lazy_measure(i64 %qalloc.i70) tail call void @___qfree(i64 %qalloc.i70) - %read_bool35 = tail call i1 @___read_future_bool(i64 %lazy_measure33) - tail call void @___dec_future_refcount(i64 %lazy_measure33) + %read_bool35 = tail call i1 @___read_future_bool(i64 %___lazy_measure33) + tail call void @___dec_future_refcount(i64 %___lazy_measure33) br i1 %read_bool35, label %3, label %2 2: ; preds = %1 @@ -85,10 +85,10 @@ __hugr__.__tk2_helios_qalloc.44.exit73: ; preds = %__hugr__.__tk2_heli br label %.backedge 3: ; preds = %1 - %lazy_measure48 = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure48 = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %read_bool50 = tail call i1 @___read_future_bool(i64 %lazy_measure48) - tail call void @___dec_future_refcount(i64 %lazy_measure48) + %read_bool50 = tail call i1 @___read_future_bool(i64 %___lazy_measure48) + tail call void @___dec_future_refcount(i64 %___lazy_measure48) tail call void @print_bool(ptr nonnull @res_result.457DE32D.0, i64 16, i1 %read_bool50) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rus/repeat_until_success-helios-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rus/repeat_until_success-helios-aarch64-unknown-linux-gnu.ll index 8fa74520..5ad08326 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rus/repeat_until_success-helios-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rus/repeat_until_success-helios-aarch64-unknown-linux-gnu.ll @@ -50,10 +50,10 @@ __hugr__.__tk2_helios_qalloc.44.exit73: ; preds = %__hugr__.__tk2_heli tail call void @___rxy(i64 %qalloc.i6678, double 0x3FF921FB54442D18, double 0x400921FB54442D18) tail call void @___rz(i64 %qalloc.i6678, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i6678, double 0x3FE921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i6678) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i6678) tail call void @___qfree(i64 %qalloc.i6678) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) br i1 %read_bool, label %1, label %0 0: ; preds = %__hugr__.__tk2_helios_qalloc.44.exit73 @@ -74,10 +74,10 @@ __hugr__.__tk2_helios_qalloc.44.exit73: ; preds = %__hugr__.__tk2_heli tail call void @___rxy(i64 %qalloc.i70, double 0x3FF921FB54442D18, double 0x400921FB54442D18) tail call void @___rz(i64 %qalloc.i70, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i70, double 0x3FE921FB54442D18) - %lazy_measure33 = tail call i64 @___lazy_measure(i64 %qalloc.i70) + %___lazy_measure33 = tail call i64 @___lazy_measure(i64 %qalloc.i70) tail call void @___qfree(i64 %qalloc.i70) - %read_bool35 = tail call i1 @___read_future_bool(i64 %lazy_measure33) - tail call void @___dec_future_refcount(i64 %lazy_measure33) + %read_bool35 = tail call i1 @___read_future_bool(i64 %___lazy_measure33) + tail call void @___dec_future_refcount(i64 %___lazy_measure33) br i1 %read_bool35, label %3, label %2 2: ; preds = %1 @@ -85,10 +85,10 @@ __hugr__.__tk2_helios_qalloc.44.exit73: ; preds = %__hugr__.__tk2_heli br label %.backedge 3: ; preds = %1 - %lazy_measure48 = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure48 = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %read_bool50 = tail call i1 @___read_future_bool(i64 %lazy_measure48) - tail call void @___dec_future_refcount(i64 %lazy_measure48) + %read_bool50 = tail call i1 @___read_future_bool(i64 %___lazy_measure48) + tail call void @___dec_future_refcount(i64 %___lazy_measure48) tail call void @print_bool(ptr nonnull @res_result.457DE32D.0, i64 16, i1 %read_bool50) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rus/repeat_until_success-helios-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rus/repeat_until_success-helios-x86_64-apple-darwin.ll index e2834faa..0e7f6fef 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rus/repeat_until_success-helios-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rus/repeat_until_success-helios-x86_64-apple-darwin.ll @@ -50,10 +50,10 @@ __hugr__.__tk2_helios_qalloc.44.exit73: ; preds = %__hugr__.__tk2_heli tail call void @___rxy(i64 %qalloc.i6678, double 0x3FF921FB54442D18, double 0x400921FB54442D18) tail call void @___rz(i64 %qalloc.i6678, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i6678, double 0x3FE921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i6678) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i6678) tail call void @___qfree(i64 %qalloc.i6678) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) br i1 %read_bool, label %1, label %0 0: ; preds = %__hugr__.__tk2_helios_qalloc.44.exit73 @@ -74,10 +74,10 @@ __hugr__.__tk2_helios_qalloc.44.exit73: ; preds = %__hugr__.__tk2_heli tail call void @___rxy(i64 %qalloc.i70, double 0x3FF921FB54442D18, double 0x400921FB54442D18) tail call void @___rz(i64 %qalloc.i70, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i70, double 0x3FE921FB54442D18) - %lazy_measure33 = tail call i64 @___lazy_measure(i64 %qalloc.i70) + %___lazy_measure33 = tail call i64 @___lazy_measure(i64 %qalloc.i70) tail call void @___qfree(i64 %qalloc.i70) - %read_bool35 = tail call i1 @___read_future_bool(i64 %lazy_measure33) - tail call void @___dec_future_refcount(i64 %lazy_measure33) + %read_bool35 = tail call i1 @___read_future_bool(i64 %___lazy_measure33) + tail call void @___dec_future_refcount(i64 %___lazy_measure33) br i1 %read_bool35, label %3, label %2 2: ; preds = %1 @@ -85,10 +85,10 @@ __hugr__.__tk2_helios_qalloc.44.exit73: ; preds = %__hugr__.__tk2_heli br label %.backedge 3: ; preds = %1 - %lazy_measure48 = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure48 = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %read_bool50 = tail call i1 @___read_future_bool(i64 %lazy_measure48) - tail call void @___dec_future_refcount(i64 %lazy_measure48) + %read_bool50 = tail call i1 @___read_future_bool(i64 %___lazy_measure48) + tail call void @___dec_future_refcount(i64 %___lazy_measure48) tail call void @print_bool(ptr nonnull @res_result.457DE32D.0, i64 16, i1 %read_bool50) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rus/repeat_until_success-helios-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rus/repeat_until_success-helios-x86_64-unknown-linux-gnu.ll index d3ab0197..5c48a08e 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rus/repeat_until_success-helios-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rus/repeat_until_success-helios-x86_64-unknown-linux-gnu.ll @@ -50,10 +50,10 @@ __hugr__.__tk2_helios_qalloc.44.exit73: ; preds = %__hugr__.__tk2_heli tail call void @___rxy(i64 %qalloc.i6678, double 0x3FF921FB54442D18, double 0x400921FB54442D18) tail call void @___rz(i64 %qalloc.i6678, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i6678, double 0x3FE921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i6678) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i6678) tail call void @___qfree(i64 %qalloc.i6678) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) br i1 %read_bool, label %1, label %0 0: ; preds = %__hugr__.__tk2_helios_qalloc.44.exit73 @@ -74,10 +74,10 @@ __hugr__.__tk2_helios_qalloc.44.exit73: ; preds = %__hugr__.__tk2_heli tail call void @___rxy(i64 %qalloc.i70, double 0x3FF921FB54442D18, double 0x400921FB54442D18) tail call void @___rz(i64 %qalloc.i70, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i70, double 0x3FE921FB54442D18) - %lazy_measure33 = tail call i64 @___lazy_measure(i64 %qalloc.i70) + %___lazy_measure33 = tail call i64 @___lazy_measure(i64 %qalloc.i70) tail call void @___qfree(i64 %qalloc.i70) - %read_bool35 = tail call i1 @___read_future_bool(i64 %lazy_measure33) - tail call void @___dec_future_refcount(i64 %lazy_measure33) + %read_bool35 = tail call i1 @___read_future_bool(i64 %___lazy_measure33) + tail call void @___dec_future_refcount(i64 %___lazy_measure33) br i1 %read_bool35, label %3, label %2 2: ; preds = %1 @@ -85,10 +85,10 @@ __hugr__.__tk2_helios_qalloc.44.exit73: ; preds = %__hugr__.__tk2_heli br label %.backedge 3: ; preds = %1 - %lazy_measure48 = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure48 = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %read_bool50 = tail call i1 @___read_future_bool(i64 %lazy_measure48) - tail call void @___dec_future_refcount(i64 %lazy_measure48) + %read_bool50 = tail call i1 @___read_future_bool(i64 %___lazy_measure48) + tail call void @___dec_future_refcount(i64 %___lazy_measure48) tail call void @print_bool(ptr nonnull @res_result.457DE32D.0, i64 16, i1 %read_bool50) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rus/repeat_until_success-helios-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rus/repeat_until_success-helios-x86_64-windows-gnu.ll index 6c22e206..352fdb71 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rus/repeat_until_success-helios-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rus/repeat_until_success-helios-x86_64-windows-gnu.ll @@ -50,10 +50,10 @@ __hugr__.__tk2_helios_qalloc.44.exit73: ; preds = %__hugr__.__tk2_heli tail call void @___rxy(i64 %qalloc.i6678, double 0x3FF921FB54442D18, double 0x400921FB54442D18) tail call void @___rz(i64 %qalloc.i6678, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i6678, double 0x3FE921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i6678) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i6678) tail call void @___qfree(i64 %qalloc.i6678) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) br i1 %read_bool, label %1, label %0 0: ; preds = %__hugr__.__tk2_helios_qalloc.44.exit73 @@ -74,10 +74,10 @@ __hugr__.__tk2_helios_qalloc.44.exit73: ; preds = %__hugr__.__tk2_heli tail call void @___rxy(i64 %qalloc.i70, double 0x3FF921FB54442D18, double 0x400921FB54442D18) tail call void @___rz(i64 %qalloc.i70, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i70, double 0x3FE921FB54442D18) - %lazy_measure33 = tail call i64 @___lazy_measure(i64 %qalloc.i70) + %___lazy_measure33 = tail call i64 @___lazy_measure(i64 %qalloc.i70) tail call void @___qfree(i64 %qalloc.i70) - %read_bool35 = tail call i1 @___read_future_bool(i64 %lazy_measure33) - tail call void @___dec_future_refcount(i64 %lazy_measure33) + %read_bool35 = tail call i1 @___read_future_bool(i64 %___lazy_measure33) + tail call void @___dec_future_refcount(i64 %___lazy_measure33) br i1 %read_bool35, label %3, label %2 2: ; preds = %1 @@ -85,10 +85,10 @@ __hugr__.__tk2_helios_qalloc.44.exit73: ; preds = %__hugr__.__tk2_heli br label %.backedge 3: ; preds = %1 - %lazy_measure48 = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure48 = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %read_bool50 = tail call i1 @___read_future_bool(i64 %lazy_measure48) - tail call void @___dec_future_refcount(i64 %lazy_measure48) + %read_bool50 = tail call i1 @___read_future_bool(i64 %___lazy_measure48) + tail call void @___dec_future_refcount(i64 %___lazy_measure48) tail call void @print_bool(ptr nonnull @res_result.457DE32D.0, i64 16, i1 %read_bool50) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rus/repeat_until_success-sol-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rus/repeat_until_success-sol-aarch64-apple-darwin.ll index 62c79113..f972de94 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rus/repeat_until_success-sol-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rus/repeat_until_success-sol-aarch64-apple-darwin.ll @@ -50,10 +50,10 @@ __hugr__.__tk2_sol_qalloc.44.exit73: ; preds = %__hugr__.__tk2_sol_ tail call void @___rp(i64 %qalloc.i70, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rz(i64 %qalloc.i70, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i6678, double 0x3FE921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i6678) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i6678, i64 0) tail call void @___qfree(i64 %qalloc.i6678) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) br i1 %read_bool, label %1, label %0 0: ; preds = %__hugr__.__tk2_sol_qalloc.44.exit73 @@ -74,10 +74,10 @@ __hugr__.__tk2_sol_qalloc.44.exit73: ; preds = %__hugr__.__tk2_sol_ tail call void @___rp(i64 %qalloc.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i70, double 0x3FE921FB54442D18) - %lazy_measure33 = tail call i64 @___lazy_measure(i64 %qalloc.i70) + %___future_measure33 = tail call i64 @___future_measure(i64 %qalloc.i70, i64 0) tail call void @___qfree(i64 %qalloc.i70) - %read_bool35 = tail call i1 @___read_future_bool(i64 %lazy_measure33) - tail call void @___dec_future_refcount(i64 %lazy_measure33) + %read_bool35 = tail call i1 @___read_future_bool(i64 %___future_measure33) + tail call void @___dec_future_refcount(i64 %___future_measure33) br i1 %read_bool35, label %3, label %2 2: ; preds = %1 @@ -85,15 +85,15 @@ __hugr__.__tk2_sol_qalloc.44.exit73: ; preds = %__hugr__.__tk2_sol_ br label %.backedge 3: ; preds = %1 - %lazy_measure48 = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure48 = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %read_bool50 = tail call i1 @___read_future_bool(i64 %lazy_measure48) - tail call void @___dec_future_refcount(i64 %lazy_measure48) + %read_bool50 = tail call i1 @___read_future_bool(i64 %___future_measure48) + tail call void @___dec_future_refcount(i64 %___future_measure48) tail call void @print_bool(ptr nonnull @res_result.457DE32D.0, i64 16, i1 %read_bool50) ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rus/repeat_until_success-sol-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rus/repeat_until_success-sol-aarch64-unknown-linux-gnu.ll index 310a8438..875020eb 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rus/repeat_until_success-sol-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rus/repeat_until_success-sol-aarch64-unknown-linux-gnu.ll @@ -50,10 +50,10 @@ __hugr__.__tk2_sol_qalloc.44.exit73: ; preds = %__hugr__.__tk2_sol_ tail call void @___rp(i64 %qalloc.i70, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rz(i64 %qalloc.i70, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i6678, double 0x3FE921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i6678) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i6678, i64 0) tail call void @___qfree(i64 %qalloc.i6678) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) br i1 %read_bool, label %1, label %0 0: ; preds = %__hugr__.__tk2_sol_qalloc.44.exit73 @@ -74,10 +74,10 @@ __hugr__.__tk2_sol_qalloc.44.exit73: ; preds = %__hugr__.__tk2_sol_ tail call void @___rp(i64 %qalloc.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i70, double 0x3FE921FB54442D18) - %lazy_measure33 = tail call i64 @___lazy_measure(i64 %qalloc.i70) + %___future_measure33 = tail call i64 @___future_measure(i64 %qalloc.i70, i64 0) tail call void @___qfree(i64 %qalloc.i70) - %read_bool35 = tail call i1 @___read_future_bool(i64 %lazy_measure33) - tail call void @___dec_future_refcount(i64 %lazy_measure33) + %read_bool35 = tail call i1 @___read_future_bool(i64 %___future_measure33) + tail call void @___dec_future_refcount(i64 %___future_measure33) br i1 %read_bool35, label %3, label %2 2: ; preds = %1 @@ -85,15 +85,15 @@ __hugr__.__tk2_sol_qalloc.44.exit73: ; preds = %__hugr__.__tk2_sol_ br label %.backedge 3: ; preds = %1 - %lazy_measure48 = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure48 = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %read_bool50 = tail call i1 @___read_future_bool(i64 %lazy_measure48) - tail call void @___dec_future_refcount(i64 %lazy_measure48) + %read_bool50 = tail call i1 @___read_future_bool(i64 %___future_measure48) + tail call void @___dec_future_refcount(i64 %___future_measure48) tail call void @print_bool(ptr nonnull @res_result.457DE32D.0, i64 16, i1 %read_bool50) ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rus/repeat_until_success-sol-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rus/repeat_until_success-sol-x86_64-apple-darwin.ll index 1c97f622..72fc170d 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rus/repeat_until_success-sol-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rus/repeat_until_success-sol-x86_64-apple-darwin.ll @@ -50,10 +50,10 @@ __hugr__.__tk2_sol_qalloc.44.exit73: ; preds = %__hugr__.__tk2_sol_ tail call void @___rp(i64 %qalloc.i70, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rz(i64 %qalloc.i70, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i6678, double 0x3FE921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i6678) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i6678, i64 0) tail call void @___qfree(i64 %qalloc.i6678) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) br i1 %read_bool, label %1, label %0 0: ; preds = %__hugr__.__tk2_sol_qalloc.44.exit73 @@ -74,10 +74,10 @@ __hugr__.__tk2_sol_qalloc.44.exit73: ; preds = %__hugr__.__tk2_sol_ tail call void @___rp(i64 %qalloc.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i70, double 0x3FE921FB54442D18) - %lazy_measure33 = tail call i64 @___lazy_measure(i64 %qalloc.i70) + %___future_measure33 = tail call i64 @___future_measure(i64 %qalloc.i70, i64 0) tail call void @___qfree(i64 %qalloc.i70) - %read_bool35 = tail call i1 @___read_future_bool(i64 %lazy_measure33) - tail call void @___dec_future_refcount(i64 %lazy_measure33) + %read_bool35 = tail call i1 @___read_future_bool(i64 %___future_measure33) + tail call void @___dec_future_refcount(i64 %___future_measure33) br i1 %read_bool35, label %3, label %2 2: ; preds = %1 @@ -85,15 +85,15 @@ __hugr__.__tk2_sol_qalloc.44.exit73: ; preds = %__hugr__.__tk2_sol_ br label %.backedge 3: ; preds = %1 - %lazy_measure48 = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure48 = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %read_bool50 = tail call i1 @___read_future_bool(i64 %lazy_measure48) - tail call void @___dec_future_refcount(i64 %lazy_measure48) + %read_bool50 = tail call i1 @___read_future_bool(i64 %___future_measure48) + tail call void @___dec_future_refcount(i64 %___future_measure48) tail call void @print_bool(ptr nonnull @res_result.457DE32D.0, i64 16, i1 %read_bool50) ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rus/repeat_until_success-sol-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rus/repeat_until_success-sol-x86_64-unknown-linux-gnu.ll index 02199552..d9b780c8 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rus/repeat_until_success-sol-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rus/repeat_until_success-sol-x86_64-unknown-linux-gnu.ll @@ -50,10 +50,10 @@ __hugr__.__tk2_sol_qalloc.44.exit73: ; preds = %__hugr__.__tk2_sol_ tail call void @___rp(i64 %qalloc.i70, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rz(i64 %qalloc.i70, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i6678, double 0x3FE921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i6678) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i6678, i64 0) tail call void @___qfree(i64 %qalloc.i6678) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) br i1 %read_bool, label %1, label %0 0: ; preds = %__hugr__.__tk2_sol_qalloc.44.exit73 @@ -74,10 +74,10 @@ __hugr__.__tk2_sol_qalloc.44.exit73: ; preds = %__hugr__.__tk2_sol_ tail call void @___rp(i64 %qalloc.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i70, double 0x3FE921FB54442D18) - %lazy_measure33 = tail call i64 @___lazy_measure(i64 %qalloc.i70) + %___future_measure33 = tail call i64 @___future_measure(i64 %qalloc.i70, i64 0) tail call void @___qfree(i64 %qalloc.i70) - %read_bool35 = tail call i1 @___read_future_bool(i64 %lazy_measure33) - tail call void @___dec_future_refcount(i64 %lazy_measure33) + %read_bool35 = tail call i1 @___read_future_bool(i64 %___future_measure33) + tail call void @___dec_future_refcount(i64 %___future_measure33) br i1 %read_bool35, label %3, label %2 2: ; preds = %1 @@ -85,15 +85,15 @@ __hugr__.__tk2_sol_qalloc.44.exit73: ; preds = %__hugr__.__tk2_sol_ br label %.backedge 3: ; preds = %1 - %lazy_measure48 = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure48 = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %read_bool50 = tail call i1 @___read_future_bool(i64 %lazy_measure48) - tail call void @___dec_future_refcount(i64 %lazy_measure48) + %read_bool50 = tail call i1 @___read_future_bool(i64 %___future_measure48) + tail call void @___dec_future_refcount(i64 %___future_measure48) tail call void @print_bool(ptr nonnull @res_result.457DE32D.0, i64 16, i1 %read_bool50) ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rus/repeat_until_success-sol-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rus/repeat_until_success-sol-x86_64-windows-gnu.ll index 1e3a5be7..106cd5bb 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rus/repeat_until_success-sol-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_rus/repeat_until_success-sol-x86_64-windows-gnu.ll @@ -50,10 +50,10 @@ __hugr__.__tk2_sol_qalloc.44.exit73: ; preds = %__hugr__.__tk2_sol_ tail call void @___rp(i64 %qalloc.i70, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rz(i64 %qalloc.i70, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i6678, double 0x3FE921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i6678) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i6678, i64 0) tail call void @___qfree(i64 %qalloc.i6678) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) br i1 %read_bool, label %1, label %0 0: ; preds = %__hugr__.__tk2_sol_qalloc.44.exit73 @@ -74,10 +74,10 @@ __hugr__.__tk2_sol_qalloc.44.exit73: ; preds = %__hugr__.__tk2_sol_ tail call void @___rp(i64 %qalloc.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i70, double 0x3FE921FB54442D18) - %lazy_measure33 = tail call i64 @___lazy_measure(i64 %qalloc.i70) + %___future_measure33 = tail call i64 @___future_measure(i64 %qalloc.i70, i64 0) tail call void @___qfree(i64 %qalloc.i70) - %read_bool35 = tail call i1 @___read_future_bool(i64 %lazy_measure33) - tail call void @___dec_future_refcount(i64 %lazy_measure33) + %read_bool35 = tail call i1 @___read_future_bool(i64 %___future_measure33) + tail call void @___dec_future_refcount(i64 %___future_measure33) br i1 %read_bool35, label %3, label %2 2: ; preds = %1 @@ -85,15 +85,15 @@ __hugr__.__tk2_sol_qalloc.44.exit73: ; preds = %__hugr__.__tk2_sol_ br label %.backedge 3: ; preds = %1 - %lazy_measure48 = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure48 = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %read_bool50 = tail call i1 @___read_future_bool(i64 %lazy_measure48) - tail call void @___dec_future_refcount(i64 %lazy_measure48) + %read_bool50 = tail call i1 @___read_future_bool(i64 %___future_measure48) + tail call void @___dec_future_refcount(i64 %___future_measure48) tail call void @print_bool(ptr nonnull @res_result.457DE32D.0, i64 16, i1 %read_bool50) ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_sim_restriction/nonclifford-helios-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_sim_restriction/nonclifford-helios-aarch64-apple-darwin.ll index df2bb845..78780549 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_sim_restriction/nonclifford-helios-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_sim_restriction/nonclifford-helios-aarch64-apple-darwin.ll @@ -187,7 +187,7 @@ panic.i850: ; preds = %cond_exit_137.1, %c %39 = or disjoint i64 %37, 1 store i64 %39, ptr %5, align 4 %40 = load i64, ptr %4, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %40) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %40) tail call void @___qfree(i64 %40) %41 = load i64, ptr %3, align 4 %42 = trunc i64 %41 to i1 @@ -196,7 +196,7 @@ panic.i850: ; preds = %cond_exit_137.1, %c cond_exit_137: ; preds = %.thread %43 = and i64 %41, -2 store i64 %43, ptr %3, align 4 - store i64 %lazy_measure, ptr %2, align 4 + store i64 %___lazy_measure, ptr %2, align 4 %44 = load i64, ptr %5, align 4 %45 = and i64 %44, 2 %.not916 = icmp eq i64 %45, 0 @@ -207,7 +207,7 @@ cond_exit_137: ; preds = %.thread store i64 %46, ptr %5, align 4 %47 = getelementptr inbounds nuw i8, ptr %4, i64 8 %48 = load i64, ptr %47, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %48) + %___lazy_measure.1 = tail call i64 @___lazy_measure(i64 %48) tail call void @___qfree(i64 %48) %49 = load i64, ptr %3, align 4 %50 = and i64 %49, 2 @@ -218,7 +218,7 @@ cond_exit_137.1: ; preds = %.thread.1 %51 = and i64 %49, -3 store i64 %51, ptr %3, align 4 %52 = getelementptr inbounds nuw i8, ptr %2, i64 8 - store i64 %lazy_measure.1, ptr %52, align 4 + store i64 %___lazy_measure.1, ptr %52, align 4 %53 = load i64, ptr %5, align 4 %54 = and i64 %53, 4 %.not918 = icmp eq i64 %54, 0 @@ -229,7 +229,7 @@ cond_exit_137.1: ; preds = %.thread.1 store i64 %55, ptr %5, align 4 %56 = getelementptr inbounds nuw i8, ptr %4, i64 16 %57 = load i64, ptr %56, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %57) + %___lazy_measure.2 = tail call i64 @___lazy_measure(i64 %57) tail call void @___qfree(i64 %57) %58 = load i64, ptr %3, align 4 %59 = and i64 %58, 4 @@ -240,7 +240,7 @@ cond_exit_137.2: ; preds = %.thread.2 %60 = and i64 %58, -5 store i64 %60, ptr %3, align 4 %61 = getelementptr inbounds nuw i8, ptr %2, i64 16 - store i64 %lazy_measure.2, ptr %61, align 4 + store i64 %___lazy_measure.2, ptr %61, align 4 %62 = load i64, ptr %5, align 4 %63 = or i64 %62, -8 store i64 %63, ptr %5, align 4 diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_sim_restriction/nonclifford-helios-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_sim_restriction/nonclifford-helios-aarch64-unknown-linux-gnu.ll index bc26a9a7..f104577e 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_sim_restriction/nonclifford-helios-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_sim_restriction/nonclifford-helios-aarch64-unknown-linux-gnu.ll @@ -187,7 +187,7 @@ panic.i850: ; preds = %cond_exit_137.1, %c %39 = or disjoint i64 %37, 1 store i64 %39, ptr %5, align 4 %40 = load i64, ptr %4, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %40) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %40) tail call void @___qfree(i64 %40) %41 = load i64, ptr %3, align 4 %42 = trunc i64 %41 to i1 @@ -196,7 +196,7 @@ panic.i850: ; preds = %cond_exit_137.1, %c cond_exit_137: ; preds = %.thread %43 = and i64 %41, -2 store i64 %43, ptr %3, align 4 - store i64 %lazy_measure, ptr %2, align 4 + store i64 %___lazy_measure, ptr %2, align 4 %44 = load i64, ptr %5, align 4 %45 = and i64 %44, 2 %.not916 = icmp eq i64 %45, 0 @@ -207,7 +207,7 @@ cond_exit_137: ; preds = %.thread store i64 %46, ptr %5, align 4 %47 = getelementptr inbounds nuw i8, ptr %4, i64 8 %48 = load i64, ptr %47, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %48) + %___lazy_measure.1 = tail call i64 @___lazy_measure(i64 %48) tail call void @___qfree(i64 %48) %49 = load i64, ptr %3, align 4 %50 = and i64 %49, 2 @@ -218,7 +218,7 @@ cond_exit_137.1: ; preds = %.thread.1 %51 = and i64 %49, -3 store i64 %51, ptr %3, align 4 %52 = getelementptr inbounds nuw i8, ptr %2, i64 8 - store i64 %lazy_measure.1, ptr %52, align 4 + store i64 %___lazy_measure.1, ptr %52, align 4 %53 = load i64, ptr %5, align 4 %54 = and i64 %53, 4 %.not918 = icmp eq i64 %54, 0 @@ -229,7 +229,7 @@ cond_exit_137.1: ; preds = %.thread.1 store i64 %55, ptr %5, align 4 %56 = getelementptr inbounds nuw i8, ptr %4, i64 16 %57 = load i64, ptr %56, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %57) + %___lazy_measure.2 = tail call i64 @___lazy_measure(i64 %57) tail call void @___qfree(i64 %57) %58 = load i64, ptr %3, align 4 %59 = and i64 %58, 4 @@ -240,7 +240,7 @@ cond_exit_137.2: ; preds = %.thread.2 %60 = and i64 %58, -5 store i64 %60, ptr %3, align 4 %61 = getelementptr inbounds nuw i8, ptr %2, i64 16 - store i64 %lazy_measure.2, ptr %61, align 4 + store i64 %___lazy_measure.2, ptr %61, align 4 %62 = load i64, ptr %5, align 4 %63 = or i64 %62, -8 store i64 %63, ptr %5, align 4 diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_sim_restriction/nonclifford-helios-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_sim_restriction/nonclifford-helios-x86_64-apple-darwin.ll index a3bd39e6..b530a81c 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_sim_restriction/nonclifford-helios-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_sim_restriction/nonclifford-helios-x86_64-apple-darwin.ll @@ -187,7 +187,7 @@ panic.i850: ; preds = %cond_exit_137.1, %c %39 = or disjoint i64 %37, 1 store i64 %39, ptr %5, align 4 %40 = load i64, ptr %4, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %40) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %40) tail call void @___qfree(i64 %40) %41 = load i64, ptr %3, align 4 %42 = trunc i64 %41 to i1 @@ -196,7 +196,7 @@ panic.i850: ; preds = %cond_exit_137.1, %c cond_exit_137: ; preds = %.thread %43 = and i64 %41, -2 store i64 %43, ptr %3, align 4 - store i64 %lazy_measure, ptr %2, align 4 + store i64 %___lazy_measure, ptr %2, align 4 %44 = load i64, ptr %5, align 4 %45 = and i64 %44, 2 %.not916 = icmp eq i64 %45, 0 @@ -207,7 +207,7 @@ cond_exit_137: ; preds = %.thread store i64 %46, ptr %5, align 4 %47 = getelementptr inbounds nuw i8, ptr %4, i64 8 %48 = load i64, ptr %47, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %48) + %___lazy_measure.1 = tail call i64 @___lazy_measure(i64 %48) tail call void @___qfree(i64 %48) %49 = load i64, ptr %3, align 4 %50 = and i64 %49, 2 @@ -218,7 +218,7 @@ cond_exit_137.1: ; preds = %.thread.1 %51 = and i64 %49, -3 store i64 %51, ptr %3, align 4 %52 = getelementptr inbounds nuw i8, ptr %2, i64 8 - store i64 %lazy_measure.1, ptr %52, align 4 + store i64 %___lazy_measure.1, ptr %52, align 4 %53 = load i64, ptr %5, align 4 %54 = and i64 %53, 4 %.not918 = icmp eq i64 %54, 0 @@ -229,7 +229,7 @@ cond_exit_137.1: ; preds = %.thread.1 store i64 %55, ptr %5, align 4 %56 = getelementptr inbounds nuw i8, ptr %4, i64 16 %57 = load i64, ptr %56, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %57) + %___lazy_measure.2 = tail call i64 @___lazy_measure(i64 %57) tail call void @___qfree(i64 %57) %58 = load i64, ptr %3, align 4 %59 = and i64 %58, 4 @@ -240,7 +240,7 @@ cond_exit_137.2: ; preds = %.thread.2 %60 = and i64 %58, -5 store i64 %60, ptr %3, align 4 %61 = getelementptr inbounds nuw i8, ptr %2, i64 16 - store i64 %lazy_measure.2, ptr %61, align 4 + store i64 %___lazy_measure.2, ptr %61, align 4 %62 = load i64, ptr %5, align 4 %63 = or i64 %62, -8 store i64 %63, ptr %5, align 4 diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_sim_restriction/nonclifford-helios-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_sim_restriction/nonclifford-helios-x86_64-unknown-linux-gnu.ll index 860f9124..3118cf35 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_sim_restriction/nonclifford-helios-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_sim_restriction/nonclifford-helios-x86_64-unknown-linux-gnu.ll @@ -187,7 +187,7 @@ panic.i850: ; preds = %cond_exit_137.1, %c %39 = or disjoint i64 %37, 1 store i64 %39, ptr %5, align 4 %40 = load i64, ptr %4, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %40) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %40) tail call void @___qfree(i64 %40) %41 = load i64, ptr %3, align 4 %42 = trunc i64 %41 to i1 @@ -196,7 +196,7 @@ panic.i850: ; preds = %cond_exit_137.1, %c cond_exit_137: ; preds = %.thread %43 = and i64 %41, -2 store i64 %43, ptr %3, align 4 - store i64 %lazy_measure, ptr %2, align 4 + store i64 %___lazy_measure, ptr %2, align 4 %44 = load i64, ptr %5, align 4 %45 = and i64 %44, 2 %.not916 = icmp eq i64 %45, 0 @@ -207,7 +207,7 @@ cond_exit_137: ; preds = %.thread store i64 %46, ptr %5, align 4 %47 = getelementptr inbounds nuw i8, ptr %4, i64 8 %48 = load i64, ptr %47, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %48) + %___lazy_measure.1 = tail call i64 @___lazy_measure(i64 %48) tail call void @___qfree(i64 %48) %49 = load i64, ptr %3, align 4 %50 = and i64 %49, 2 @@ -218,7 +218,7 @@ cond_exit_137.1: ; preds = %.thread.1 %51 = and i64 %49, -3 store i64 %51, ptr %3, align 4 %52 = getelementptr inbounds nuw i8, ptr %2, i64 8 - store i64 %lazy_measure.1, ptr %52, align 4 + store i64 %___lazy_measure.1, ptr %52, align 4 %53 = load i64, ptr %5, align 4 %54 = and i64 %53, 4 %.not918 = icmp eq i64 %54, 0 @@ -229,7 +229,7 @@ cond_exit_137.1: ; preds = %.thread.1 store i64 %55, ptr %5, align 4 %56 = getelementptr inbounds nuw i8, ptr %4, i64 16 %57 = load i64, ptr %56, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %57) + %___lazy_measure.2 = tail call i64 @___lazy_measure(i64 %57) tail call void @___qfree(i64 %57) %58 = load i64, ptr %3, align 4 %59 = and i64 %58, 4 @@ -240,7 +240,7 @@ cond_exit_137.2: ; preds = %.thread.2 %60 = and i64 %58, -5 store i64 %60, ptr %3, align 4 %61 = getelementptr inbounds nuw i8, ptr %2, i64 16 - store i64 %lazy_measure.2, ptr %61, align 4 + store i64 %___lazy_measure.2, ptr %61, align 4 %62 = load i64, ptr %5, align 4 %63 = or i64 %62, -8 store i64 %63, ptr %5, align 4 diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_sim_restriction/nonclifford-helios-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_sim_restriction/nonclifford-helios-x86_64-windows-gnu.ll index 159548e0..c4e3090b 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_sim_restriction/nonclifford-helios-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_sim_restriction/nonclifford-helios-x86_64-windows-gnu.ll @@ -187,7 +187,7 @@ panic.i850: ; preds = %cond_exit_137.1, %c %39 = or disjoint i64 %37, 1 store i64 %39, ptr %5, align 4 %40 = load i64, ptr %4, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %40) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %40) tail call void @___qfree(i64 %40) %41 = load i64, ptr %3, align 4 %42 = trunc i64 %41 to i1 @@ -196,7 +196,7 @@ panic.i850: ; preds = %cond_exit_137.1, %c cond_exit_137: ; preds = %.thread %43 = and i64 %41, -2 store i64 %43, ptr %3, align 4 - store i64 %lazy_measure, ptr %2, align 4 + store i64 %___lazy_measure, ptr %2, align 4 %44 = load i64, ptr %5, align 4 %45 = and i64 %44, 2 %.not916 = icmp eq i64 %45, 0 @@ -207,7 +207,7 @@ cond_exit_137: ; preds = %.thread store i64 %46, ptr %5, align 4 %47 = getelementptr inbounds nuw i8, ptr %4, i64 8 %48 = load i64, ptr %47, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %48) + %___lazy_measure.1 = tail call i64 @___lazy_measure(i64 %48) tail call void @___qfree(i64 %48) %49 = load i64, ptr %3, align 4 %50 = and i64 %49, 2 @@ -218,7 +218,7 @@ cond_exit_137.1: ; preds = %.thread.1 %51 = and i64 %49, -3 store i64 %51, ptr %3, align 4 %52 = getelementptr inbounds nuw i8, ptr %2, i64 8 - store i64 %lazy_measure.1, ptr %52, align 4 + store i64 %___lazy_measure.1, ptr %52, align 4 %53 = load i64, ptr %5, align 4 %54 = and i64 %53, 4 %.not918 = icmp eq i64 %54, 0 @@ -229,7 +229,7 @@ cond_exit_137.1: ; preds = %.thread.1 store i64 %55, ptr %5, align 4 %56 = getelementptr inbounds nuw i8, ptr %4, i64 16 %57 = load i64, ptr %56, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %57) + %___lazy_measure.2 = tail call i64 @___lazy_measure(i64 %57) tail call void @___qfree(i64 %57) %58 = load i64, ptr %3, align 4 %59 = and i64 %58, 4 @@ -240,7 +240,7 @@ cond_exit_137.2: ; preds = %.thread.2 %60 = and i64 %58, -5 store i64 %60, ptr %3, align 4 %61 = getelementptr inbounds nuw i8, ptr %2, i64 16 - store i64 %lazy_measure.2, ptr %61, align 4 + store i64 %___lazy_measure.2, ptr %61, align 4 %62 = load i64, ptr %5, align 4 %63 = or i64 %62, -8 store i64 %63, ptr %5, align 4 diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_sim_restriction/nonclifford-sol-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_sim_restriction/nonclifford-sol-aarch64-apple-darwin.ll index 35784a36..71ea11d1 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_sim_restriction/nonclifford-sol-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_sim_restriction/nonclifford-sol-aarch64-apple-darwin.ll @@ -194,7 +194,7 @@ panic.i850: ; preds = %cond_exit_137.1, %c %39 = or disjoint i64 %37, 1 store i64 %39, ptr %5, align 4 %40 = load i64, ptr %4, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %40) + %___future_measure = tail call i64 @___future_measure(i64 %40, i64 0) tail call void @___qfree(i64 %40) %41 = load i64, ptr %3, align 4 %42 = trunc i64 %41 to i1 @@ -203,7 +203,7 @@ panic.i850: ; preds = %cond_exit_137.1, %c cond_exit_137: ; preds = %.thread %43 = and i64 %41, -2 store i64 %43, ptr %3, align 4 - store i64 %lazy_measure, ptr %2, align 4 + store i64 %___future_measure, ptr %2, align 4 %44 = load i64, ptr %5, align 4 %45 = and i64 %44, 2 %.not916 = icmp eq i64 %45, 0 @@ -214,7 +214,7 @@ cond_exit_137: ; preds = %.thread store i64 %46, ptr %5, align 4 %47 = getelementptr inbounds nuw i8, ptr %4, i64 8 %48 = load i64, ptr %47, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %48) + %___future_measure.1 = tail call i64 @___future_measure(i64 %48, i64 0) tail call void @___qfree(i64 %48) %49 = load i64, ptr %3, align 4 %50 = and i64 %49, 2 @@ -225,7 +225,7 @@ cond_exit_137.1: ; preds = %.thread.1 %51 = and i64 %49, -3 store i64 %51, ptr %3, align 4 %52 = getelementptr inbounds nuw i8, ptr %2, i64 8 - store i64 %lazy_measure.1, ptr %52, align 4 + store i64 %___future_measure.1, ptr %52, align 4 %53 = load i64, ptr %5, align 4 %54 = and i64 %53, 4 %.not918 = icmp eq i64 %54, 0 @@ -236,7 +236,7 @@ cond_exit_137.1: ; preds = %.thread.1 store i64 %55, ptr %5, align 4 %56 = getelementptr inbounds nuw i8, ptr %4, i64 16 %57 = load i64, ptr %56, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %57) + %___future_measure.2 = tail call i64 @___future_measure(i64 %57, i64 0) tail call void @___qfree(i64 %57) %58 = load i64, ptr %3, align 4 %59 = and i64 %58, 4 @@ -247,7 +247,7 @@ cond_exit_137.2: ; preds = %.thread.2 %60 = and i64 %58, -5 store i64 %60, ptr %3, align 4 %61 = getelementptr inbounds nuw i8, ptr %2, i64 16 - store i64 %lazy_measure.2, ptr %61, align 4 + store i64 %___future_measure.2, ptr %61, align 4 %62 = load i64, ptr %5, align 4 %63 = or i64 %62, -8 store i64 %63, ptr %5, align 4 @@ -465,7 +465,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_sim_restriction/nonclifford-sol-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_sim_restriction/nonclifford-sol-aarch64-unknown-linux-gnu.ll index 6e546134..9ea823a2 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_sim_restriction/nonclifford-sol-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_sim_restriction/nonclifford-sol-aarch64-unknown-linux-gnu.ll @@ -194,7 +194,7 @@ panic.i850: ; preds = %cond_exit_137.1, %c %39 = or disjoint i64 %37, 1 store i64 %39, ptr %5, align 4 %40 = load i64, ptr %4, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %40) + %___future_measure = tail call i64 @___future_measure(i64 %40, i64 0) tail call void @___qfree(i64 %40) %41 = load i64, ptr %3, align 4 %42 = trunc i64 %41 to i1 @@ -203,7 +203,7 @@ panic.i850: ; preds = %cond_exit_137.1, %c cond_exit_137: ; preds = %.thread %43 = and i64 %41, -2 store i64 %43, ptr %3, align 4 - store i64 %lazy_measure, ptr %2, align 4 + store i64 %___future_measure, ptr %2, align 4 %44 = load i64, ptr %5, align 4 %45 = and i64 %44, 2 %.not916 = icmp eq i64 %45, 0 @@ -214,7 +214,7 @@ cond_exit_137: ; preds = %.thread store i64 %46, ptr %5, align 4 %47 = getelementptr inbounds nuw i8, ptr %4, i64 8 %48 = load i64, ptr %47, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %48) + %___future_measure.1 = tail call i64 @___future_measure(i64 %48, i64 0) tail call void @___qfree(i64 %48) %49 = load i64, ptr %3, align 4 %50 = and i64 %49, 2 @@ -225,7 +225,7 @@ cond_exit_137.1: ; preds = %.thread.1 %51 = and i64 %49, -3 store i64 %51, ptr %3, align 4 %52 = getelementptr inbounds nuw i8, ptr %2, i64 8 - store i64 %lazy_measure.1, ptr %52, align 4 + store i64 %___future_measure.1, ptr %52, align 4 %53 = load i64, ptr %5, align 4 %54 = and i64 %53, 4 %.not918 = icmp eq i64 %54, 0 @@ -236,7 +236,7 @@ cond_exit_137.1: ; preds = %.thread.1 store i64 %55, ptr %5, align 4 %56 = getelementptr inbounds nuw i8, ptr %4, i64 16 %57 = load i64, ptr %56, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %57) + %___future_measure.2 = tail call i64 @___future_measure(i64 %57, i64 0) tail call void @___qfree(i64 %57) %58 = load i64, ptr %3, align 4 %59 = and i64 %58, 4 @@ -247,7 +247,7 @@ cond_exit_137.2: ; preds = %.thread.2 %60 = and i64 %58, -5 store i64 %60, ptr %3, align 4 %61 = getelementptr inbounds nuw i8, ptr %2, i64 16 - store i64 %lazy_measure.2, ptr %61, align 4 + store i64 %___future_measure.2, ptr %61, align 4 %62 = load i64, ptr %5, align 4 %63 = or i64 %62, -8 store i64 %63, ptr %5, align 4 @@ -465,7 +465,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_sim_restriction/nonclifford-sol-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_sim_restriction/nonclifford-sol-x86_64-apple-darwin.ll index e135786c..2e207a13 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_sim_restriction/nonclifford-sol-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_sim_restriction/nonclifford-sol-x86_64-apple-darwin.ll @@ -194,7 +194,7 @@ panic.i850: ; preds = %cond_exit_137.1, %c %39 = or disjoint i64 %37, 1 store i64 %39, ptr %5, align 4 %40 = load i64, ptr %4, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %40) + %___future_measure = tail call i64 @___future_measure(i64 %40, i64 0) tail call void @___qfree(i64 %40) %41 = load i64, ptr %3, align 4 %42 = trunc i64 %41 to i1 @@ -203,7 +203,7 @@ panic.i850: ; preds = %cond_exit_137.1, %c cond_exit_137: ; preds = %.thread %43 = and i64 %41, -2 store i64 %43, ptr %3, align 4 - store i64 %lazy_measure, ptr %2, align 4 + store i64 %___future_measure, ptr %2, align 4 %44 = load i64, ptr %5, align 4 %45 = and i64 %44, 2 %.not916 = icmp eq i64 %45, 0 @@ -214,7 +214,7 @@ cond_exit_137: ; preds = %.thread store i64 %46, ptr %5, align 4 %47 = getelementptr inbounds nuw i8, ptr %4, i64 8 %48 = load i64, ptr %47, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %48) + %___future_measure.1 = tail call i64 @___future_measure(i64 %48, i64 0) tail call void @___qfree(i64 %48) %49 = load i64, ptr %3, align 4 %50 = and i64 %49, 2 @@ -225,7 +225,7 @@ cond_exit_137.1: ; preds = %.thread.1 %51 = and i64 %49, -3 store i64 %51, ptr %3, align 4 %52 = getelementptr inbounds nuw i8, ptr %2, i64 8 - store i64 %lazy_measure.1, ptr %52, align 4 + store i64 %___future_measure.1, ptr %52, align 4 %53 = load i64, ptr %5, align 4 %54 = and i64 %53, 4 %.not918 = icmp eq i64 %54, 0 @@ -236,7 +236,7 @@ cond_exit_137.1: ; preds = %.thread.1 store i64 %55, ptr %5, align 4 %56 = getelementptr inbounds nuw i8, ptr %4, i64 16 %57 = load i64, ptr %56, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %57) + %___future_measure.2 = tail call i64 @___future_measure(i64 %57, i64 0) tail call void @___qfree(i64 %57) %58 = load i64, ptr %3, align 4 %59 = and i64 %58, 4 @@ -247,7 +247,7 @@ cond_exit_137.2: ; preds = %.thread.2 %60 = and i64 %58, -5 store i64 %60, ptr %3, align 4 %61 = getelementptr inbounds nuw i8, ptr %2, i64 16 - store i64 %lazy_measure.2, ptr %61, align 4 + store i64 %___future_measure.2, ptr %61, align 4 %62 = load i64, ptr %5, align 4 %63 = or i64 %62, -8 store i64 %63, ptr %5, align 4 @@ -465,7 +465,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_sim_restriction/nonclifford-sol-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_sim_restriction/nonclifford-sol-x86_64-unknown-linux-gnu.ll index 99a310d4..88fc7e7e 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_sim_restriction/nonclifford-sol-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_sim_restriction/nonclifford-sol-x86_64-unknown-linux-gnu.ll @@ -194,7 +194,7 @@ panic.i850: ; preds = %cond_exit_137.1, %c %39 = or disjoint i64 %37, 1 store i64 %39, ptr %5, align 4 %40 = load i64, ptr %4, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %40) + %___future_measure = tail call i64 @___future_measure(i64 %40, i64 0) tail call void @___qfree(i64 %40) %41 = load i64, ptr %3, align 4 %42 = trunc i64 %41 to i1 @@ -203,7 +203,7 @@ panic.i850: ; preds = %cond_exit_137.1, %c cond_exit_137: ; preds = %.thread %43 = and i64 %41, -2 store i64 %43, ptr %3, align 4 - store i64 %lazy_measure, ptr %2, align 4 + store i64 %___future_measure, ptr %2, align 4 %44 = load i64, ptr %5, align 4 %45 = and i64 %44, 2 %.not916 = icmp eq i64 %45, 0 @@ -214,7 +214,7 @@ cond_exit_137: ; preds = %.thread store i64 %46, ptr %5, align 4 %47 = getelementptr inbounds nuw i8, ptr %4, i64 8 %48 = load i64, ptr %47, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %48) + %___future_measure.1 = tail call i64 @___future_measure(i64 %48, i64 0) tail call void @___qfree(i64 %48) %49 = load i64, ptr %3, align 4 %50 = and i64 %49, 2 @@ -225,7 +225,7 @@ cond_exit_137.1: ; preds = %.thread.1 %51 = and i64 %49, -3 store i64 %51, ptr %3, align 4 %52 = getelementptr inbounds nuw i8, ptr %2, i64 8 - store i64 %lazy_measure.1, ptr %52, align 4 + store i64 %___future_measure.1, ptr %52, align 4 %53 = load i64, ptr %5, align 4 %54 = and i64 %53, 4 %.not918 = icmp eq i64 %54, 0 @@ -236,7 +236,7 @@ cond_exit_137.1: ; preds = %.thread.1 store i64 %55, ptr %5, align 4 %56 = getelementptr inbounds nuw i8, ptr %4, i64 16 %57 = load i64, ptr %56, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %57) + %___future_measure.2 = tail call i64 @___future_measure(i64 %57, i64 0) tail call void @___qfree(i64 %57) %58 = load i64, ptr %3, align 4 %59 = and i64 %58, 4 @@ -247,7 +247,7 @@ cond_exit_137.2: ; preds = %.thread.2 %60 = and i64 %58, -5 store i64 %60, ptr %3, align 4 %61 = getelementptr inbounds nuw i8, ptr %2, i64 16 - store i64 %lazy_measure.2, ptr %61, align 4 + store i64 %___future_measure.2, ptr %61, align 4 %62 = load i64, ptr %5, align 4 %63 = or i64 %62, -8 store i64 %63, ptr %5, align 4 @@ -465,7 +465,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_sim_restriction/nonclifford-sol-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_sim_restriction/nonclifford-sol-x86_64-windows-gnu.ll index 0da6e542..23bb49e4 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_guppy/test_sim_restriction/nonclifford-sol-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_guppy/test_sim_restriction/nonclifford-sol-x86_64-windows-gnu.ll @@ -194,7 +194,7 @@ panic.i850: ; preds = %cond_exit_137.1, %c %39 = or disjoint i64 %37, 1 store i64 %39, ptr %5, align 4 %40 = load i64, ptr %4, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %40) + %___future_measure = tail call i64 @___future_measure(i64 %40, i64 0) tail call void @___qfree(i64 %40) %41 = load i64, ptr %3, align 4 %42 = trunc i64 %41 to i1 @@ -203,7 +203,7 @@ panic.i850: ; preds = %cond_exit_137.1, %c cond_exit_137: ; preds = %.thread %43 = and i64 %41, -2 store i64 %43, ptr %3, align 4 - store i64 %lazy_measure, ptr %2, align 4 + store i64 %___future_measure, ptr %2, align 4 %44 = load i64, ptr %5, align 4 %45 = and i64 %44, 2 %.not916 = icmp eq i64 %45, 0 @@ -214,7 +214,7 @@ cond_exit_137: ; preds = %.thread store i64 %46, ptr %5, align 4 %47 = getelementptr inbounds nuw i8, ptr %4, i64 8 %48 = load i64, ptr %47, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %48) + %___future_measure.1 = tail call i64 @___future_measure(i64 %48, i64 0) tail call void @___qfree(i64 %48) %49 = load i64, ptr %3, align 4 %50 = and i64 %49, 2 @@ -225,7 +225,7 @@ cond_exit_137.1: ; preds = %.thread.1 %51 = and i64 %49, -3 store i64 %51, ptr %3, align 4 %52 = getelementptr inbounds nuw i8, ptr %2, i64 8 - store i64 %lazy_measure.1, ptr %52, align 4 + store i64 %___future_measure.1, ptr %52, align 4 %53 = load i64, ptr %5, align 4 %54 = and i64 %53, 4 %.not918 = icmp eq i64 %54, 0 @@ -236,7 +236,7 @@ cond_exit_137.1: ; preds = %.thread.1 store i64 %55, ptr %5, align 4 %56 = getelementptr inbounds nuw i8, ptr %4, i64 16 %57 = load i64, ptr %56, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %57) + %___future_measure.2 = tail call i64 @___future_measure(i64 %57, i64 0) tail call void @___qfree(i64 %57) %58 = load i64, ptr %3, align 4 %59 = and i64 %58, 4 @@ -247,7 +247,7 @@ cond_exit_137.2: ; preds = %.thread.2 %60 = and i64 %58, -5 store i64 %60, ptr %3, align 4 %61 = getelementptr inbounds nuw i8, ptr %2, i64 16 - store i64 %lazy_measure.2, ptr %61, align 4 + store i64 %___future_measure.2, ptr %61, align 4 %62 = load i64, ptr %5, align 4 %63 = or i64 %62, -8 store i64 %63, ptr %5, align 4 @@ -465,7 +465,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-QuestPlugin]/quantum_replay_state-helios-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-QuestPlugin]/quantum_replay_state-helios-aarch64-apple-darwin.ll index c9b701ab..2ac93f8d 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-QuestPlugin]/quantum_replay_state-helios-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-QuestPlugin]/quantum_replay_state-helios-aarch64-apple-darwin.ll @@ -73,7 +73,7 @@ __barray_mask_check_not_borrowed.exit103: ; preds = %__hugr__.__tk2_heli store i64 0, ptr %7, align 1 %8 = load i64, ptr %0, align 4 %9 = load i64, ptr %2, align 4 - %lazy_measure = call i64 @___lazy_measure(i64 %8) + %___lazy_measure = call i64 @___lazy_measure(i64 %8) call void @___qfree(i64 %8) %10 = call ptr @heap_alloc(i64 8) %11 = call ptr @heap_alloc(i64 8) @@ -90,8 +90,8 @@ mask_block_err.i104: ; preds = %__barray_mask_check unreachable __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check_not_borrowed.exit103 - %read_bool = call i1 @___read_future_bool(i64 %lazy_measure) - call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = call i1 @___read_future_bool(i64 %___lazy_measure) + call void @___dec_future_refcount(i64 %___lazy_measure) call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) %out_arr_alloca34 = alloca <{ i32, i32, ptr, ptr }>, align 8 %y_ptr36 = getelementptr inbounds nuw i8, ptr %out_arr_alloca34, i64 4 @@ -107,10 +107,10 @@ __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check %16 = call ptr @heap_alloc(i64 8) store i64 0, ptr %16, align 1 %17 = load i64, ptr %10, align 4 - %lazy_measure48 = call i64 @___lazy_measure(i64 %17) + %___lazy_measure48 = call i64 @___lazy_measure(i64 %17) call void @___qfree(i64 %17) - %read_bool50 = call i1 @___read_future_bool(i64 %lazy_measure48) - call void @___dec_future_refcount(i64 %lazy_measure48) + %read_bool50 = call i1 @___read_future_bool(i64 %___lazy_measure48) + call void @___dec_future_refcount(i64 %___lazy_measure48) call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool50) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-QuestPlugin]/quantum_replay_state-helios-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-QuestPlugin]/quantum_replay_state-helios-aarch64-unknown-linux-gnu.ll index 2dac175d..0f58b9f3 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-QuestPlugin]/quantum_replay_state-helios-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-QuestPlugin]/quantum_replay_state-helios-aarch64-unknown-linux-gnu.ll @@ -73,7 +73,7 @@ __barray_mask_check_not_borrowed.exit103: ; preds = %__hugr__.__tk2_heli store i64 0, ptr %7, align 1 %8 = load i64, ptr %0, align 4 %9 = load i64, ptr %2, align 4 - %lazy_measure = call i64 @___lazy_measure(i64 %8) + %___lazy_measure = call i64 @___lazy_measure(i64 %8) call void @___qfree(i64 %8) %10 = call ptr @heap_alloc(i64 8) %11 = call ptr @heap_alloc(i64 8) @@ -90,8 +90,8 @@ mask_block_err.i104: ; preds = %__barray_mask_check unreachable __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check_not_borrowed.exit103 - %read_bool = call i1 @___read_future_bool(i64 %lazy_measure) - call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = call i1 @___read_future_bool(i64 %___lazy_measure) + call void @___dec_future_refcount(i64 %___lazy_measure) call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) %out_arr_alloca34 = alloca <{ i32, i32, ptr, ptr }>, align 8 %y_ptr36 = getelementptr inbounds nuw i8, ptr %out_arr_alloca34, i64 4 @@ -107,10 +107,10 @@ __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check %16 = call ptr @heap_alloc(i64 8) store i64 0, ptr %16, align 1 %17 = load i64, ptr %10, align 4 - %lazy_measure48 = call i64 @___lazy_measure(i64 %17) + %___lazy_measure48 = call i64 @___lazy_measure(i64 %17) call void @___qfree(i64 %17) - %read_bool50 = call i1 @___read_future_bool(i64 %lazy_measure48) - call void @___dec_future_refcount(i64 %lazy_measure48) + %read_bool50 = call i1 @___read_future_bool(i64 %___lazy_measure48) + call void @___dec_future_refcount(i64 %___lazy_measure48) call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool50) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-QuestPlugin]/quantum_replay_state-helios-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-QuestPlugin]/quantum_replay_state-helios-x86_64-apple-darwin.ll index 32d86400..63c0c932 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-QuestPlugin]/quantum_replay_state-helios-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-QuestPlugin]/quantum_replay_state-helios-x86_64-apple-darwin.ll @@ -73,7 +73,7 @@ __barray_mask_check_not_borrowed.exit103: ; preds = %__hugr__.__tk2_heli store i64 0, ptr %7, align 1 %8 = load i64, ptr %0, align 4 %9 = load i64, ptr %2, align 4 - %lazy_measure = call i64 @___lazy_measure(i64 %8) + %___lazy_measure = call i64 @___lazy_measure(i64 %8) call void @___qfree(i64 %8) %10 = call ptr @heap_alloc(i64 8) %11 = call ptr @heap_alloc(i64 8) @@ -90,8 +90,8 @@ mask_block_err.i104: ; preds = %__barray_mask_check unreachable __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check_not_borrowed.exit103 - %read_bool = call i1 @___read_future_bool(i64 %lazy_measure) - call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = call i1 @___read_future_bool(i64 %___lazy_measure) + call void @___dec_future_refcount(i64 %___lazy_measure) call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) %out_arr_alloca34 = alloca <{ i32, i32, ptr, ptr }>, align 8 %y_ptr36 = getelementptr inbounds nuw i8, ptr %out_arr_alloca34, i64 4 @@ -107,10 +107,10 @@ __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check %16 = call ptr @heap_alloc(i64 8) store i64 0, ptr %16, align 1 %17 = load i64, ptr %10, align 4 - %lazy_measure48 = call i64 @___lazy_measure(i64 %17) + %___lazy_measure48 = call i64 @___lazy_measure(i64 %17) call void @___qfree(i64 %17) - %read_bool50 = call i1 @___read_future_bool(i64 %lazy_measure48) - call void @___dec_future_refcount(i64 %lazy_measure48) + %read_bool50 = call i1 @___read_future_bool(i64 %___lazy_measure48) + call void @___dec_future_refcount(i64 %___lazy_measure48) call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool50) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-QuestPlugin]/quantum_replay_state-helios-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-QuestPlugin]/quantum_replay_state-helios-x86_64-unknown-linux-gnu.ll index 063445e1..f3ef9e2c 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-QuestPlugin]/quantum_replay_state-helios-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-QuestPlugin]/quantum_replay_state-helios-x86_64-unknown-linux-gnu.ll @@ -73,7 +73,7 @@ __barray_mask_check_not_borrowed.exit103: ; preds = %__hugr__.__tk2_heli store i64 0, ptr %7, align 1 %8 = load i64, ptr %0, align 4 %9 = load i64, ptr %2, align 4 - %lazy_measure = call i64 @___lazy_measure(i64 %8) + %___lazy_measure = call i64 @___lazy_measure(i64 %8) call void @___qfree(i64 %8) %10 = call ptr @heap_alloc(i64 8) %11 = call ptr @heap_alloc(i64 8) @@ -90,8 +90,8 @@ mask_block_err.i104: ; preds = %__barray_mask_check unreachable __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check_not_borrowed.exit103 - %read_bool = call i1 @___read_future_bool(i64 %lazy_measure) - call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = call i1 @___read_future_bool(i64 %___lazy_measure) + call void @___dec_future_refcount(i64 %___lazy_measure) call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) %out_arr_alloca34 = alloca <{ i32, i32, ptr, ptr }>, align 8 %y_ptr36 = getelementptr inbounds nuw i8, ptr %out_arr_alloca34, i64 4 @@ -107,10 +107,10 @@ __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check %16 = call ptr @heap_alloc(i64 8) store i64 0, ptr %16, align 1 %17 = load i64, ptr %10, align 4 - %lazy_measure48 = call i64 @___lazy_measure(i64 %17) + %___lazy_measure48 = call i64 @___lazy_measure(i64 %17) call void @___qfree(i64 %17) - %read_bool50 = call i1 @___read_future_bool(i64 %lazy_measure48) - call void @___dec_future_refcount(i64 %lazy_measure48) + %read_bool50 = call i1 @___read_future_bool(i64 %___lazy_measure48) + call void @___dec_future_refcount(i64 %___lazy_measure48) call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool50) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-QuestPlugin]/quantum_replay_state-helios-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-QuestPlugin]/quantum_replay_state-helios-x86_64-windows-gnu.ll index 91b13668..f6f60264 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-QuestPlugin]/quantum_replay_state-helios-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-QuestPlugin]/quantum_replay_state-helios-x86_64-windows-gnu.ll @@ -73,7 +73,7 @@ __barray_mask_check_not_borrowed.exit103: ; preds = %__hugr__.__tk2_heli store i64 0, ptr %7, align 1 %8 = load i64, ptr %0, align 4 %9 = load i64, ptr %2, align 4 - %lazy_measure = call i64 @___lazy_measure(i64 %8) + %___lazy_measure = call i64 @___lazy_measure(i64 %8) call void @___qfree(i64 %8) %10 = call ptr @heap_alloc(i64 8) %11 = call ptr @heap_alloc(i64 8) @@ -90,8 +90,8 @@ mask_block_err.i104: ; preds = %__barray_mask_check unreachable __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check_not_borrowed.exit103 - %read_bool = call i1 @___read_future_bool(i64 %lazy_measure) - call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = call i1 @___read_future_bool(i64 %___lazy_measure) + call void @___dec_future_refcount(i64 %___lazy_measure) call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) %out_arr_alloca34 = alloca <{ i32, i32, ptr, ptr }>, align 8 %y_ptr36 = getelementptr inbounds nuw i8, ptr %out_arr_alloca34, i64 4 @@ -107,10 +107,10 @@ __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check %16 = call ptr @heap_alloc(i64 8) store i64 0, ptr %16, align 1 %17 = load i64, ptr %10, align 4 - %lazy_measure48 = call i64 @___lazy_measure(i64 %17) + %___lazy_measure48 = call i64 @___lazy_measure(i64 %17) call void @___qfree(i64 %17) - %read_bool50 = call i1 @___read_future_bool(i64 %lazy_measure48) - call void @___dec_future_refcount(i64 %lazy_measure48) + %read_bool50 = call i1 @___read_future_bool(i64 %___lazy_measure48) + call void @___dec_future_refcount(i64 %___lazy_measure48) call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool50) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-QuestPlugin]/quantum_replay_state-sol-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-QuestPlugin]/quantum_replay_state-sol-aarch64-apple-darwin.ll index f834a8d4..b804975c 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-QuestPlugin]/quantum_replay_state-sol-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-QuestPlugin]/quantum_replay_state-sol-aarch64-apple-darwin.ll @@ -73,7 +73,7 @@ __barray_mask_check_not_borrowed.exit103: ; preds = %__hugr__.__tk2_sol_ store i64 0, ptr %7, align 1 %8 = load i64, ptr %0, align 4 %9 = load i64, ptr %2, align 4 - %lazy_measure = call i64 @___lazy_measure(i64 %8) + %___future_measure = call i64 @___future_measure(i64 %8, i64 0) call void @___qfree(i64 %8) %10 = call ptr @heap_alloc(i64 8) %11 = call ptr @heap_alloc(i64 8) @@ -90,8 +90,8 @@ mask_block_err.i104: ; preds = %__barray_mask_check unreachable __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check_not_borrowed.exit103 - %read_bool = call i1 @___read_future_bool(i64 %lazy_measure) - call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = call i1 @___read_future_bool(i64 %___future_measure) + call void @___dec_future_refcount(i64 %___future_measure) call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) %out_arr_alloca34 = alloca <{ i32, i32, ptr, ptr }>, align 8 %y_ptr36 = getelementptr inbounds nuw i8, ptr %out_arr_alloca34, i64 4 @@ -107,10 +107,10 @@ __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check %16 = call ptr @heap_alloc(i64 8) store i64 0, ptr %16, align 1 %17 = load i64, ptr %10, align 4 - %lazy_measure48 = call i64 @___lazy_measure(i64 %17) + %___future_measure48 = call i64 @___future_measure(i64 %17, i64 0) call void @___qfree(i64 %17) - %read_bool50 = call i1 @___read_future_bool(i64 %lazy_measure48) - call void @___dec_future_refcount(i64 %lazy_measure48) + %read_bool50 = call i1 @___read_future_bool(i64 %___future_measure48) + call void @___dec_future_refcount(i64 %___future_measure48) call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool50) ret void } @@ -122,7 +122,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @print_state_result(ptr, i64, ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-QuestPlugin]/quantum_replay_state-sol-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-QuestPlugin]/quantum_replay_state-sol-aarch64-unknown-linux-gnu.ll index cc3bc0ac..5cd6aa87 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-QuestPlugin]/quantum_replay_state-sol-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-QuestPlugin]/quantum_replay_state-sol-aarch64-unknown-linux-gnu.ll @@ -73,7 +73,7 @@ __barray_mask_check_not_borrowed.exit103: ; preds = %__hugr__.__tk2_sol_ store i64 0, ptr %7, align 1 %8 = load i64, ptr %0, align 4 %9 = load i64, ptr %2, align 4 - %lazy_measure = call i64 @___lazy_measure(i64 %8) + %___future_measure = call i64 @___future_measure(i64 %8, i64 0) call void @___qfree(i64 %8) %10 = call ptr @heap_alloc(i64 8) %11 = call ptr @heap_alloc(i64 8) @@ -90,8 +90,8 @@ mask_block_err.i104: ; preds = %__barray_mask_check unreachable __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check_not_borrowed.exit103 - %read_bool = call i1 @___read_future_bool(i64 %lazy_measure) - call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = call i1 @___read_future_bool(i64 %___future_measure) + call void @___dec_future_refcount(i64 %___future_measure) call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) %out_arr_alloca34 = alloca <{ i32, i32, ptr, ptr }>, align 8 %y_ptr36 = getelementptr inbounds nuw i8, ptr %out_arr_alloca34, i64 4 @@ -107,10 +107,10 @@ __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check %16 = call ptr @heap_alloc(i64 8) store i64 0, ptr %16, align 1 %17 = load i64, ptr %10, align 4 - %lazy_measure48 = call i64 @___lazy_measure(i64 %17) + %___future_measure48 = call i64 @___future_measure(i64 %17, i64 0) call void @___qfree(i64 %17) - %read_bool50 = call i1 @___read_future_bool(i64 %lazy_measure48) - call void @___dec_future_refcount(i64 %lazy_measure48) + %read_bool50 = call i1 @___read_future_bool(i64 %___future_measure48) + call void @___dec_future_refcount(i64 %___future_measure48) call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool50) ret void } @@ -122,7 +122,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @print_state_result(ptr, i64, ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-QuestPlugin]/quantum_replay_state-sol-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-QuestPlugin]/quantum_replay_state-sol-x86_64-apple-darwin.ll index 3f4785e4..84cde776 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-QuestPlugin]/quantum_replay_state-sol-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-QuestPlugin]/quantum_replay_state-sol-x86_64-apple-darwin.ll @@ -73,7 +73,7 @@ __barray_mask_check_not_borrowed.exit103: ; preds = %__hugr__.__tk2_sol_ store i64 0, ptr %7, align 1 %8 = load i64, ptr %0, align 4 %9 = load i64, ptr %2, align 4 - %lazy_measure = call i64 @___lazy_measure(i64 %8) + %___future_measure = call i64 @___future_measure(i64 %8, i64 0) call void @___qfree(i64 %8) %10 = call ptr @heap_alloc(i64 8) %11 = call ptr @heap_alloc(i64 8) @@ -90,8 +90,8 @@ mask_block_err.i104: ; preds = %__barray_mask_check unreachable __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check_not_borrowed.exit103 - %read_bool = call i1 @___read_future_bool(i64 %lazy_measure) - call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = call i1 @___read_future_bool(i64 %___future_measure) + call void @___dec_future_refcount(i64 %___future_measure) call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) %out_arr_alloca34 = alloca <{ i32, i32, ptr, ptr }>, align 8 %y_ptr36 = getelementptr inbounds nuw i8, ptr %out_arr_alloca34, i64 4 @@ -107,10 +107,10 @@ __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check %16 = call ptr @heap_alloc(i64 8) store i64 0, ptr %16, align 1 %17 = load i64, ptr %10, align 4 - %lazy_measure48 = call i64 @___lazy_measure(i64 %17) + %___future_measure48 = call i64 @___future_measure(i64 %17, i64 0) call void @___qfree(i64 %17) - %read_bool50 = call i1 @___read_future_bool(i64 %lazy_measure48) - call void @___dec_future_refcount(i64 %lazy_measure48) + %read_bool50 = call i1 @___read_future_bool(i64 %___future_measure48) + call void @___dec_future_refcount(i64 %___future_measure48) call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool50) ret void } @@ -122,7 +122,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @print_state_result(ptr, i64, ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-QuestPlugin]/quantum_replay_state-sol-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-QuestPlugin]/quantum_replay_state-sol-x86_64-unknown-linux-gnu.ll index f28a7b6f..adb7dd0a 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-QuestPlugin]/quantum_replay_state-sol-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-QuestPlugin]/quantum_replay_state-sol-x86_64-unknown-linux-gnu.ll @@ -73,7 +73,7 @@ __barray_mask_check_not_borrowed.exit103: ; preds = %__hugr__.__tk2_sol_ store i64 0, ptr %7, align 1 %8 = load i64, ptr %0, align 4 %9 = load i64, ptr %2, align 4 - %lazy_measure = call i64 @___lazy_measure(i64 %8) + %___future_measure = call i64 @___future_measure(i64 %8, i64 0) call void @___qfree(i64 %8) %10 = call ptr @heap_alloc(i64 8) %11 = call ptr @heap_alloc(i64 8) @@ -90,8 +90,8 @@ mask_block_err.i104: ; preds = %__barray_mask_check unreachable __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check_not_borrowed.exit103 - %read_bool = call i1 @___read_future_bool(i64 %lazy_measure) - call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = call i1 @___read_future_bool(i64 %___future_measure) + call void @___dec_future_refcount(i64 %___future_measure) call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) %out_arr_alloca34 = alloca <{ i32, i32, ptr, ptr }>, align 8 %y_ptr36 = getelementptr inbounds nuw i8, ptr %out_arr_alloca34, i64 4 @@ -107,10 +107,10 @@ __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check %16 = call ptr @heap_alloc(i64 8) store i64 0, ptr %16, align 1 %17 = load i64, ptr %10, align 4 - %lazy_measure48 = call i64 @___lazy_measure(i64 %17) + %___future_measure48 = call i64 @___future_measure(i64 %17, i64 0) call void @___qfree(i64 %17) - %read_bool50 = call i1 @___read_future_bool(i64 %lazy_measure48) - call void @___dec_future_refcount(i64 %lazy_measure48) + %read_bool50 = call i1 @___read_future_bool(i64 %___future_measure48) + call void @___dec_future_refcount(i64 %___future_measure48) call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool50) ret void } @@ -122,7 +122,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @print_state_result(ptr, i64, ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-QuestPlugin]/quantum_replay_state-sol-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-QuestPlugin]/quantum_replay_state-sol-x86_64-windows-gnu.ll index 1b77d112..b1de00ef 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-QuestPlugin]/quantum_replay_state-sol-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-QuestPlugin]/quantum_replay_state-sol-x86_64-windows-gnu.ll @@ -73,7 +73,7 @@ __barray_mask_check_not_borrowed.exit103: ; preds = %__hugr__.__tk2_sol_ store i64 0, ptr %7, align 1 %8 = load i64, ptr %0, align 4 %9 = load i64, ptr %2, align 4 - %lazy_measure = call i64 @___lazy_measure(i64 %8) + %___future_measure = call i64 @___future_measure(i64 %8, i64 0) call void @___qfree(i64 %8) %10 = call ptr @heap_alloc(i64 8) %11 = call ptr @heap_alloc(i64 8) @@ -90,8 +90,8 @@ mask_block_err.i104: ; preds = %__barray_mask_check unreachable __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check_not_borrowed.exit103 - %read_bool = call i1 @___read_future_bool(i64 %lazy_measure) - call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = call i1 @___read_future_bool(i64 %___future_measure) + call void @___dec_future_refcount(i64 %___future_measure) call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) %out_arr_alloca34 = alloca <{ i32, i32, ptr, ptr }>, align 8 %y_ptr36 = getelementptr inbounds nuw i8, ptr %out_arr_alloca34, i64 4 @@ -107,10 +107,10 @@ __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check %16 = call ptr @heap_alloc(i64 8) store i64 0, ptr %16, align 1 %17 = load i64, ptr %10, align 4 - %lazy_measure48 = call i64 @___lazy_measure(i64 %17) + %___future_measure48 = call i64 @___future_measure(i64 %17, i64 0) call void @___qfree(i64 %17) - %read_bool50 = call i1 @___read_future_bool(i64 %lazy_measure48) - call void @___dec_future_refcount(i64 %lazy_measure48) + %read_bool50 = call i1 @___read_future_bool(i64 %___future_measure48) + call void @___dec_future_refcount(i64 %___future_measure48) call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool50) ret void } @@ -122,7 +122,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @print_state_result(ptr, i64, ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-StimPlugin]/quantum_replay_state-helios-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-StimPlugin]/quantum_replay_state-helios-aarch64-apple-darwin.ll index c9b701ab..2ac93f8d 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-StimPlugin]/quantum_replay_state-helios-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-StimPlugin]/quantum_replay_state-helios-aarch64-apple-darwin.ll @@ -73,7 +73,7 @@ __barray_mask_check_not_borrowed.exit103: ; preds = %__hugr__.__tk2_heli store i64 0, ptr %7, align 1 %8 = load i64, ptr %0, align 4 %9 = load i64, ptr %2, align 4 - %lazy_measure = call i64 @___lazy_measure(i64 %8) + %___lazy_measure = call i64 @___lazy_measure(i64 %8) call void @___qfree(i64 %8) %10 = call ptr @heap_alloc(i64 8) %11 = call ptr @heap_alloc(i64 8) @@ -90,8 +90,8 @@ mask_block_err.i104: ; preds = %__barray_mask_check unreachable __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check_not_borrowed.exit103 - %read_bool = call i1 @___read_future_bool(i64 %lazy_measure) - call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = call i1 @___read_future_bool(i64 %___lazy_measure) + call void @___dec_future_refcount(i64 %___lazy_measure) call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) %out_arr_alloca34 = alloca <{ i32, i32, ptr, ptr }>, align 8 %y_ptr36 = getelementptr inbounds nuw i8, ptr %out_arr_alloca34, i64 4 @@ -107,10 +107,10 @@ __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check %16 = call ptr @heap_alloc(i64 8) store i64 0, ptr %16, align 1 %17 = load i64, ptr %10, align 4 - %lazy_measure48 = call i64 @___lazy_measure(i64 %17) + %___lazy_measure48 = call i64 @___lazy_measure(i64 %17) call void @___qfree(i64 %17) - %read_bool50 = call i1 @___read_future_bool(i64 %lazy_measure48) - call void @___dec_future_refcount(i64 %lazy_measure48) + %read_bool50 = call i1 @___read_future_bool(i64 %___lazy_measure48) + call void @___dec_future_refcount(i64 %___lazy_measure48) call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool50) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-StimPlugin]/quantum_replay_state-helios-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-StimPlugin]/quantum_replay_state-helios-aarch64-unknown-linux-gnu.ll index 2dac175d..0f58b9f3 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-StimPlugin]/quantum_replay_state-helios-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-StimPlugin]/quantum_replay_state-helios-aarch64-unknown-linux-gnu.ll @@ -73,7 +73,7 @@ __barray_mask_check_not_borrowed.exit103: ; preds = %__hugr__.__tk2_heli store i64 0, ptr %7, align 1 %8 = load i64, ptr %0, align 4 %9 = load i64, ptr %2, align 4 - %lazy_measure = call i64 @___lazy_measure(i64 %8) + %___lazy_measure = call i64 @___lazy_measure(i64 %8) call void @___qfree(i64 %8) %10 = call ptr @heap_alloc(i64 8) %11 = call ptr @heap_alloc(i64 8) @@ -90,8 +90,8 @@ mask_block_err.i104: ; preds = %__barray_mask_check unreachable __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check_not_borrowed.exit103 - %read_bool = call i1 @___read_future_bool(i64 %lazy_measure) - call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = call i1 @___read_future_bool(i64 %___lazy_measure) + call void @___dec_future_refcount(i64 %___lazy_measure) call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) %out_arr_alloca34 = alloca <{ i32, i32, ptr, ptr }>, align 8 %y_ptr36 = getelementptr inbounds nuw i8, ptr %out_arr_alloca34, i64 4 @@ -107,10 +107,10 @@ __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check %16 = call ptr @heap_alloc(i64 8) store i64 0, ptr %16, align 1 %17 = load i64, ptr %10, align 4 - %lazy_measure48 = call i64 @___lazy_measure(i64 %17) + %___lazy_measure48 = call i64 @___lazy_measure(i64 %17) call void @___qfree(i64 %17) - %read_bool50 = call i1 @___read_future_bool(i64 %lazy_measure48) - call void @___dec_future_refcount(i64 %lazy_measure48) + %read_bool50 = call i1 @___read_future_bool(i64 %___lazy_measure48) + call void @___dec_future_refcount(i64 %___lazy_measure48) call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool50) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-StimPlugin]/quantum_replay_state-helios-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-StimPlugin]/quantum_replay_state-helios-x86_64-apple-darwin.ll index 32d86400..63c0c932 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-StimPlugin]/quantum_replay_state-helios-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-StimPlugin]/quantum_replay_state-helios-x86_64-apple-darwin.ll @@ -73,7 +73,7 @@ __barray_mask_check_not_borrowed.exit103: ; preds = %__hugr__.__tk2_heli store i64 0, ptr %7, align 1 %8 = load i64, ptr %0, align 4 %9 = load i64, ptr %2, align 4 - %lazy_measure = call i64 @___lazy_measure(i64 %8) + %___lazy_measure = call i64 @___lazy_measure(i64 %8) call void @___qfree(i64 %8) %10 = call ptr @heap_alloc(i64 8) %11 = call ptr @heap_alloc(i64 8) @@ -90,8 +90,8 @@ mask_block_err.i104: ; preds = %__barray_mask_check unreachable __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check_not_borrowed.exit103 - %read_bool = call i1 @___read_future_bool(i64 %lazy_measure) - call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = call i1 @___read_future_bool(i64 %___lazy_measure) + call void @___dec_future_refcount(i64 %___lazy_measure) call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) %out_arr_alloca34 = alloca <{ i32, i32, ptr, ptr }>, align 8 %y_ptr36 = getelementptr inbounds nuw i8, ptr %out_arr_alloca34, i64 4 @@ -107,10 +107,10 @@ __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check %16 = call ptr @heap_alloc(i64 8) store i64 0, ptr %16, align 1 %17 = load i64, ptr %10, align 4 - %lazy_measure48 = call i64 @___lazy_measure(i64 %17) + %___lazy_measure48 = call i64 @___lazy_measure(i64 %17) call void @___qfree(i64 %17) - %read_bool50 = call i1 @___read_future_bool(i64 %lazy_measure48) - call void @___dec_future_refcount(i64 %lazy_measure48) + %read_bool50 = call i1 @___read_future_bool(i64 %___lazy_measure48) + call void @___dec_future_refcount(i64 %___lazy_measure48) call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool50) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-StimPlugin]/quantum_replay_state-helios-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-StimPlugin]/quantum_replay_state-helios-x86_64-unknown-linux-gnu.ll index 063445e1..f3ef9e2c 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-StimPlugin]/quantum_replay_state-helios-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-StimPlugin]/quantum_replay_state-helios-x86_64-unknown-linux-gnu.ll @@ -73,7 +73,7 @@ __barray_mask_check_not_borrowed.exit103: ; preds = %__hugr__.__tk2_heli store i64 0, ptr %7, align 1 %8 = load i64, ptr %0, align 4 %9 = load i64, ptr %2, align 4 - %lazy_measure = call i64 @___lazy_measure(i64 %8) + %___lazy_measure = call i64 @___lazy_measure(i64 %8) call void @___qfree(i64 %8) %10 = call ptr @heap_alloc(i64 8) %11 = call ptr @heap_alloc(i64 8) @@ -90,8 +90,8 @@ mask_block_err.i104: ; preds = %__barray_mask_check unreachable __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check_not_borrowed.exit103 - %read_bool = call i1 @___read_future_bool(i64 %lazy_measure) - call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = call i1 @___read_future_bool(i64 %___lazy_measure) + call void @___dec_future_refcount(i64 %___lazy_measure) call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) %out_arr_alloca34 = alloca <{ i32, i32, ptr, ptr }>, align 8 %y_ptr36 = getelementptr inbounds nuw i8, ptr %out_arr_alloca34, i64 4 @@ -107,10 +107,10 @@ __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check %16 = call ptr @heap_alloc(i64 8) store i64 0, ptr %16, align 1 %17 = load i64, ptr %10, align 4 - %lazy_measure48 = call i64 @___lazy_measure(i64 %17) + %___lazy_measure48 = call i64 @___lazy_measure(i64 %17) call void @___qfree(i64 %17) - %read_bool50 = call i1 @___read_future_bool(i64 %lazy_measure48) - call void @___dec_future_refcount(i64 %lazy_measure48) + %read_bool50 = call i1 @___read_future_bool(i64 %___lazy_measure48) + call void @___dec_future_refcount(i64 %___lazy_measure48) call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool50) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-StimPlugin]/quantum_replay_state-helios-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-StimPlugin]/quantum_replay_state-helios-x86_64-windows-gnu.ll index 91b13668..f6f60264 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-StimPlugin]/quantum_replay_state-helios-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-StimPlugin]/quantum_replay_state-helios-x86_64-windows-gnu.ll @@ -73,7 +73,7 @@ __barray_mask_check_not_borrowed.exit103: ; preds = %__hugr__.__tk2_heli store i64 0, ptr %7, align 1 %8 = load i64, ptr %0, align 4 %9 = load i64, ptr %2, align 4 - %lazy_measure = call i64 @___lazy_measure(i64 %8) + %___lazy_measure = call i64 @___lazy_measure(i64 %8) call void @___qfree(i64 %8) %10 = call ptr @heap_alloc(i64 8) %11 = call ptr @heap_alloc(i64 8) @@ -90,8 +90,8 @@ mask_block_err.i104: ; preds = %__barray_mask_check unreachable __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check_not_borrowed.exit103 - %read_bool = call i1 @___read_future_bool(i64 %lazy_measure) - call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = call i1 @___read_future_bool(i64 %___lazy_measure) + call void @___dec_future_refcount(i64 %___lazy_measure) call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) %out_arr_alloca34 = alloca <{ i32, i32, ptr, ptr }>, align 8 %y_ptr36 = getelementptr inbounds nuw i8, ptr %out_arr_alloca34, i64 4 @@ -107,10 +107,10 @@ __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check %16 = call ptr @heap_alloc(i64 8) store i64 0, ptr %16, align 1 %17 = load i64, ptr %10, align 4 - %lazy_measure48 = call i64 @___lazy_measure(i64 %17) + %___lazy_measure48 = call i64 @___lazy_measure(i64 %17) call void @___qfree(i64 %17) - %read_bool50 = call i1 @___read_future_bool(i64 %lazy_measure48) - call void @___dec_future_refcount(i64 %lazy_measure48) + %read_bool50 = call i1 @___read_future_bool(i64 %___lazy_measure48) + call void @___dec_future_refcount(i64 %___lazy_measure48) call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool50) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-StimPlugin]/quantum_replay_state-sol-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-StimPlugin]/quantum_replay_state-sol-aarch64-apple-darwin.ll index f834a8d4..b804975c 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-StimPlugin]/quantum_replay_state-sol-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-StimPlugin]/quantum_replay_state-sol-aarch64-apple-darwin.ll @@ -73,7 +73,7 @@ __barray_mask_check_not_borrowed.exit103: ; preds = %__hugr__.__tk2_sol_ store i64 0, ptr %7, align 1 %8 = load i64, ptr %0, align 4 %9 = load i64, ptr %2, align 4 - %lazy_measure = call i64 @___lazy_measure(i64 %8) + %___future_measure = call i64 @___future_measure(i64 %8, i64 0) call void @___qfree(i64 %8) %10 = call ptr @heap_alloc(i64 8) %11 = call ptr @heap_alloc(i64 8) @@ -90,8 +90,8 @@ mask_block_err.i104: ; preds = %__barray_mask_check unreachable __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check_not_borrowed.exit103 - %read_bool = call i1 @___read_future_bool(i64 %lazy_measure) - call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = call i1 @___read_future_bool(i64 %___future_measure) + call void @___dec_future_refcount(i64 %___future_measure) call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) %out_arr_alloca34 = alloca <{ i32, i32, ptr, ptr }>, align 8 %y_ptr36 = getelementptr inbounds nuw i8, ptr %out_arr_alloca34, i64 4 @@ -107,10 +107,10 @@ __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check %16 = call ptr @heap_alloc(i64 8) store i64 0, ptr %16, align 1 %17 = load i64, ptr %10, align 4 - %lazy_measure48 = call i64 @___lazy_measure(i64 %17) + %___future_measure48 = call i64 @___future_measure(i64 %17, i64 0) call void @___qfree(i64 %17) - %read_bool50 = call i1 @___read_future_bool(i64 %lazy_measure48) - call void @___dec_future_refcount(i64 %lazy_measure48) + %read_bool50 = call i1 @___read_future_bool(i64 %___future_measure48) + call void @___dec_future_refcount(i64 %___future_measure48) call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool50) ret void } @@ -122,7 +122,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @print_state_result(ptr, i64, ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-StimPlugin]/quantum_replay_state-sol-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-StimPlugin]/quantum_replay_state-sol-aarch64-unknown-linux-gnu.ll index cc3bc0ac..5cd6aa87 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-StimPlugin]/quantum_replay_state-sol-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-StimPlugin]/quantum_replay_state-sol-aarch64-unknown-linux-gnu.ll @@ -73,7 +73,7 @@ __barray_mask_check_not_borrowed.exit103: ; preds = %__hugr__.__tk2_sol_ store i64 0, ptr %7, align 1 %8 = load i64, ptr %0, align 4 %9 = load i64, ptr %2, align 4 - %lazy_measure = call i64 @___lazy_measure(i64 %8) + %___future_measure = call i64 @___future_measure(i64 %8, i64 0) call void @___qfree(i64 %8) %10 = call ptr @heap_alloc(i64 8) %11 = call ptr @heap_alloc(i64 8) @@ -90,8 +90,8 @@ mask_block_err.i104: ; preds = %__barray_mask_check unreachable __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check_not_borrowed.exit103 - %read_bool = call i1 @___read_future_bool(i64 %lazy_measure) - call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = call i1 @___read_future_bool(i64 %___future_measure) + call void @___dec_future_refcount(i64 %___future_measure) call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) %out_arr_alloca34 = alloca <{ i32, i32, ptr, ptr }>, align 8 %y_ptr36 = getelementptr inbounds nuw i8, ptr %out_arr_alloca34, i64 4 @@ -107,10 +107,10 @@ __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check %16 = call ptr @heap_alloc(i64 8) store i64 0, ptr %16, align 1 %17 = load i64, ptr %10, align 4 - %lazy_measure48 = call i64 @___lazy_measure(i64 %17) + %___future_measure48 = call i64 @___future_measure(i64 %17, i64 0) call void @___qfree(i64 %17) - %read_bool50 = call i1 @___read_future_bool(i64 %lazy_measure48) - call void @___dec_future_refcount(i64 %lazy_measure48) + %read_bool50 = call i1 @___read_future_bool(i64 %___future_measure48) + call void @___dec_future_refcount(i64 %___future_measure48) call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool50) ret void } @@ -122,7 +122,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @print_state_result(ptr, i64, ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-StimPlugin]/quantum_replay_state-sol-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-StimPlugin]/quantum_replay_state-sol-x86_64-apple-darwin.ll index 3f4785e4..84cde776 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-StimPlugin]/quantum_replay_state-sol-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-StimPlugin]/quantum_replay_state-sol-x86_64-apple-darwin.ll @@ -73,7 +73,7 @@ __barray_mask_check_not_borrowed.exit103: ; preds = %__hugr__.__tk2_sol_ store i64 0, ptr %7, align 1 %8 = load i64, ptr %0, align 4 %9 = load i64, ptr %2, align 4 - %lazy_measure = call i64 @___lazy_measure(i64 %8) + %___future_measure = call i64 @___future_measure(i64 %8, i64 0) call void @___qfree(i64 %8) %10 = call ptr @heap_alloc(i64 8) %11 = call ptr @heap_alloc(i64 8) @@ -90,8 +90,8 @@ mask_block_err.i104: ; preds = %__barray_mask_check unreachable __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check_not_borrowed.exit103 - %read_bool = call i1 @___read_future_bool(i64 %lazy_measure) - call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = call i1 @___read_future_bool(i64 %___future_measure) + call void @___dec_future_refcount(i64 %___future_measure) call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) %out_arr_alloca34 = alloca <{ i32, i32, ptr, ptr }>, align 8 %y_ptr36 = getelementptr inbounds nuw i8, ptr %out_arr_alloca34, i64 4 @@ -107,10 +107,10 @@ __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check %16 = call ptr @heap_alloc(i64 8) store i64 0, ptr %16, align 1 %17 = load i64, ptr %10, align 4 - %lazy_measure48 = call i64 @___lazy_measure(i64 %17) + %___future_measure48 = call i64 @___future_measure(i64 %17, i64 0) call void @___qfree(i64 %17) - %read_bool50 = call i1 @___read_future_bool(i64 %lazy_measure48) - call void @___dec_future_refcount(i64 %lazy_measure48) + %read_bool50 = call i1 @___read_future_bool(i64 %___future_measure48) + call void @___dec_future_refcount(i64 %___future_measure48) call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool50) ret void } @@ -122,7 +122,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @print_state_result(ptr, i64, ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-StimPlugin]/quantum_replay_state-sol-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-StimPlugin]/quantum_replay_state-sol-x86_64-unknown-linux-gnu.ll index f28a7b6f..adb7dd0a 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-StimPlugin]/quantum_replay_state-sol-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-StimPlugin]/quantum_replay_state-sol-x86_64-unknown-linux-gnu.ll @@ -73,7 +73,7 @@ __barray_mask_check_not_borrowed.exit103: ; preds = %__hugr__.__tk2_sol_ store i64 0, ptr %7, align 1 %8 = load i64, ptr %0, align 4 %9 = load i64, ptr %2, align 4 - %lazy_measure = call i64 @___lazy_measure(i64 %8) + %___future_measure = call i64 @___future_measure(i64 %8, i64 0) call void @___qfree(i64 %8) %10 = call ptr @heap_alloc(i64 8) %11 = call ptr @heap_alloc(i64 8) @@ -90,8 +90,8 @@ mask_block_err.i104: ; preds = %__barray_mask_check unreachable __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check_not_borrowed.exit103 - %read_bool = call i1 @___read_future_bool(i64 %lazy_measure) - call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = call i1 @___read_future_bool(i64 %___future_measure) + call void @___dec_future_refcount(i64 %___future_measure) call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) %out_arr_alloca34 = alloca <{ i32, i32, ptr, ptr }>, align 8 %y_ptr36 = getelementptr inbounds nuw i8, ptr %out_arr_alloca34, i64 4 @@ -107,10 +107,10 @@ __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check %16 = call ptr @heap_alloc(i64 8) store i64 0, ptr %16, align 1 %17 = load i64, ptr %10, align 4 - %lazy_measure48 = call i64 @___lazy_measure(i64 %17) + %___future_measure48 = call i64 @___future_measure(i64 %17, i64 0) call void @___qfree(i64 %17) - %read_bool50 = call i1 @___read_future_bool(i64 %lazy_measure48) - call void @___dec_future_refcount(i64 %lazy_measure48) + %read_bool50 = call i1 @___read_future_bool(i64 %___future_measure48) + call void @___dec_future_refcount(i64 %___future_measure48) call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool50) ret void } @@ -122,7 +122,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @print_state_result(ptr, i64, ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-StimPlugin]/quantum_replay_state-sol-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-StimPlugin]/quantum_replay_state-sol-x86_64-windows-gnu.ll index 1b77d112..b1de00ef 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-StimPlugin]/quantum_replay_state-sol-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[0-StimPlugin]/quantum_replay_state-sol-x86_64-windows-gnu.ll @@ -73,7 +73,7 @@ __barray_mask_check_not_borrowed.exit103: ; preds = %__hugr__.__tk2_sol_ store i64 0, ptr %7, align 1 %8 = load i64, ptr %0, align 4 %9 = load i64, ptr %2, align 4 - %lazy_measure = call i64 @___lazy_measure(i64 %8) + %___future_measure = call i64 @___future_measure(i64 %8, i64 0) call void @___qfree(i64 %8) %10 = call ptr @heap_alloc(i64 8) %11 = call ptr @heap_alloc(i64 8) @@ -90,8 +90,8 @@ mask_block_err.i104: ; preds = %__barray_mask_check unreachable __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check_not_borrowed.exit103 - %read_bool = call i1 @___read_future_bool(i64 %lazy_measure) - call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = call i1 @___read_future_bool(i64 %___future_measure) + call void @___dec_future_refcount(i64 %___future_measure) call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) %out_arr_alloca34 = alloca <{ i32, i32, ptr, ptr }>, align 8 %y_ptr36 = getelementptr inbounds nuw i8, ptr %out_arr_alloca34, i64 4 @@ -107,10 +107,10 @@ __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check %16 = call ptr @heap_alloc(i64 8) store i64 0, ptr %16, align 1 %17 = load i64, ptr %10, align 4 - %lazy_measure48 = call i64 @___lazy_measure(i64 %17) + %___future_measure48 = call i64 @___future_measure(i64 %17, i64 0) call void @___qfree(i64 %17) - %read_bool50 = call i1 @___read_future_bool(i64 %lazy_measure48) - call void @___dec_future_refcount(i64 %lazy_measure48) + %read_bool50 = call i1 @___read_future_bool(i64 %___future_measure48) + call void @___dec_future_refcount(i64 %___future_measure48) call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool50) ret void } @@ -122,7 +122,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @print_state_result(ptr, i64, ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-QuestPlugin]/quantum_replay_state-helios-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-QuestPlugin]/quantum_replay_state-helios-aarch64-apple-darwin.ll index c9b701ab..2ac93f8d 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-QuestPlugin]/quantum_replay_state-helios-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-QuestPlugin]/quantum_replay_state-helios-aarch64-apple-darwin.ll @@ -73,7 +73,7 @@ __barray_mask_check_not_borrowed.exit103: ; preds = %__hugr__.__tk2_heli store i64 0, ptr %7, align 1 %8 = load i64, ptr %0, align 4 %9 = load i64, ptr %2, align 4 - %lazy_measure = call i64 @___lazy_measure(i64 %8) + %___lazy_measure = call i64 @___lazy_measure(i64 %8) call void @___qfree(i64 %8) %10 = call ptr @heap_alloc(i64 8) %11 = call ptr @heap_alloc(i64 8) @@ -90,8 +90,8 @@ mask_block_err.i104: ; preds = %__barray_mask_check unreachable __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check_not_borrowed.exit103 - %read_bool = call i1 @___read_future_bool(i64 %lazy_measure) - call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = call i1 @___read_future_bool(i64 %___lazy_measure) + call void @___dec_future_refcount(i64 %___lazy_measure) call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) %out_arr_alloca34 = alloca <{ i32, i32, ptr, ptr }>, align 8 %y_ptr36 = getelementptr inbounds nuw i8, ptr %out_arr_alloca34, i64 4 @@ -107,10 +107,10 @@ __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check %16 = call ptr @heap_alloc(i64 8) store i64 0, ptr %16, align 1 %17 = load i64, ptr %10, align 4 - %lazy_measure48 = call i64 @___lazy_measure(i64 %17) + %___lazy_measure48 = call i64 @___lazy_measure(i64 %17) call void @___qfree(i64 %17) - %read_bool50 = call i1 @___read_future_bool(i64 %lazy_measure48) - call void @___dec_future_refcount(i64 %lazy_measure48) + %read_bool50 = call i1 @___read_future_bool(i64 %___lazy_measure48) + call void @___dec_future_refcount(i64 %___lazy_measure48) call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool50) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-QuestPlugin]/quantum_replay_state-helios-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-QuestPlugin]/quantum_replay_state-helios-aarch64-unknown-linux-gnu.ll index 2dac175d..0f58b9f3 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-QuestPlugin]/quantum_replay_state-helios-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-QuestPlugin]/quantum_replay_state-helios-aarch64-unknown-linux-gnu.ll @@ -73,7 +73,7 @@ __barray_mask_check_not_borrowed.exit103: ; preds = %__hugr__.__tk2_heli store i64 0, ptr %7, align 1 %8 = load i64, ptr %0, align 4 %9 = load i64, ptr %2, align 4 - %lazy_measure = call i64 @___lazy_measure(i64 %8) + %___lazy_measure = call i64 @___lazy_measure(i64 %8) call void @___qfree(i64 %8) %10 = call ptr @heap_alloc(i64 8) %11 = call ptr @heap_alloc(i64 8) @@ -90,8 +90,8 @@ mask_block_err.i104: ; preds = %__barray_mask_check unreachable __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check_not_borrowed.exit103 - %read_bool = call i1 @___read_future_bool(i64 %lazy_measure) - call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = call i1 @___read_future_bool(i64 %___lazy_measure) + call void @___dec_future_refcount(i64 %___lazy_measure) call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) %out_arr_alloca34 = alloca <{ i32, i32, ptr, ptr }>, align 8 %y_ptr36 = getelementptr inbounds nuw i8, ptr %out_arr_alloca34, i64 4 @@ -107,10 +107,10 @@ __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check %16 = call ptr @heap_alloc(i64 8) store i64 0, ptr %16, align 1 %17 = load i64, ptr %10, align 4 - %lazy_measure48 = call i64 @___lazy_measure(i64 %17) + %___lazy_measure48 = call i64 @___lazy_measure(i64 %17) call void @___qfree(i64 %17) - %read_bool50 = call i1 @___read_future_bool(i64 %lazy_measure48) - call void @___dec_future_refcount(i64 %lazy_measure48) + %read_bool50 = call i1 @___read_future_bool(i64 %___lazy_measure48) + call void @___dec_future_refcount(i64 %___lazy_measure48) call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool50) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-QuestPlugin]/quantum_replay_state-helios-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-QuestPlugin]/quantum_replay_state-helios-x86_64-apple-darwin.ll index 32d86400..63c0c932 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-QuestPlugin]/quantum_replay_state-helios-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-QuestPlugin]/quantum_replay_state-helios-x86_64-apple-darwin.ll @@ -73,7 +73,7 @@ __barray_mask_check_not_borrowed.exit103: ; preds = %__hugr__.__tk2_heli store i64 0, ptr %7, align 1 %8 = load i64, ptr %0, align 4 %9 = load i64, ptr %2, align 4 - %lazy_measure = call i64 @___lazy_measure(i64 %8) + %___lazy_measure = call i64 @___lazy_measure(i64 %8) call void @___qfree(i64 %8) %10 = call ptr @heap_alloc(i64 8) %11 = call ptr @heap_alloc(i64 8) @@ -90,8 +90,8 @@ mask_block_err.i104: ; preds = %__barray_mask_check unreachable __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check_not_borrowed.exit103 - %read_bool = call i1 @___read_future_bool(i64 %lazy_measure) - call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = call i1 @___read_future_bool(i64 %___lazy_measure) + call void @___dec_future_refcount(i64 %___lazy_measure) call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) %out_arr_alloca34 = alloca <{ i32, i32, ptr, ptr }>, align 8 %y_ptr36 = getelementptr inbounds nuw i8, ptr %out_arr_alloca34, i64 4 @@ -107,10 +107,10 @@ __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check %16 = call ptr @heap_alloc(i64 8) store i64 0, ptr %16, align 1 %17 = load i64, ptr %10, align 4 - %lazy_measure48 = call i64 @___lazy_measure(i64 %17) + %___lazy_measure48 = call i64 @___lazy_measure(i64 %17) call void @___qfree(i64 %17) - %read_bool50 = call i1 @___read_future_bool(i64 %lazy_measure48) - call void @___dec_future_refcount(i64 %lazy_measure48) + %read_bool50 = call i1 @___read_future_bool(i64 %___lazy_measure48) + call void @___dec_future_refcount(i64 %___lazy_measure48) call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool50) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-QuestPlugin]/quantum_replay_state-helios-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-QuestPlugin]/quantum_replay_state-helios-x86_64-unknown-linux-gnu.ll index 063445e1..f3ef9e2c 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-QuestPlugin]/quantum_replay_state-helios-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-QuestPlugin]/quantum_replay_state-helios-x86_64-unknown-linux-gnu.ll @@ -73,7 +73,7 @@ __barray_mask_check_not_borrowed.exit103: ; preds = %__hugr__.__tk2_heli store i64 0, ptr %7, align 1 %8 = load i64, ptr %0, align 4 %9 = load i64, ptr %2, align 4 - %lazy_measure = call i64 @___lazy_measure(i64 %8) + %___lazy_measure = call i64 @___lazy_measure(i64 %8) call void @___qfree(i64 %8) %10 = call ptr @heap_alloc(i64 8) %11 = call ptr @heap_alloc(i64 8) @@ -90,8 +90,8 @@ mask_block_err.i104: ; preds = %__barray_mask_check unreachable __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check_not_borrowed.exit103 - %read_bool = call i1 @___read_future_bool(i64 %lazy_measure) - call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = call i1 @___read_future_bool(i64 %___lazy_measure) + call void @___dec_future_refcount(i64 %___lazy_measure) call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) %out_arr_alloca34 = alloca <{ i32, i32, ptr, ptr }>, align 8 %y_ptr36 = getelementptr inbounds nuw i8, ptr %out_arr_alloca34, i64 4 @@ -107,10 +107,10 @@ __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check %16 = call ptr @heap_alloc(i64 8) store i64 0, ptr %16, align 1 %17 = load i64, ptr %10, align 4 - %lazy_measure48 = call i64 @___lazy_measure(i64 %17) + %___lazy_measure48 = call i64 @___lazy_measure(i64 %17) call void @___qfree(i64 %17) - %read_bool50 = call i1 @___read_future_bool(i64 %lazy_measure48) - call void @___dec_future_refcount(i64 %lazy_measure48) + %read_bool50 = call i1 @___read_future_bool(i64 %___lazy_measure48) + call void @___dec_future_refcount(i64 %___lazy_measure48) call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool50) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-QuestPlugin]/quantum_replay_state-helios-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-QuestPlugin]/quantum_replay_state-helios-x86_64-windows-gnu.ll index 91b13668..f6f60264 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-QuestPlugin]/quantum_replay_state-helios-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-QuestPlugin]/quantum_replay_state-helios-x86_64-windows-gnu.ll @@ -73,7 +73,7 @@ __barray_mask_check_not_borrowed.exit103: ; preds = %__hugr__.__tk2_heli store i64 0, ptr %7, align 1 %8 = load i64, ptr %0, align 4 %9 = load i64, ptr %2, align 4 - %lazy_measure = call i64 @___lazy_measure(i64 %8) + %___lazy_measure = call i64 @___lazy_measure(i64 %8) call void @___qfree(i64 %8) %10 = call ptr @heap_alloc(i64 8) %11 = call ptr @heap_alloc(i64 8) @@ -90,8 +90,8 @@ mask_block_err.i104: ; preds = %__barray_mask_check unreachable __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check_not_borrowed.exit103 - %read_bool = call i1 @___read_future_bool(i64 %lazy_measure) - call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = call i1 @___read_future_bool(i64 %___lazy_measure) + call void @___dec_future_refcount(i64 %___lazy_measure) call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) %out_arr_alloca34 = alloca <{ i32, i32, ptr, ptr }>, align 8 %y_ptr36 = getelementptr inbounds nuw i8, ptr %out_arr_alloca34, i64 4 @@ -107,10 +107,10 @@ __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check %16 = call ptr @heap_alloc(i64 8) store i64 0, ptr %16, align 1 %17 = load i64, ptr %10, align 4 - %lazy_measure48 = call i64 @___lazy_measure(i64 %17) + %___lazy_measure48 = call i64 @___lazy_measure(i64 %17) call void @___qfree(i64 %17) - %read_bool50 = call i1 @___read_future_bool(i64 %lazy_measure48) - call void @___dec_future_refcount(i64 %lazy_measure48) + %read_bool50 = call i1 @___read_future_bool(i64 %___lazy_measure48) + call void @___dec_future_refcount(i64 %___lazy_measure48) call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool50) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-QuestPlugin]/quantum_replay_state-sol-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-QuestPlugin]/quantum_replay_state-sol-aarch64-apple-darwin.ll index f834a8d4..b804975c 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-QuestPlugin]/quantum_replay_state-sol-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-QuestPlugin]/quantum_replay_state-sol-aarch64-apple-darwin.ll @@ -73,7 +73,7 @@ __barray_mask_check_not_borrowed.exit103: ; preds = %__hugr__.__tk2_sol_ store i64 0, ptr %7, align 1 %8 = load i64, ptr %0, align 4 %9 = load i64, ptr %2, align 4 - %lazy_measure = call i64 @___lazy_measure(i64 %8) + %___future_measure = call i64 @___future_measure(i64 %8, i64 0) call void @___qfree(i64 %8) %10 = call ptr @heap_alloc(i64 8) %11 = call ptr @heap_alloc(i64 8) @@ -90,8 +90,8 @@ mask_block_err.i104: ; preds = %__barray_mask_check unreachable __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check_not_borrowed.exit103 - %read_bool = call i1 @___read_future_bool(i64 %lazy_measure) - call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = call i1 @___read_future_bool(i64 %___future_measure) + call void @___dec_future_refcount(i64 %___future_measure) call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) %out_arr_alloca34 = alloca <{ i32, i32, ptr, ptr }>, align 8 %y_ptr36 = getelementptr inbounds nuw i8, ptr %out_arr_alloca34, i64 4 @@ -107,10 +107,10 @@ __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check %16 = call ptr @heap_alloc(i64 8) store i64 0, ptr %16, align 1 %17 = load i64, ptr %10, align 4 - %lazy_measure48 = call i64 @___lazy_measure(i64 %17) + %___future_measure48 = call i64 @___future_measure(i64 %17, i64 0) call void @___qfree(i64 %17) - %read_bool50 = call i1 @___read_future_bool(i64 %lazy_measure48) - call void @___dec_future_refcount(i64 %lazy_measure48) + %read_bool50 = call i1 @___read_future_bool(i64 %___future_measure48) + call void @___dec_future_refcount(i64 %___future_measure48) call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool50) ret void } @@ -122,7 +122,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @print_state_result(ptr, i64, ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-QuestPlugin]/quantum_replay_state-sol-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-QuestPlugin]/quantum_replay_state-sol-aarch64-unknown-linux-gnu.ll index cc3bc0ac..5cd6aa87 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-QuestPlugin]/quantum_replay_state-sol-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-QuestPlugin]/quantum_replay_state-sol-aarch64-unknown-linux-gnu.ll @@ -73,7 +73,7 @@ __barray_mask_check_not_borrowed.exit103: ; preds = %__hugr__.__tk2_sol_ store i64 0, ptr %7, align 1 %8 = load i64, ptr %0, align 4 %9 = load i64, ptr %2, align 4 - %lazy_measure = call i64 @___lazy_measure(i64 %8) + %___future_measure = call i64 @___future_measure(i64 %8, i64 0) call void @___qfree(i64 %8) %10 = call ptr @heap_alloc(i64 8) %11 = call ptr @heap_alloc(i64 8) @@ -90,8 +90,8 @@ mask_block_err.i104: ; preds = %__barray_mask_check unreachable __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check_not_borrowed.exit103 - %read_bool = call i1 @___read_future_bool(i64 %lazy_measure) - call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = call i1 @___read_future_bool(i64 %___future_measure) + call void @___dec_future_refcount(i64 %___future_measure) call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) %out_arr_alloca34 = alloca <{ i32, i32, ptr, ptr }>, align 8 %y_ptr36 = getelementptr inbounds nuw i8, ptr %out_arr_alloca34, i64 4 @@ -107,10 +107,10 @@ __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check %16 = call ptr @heap_alloc(i64 8) store i64 0, ptr %16, align 1 %17 = load i64, ptr %10, align 4 - %lazy_measure48 = call i64 @___lazy_measure(i64 %17) + %___future_measure48 = call i64 @___future_measure(i64 %17, i64 0) call void @___qfree(i64 %17) - %read_bool50 = call i1 @___read_future_bool(i64 %lazy_measure48) - call void @___dec_future_refcount(i64 %lazy_measure48) + %read_bool50 = call i1 @___read_future_bool(i64 %___future_measure48) + call void @___dec_future_refcount(i64 %___future_measure48) call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool50) ret void } @@ -122,7 +122,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @print_state_result(ptr, i64, ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-QuestPlugin]/quantum_replay_state-sol-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-QuestPlugin]/quantum_replay_state-sol-x86_64-apple-darwin.ll index 3f4785e4..84cde776 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-QuestPlugin]/quantum_replay_state-sol-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-QuestPlugin]/quantum_replay_state-sol-x86_64-apple-darwin.ll @@ -73,7 +73,7 @@ __barray_mask_check_not_borrowed.exit103: ; preds = %__hugr__.__tk2_sol_ store i64 0, ptr %7, align 1 %8 = load i64, ptr %0, align 4 %9 = load i64, ptr %2, align 4 - %lazy_measure = call i64 @___lazy_measure(i64 %8) + %___future_measure = call i64 @___future_measure(i64 %8, i64 0) call void @___qfree(i64 %8) %10 = call ptr @heap_alloc(i64 8) %11 = call ptr @heap_alloc(i64 8) @@ -90,8 +90,8 @@ mask_block_err.i104: ; preds = %__barray_mask_check unreachable __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check_not_borrowed.exit103 - %read_bool = call i1 @___read_future_bool(i64 %lazy_measure) - call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = call i1 @___read_future_bool(i64 %___future_measure) + call void @___dec_future_refcount(i64 %___future_measure) call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) %out_arr_alloca34 = alloca <{ i32, i32, ptr, ptr }>, align 8 %y_ptr36 = getelementptr inbounds nuw i8, ptr %out_arr_alloca34, i64 4 @@ -107,10 +107,10 @@ __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check %16 = call ptr @heap_alloc(i64 8) store i64 0, ptr %16, align 1 %17 = load i64, ptr %10, align 4 - %lazy_measure48 = call i64 @___lazy_measure(i64 %17) + %___future_measure48 = call i64 @___future_measure(i64 %17, i64 0) call void @___qfree(i64 %17) - %read_bool50 = call i1 @___read_future_bool(i64 %lazy_measure48) - call void @___dec_future_refcount(i64 %lazy_measure48) + %read_bool50 = call i1 @___read_future_bool(i64 %___future_measure48) + call void @___dec_future_refcount(i64 %___future_measure48) call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool50) ret void } @@ -122,7 +122,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @print_state_result(ptr, i64, ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-QuestPlugin]/quantum_replay_state-sol-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-QuestPlugin]/quantum_replay_state-sol-x86_64-unknown-linux-gnu.ll index f28a7b6f..adb7dd0a 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-QuestPlugin]/quantum_replay_state-sol-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-QuestPlugin]/quantum_replay_state-sol-x86_64-unknown-linux-gnu.ll @@ -73,7 +73,7 @@ __barray_mask_check_not_borrowed.exit103: ; preds = %__hugr__.__tk2_sol_ store i64 0, ptr %7, align 1 %8 = load i64, ptr %0, align 4 %9 = load i64, ptr %2, align 4 - %lazy_measure = call i64 @___lazy_measure(i64 %8) + %___future_measure = call i64 @___future_measure(i64 %8, i64 0) call void @___qfree(i64 %8) %10 = call ptr @heap_alloc(i64 8) %11 = call ptr @heap_alloc(i64 8) @@ -90,8 +90,8 @@ mask_block_err.i104: ; preds = %__barray_mask_check unreachable __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check_not_borrowed.exit103 - %read_bool = call i1 @___read_future_bool(i64 %lazy_measure) - call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = call i1 @___read_future_bool(i64 %___future_measure) + call void @___dec_future_refcount(i64 %___future_measure) call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) %out_arr_alloca34 = alloca <{ i32, i32, ptr, ptr }>, align 8 %y_ptr36 = getelementptr inbounds nuw i8, ptr %out_arr_alloca34, i64 4 @@ -107,10 +107,10 @@ __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check %16 = call ptr @heap_alloc(i64 8) store i64 0, ptr %16, align 1 %17 = load i64, ptr %10, align 4 - %lazy_measure48 = call i64 @___lazy_measure(i64 %17) + %___future_measure48 = call i64 @___future_measure(i64 %17, i64 0) call void @___qfree(i64 %17) - %read_bool50 = call i1 @___read_future_bool(i64 %lazy_measure48) - call void @___dec_future_refcount(i64 %lazy_measure48) + %read_bool50 = call i1 @___read_future_bool(i64 %___future_measure48) + call void @___dec_future_refcount(i64 %___future_measure48) call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool50) ret void } @@ -122,7 +122,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @print_state_result(ptr, i64, ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-QuestPlugin]/quantum_replay_state-sol-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-QuestPlugin]/quantum_replay_state-sol-x86_64-windows-gnu.ll index 1b77d112..b1de00ef 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-QuestPlugin]/quantum_replay_state-sol-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-QuestPlugin]/quantum_replay_state-sol-x86_64-windows-gnu.ll @@ -73,7 +73,7 @@ __barray_mask_check_not_borrowed.exit103: ; preds = %__hugr__.__tk2_sol_ store i64 0, ptr %7, align 1 %8 = load i64, ptr %0, align 4 %9 = load i64, ptr %2, align 4 - %lazy_measure = call i64 @___lazy_measure(i64 %8) + %___future_measure = call i64 @___future_measure(i64 %8, i64 0) call void @___qfree(i64 %8) %10 = call ptr @heap_alloc(i64 8) %11 = call ptr @heap_alloc(i64 8) @@ -90,8 +90,8 @@ mask_block_err.i104: ; preds = %__barray_mask_check unreachable __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check_not_borrowed.exit103 - %read_bool = call i1 @___read_future_bool(i64 %lazy_measure) - call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = call i1 @___read_future_bool(i64 %___future_measure) + call void @___dec_future_refcount(i64 %___future_measure) call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) %out_arr_alloca34 = alloca <{ i32, i32, ptr, ptr }>, align 8 %y_ptr36 = getelementptr inbounds nuw i8, ptr %out_arr_alloca34, i64 4 @@ -107,10 +107,10 @@ __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check %16 = call ptr @heap_alloc(i64 8) store i64 0, ptr %16, align 1 %17 = load i64, ptr %10, align 4 - %lazy_measure48 = call i64 @___lazy_measure(i64 %17) + %___future_measure48 = call i64 @___future_measure(i64 %17, i64 0) call void @___qfree(i64 %17) - %read_bool50 = call i1 @___read_future_bool(i64 %lazy_measure48) - call void @___dec_future_refcount(i64 %lazy_measure48) + %read_bool50 = call i1 @___read_future_bool(i64 %___future_measure48) + call void @___dec_future_refcount(i64 %___future_measure48) call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool50) ret void } @@ -122,7 +122,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @print_state_result(ptr, i64, ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-StimPlugin]/quantum_replay_state-helios-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-StimPlugin]/quantum_replay_state-helios-aarch64-apple-darwin.ll index c9b701ab..2ac93f8d 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-StimPlugin]/quantum_replay_state-helios-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-StimPlugin]/quantum_replay_state-helios-aarch64-apple-darwin.ll @@ -73,7 +73,7 @@ __barray_mask_check_not_borrowed.exit103: ; preds = %__hugr__.__tk2_heli store i64 0, ptr %7, align 1 %8 = load i64, ptr %0, align 4 %9 = load i64, ptr %2, align 4 - %lazy_measure = call i64 @___lazy_measure(i64 %8) + %___lazy_measure = call i64 @___lazy_measure(i64 %8) call void @___qfree(i64 %8) %10 = call ptr @heap_alloc(i64 8) %11 = call ptr @heap_alloc(i64 8) @@ -90,8 +90,8 @@ mask_block_err.i104: ; preds = %__barray_mask_check unreachable __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check_not_borrowed.exit103 - %read_bool = call i1 @___read_future_bool(i64 %lazy_measure) - call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = call i1 @___read_future_bool(i64 %___lazy_measure) + call void @___dec_future_refcount(i64 %___lazy_measure) call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) %out_arr_alloca34 = alloca <{ i32, i32, ptr, ptr }>, align 8 %y_ptr36 = getelementptr inbounds nuw i8, ptr %out_arr_alloca34, i64 4 @@ -107,10 +107,10 @@ __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check %16 = call ptr @heap_alloc(i64 8) store i64 0, ptr %16, align 1 %17 = load i64, ptr %10, align 4 - %lazy_measure48 = call i64 @___lazy_measure(i64 %17) + %___lazy_measure48 = call i64 @___lazy_measure(i64 %17) call void @___qfree(i64 %17) - %read_bool50 = call i1 @___read_future_bool(i64 %lazy_measure48) - call void @___dec_future_refcount(i64 %lazy_measure48) + %read_bool50 = call i1 @___read_future_bool(i64 %___lazy_measure48) + call void @___dec_future_refcount(i64 %___lazy_measure48) call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool50) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-StimPlugin]/quantum_replay_state-helios-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-StimPlugin]/quantum_replay_state-helios-aarch64-unknown-linux-gnu.ll index 2dac175d..0f58b9f3 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-StimPlugin]/quantum_replay_state-helios-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-StimPlugin]/quantum_replay_state-helios-aarch64-unknown-linux-gnu.ll @@ -73,7 +73,7 @@ __barray_mask_check_not_borrowed.exit103: ; preds = %__hugr__.__tk2_heli store i64 0, ptr %7, align 1 %8 = load i64, ptr %0, align 4 %9 = load i64, ptr %2, align 4 - %lazy_measure = call i64 @___lazy_measure(i64 %8) + %___lazy_measure = call i64 @___lazy_measure(i64 %8) call void @___qfree(i64 %8) %10 = call ptr @heap_alloc(i64 8) %11 = call ptr @heap_alloc(i64 8) @@ -90,8 +90,8 @@ mask_block_err.i104: ; preds = %__barray_mask_check unreachable __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check_not_borrowed.exit103 - %read_bool = call i1 @___read_future_bool(i64 %lazy_measure) - call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = call i1 @___read_future_bool(i64 %___lazy_measure) + call void @___dec_future_refcount(i64 %___lazy_measure) call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) %out_arr_alloca34 = alloca <{ i32, i32, ptr, ptr }>, align 8 %y_ptr36 = getelementptr inbounds nuw i8, ptr %out_arr_alloca34, i64 4 @@ -107,10 +107,10 @@ __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check %16 = call ptr @heap_alloc(i64 8) store i64 0, ptr %16, align 1 %17 = load i64, ptr %10, align 4 - %lazy_measure48 = call i64 @___lazy_measure(i64 %17) + %___lazy_measure48 = call i64 @___lazy_measure(i64 %17) call void @___qfree(i64 %17) - %read_bool50 = call i1 @___read_future_bool(i64 %lazy_measure48) - call void @___dec_future_refcount(i64 %lazy_measure48) + %read_bool50 = call i1 @___read_future_bool(i64 %___lazy_measure48) + call void @___dec_future_refcount(i64 %___lazy_measure48) call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool50) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-StimPlugin]/quantum_replay_state-helios-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-StimPlugin]/quantum_replay_state-helios-x86_64-apple-darwin.ll index 32d86400..63c0c932 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-StimPlugin]/quantum_replay_state-helios-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-StimPlugin]/quantum_replay_state-helios-x86_64-apple-darwin.ll @@ -73,7 +73,7 @@ __barray_mask_check_not_borrowed.exit103: ; preds = %__hugr__.__tk2_heli store i64 0, ptr %7, align 1 %8 = load i64, ptr %0, align 4 %9 = load i64, ptr %2, align 4 - %lazy_measure = call i64 @___lazy_measure(i64 %8) + %___lazy_measure = call i64 @___lazy_measure(i64 %8) call void @___qfree(i64 %8) %10 = call ptr @heap_alloc(i64 8) %11 = call ptr @heap_alloc(i64 8) @@ -90,8 +90,8 @@ mask_block_err.i104: ; preds = %__barray_mask_check unreachable __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check_not_borrowed.exit103 - %read_bool = call i1 @___read_future_bool(i64 %lazy_measure) - call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = call i1 @___read_future_bool(i64 %___lazy_measure) + call void @___dec_future_refcount(i64 %___lazy_measure) call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) %out_arr_alloca34 = alloca <{ i32, i32, ptr, ptr }>, align 8 %y_ptr36 = getelementptr inbounds nuw i8, ptr %out_arr_alloca34, i64 4 @@ -107,10 +107,10 @@ __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check %16 = call ptr @heap_alloc(i64 8) store i64 0, ptr %16, align 1 %17 = load i64, ptr %10, align 4 - %lazy_measure48 = call i64 @___lazy_measure(i64 %17) + %___lazy_measure48 = call i64 @___lazy_measure(i64 %17) call void @___qfree(i64 %17) - %read_bool50 = call i1 @___read_future_bool(i64 %lazy_measure48) - call void @___dec_future_refcount(i64 %lazy_measure48) + %read_bool50 = call i1 @___read_future_bool(i64 %___lazy_measure48) + call void @___dec_future_refcount(i64 %___lazy_measure48) call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool50) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-StimPlugin]/quantum_replay_state-helios-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-StimPlugin]/quantum_replay_state-helios-x86_64-unknown-linux-gnu.ll index 063445e1..f3ef9e2c 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-StimPlugin]/quantum_replay_state-helios-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-StimPlugin]/quantum_replay_state-helios-x86_64-unknown-linux-gnu.ll @@ -73,7 +73,7 @@ __barray_mask_check_not_borrowed.exit103: ; preds = %__hugr__.__tk2_heli store i64 0, ptr %7, align 1 %8 = load i64, ptr %0, align 4 %9 = load i64, ptr %2, align 4 - %lazy_measure = call i64 @___lazy_measure(i64 %8) + %___lazy_measure = call i64 @___lazy_measure(i64 %8) call void @___qfree(i64 %8) %10 = call ptr @heap_alloc(i64 8) %11 = call ptr @heap_alloc(i64 8) @@ -90,8 +90,8 @@ mask_block_err.i104: ; preds = %__barray_mask_check unreachable __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check_not_borrowed.exit103 - %read_bool = call i1 @___read_future_bool(i64 %lazy_measure) - call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = call i1 @___read_future_bool(i64 %___lazy_measure) + call void @___dec_future_refcount(i64 %___lazy_measure) call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) %out_arr_alloca34 = alloca <{ i32, i32, ptr, ptr }>, align 8 %y_ptr36 = getelementptr inbounds nuw i8, ptr %out_arr_alloca34, i64 4 @@ -107,10 +107,10 @@ __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check %16 = call ptr @heap_alloc(i64 8) store i64 0, ptr %16, align 1 %17 = load i64, ptr %10, align 4 - %lazy_measure48 = call i64 @___lazy_measure(i64 %17) + %___lazy_measure48 = call i64 @___lazy_measure(i64 %17) call void @___qfree(i64 %17) - %read_bool50 = call i1 @___read_future_bool(i64 %lazy_measure48) - call void @___dec_future_refcount(i64 %lazy_measure48) + %read_bool50 = call i1 @___read_future_bool(i64 %___lazy_measure48) + call void @___dec_future_refcount(i64 %___lazy_measure48) call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool50) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-StimPlugin]/quantum_replay_state-helios-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-StimPlugin]/quantum_replay_state-helios-x86_64-windows-gnu.ll index 91b13668..f6f60264 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-StimPlugin]/quantum_replay_state-helios-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-StimPlugin]/quantum_replay_state-helios-x86_64-windows-gnu.ll @@ -73,7 +73,7 @@ __barray_mask_check_not_borrowed.exit103: ; preds = %__hugr__.__tk2_heli store i64 0, ptr %7, align 1 %8 = load i64, ptr %0, align 4 %9 = load i64, ptr %2, align 4 - %lazy_measure = call i64 @___lazy_measure(i64 %8) + %___lazy_measure = call i64 @___lazy_measure(i64 %8) call void @___qfree(i64 %8) %10 = call ptr @heap_alloc(i64 8) %11 = call ptr @heap_alloc(i64 8) @@ -90,8 +90,8 @@ mask_block_err.i104: ; preds = %__barray_mask_check unreachable __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check_not_borrowed.exit103 - %read_bool = call i1 @___read_future_bool(i64 %lazy_measure) - call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = call i1 @___read_future_bool(i64 %___lazy_measure) + call void @___dec_future_refcount(i64 %___lazy_measure) call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) %out_arr_alloca34 = alloca <{ i32, i32, ptr, ptr }>, align 8 %y_ptr36 = getelementptr inbounds nuw i8, ptr %out_arr_alloca34, i64 4 @@ -107,10 +107,10 @@ __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check %16 = call ptr @heap_alloc(i64 8) store i64 0, ptr %16, align 1 %17 = load i64, ptr %10, align 4 - %lazy_measure48 = call i64 @___lazy_measure(i64 %17) + %___lazy_measure48 = call i64 @___lazy_measure(i64 %17) call void @___qfree(i64 %17) - %read_bool50 = call i1 @___read_future_bool(i64 %lazy_measure48) - call void @___dec_future_refcount(i64 %lazy_measure48) + %read_bool50 = call i1 @___read_future_bool(i64 %___lazy_measure48) + call void @___dec_future_refcount(i64 %___lazy_measure48) call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool50) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-StimPlugin]/quantum_replay_state-sol-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-StimPlugin]/quantum_replay_state-sol-aarch64-apple-darwin.ll index f834a8d4..b804975c 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-StimPlugin]/quantum_replay_state-sol-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-StimPlugin]/quantum_replay_state-sol-aarch64-apple-darwin.ll @@ -73,7 +73,7 @@ __barray_mask_check_not_borrowed.exit103: ; preds = %__hugr__.__tk2_sol_ store i64 0, ptr %7, align 1 %8 = load i64, ptr %0, align 4 %9 = load i64, ptr %2, align 4 - %lazy_measure = call i64 @___lazy_measure(i64 %8) + %___future_measure = call i64 @___future_measure(i64 %8, i64 0) call void @___qfree(i64 %8) %10 = call ptr @heap_alloc(i64 8) %11 = call ptr @heap_alloc(i64 8) @@ -90,8 +90,8 @@ mask_block_err.i104: ; preds = %__barray_mask_check unreachable __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check_not_borrowed.exit103 - %read_bool = call i1 @___read_future_bool(i64 %lazy_measure) - call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = call i1 @___read_future_bool(i64 %___future_measure) + call void @___dec_future_refcount(i64 %___future_measure) call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) %out_arr_alloca34 = alloca <{ i32, i32, ptr, ptr }>, align 8 %y_ptr36 = getelementptr inbounds nuw i8, ptr %out_arr_alloca34, i64 4 @@ -107,10 +107,10 @@ __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check %16 = call ptr @heap_alloc(i64 8) store i64 0, ptr %16, align 1 %17 = load i64, ptr %10, align 4 - %lazy_measure48 = call i64 @___lazy_measure(i64 %17) + %___future_measure48 = call i64 @___future_measure(i64 %17, i64 0) call void @___qfree(i64 %17) - %read_bool50 = call i1 @___read_future_bool(i64 %lazy_measure48) - call void @___dec_future_refcount(i64 %lazy_measure48) + %read_bool50 = call i1 @___read_future_bool(i64 %___future_measure48) + call void @___dec_future_refcount(i64 %___future_measure48) call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool50) ret void } @@ -122,7 +122,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @print_state_result(ptr, i64, ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-StimPlugin]/quantum_replay_state-sol-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-StimPlugin]/quantum_replay_state-sol-aarch64-unknown-linux-gnu.ll index cc3bc0ac..5cd6aa87 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-StimPlugin]/quantum_replay_state-sol-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-StimPlugin]/quantum_replay_state-sol-aarch64-unknown-linux-gnu.ll @@ -73,7 +73,7 @@ __barray_mask_check_not_borrowed.exit103: ; preds = %__hugr__.__tk2_sol_ store i64 0, ptr %7, align 1 %8 = load i64, ptr %0, align 4 %9 = load i64, ptr %2, align 4 - %lazy_measure = call i64 @___lazy_measure(i64 %8) + %___future_measure = call i64 @___future_measure(i64 %8, i64 0) call void @___qfree(i64 %8) %10 = call ptr @heap_alloc(i64 8) %11 = call ptr @heap_alloc(i64 8) @@ -90,8 +90,8 @@ mask_block_err.i104: ; preds = %__barray_mask_check unreachable __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check_not_borrowed.exit103 - %read_bool = call i1 @___read_future_bool(i64 %lazy_measure) - call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = call i1 @___read_future_bool(i64 %___future_measure) + call void @___dec_future_refcount(i64 %___future_measure) call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) %out_arr_alloca34 = alloca <{ i32, i32, ptr, ptr }>, align 8 %y_ptr36 = getelementptr inbounds nuw i8, ptr %out_arr_alloca34, i64 4 @@ -107,10 +107,10 @@ __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check %16 = call ptr @heap_alloc(i64 8) store i64 0, ptr %16, align 1 %17 = load i64, ptr %10, align 4 - %lazy_measure48 = call i64 @___lazy_measure(i64 %17) + %___future_measure48 = call i64 @___future_measure(i64 %17, i64 0) call void @___qfree(i64 %17) - %read_bool50 = call i1 @___read_future_bool(i64 %lazy_measure48) - call void @___dec_future_refcount(i64 %lazy_measure48) + %read_bool50 = call i1 @___read_future_bool(i64 %___future_measure48) + call void @___dec_future_refcount(i64 %___future_measure48) call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool50) ret void } @@ -122,7 +122,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @print_state_result(ptr, i64, ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-StimPlugin]/quantum_replay_state-sol-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-StimPlugin]/quantum_replay_state-sol-x86_64-apple-darwin.ll index 3f4785e4..84cde776 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-StimPlugin]/quantum_replay_state-sol-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-StimPlugin]/quantum_replay_state-sol-x86_64-apple-darwin.ll @@ -73,7 +73,7 @@ __barray_mask_check_not_borrowed.exit103: ; preds = %__hugr__.__tk2_sol_ store i64 0, ptr %7, align 1 %8 = load i64, ptr %0, align 4 %9 = load i64, ptr %2, align 4 - %lazy_measure = call i64 @___lazy_measure(i64 %8) + %___future_measure = call i64 @___future_measure(i64 %8, i64 0) call void @___qfree(i64 %8) %10 = call ptr @heap_alloc(i64 8) %11 = call ptr @heap_alloc(i64 8) @@ -90,8 +90,8 @@ mask_block_err.i104: ; preds = %__barray_mask_check unreachable __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check_not_borrowed.exit103 - %read_bool = call i1 @___read_future_bool(i64 %lazy_measure) - call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = call i1 @___read_future_bool(i64 %___future_measure) + call void @___dec_future_refcount(i64 %___future_measure) call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) %out_arr_alloca34 = alloca <{ i32, i32, ptr, ptr }>, align 8 %y_ptr36 = getelementptr inbounds nuw i8, ptr %out_arr_alloca34, i64 4 @@ -107,10 +107,10 @@ __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check %16 = call ptr @heap_alloc(i64 8) store i64 0, ptr %16, align 1 %17 = load i64, ptr %10, align 4 - %lazy_measure48 = call i64 @___lazy_measure(i64 %17) + %___future_measure48 = call i64 @___future_measure(i64 %17, i64 0) call void @___qfree(i64 %17) - %read_bool50 = call i1 @___read_future_bool(i64 %lazy_measure48) - call void @___dec_future_refcount(i64 %lazy_measure48) + %read_bool50 = call i1 @___read_future_bool(i64 %___future_measure48) + call void @___dec_future_refcount(i64 %___future_measure48) call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool50) ret void } @@ -122,7 +122,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @print_state_result(ptr, i64, ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-StimPlugin]/quantum_replay_state-sol-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-StimPlugin]/quantum_replay_state-sol-x86_64-unknown-linux-gnu.ll index f28a7b6f..adb7dd0a 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-StimPlugin]/quantum_replay_state-sol-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-StimPlugin]/quantum_replay_state-sol-x86_64-unknown-linux-gnu.ll @@ -73,7 +73,7 @@ __barray_mask_check_not_borrowed.exit103: ; preds = %__hugr__.__tk2_sol_ store i64 0, ptr %7, align 1 %8 = load i64, ptr %0, align 4 %9 = load i64, ptr %2, align 4 - %lazy_measure = call i64 @___lazy_measure(i64 %8) + %___future_measure = call i64 @___future_measure(i64 %8, i64 0) call void @___qfree(i64 %8) %10 = call ptr @heap_alloc(i64 8) %11 = call ptr @heap_alloc(i64 8) @@ -90,8 +90,8 @@ mask_block_err.i104: ; preds = %__barray_mask_check unreachable __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check_not_borrowed.exit103 - %read_bool = call i1 @___read_future_bool(i64 %lazy_measure) - call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = call i1 @___read_future_bool(i64 %___future_measure) + call void @___dec_future_refcount(i64 %___future_measure) call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) %out_arr_alloca34 = alloca <{ i32, i32, ptr, ptr }>, align 8 %y_ptr36 = getelementptr inbounds nuw i8, ptr %out_arr_alloca34, i64 4 @@ -107,10 +107,10 @@ __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check %16 = call ptr @heap_alloc(i64 8) store i64 0, ptr %16, align 1 %17 = load i64, ptr %10, align 4 - %lazy_measure48 = call i64 @___lazy_measure(i64 %17) + %___future_measure48 = call i64 @___future_measure(i64 %17, i64 0) call void @___qfree(i64 %17) - %read_bool50 = call i1 @___read_future_bool(i64 %lazy_measure48) - call void @___dec_future_refcount(i64 %lazy_measure48) + %read_bool50 = call i1 @___read_future_bool(i64 %___future_measure48) + call void @___dec_future_refcount(i64 %___future_measure48) call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool50) ret void } @@ -122,7 +122,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @print_state_result(ptr, i64, ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-StimPlugin]/quantum_replay_state-sol-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-StimPlugin]/quantum_replay_state-sol-x86_64-windows-gnu.ll index 1b77d112..b1de00ef 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-StimPlugin]/quantum_replay_state-sol-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_quantum_state/test_quantum_replay_state[1-StimPlugin]/quantum_replay_state-sol-x86_64-windows-gnu.ll @@ -73,7 +73,7 @@ __barray_mask_check_not_borrowed.exit103: ; preds = %__hugr__.__tk2_sol_ store i64 0, ptr %7, align 1 %8 = load i64, ptr %0, align 4 %9 = load i64, ptr %2, align 4 - %lazy_measure = call i64 @___lazy_measure(i64 %8) + %___future_measure = call i64 @___future_measure(i64 %8, i64 0) call void @___qfree(i64 %8) %10 = call ptr @heap_alloc(i64 8) %11 = call ptr @heap_alloc(i64 8) @@ -90,8 +90,8 @@ mask_block_err.i104: ; preds = %__barray_mask_check unreachable __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check_not_borrowed.exit103 - %read_bool = call i1 @___read_future_bool(i64 %lazy_measure) - call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = call i1 @___read_future_bool(i64 %___future_measure) + call void @___dec_future_refcount(i64 %___future_measure) call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) %out_arr_alloca34 = alloca <{ i32, i32, ptr, ptr }>, align 8 %y_ptr36 = getelementptr inbounds nuw i8, ptr %out_arr_alloca34, i64 4 @@ -107,10 +107,10 @@ __barray_mask_check_not_borrowed.exit107: ; preds = %__barray_mask_check %16 = call ptr @heap_alloc(i64 8) store i64 0, ptr %16, align 1 %17 = load i64, ptr %10, align 4 - %lazy_measure48 = call i64 @___lazy_measure(i64 %17) + %___future_measure48 = call i64 @___future_measure(i64 %17, i64 0) call void @___qfree(i64 %17) - %read_bool50 = call i1 @___read_future_bool(i64 %lazy_measure48) - call void @___dec_future_refcount(i64 %lazy_measure48) + %read_bool50 = call i1 @___read_future_bool(i64 %___future_measure48) + call void @___dec_future_refcount(i64 %___future_measure48) call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool50) ret void } @@ -122,7 +122,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @print_state_result(ptr, i64, ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[QuestPlugin]/quantum_replay_quest-helios-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[QuestPlugin]/quantum_replay_quest-helios-aarch64-apple-darwin.ll index 1bd20fe5..9a7d908e 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[QuestPlugin]/quantum_replay_quest-helios-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[QuestPlugin]/quantum_replay_quest-helios-aarch64-apple-darwin.ll @@ -64,30 +64,30 @@ cond_29_case_0.i49: ; preds = %__hugr__.__tk2_heli __hugr__.__tk2_helios_qalloc.25.exit50: ; preds = %__hugr__.__tk2_helios_qalloc.25.exit44 tail call void @___reset(i64 %qalloc.i47) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i47, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rzz(i64 %qalloc.i41, i64 %qalloc.i47, double 0x3FF921FB54442D18) tail call void @___rz(i64 %qalloc.i41, double 0xBFF921FB54442D18) tail call void @___rxy(i64 %qalloc.i47, double 0x3FF921FB54442D18, double 0x400921FB54442D18) tail call void @___rz(i64 %qalloc.i47, double 0xBFF921FB54442D18) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) - %lazy_measure14 = tail call i64 @___lazy_measure(i64 %qalloc.i37) + %___lazy_measure14 = tail call i64 @___lazy_measure(i64 %qalloc.i37) tail call void @___qfree(i64 %qalloc.i37) - %read_bool16 = tail call i1 @___read_future_bool(i64 %lazy_measure14) - tail call void @___dec_future_refcount(i64 %lazy_measure14) + %read_bool16 = tail call i1 @___read_future_bool(i64 %___lazy_measure14) + tail call void @___dec_future_refcount(i64 %___lazy_measure14) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool16) - %lazy_measure22 = tail call i64 @___lazy_measure(i64 %qalloc.i41) + %___lazy_measure22 = tail call i64 @___lazy_measure(i64 %qalloc.i41) tail call void @___qfree(i64 %qalloc.i41) - %read_bool24 = tail call i1 @___read_future_bool(i64 %lazy_measure22) - tail call void @___dec_future_refcount(i64 %lazy_measure22) + %read_bool24 = tail call i1 @___read_future_bool(i64 %___lazy_measure22) + tail call void @___dec_future_refcount(i64 %___lazy_measure22) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool24) - %lazy_measure30 = tail call i64 @___lazy_measure(i64 %qalloc.i47) + %___lazy_measure30 = tail call i64 @___lazy_measure(i64 %qalloc.i47) tail call void @___qfree(i64 %qalloc.i47) - %read_bool32 = tail call i1 @___read_future_bool(i64 %lazy_measure30) - tail call void @___dec_future_refcount(i64 %lazy_measure30) + %read_bool32 = tail call i1 @___read_future_bool(i64 %___lazy_measure30) + tail call void @___dec_future_refcount(i64 %___lazy_measure30) tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool32) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[QuestPlugin]/quantum_replay_quest-helios-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[QuestPlugin]/quantum_replay_quest-helios-aarch64-unknown-linux-gnu.ll index 8f7cd078..14be5f80 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[QuestPlugin]/quantum_replay_quest-helios-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[QuestPlugin]/quantum_replay_quest-helios-aarch64-unknown-linux-gnu.ll @@ -64,30 +64,30 @@ cond_29_case_0.i49: ; preds = %__hugr__.__tk2_heli __hugr__.__tk2_helios_qalloc.25.exit50: ; preds = %__hugr__.__tk2_helios_qalloc.25.exit44 tail call void @___reset(i64 %qalloc.i47) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i47, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rzz(i64 %qalloc.i41, i64 %qalloc.i47, double 0x3FF921FB54442D18) tail call void @___rz(i64 %qalloc.i41, double 0xBFF921FB54442D18) tail call void @___rxy(i64 %qalloc.i47, double 0x3FF921FB54442D18, double 0x400921FB54442D18) tail call void @___rz(i64 %qalloc.i47, double 0xBFF921FB54442D18) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) - %lazy_measure14 = tail call i64 @___lazy_measure(i64 %qalloc.i37) + %___lazy_measure14 = tail call i64 @___lazy_measure(i64 %qalloc.i37) tail call void @___qfree(i64 %qalloc.i37) - %read_bool16 = tail call i1 @___read_future_bool(i64 %lazy_measure14) - tail call void @___dec_future_refcount(i64 %lazy_measure14) + %read_bool16 = tail call i1 @___read_future_bool(i64 %___lazy_measure14) + tail call void @___dec_future_refcount(i64 %___lazy_measure14) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool16) - %lazy_measure22 = tail call i64 @___lazy_measure(i64 %qalloc.i41) + %___lazy_measure22 = tail call i64 @___lazy_measure(i64 %qalloc.i41) tail call void @___qfree(i64 %qalloc.i41) - %read_bool24 = tail call i1 @___read_future_bool(i64 %lazy_measure22) - tail call void @___dec_future_refcount(i64 %lazy_measure22) + %read_bool24 = tail call i1 @___read_future_bool(i64 %___lazy_measure22) + tail call void @___dec_future_refcount(i64 %___lazy_measure22) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool24) - %lazy_measure30 = tail call i64 @___lazy_measure(i64 %qalloc.i47) + %___lazy_measure30 = tail call i64 @___lazy_measure(i64 %qalloc.i47) tail call void @___qfree(i64 %qalloc.i47) - %read_bool32 = tail call i1 @___read_future_bool(i64 %lazy_measure30) - tail call void @___dec_future_refcount(i64 %lazy_measure30) + %read_bool32 = tail call i1 @___read_future_bool(i64 %___lazy_measure30) + tail call void @___dec_future_refcount(i64 %___lazy_measure30) tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool32) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[QuestPlugin]/quantum_replay_quest-helios-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[QuestPlugin]/quantum_replay_quest-helios-x86_64-apple-darwin.ll index 6cf67f12..900248fc 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[QuestPlugin]/quantum_replay_quest-helios-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[QuestPlugin]/quantum_replay_quest-helios-x86_64-apple-darwin.ll @@ -64,30 +64,30 @@ cond_29_case_0.i49: ; preds = %__hugr__.__tk2_heli __hugr__.__tk2_helios_qalloc.25.exit50: ; preds = %__hugr__.__tk2_helios_qalloc.25.exit44 tail call void @___reset(i64 %qalloc.i47) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i47, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rzz(i64 %qalloc.i41, i64 %qalloc.i47, double 0x3FF921FB54442D18) tail call void @___rz(i64 %qalloc.i41, double 0xBFF921FB54442D18) tail call void @___rxy(i64 %qalloc.i47, double 0x3FF921FB54442D18, double 0x400921FB54442D18) tail call void @___rz(i64 %qalloc.i47, double 0xBFF921FB54442D18) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) - %lazy_measure14 = tail call i64 @___lazy_measure(i64 %qalloc.i37) + %___lazy_measure14 = tail call i64 @___lazy_measure(i64 %qalloc.i37) tail call void @___qfree(i64 %qalloc.i37) - %read_bool16 = tail call i1 @___read_future_bool(i64 %lazy_measure14) - tail call void @___dec_future_refcount(i64 %lazy_measure14) + %read_bool16 = tail call i1 @___read_future_bool(i64 %___lazy_measure14) + tail call void @___dec_future_refcount(i64 %___lazy_measure14) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool16) - %lazy_measure22 = tail call i64 @___lazy_measure(i64 %qalloc.i41) + %___lazy_measure22 = tail call i64 @___lazy_measure(i64 %qalloc.i41) tail call void @___qfree(i64 %qalloc.i41) - %read_bool24 = tail call i1 @___read_future_bool(i64 %lazy_measure22) - tail call void @___dec_future_refcount(i64 %lazy_measure22) + %read_bool24 = tail call i1 @___read_future_bool(i64 %___lazy_measure22) + tail call void @___dec_future_refcount(i64 %___lazy_measure22) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool24) - %lazy_measure30 = tail call i64 @___lazy_measure(i64 %qalloc.i47) + %___lazy_measure30 = tail call i64 @___lazy_measure(i64 %qalloc.i47) tail call void @___qfree(i64 %qalloc.i47) - %read_bool32 = tail call i1 @___read_future_bool(i64 %lazy_measure30) - tail call void @___dec_future_refcount(i64 %lazy_measure30) + %read_bool32 = tail call i1 @___read_future_bool(i64 %___lazy_measure30) + tail call void @___dec_future_refcount(i64 %___lazy_measure30) tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool32) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[QuestPlugin]/quantum_replay_quest-helios-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[QuestPlugin]/quantum_replay_quest-helios-x86_64-unknown-linux-gnu.ll index 4bb9dbc8..177214a8 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[QuestPlugin]/quantum_replay_quest-helios-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[QuestPlugin]/quantum_replay_quest-helios-x86_64-unknown-linux-gnu.ll @@ -64,30 +64,30 @@ cond_29_case_0.i49: ; preds = %__hugr__.__tk2_heli __hugr__.__tk2_helios_qalloc.25.exit50: ; preds = %__hugr__.__tk2_helios_qalloc.25.exit44 tail call void @___reset(i64 %qalloc.i47) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i47, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rzz(i64 %qalloc.i41, i64 %qalloc.i47, double 0x3FF921FB54442D18) tail call void @___rz(i64 %qalloc.i41, double 0xBFF921FB54442D18) tail call void @___rxy(i64 %qalloc.i47, double 0x3FF921FB54442D18, double 0x400921FB54442D18) tail call void @___rz(i64 %qalloc.i47, double 0xBFF921FB54442D18) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) - %lazy_measure14 = tail call i64 @___lazy_measure(i64 %qalloc.i37) + %___lazy_measure14 = tail call i64 @___lazy_measure(i64 %qalloc.i37) tail call void @___qfree(i64 %qalloc.i37) - %read_bool16 = tail call i1 @___read_future_bool(i64 %lazy_measure14) - tail call void @___dec_future_refcount(i64 %lazy_measure14) + %read_bool16 = tail call i1 @___read_future_bool(i64 %___lazy_measure14) + tail call void @___dec_future_refcount(i64 %___lazy_measure14) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool16) - %lazy_measure22 = tail call i64 @___lazy_measure(i64 %qalloc.i41) + %___lazy_measure22 = tail call i64 @___lazy_measure(i64 %qalloc.i41) tail call void @___qfree(i64 %qalloc.i41) - %read_bool24 = tail call i1 @___read_future_bool(i64 %lazy_measure22) - tail call void @___dec_future_refcount(i64 %lazy_measure22) + %read_bool24 = tail call i1 @___read_future_bool(i64 %___lazy_measure22) + tail call void @___dec_future_refcount(i64 %___lazy_measure22) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool24) - %lazy_measure30 = tail call i64 @___lazy_measure(i64 %qalloc.i47) + %___lazy_measure30 = tail call i64 @___lazy_measure(i64 %qalloc.i47) tail call void @___qfree(i64 %qalloc.i47) - %read_bool32 = tail call i1 @___read_future_bool(i64 %lazy_measure30) - tail call void @___dec_future_refcount(i64 %lazy_measure30) + %read_bool32 = tail call i1 @___read_future_bool(i64 %___lazy_measure30) + tail call void @___dec_future_refcount(i64 %___lazy_measure30) tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool32) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[QuestPlugin]/quantum_replay_quest-helios-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[QuestPlugin]/quantum_replay_quest-helios-x86_64-windows-gnu.ll index 11331961..ee7fef34 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[QuestPlugin]/quantum_replay_quest-helios-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[QuestPlugin]/quantum_replay_quest-helios-x86_64-windows-gnu.ll @@ -64,30 +64,30 @@ cond_29_case_0.i49: ; preds = %__hugr__.__tk2_heli __hugr__.__tk2_helios_qalloc.25.exit50: ; preds = %__hugr__.__tk2_helios_qalloc.25.exit44 tail call void @___reset(i64 %qalloc.i47) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i47, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rzz(i64 %qalloc.i41, i64 %qalloc.i47, double 0x3FF921FB54442D18) tail call void @___rz(i64 %qalloc.i41, double 0xBFF921FB54442D18) tail call void @___rxy(i64 %qalloc.i47, double 0x3FF921FB54442D18, double 0x400921FB54442D18) tail call void @___rz(i64 %qalloc.i47, double 0xBFF921FB54442D18) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) - %lazy_measure14 = tail call i64 @___lazy_measure(i64 %qalloc.i37) + %___lazy_measure14 = tail call i64 @___lazy_measure(i64 %qalloc.i37) tail call void @___qfree(i64 %qalloc.i37) - %read_bool16 = tail call i1 @___read_future_bool(i64 %lazy_measure14) - tail call void @___dec_future_refcount(i64 %lazy_measure14) + %read_bool16 = tail call i1 @___read_future_bool(i64 %___lazy_measure14) + tail call void @___dec_future_refcount(i64 %___lazy_measure14) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool16) - %lazy_measure22 = tail call i64 @___lazy_measure(i64 %qalloc.i41) + %___lazy_measure22 = tail call i64 @___lazy_measure(i64 %qalloc.i41) tail call void @___qfree(i64 %qalloc.i41) - %read_bool24 = tail call i1 @___read_future_bool(i64 %lazy_measure22) - tail call void @___dec_future_refcount(i64 %lazy_measure22) + %read_bool24 = tail call i1 @___read_future_bool(i64 %___lazy_measure22) + tail call void @___dec_future_refcount(i64 %___lazy_measure22) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool24) - %lazy_measure30 = tail call i64 @___lazy_measure(i64 %qalloc.i47) + %___lazy_measure30 = tail call i64 @___lazy_measure(i64 %qalloc.i47) tail call void @___qfree(i64 %qalloc.i47) - %read_bool32 = tail call i1 @___read_future_bool(i64 %lazy_measure30) - tail call void @___dec_future_refcount(i64 %lazy_measure30) + %read_bool32 = tail call i1 @___read_future_bool(i64 %___lazy_measure30) + tail call void @___dec_future_refcount(i64 %___lazy_measure30) tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool32) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[QuestPlugin]/quantum_replay_quest-sol-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[QuestPlugin]/quantum_replay_quest-sol-aarch64-apple-darwin.ll index 065412b6..6eaab9ed 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[QuestPlugin]/quantum_replay_quest-sol-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[QuestPlugin]/quantum_replay_quest-sol-aarch64-apple-darwin.ll @@ -64,35 +64,35 @@ cond_29_case_0.i49: ; preds = %__hugr__.__tk2_sol_ __hugr__.__tk2_sol_qalloc.25.exit50: ; preds = %__hugr__.__tk2_sol_qalloc.25.exit44 tail call void @___reset(i64 %qalloc.i47) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i41, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rpp(i64 %qalloc.i41, i64 %qalloc.i47, double 0x3FF921FB54442D18, double 0.000000e+00) tail call void @___rp(i64 %qalloc.i47, double 0xBFF921FB54442D18, double 0.000000e+00) tail call void @___rp(i64 %qalloc.i41, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rz(i64 %qalloc.i41, double 0xBFF921FB54442D18) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) - %lazy_measure14 = tail call i64 @___lazy_measure(i64 %qalloc.i37) + %___future_measure14 = tail call i64 @___future_measure(i64 %qalloc.i37, i64 0) tail call void @___qfree(i64 %qalloc.i37) - %read_bool16 = tail call i1 @___read_future_bool(i64 %lazy_measure14) - tail call void @___dec_future_refcount(i64 %lazy_measure14) + %read_bool16 = tail call i1 @___read_future_bool(i64 %___future_measure14) + tail call void @___dec_future_refcount(i64 %___future_measure14) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool16) - %lazy_measure22 = tail call i64 @___lazy_measure(i64 %qalloc.i41) + %___future_measure22 = tail call i64 @___future_measure(i64 %qalloc.i41, i64 0) tail call void @___qfree(i64 %qalloc.i41) - %read_bool24 = tail call i1 @___read_future_bool(i64 %lazy_measure22) - tail call void @___dec_future_refcount(i64 %lazy_measure22) + %read_bool24 = tail call i1 @___read_future_bool(i64 %___future_measure22) + tail call void @___dec_future_refcount(i64 %___future_measure22) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool24) - %lazy_measure30 = tail call i64 @___lazy_measure(i64 %qalloc.i47) + %___future_measure30 = tail call i64 @___future_measure(i64 %qalloc.i47, i64 0) tail call void @___qfree(i64 %qalloc.i47) - %read_bool32 = tail call i1 @___read_future_bool(i64 %lazy_measure30) - tail call void @___dec_future_refcount(i64 %lazy_measure30) + %read_bool32 = tail call i1 @___read_future_bool(i64 %___future_measure30) + tail call void @___dec_future_refcount(i64 %___future_measure30) tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool32) ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[QuestPlugin]/quantum_replay_quest-sol-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[QuestPlugin]/quantum_replay_quest-sol-aarch64-unknown-linux-gnu.ll index 8b2d9af0..183b6e4a 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[QuestPlugin]/quantum_replay_quest-sol-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[QuestPlugin]/quantum_replay_quest-sol-aarch64-unknown-linux-gnu.ll @@ -64,35 +64,35 @@ cond_29_case_0.i49: ; preds = %__hugr__.__tk2_sol_ __hugr__.__tk2_sol_qalloc.25.exit50: ; preds = %__hugr__.__tk2_sol_qalloc.25.exit44 tail call void @___reset(i64 %qalloc.i47) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i41, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rpp(i64 %qalloc.i41, i64 %qalloc.i47, double 0x3FF921FB54442D18, double 0.000000e+00) tail call void @___rp(i64 %qalloc.i47, double 0xBFF921FB54442D18, double 0.000000e+00) tail call void @___rp(i64 %qalloc.i41, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rz(i64 %qalloc.i41, double 0xBFF921FB54442D18) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) - %lazy_measure14 = tail call i64 @___lazy_measure(i64 %qalloc.i37) + %___future_measure14 = tail call i64 @___future_measure(i64 %qalloc.i37, i64 0) tail call void @___qfree(i64 %qalloc.i37) - %read_bool16 = tail call i1 @___read_future_bool(i64 %lazy_measure14) - tail call void @___dec_future_refcount(i64 %lazy_measure14) + %read_bool16 = tail call i1 @___read_future_bool(i64 %___future_measure14) + tail call void @___dec_future_refcount(i64 %___future_measure14) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool16) - %lazy_measure22 = tail call i64 @___lazy_measure(i64 %qalloc.i41) + %___future_measure22 = tail call i64 @___future_measure(i64 %qalloc.i41, i64 0) tail call void @___qfree(i64 %qalloc.i41) - %read_bool24 = tail call i1 @___read_future_bool(i64 %lazy_measure22) - tail call void @___dec_future_refcount(i64 %lazy_measure22) + %read_bool24 = tail call i1 @___read_future_bool(i64 %___future_measure22) + tail call void @___dec_future_refcount(i64 %___future_measure22) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool24) - %lazy_measure30 = tail call i64 @___lazy_measure(i64 %qalloc.i47) + %___future_measure30 = tail call i64 @___future_measure(i64 %qalloc.i47, i64 0) tail call void @___qfree(i64 %qalloc.i47) - %read_bool32 = tail call i1 @___read_future_bool(i64 %lazy_measure30) - tail call void @___dec_future_refcount(i64 %lazy_measure30) + %read_bool32 = tail call i1 @___read_future_bool(i64 %___future_measure30) + tail call void @___dec_future_refcount(i64 %___future_measure30) tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool32) ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[QuestPlugin]/quantum_replay_quest-sol-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[QuestPlugin]/quantum_replay_quest-sol-x86_64-apple-darwin.ll index 9b35f9de..3ab80e63 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[QuestPlugin]/quantum_replay_quest-sol-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[QuestPlugin]/quantum_replay_quest-sol-x86_64-apple-darwin.ll @@ -64,35 +64,35 @@ cond_29_case_0.i49: ; preds = %__hugr__.__tk2_sol_ __hugr__.__tk2_sol_qalloc.25.exit50: ; preds = %__hugr__.__tk2_sol_qalloc.25.exit44 tail call void @___reset(i64 %qalloc.i47) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i41, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rpp(i64 %qalloc.i41, i64 %qalloc.i47, double 0x3FF921FB54442D18, double 0.000000e+00) tail call void @___rp(i64 %qalloc.i47, double 0xBFF921FB54442D18, double 0.000000e+00) tail call void @___rp(i64 %qalloc.i41, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rz(i64 %qalloc.i41, double 0xBFF921FB54442D18) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) - %lazy_measure14 = tail call i64 @___lazy_measure(i64 %qalloc.i37) + %___future_measure14 = tail call i64 @___future_measure(i64 %qalloc.i37, i64 0) tail call void @___qfree(i64 %qalloc.i37) - %read_bool16 = tail call i1 @___read_future_bool(i64 %lazy_measure14) - tail call void @___dec_future_refcount(i64 %lazy_measure14) + %read_bool16 = tail call i1 @___read_future_bool(i64 %___future_measure14) + tail call void @___dec_future_refcount(i64 %___future_measure14) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool16) - %lazy_measure22 = tail call i64 @___lazy_measure(i64 %qalloc.i41) + %___future_measure22 = tail call i64 @___future_measure(i64 %qalloc.i41, i64 0) tail call void @___qfree(i64 %qalloc.i41) - %read_bool24 = tail call i1 @___read_future_bool(i64 %lazy_measure22) - tail call void @___dec_future_refcount(i64 %lazy_measure22) + %read_bool24 = tail call i1 @___read_future_bool(i64 %___future_measure22) + tail call void @___dec_future_refcount(i64 %___future_measure22) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool24) - %lazy_measure30 = tail call i64 @___lazy_measure(i64 %qalloc.i47) + %___future_measure30 = tail call i64 @___future_measure(i64 %qalloc.i47, i64 0) tail call void @___qfree(i64 %qalloc.i47) - %read_bool32 = tail call i1 @___read_future_bool(i64 %lazy_measure30) - tail call void @___dec_future_refcount(i64 %lazy_measure30) + %read_bool32 = tail call i1 @___read_future_bool(i64 %___future_measure30) + tail call void @___dec_future_refcount(i64 %___future_measure30) tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool32) ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[QuestPlugin]/quantum_replay_quest-sol-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[QuestPlugin]/quantum_replay_quest-sol-x86_64-unknown-linux-gnu.ll index d9f4c835..4f6a886c 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[QuestPlugin]/quantum_replay_quest-sol-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[QuestPlugin]/quantum_replay_quest-sol-x86_64-unknown-linux-gnu.ll @@ -64,35 +64,35 @@ cond_29_case_0.i49: ; preds = %__hugr__.__tk2_sol_ __hugr__.__tk2_sol_qalloc.25.exit50: ; preds = %__hugr__.__tk2_sol_qalloc.25.exit44 tail call void @___reset(i64 %qalloc.i47) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i41, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rpp(i64 %qalloc.i41, i64 %qalloc.i47, double 0x3FF921FB54442D18, double 0.000000e+00) tail call void @___rp(i64 %qalloc.i47, double 0xBFF921FB54442D18, double 0.000000e+00) tail call void @___rp(i64 %qalloc.i41, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rz(i64 %qalloc.i41, double 0xBFF921FB54442D18) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) - %lazy_measure14 = tail call i64 @___lazy_measure(i64 %qalloc.i37) + %___future_measure14 = tail call i64 @___future_measure(i64 %qalloc.i37, i64 0) tail call void @___qfree(i64 %qalloc.i37) - %read_bool16 = tail call i1 @___read_future_bool(i64 %lazy_measure14) - tail call void @___dec_future_refcount(i64 %lazy_measure14) + %read_bool16 = tail call i1 @___read_future_bool(i64 %___future_measure14) + tail call void @___dec_future_refcount(i64 %___future_measure14) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool16) - %lazy_measure22 = tail call i64 @___lazy_measure(i64 %qalloc.i41) + %___future_measure22 = tail call i64 @___future_measure(i64 %qalloc.i41, i64 0) tail call void @___qfree(i64 %qalloc.i41) - %read_bool24 = tail call i1 @___read_future_bool(i64 %lazy_measure22) - tail call void @___dec_future_refcount(i64 %lazy_measure22) + %read_bool24 = tail call i1 @___read_future_bool(i64 %___future_measure22) + tail call void @___dec_future_refcount(i64 %___future_measure22) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool24) - %lazy_measure30 = tail call i64 @___lazy_measure(i64 %qalloc.i47) + %___future_measure30 = tail call i64 @___future_measure(i64 %qalloc.i47, i64 0) tail call void @___qfree(i64 %qalloc.i47) - %read_bool32 = tail call i1 @___read_future_bool(i64 %lazy_measure30) - tail call void @___dec_future_refcount(i64 %lazy_measure30) + %read_bool32 = tail call i1 @___read_future_bool(i64 %___future_measure30) + tail call void @___dec_future_refcount(i64 %___future_measure30) tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool32) ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[QuestPlugin]/quantum_replay_quest-sol-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[QuestPlugin]/quantum_replay_quest-sol-x86_64-windows-gnu.ll index 26706639..742ca1f2 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[QuestPlugin]/quantum_replay_quest-sol-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[QuestPlugin]/quantum_replay_quest-sol-x86_64-windows-gnu.ll @@ -64,35 +64,35 @@ cond_29_case_0.i49: ; preds = %__hugr__.__tk2_sol_ __hugr__.__tk2_sol_qalloc.25.exit50: ; preds = %__hugr__.__tk2_sol_qalloc.25.exit44 tail call void @___reset(i64 %qalloc.i47) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i41, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rpp(i64 %qalloc.i41, i64 %qalloc.i47, double 0x3FF921FB54442D18, double 0.000000e+00) tail call void @___rp(i64 %qalloc.i47, double 0xBFF921FB54442D18, double 0.000000e+00) tail call void @___rp(i64 %qalloc.i41, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rz(i64 %qalloc.i41, double 0xBFF921FB54442D18) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) - %lazy_measure14 = tail call i64 @___lazy_measure(i64 %qalloc.i37) + %___future_measure14 = tail call i64 @___future_measure(i64 %qalloc.i37, i64 0) tail call void @___qfree(i64 %qalloc.i37) - %read_bool16 = tail call i1 @___read_future_bool(i64 %lazy_measure14) - tail call void @___dec_future_refcount(i64 %lazy_measure14) + %read_bool16 = tail call i1 @___read_future_bool(i64 %___future_measure14) + tail call void @___dec_future_refcount(i64 %___future_measure14) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool16) - %lazy_measure22 = tail call i64 @___lazy_measure(i64 %qalloc.i41) + %___future_measure22 = tail call i64 @___future_measure(i64 %qalloc.i41, i64 0) tail call void @___qfree(i64 %qalloc.i41) - %read_bool24 = tail call i1 @___read_future_bool(i64 %lazy_measure22) - tail call void @___dec_future_refcount(i64 %lazy_measure22) + %read_bool24 = tail call i1 @___read_future_bool(i64 %___future_measure22) + tail call void @___dec_future_refcount(i64 %___future_measure22) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool24) - %lazy_measure30 = tail call i64 @___lazy_measure(i64 %qalloc.i47) + %___future_measure30 = tail call i64 @___future_measure(i64 %qalloc.i47, i64 0) tail call void @___qfree(i64 %qalloc.i47) - %read_bool32 = tail call i1 @___read_future_bool(i64 %lazy_measure30) - tail call void @___dec_future_refcount(i64 %lazy_measure30) + %read_bool32 = tail call i1 @___read_future_bool(i64 %___future_measure30) + tail call void @___dec_future_refcount(i64 %___future_measure30) tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool32) ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[StimPlugin]/quantum_replay_quest-helios-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[StimPlugin]/quantum_replay_quest-helios-aarch64-apple-darwin.ll index 1bd20fe5..9a7d908e 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[StimPlugin]/quantum_replay_quest-helios-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[StimPlugin]/quantum_replay_quest-helios-aarch64-apple-darwin.ll @@ -64,30 +64,30 @@ cond_29_case_0.i49: ; preds = %__hugr__.__tk2_heli __hugr__.__tk2_helios_qalloc.25.exit50: ; preds = %__hugr__.__tk2_helios_qalloc.25.exit44 tail call void @___reset(i64 %qalloc.i47) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i47, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rzz(i64 %qalloc.i41, i64 %qalloc.i47, double 0x3FF921FB54442D18) tail call void @___rz(i64 %qalloc.i41, double 0xBFF921FB54442D18) tail call void @___rxy(i64 %qalloc.i47, double 0x3FF921FB54442D18, double 0x400921FB54442D18) tail call void @___rz(i64 %qalloc.i47, double 0xBFF921FB54442D18) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) - %lazy_measure14 = tail call i64 @___lazy_measure(i64 %qalloc.i37) + %___lazy_measure14 = tail call i64 @___lazy_measure(i64 %qalloc.i37) tail call void @___qfree(i64 %qalloc.i37) - %read_bool16 = tail call i1 @___read_future_bool(i64 %lazy_measure14) - tail call void @___dec_future_refcount(i64 %lazy_measure14) + %read_bool16 = tail call i1 @___read_future_bool(i64 %___lazy_measure14) + tail call void @___dec_future_refcount(i64 %___lazy_measure14) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool16) - %lazy_measure22 = tail call i64 @___lazy_measure(i64 %qalloc.i41) + %___lazy_measure22 = tail call i64 @___lazy_measure(i64 %qalloc.i41) tail call void @___qfree(i64 %qalloc.i41) - %read_bool24 = tail call i1 @___read_future_bool(i64 %lazy_measure22) - tail call void @___dec_future_refcount(i64 %lazy_measure22) + %read_bool24 = tail call i1 @___read_future_bool(i64 %___lazy_measure22) + tail call void @___dec_future_refcount(i64 %___lazy_measure22) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool24) - %lazy_measure30 = tail call i64 @___lazy_measure(i64 %qalloc.i47) + %___lazy_measure30 = tail call i64 @___lazy_measure(i64 %qalloc.i47) tail call void @___qfree(i64 %qalloc.i47) - %read_bool32 = tail call i1 @___read_future_bool(i64 %lazy_measure30) - tail call void @___dec_future_refcount(i64 %lazy_measure30) + %read_bool32 = tail call i1 @___read_future_bool(i64 %___lazy_measure30) + tail call void @___dec_future_refcount(i64 %___lazy_measure30) tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool32) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[StimPlugin]/quantum_replay_quest-helios-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[StimPlugin]/quantum_replay_quest-helios-aarch64-unknown-linux-gnu.ll index 8f7cd078..14be5f80 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[StimPlugin]/quantum_replay_quest-helios-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[StimPlugin]/quantum_replay_quest-helios-aarch64-unknown-linux-gnu.ll @@ -64,30 +64,30 @@ cond_29_case_0.i49: ; preds = %__hugr__.__tk2_heli __hugr__.__tk2_helios_qalloc.25.exit50: ; preds = %__hugr__.__tk2_helios_qalloc.25.exit44 tail call void @___reset(i64 %qalloc.i47) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i47, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rzz(i64 %qalloc.i41, i64 %qalloc.i47, double 0x3FF921FB54442D18) tail call void @___rz(i64 %qalloc.i41, double 0xBFF921FB54442D18) tail call void @___rxy(i64 %qalloc.i47, double 0x3FF921FB54442D18, double 0x400921FB54442D18) tail call void @___rz(i64 %qalloc.i47, double 0xBFF921FB54442D18) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) - %lazy_measure14 = tail call i64 @___lazy_measure(i64 %qalloc.i37) + %___lazy_measure14 = tail call i64 @___lazy_measure(i64 %qalloc.i37) tail call void @___qfree(i64 %qalloc.i37) - %read_bool16 = tail call i1 @___read_future_bool(i64 %lazy_measure14) - tail call void @___dec_future_refcount(i64 %lazy_measure14) + %read_bool16 = tail call i1 @___read_future_bool(i64 %___lazy_measure14) + tail call void @___dec_future_refcount(i64 %___lazy_measure14) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool16) - %lazy_measure22 = tail call i64 @___lazy_measure(i64 %qalloc.i41) + %___lazy_measure22 = tail call i64 @___lazy_measure(i64 %qalloc.i41) tail call void @___qfree(i64 %qalloc.i41) - %read_bool24 = tail call i1 @___read_future_bool(i64 %lazy_measure22) - tail call void @___dec_future_refcount(i64 %lazy_measure22) + %read_bool24 = tail call i1 @___read_future_bool(i64 %___lazy_measure22) + tail call void @___dec_future_refcount(i64 %___lazy_measure22) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool24) - %lazy_measure30 = tail call i64 @___lazy_measure(i64 %qalloc.i47) + %___lazy_measure30 = tail call i64 @___lazy_measure(i64 %qalloc.i47) tail call void @___qfree(i64 %qalloc.i47) - %read_bool32 = tail call i1 @___read_future_bool(i64 %lazy_measure30) - tail call void @___dec_future_refcount(i64 %lazy_measure30) + %read_bool32 = tail call i1 @___read_future_bool(i64 %___lazy_measure30) + tail call void @___dec_future_refcount(i64 %___lazy_measure30) tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool32) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[StimPlugin]/quantum_replay_quest-helios-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[StimPlugin]/quantum_replay_quest-helios-x86_64-apple-darwin.ll index 6cf67f12..900248fc 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[StimPlugin]/quantum_replay_quest-helios-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[StimPlugin]/quantum_replay_quest-helios-x86_64-apple-darwin.ll @@ -64,30 +64,30 @@ cond_29_case_0.i49: ; preds = %__hugr__.__tk2_heli __hugr__.__tk2_helios_qalloc.25.exit50: ; preds = %__hugr__.__tk2_helios_qalloc.25.exit44 tail call void @___reset(i64 %qalloc.i47) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i47, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rzz(i64 %qalloc.i41, i64 %qalloc.i47, double 0x3FF921FB54442D18) tail call void @___rz(i64 %qalloc.i41, double 0xBFF921FB54442D18) tail call void @___rxy(i64 %qalloc.i47, double 0x3FF921FB54442D18, double 0x400921FB54442D18) tail call void @___rz(i64 %qalloc.i47, double 0xBFF921FB54442D18) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) - %lazy_measure14 = tail call i64 @___lazy_measure(i64 %qalloc.i37) + %___lazy_measure14 = tail call i64 @___lazy_measure(i64 %qalloc.i37) tail call void @___qfree(i64 %qalloc.i37) - %read_bool16 = tail call i1 @___read_future_bool(i64 %lazy_measure14) - tail call void @___dec_future_refcount(i64 %lazy_measure14) + %read_bool16 = tail call i1 @___read_future_bool(i64 %___lazy_measure14) + tail call void @___dec_future_refcount(i64 %___lazy_measure14) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool16) - %lazy_measure22 = tail call i64 @___lazy_measure(i64 %qalloc.i41) + %___lazy_measure22 = tail call i64 @___lazy_measure(i64 %qalloc.i41) tail call void @___qfree(i64 %qalloc.i41) - %read_bool24 = tail call i1 @___read_future_bool(i64 %lazy_measure22) - tail call void @___dec_future_refcount(i64 %lazy_measure22) + %read_bool24 = tail call i1 @___read_future_bool(i64 %___lazy_measure22) + tail call void @___dec_future_refcount(i64 %___lazy_measure22) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool24) - %lazy_measure30 = tail call i64 @___lazy_measure(i64 %qalloc.i47) + %___lazy_measure30 = tail call i64 @___lazy_measure(i64 %qalloc.i47) tail call void @___qfree(i64 %qalloc.i47) - %read_bool32 = tail call i1 @___read_future_bool(i64 %lazy_measure30) - tail call void @___dec_future_refcount(i64 %lazy_measure30) + %read_bool32 = tail call i1 @___read_future_bool(i64 %___lazy_measure30) + tail call void @___dec_future_refcount(i64 %___lazy_measure30) tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool32) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[StimPlugin]/quantum_replay_quest-helios-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[StimPlugin]/quantum_replay_quest-helios-x86_64-unknown-linux-gnu.ll index 4bb9dbc8..177214a8 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[StimPlugin]/quantum_replay_quest-helios-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[StimPlugin]/quantum_replay_quest-helios-x86_64-unknown-linux-gnu.ll @@ -64,30 +64,30 @@ cond_29_case_0.i49: ; preds = %__hugr__.__tk2_heli __hugr__.__tk2_helios_qalloc.25.exit50: ; preds = %__hugr__.__tk2_helios_qalloc.25.exit44 tail call void @___reset(i64 %qalloc.i47) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i47, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rzz(i64 %qalloc.i41, i64 %qalloc.i47, double 0x3FF921FB54442D18) tail call void @___rz(i64 %qalloc.i41, double 0xBFF921FB54442D18) tail call void @___rxy(i64 %qalloc.i47, double 0x3FF921FB54442D18, double 0x400921FB54442D18) tail call void @___rz(i64 %qalloc.i47, double 0xBFF921FB54442D18) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) - %lazy_measure14 = tail call i64 @___lazy_measure(i64 %qalloc.i37) + %___lazy_measure14 = tail call i64 @___lazy_measure(i64 %qalloc.i37) tail call void @___qfree(i64 %qalloc.i37) - %read_bool16 = tail call i1 @___read_future_bool(i64 %lazy_measure14) - tail call void @___dec_future_refcount(i64 %lazy_measure14) + %read_bool16 = tail call i1 @___read_future_bool(i64 %___lazy_measure14) + tail call void @___dec_future_refcount(i64 %___lazy_measure14) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool16) - %lazy_measure22 = tail call i64 @___lazy_measure(i64 %qalloc.i41) + %___lazy_measure22 = tail call i64 @___lazy_measure(i64 %qalloc.i41) tail call void @___qfree(i64 %qalloc.i41) - %read_bool24 = tail call i1 @___read_future_bool(i64 %lazy_measure22) - tail call void @___dec_future_refcount(i64 %lazy_measure22) + %read_bool24 = tail call i1 @___read_future_bool(i64 %___lazy_measure22) + tail call void @___dec_future_refcount(i64 %___lazy_measure22) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool24) - %lazy_measure30 = tail call i64 @___lazy_measure(i64 %qalloc.i47) + %___lazy_measure30 = tail call i64 @___lazy_measure(i64 %qalloc.i47) tail call void @___qfree(i64 %qalloc.i47) - %read_bool32 = tail call i1 @___read_future_bool(i64 %lazy_measure30) - tail call void @___dec_future_refcount(i64 %lazy_measure30) + %read_bool32 = tail call i1 @___read_future_bool(i64 %___lazy_measure30) + tail call void @___dec_future_refcount(i64 %___lazy_measure30) tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool32) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[StimPlugin]/quantum_replay_quest-helios-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[StimPlugin]/quantum_replay_quest-helios-x86_64-windows-gnu.ll index 11331961..ee7fef34 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[StimPlugin]/quantum_replay_quest-helios-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[StimPlugin]/quantum_replay_quest-helios-x86_64-windows-gnu.ll @@ -64,30 +64,30 @@ cond_29_case_0.i49: ; preds = %__hugr__.__tk2_heli __hugr__.__tk2_helios_qalloc.25.exit50: ; preds = %__hugr__.__tk2_helios_qalloc.25.exit44 tail call void @___reset(i64 %qalloc.i47) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i47, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rzz(i64 %qalloc.i41, i64 %qalloc.i47, double 0x3FF921FB54442D18) tail call void @___rz(i64 %qalloc.i41, double 0xBFF921FB54442D18) tail call void @___rxy(i64 %qalloc.i47, double 0x3FF921FB54442D18, double 0x400921FB54442D18) tail call void @___rz(i64 %qalloc.i47, double 0xBFF921FB54442D18) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) - %lazy_measure14 = tail call i64 @___lazy_measure(i64 %qalloc.i37) + %___lazy_measure14 = tail call i64 @___lazy_measure(i64 %qalloc.i37) tail call void @___qfree(i64 %qalloc.i37) - %read_bool16 = tail call i1 @___read_future_bool(i64 %lazy_measure14) - tail call void @___dec_future_refcount(i64 %lazy_measure14) + %read_bool16 = tail call i1 @___read_future_bool(i64 %___lazy_measure14) + tail call void @___dec_future_refcount(i64 %___lazy_measure14) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool16) - %lazy_measure22 = tail call i64 @___lazy_measure(i64 %qalloc.i41) + %___lazy_measure22 = tail call i64 @___lazy_measure(i64 %qalloc.i41) tail call void @___qfree(i64 %qalloc.i41) - %read_bool24 = tail call i1 @___read_future_bool(i64 %lazy_measure22) - tail call void @___dec_future_refcount(i64 %lazy_measure22) + %read_bool24 = tail call i1 @___read_future_bool(i64 %___lazy_measure22) + tail call void @___dec_future_refcount(i64 %___lazy_measure22) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool24) - %lazy_measure30 = tail call i64 @___lazy_measure(i64 %qalloc.i47) + %___lazy_measure30 = tail call i64 @___lazy_measure(i64 %qalloc.i47) tail call void @___qfree(i64 %qalloc.i47) - %read_bool32 = tail call i1 @___read_future_bool(i64 %lazy_measure30) - tail call void @___dec_future_refcount(i64 %lazy_measure30) + %read_bool32 = tail call i1 @___read_future_bool(i64 %___lazy_measure30) + tail call void @___dec_future_refcount(i64 %___lazy_measure30) tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool32) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[StimPlugin]/quantum_replay_quest-sol-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[StimPlugin]/quantum_replay_quest-sol-aarch64-apple-darwin.ll index 065412b6..6eaab9ed 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[StimPlugin]/quantum_replay_quest-sol-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[StimPlugin]/quantum_replay_quest-sol-aarch64-apple-darwin.ll @@ -64,35 +64,35 @@ cond_29_case_0.i49: ; preds = %__hugr__.__tk2_sol_ __hugr__.__tk2_sol_qalloc.25.exit50: ; preds = %__hugr__.__tk2_sol_qalloc.25.exit44 tail call void @___reset(i64 %qalloc.i47) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i41, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rpp(i64 %qalloc.i41, i64 %qalloc.i47, double 0x3FF921FB54442D18, double 0.000000e+00) tail call void @___rp(i64 %qalloc.i47, double 0xBFF921FB54442D18, double 0.000000e+00) tail call void @___rp(i64 %qalloc.i41, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rz(i64 %qalloc.i41, double 0xBFF921FB54442D18) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) - %lazy_measure14 = tail call i64 @___lazy_measure(i64 %qalloc.i37) + %___future_measure14 = tail call i64 @___future_measure(i64 %qalloc.i37, i64 0) tail call void @___qfree(i64 %qalloc.i37) - %read_bool16 = tail call i1 @___read_future_bool(i64 %lazy_measure14) - tail call void @___dec_future_refcount(i64 %lazy_measure14) + %read_bool16 = tail call i1 @___read_future_bool(i64 %___future_measure14) + tail call void @___dec_future_refcount(i64 %___future_measure14) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool16) - %lazy_measure22 = tail call i64 @___lazy_measure(i64 %qalloc.i41) + %___future_measure22 = tail call i64 @___future_measure(i64 %qalloc.i41, i64 0) tail call void @___qfree(i64 %qalloc.i41) - %read_bool24 = tail call i1 @___read_future_bool(i64 %lazy_measure22) - tail call void @___dec_future_refcount(i64 %lazy_measure22) + %read_bool24 = tail call i1 @___read_future_bool(i64 %___future_measure22) + tail call void @___dec_future_refcount(i64 %___future_measure22) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool24) - %lazy_measure30 = tail call i64 @___lazy_measure(i64 %qalloc.i47) + %___future_measure30 = tail call i64 @___future_measure(i64 %qalloc.i47, i64 0) tail call void @___qfree(i64 %qalloc.i47) - %read_bool32 = tail call i1 @___read_future_bool(i64 %lazy_measure30) - tail call void @___dec_future_refcount(i64 %lazy_measure30) + %read_bool32 = tail call i1 @___read_future_bool(i64 %___future_measure30) + tail call void @___dec_future_refcount(i64 %___future_measure30) tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool32) ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[StimPlugin]/quantum_replay_quest-sol-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[StimPlugin]/quantum_replay_quest-sol-aarch64-unknown-linux-gnu.ll index 8b2d9af0..183b6e4a 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[StimPlugin]/quantum_replay_quest-sol-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[StimPlugin]/quantum_replay_quest-sol-aarch64-unknown-linux-gnu.ll @@ -64,35 +64,35 @@ cond_29_case_0.i49: ; preds = %__hugr__.__tk2_sol_ __hugr__.__tk2_sol_qalloc.25.exit50: ; preds = %__hugr__.__tk2_sol_qalloc.25.exit44 tail call void @___reset(i64 %qalloc.i47) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i41, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rpp(i64 %qalloc.i41, i64 %qalloc.i47, double 0x3FF921FB54442D18, double 0.000000e+00) tail call void @___rp(i64 %qalloc.i47, double 0xBFF921FB54442D18, double 0.000000e+00) tail call void @___rp(i64 %qalloc.i41, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rz(i64 %qalloc.i41, double 0xBFF921FB54442D18) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) - %lazy_measure14 = tail call i64 @___lazy_measure(i64 %qalloc.i37) + %___future_measure14 = tail call i64 @___future_measure(i64 %qalloc.i37, i64 0) tail call void @___qfree(i64 %qalloc.i37) - %read_bool16 = tail call i1 @___read_future_bool(i64 %lazy_measure14) - tail call void @___dec_future_refcount(i64 %lazy_measure14) + %read_bool16 = tail call i1 @___read_future_bool(i64 %___future_measure14) + tail call void @___dec_future_refcount(i64 %___future_measure14) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool16) - %lazy_measure22 = tail call i64 @___lazy_measure(i64 %qalloc.i41) + %___future_measure22 = tail call i64 @___future_measure(i64 %qalloc.i41, i64 0) tail call void @___qfree(i64 %qalloc.i41) - %read_bool24 = tail call i1 @___read_future_bool(i64 %lazy_measure22) - tail call void @___dec_future_refcount(i64 %lazy_measure22) + %read_bool24 = tail call i1 @___read_future_bool(i64 %___future_measure22) + tail call void @___dec_future_refcount(i64 %___future_measure22) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool24) - %lazy_measure30 = tail call i64 @___lazy_measure(i64 %qalloc.i47) + %___future_measure30 = tail call i64 @___future_measure(i64 %qalloc.i47, i64 0) tail call void @___qfree(i64 %qalloc.i47) - %read_bool32 = tail call i1 @___read_future_bool(i64 %lazy_measure30) - tail call void @___dec_future_refcount(i64 %lazy_measure30) + %read_bool32 = tail call i1 @___read_future_bool(i64 %___future_measure30) + tail call void @___dec_future_refcount(i64 %___future_measure30) tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool32) ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[StimPlugin]/quantum_replay_quest-sol-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[StimPlugin]/quantum_replay_quest-sol-x86_64-apple-darwin.ll index 9b35f9de..3ab80e63 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[StimPlugin]/quantum_replay_quest-sol-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[StimPlugin]/quantum_replay_quest-sol-x86_64-apple-darwin.ll @@ -64,35 +64,35 @@ cond_29_case_0.i49: ; preds = %__hugr__.__tk2_sol_ __hugr__.__tk2_sol_qalloc.25.exit50: ; preds = %__hugr__.__tk2_sol_qalloc.25.exit44 tail call void @___reset(i64 %qalloc.i47) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i41, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rpp(i64 %qalloc.i41, i64 %qalloc.i47, double 0x3FF921FB54442D18, double 0.000000e+00) tail call void @___rp(i64 %qalloc.i47, double 0xBFF921FB54442D18, double 0.000000e+00) tail call void @___rp(i64 %qalloc.i41, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rz(i64 %qalloc.i41, double 0xBFF921FB54442D18) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) - %lazy_measure14 = tail call i64 @___lazy_measure(i64 %qalloc.i37) + %___future_measure14 = tail call i64 @___future_measure(i64 %qalloc.i37, i64 0) tail call void @___qfree(i64 %qalloc.i37) - %read_bool16 = tail call i1 @___read_future_bool(i64 %lazy_measure14) - tail call void @___dec_future_refcount(i64 %lazy_measure14) + %read_bool16 = tail call i1 @___read_future_bool(i64 %___future_measure14) + tail call void @___dec_future_refcount(i64 %___future_measure14) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool16) - %lazy_measure22 = tail call i64 @___lazy_measure(i64 %qalloc.i41) + %___future_measure22 = tail call i64 @___future_measure(i64 %qalloc.i41, i64 0) tail call void @___qfree(i64 %qalloc.i41) - %read_bool24 = tail call i1 @___read_future_bool(i64 %lazy_measure22) - tail call void @___dec_future_refcount(i64 %lazy_measure22) + %read_bool24 = tail call i1 @___read_future_bool(i64 %___future_measure22) + tail call void @___dec_future_refcount(i64 %___future_measure22) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool24) - %lazy_measure30 = tail call i64 @___lazy_measure(i64 %qalloc.i47) + %___future_measure30 = tail call i64 @___future_measure(i64 %qalloc.i47, i64 0) tail call void @___qfree(i64 %qalloc.i47) - %read_bool32 = tail call i1 @___read_future_bool(i64 %lazy_measure30) - tail call void @___dec_future_refcount(i64 %lazy_measure30) + %read_bool32 = tail call i1 @___read_future_bool(i64 %___future_measure30) + tail call void @___dec_future_refcount(i64 %___future_measure30) tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool32) ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[StimPlugin]/quantum_replay_quest-sol-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[StimPlugin]/quantum_replay_quest-sol-x86_64-unknown-linux-gnu.ll index d9f4c835..4f6a886c 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[StimPlugin]/quantum_replay_quest-sol-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[StimPlugin]/quantum_replay_quest-sol-x86_64-unknown-linux-gnu.ll @@ -64,35 +64,35 @@ cond_29_case_0.i49: ; preds = %__hugr__.__tk2_sol_ __hugr__.__tk2_sol_qalloc.25.exit50: ; preds = %__hugr__.__tk2_sol_qalloc.25.exit44 tail call void @___reset(i64 %qalloc.i47) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i41, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rpp(i64 %qalloc.i41, i64 %qalloc.i47, double 0x3FF921FB54442D18, double 0.000000e+00) tail call void @___rp(i64 %qalloc.i47, double 0xBFF921FB54442D18, double 0.000000e+00) tail call void @___rp(i64 %qalloc.i41, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rz(i64 %qalloc.i41, double 0xBFF921FB54442D18) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) - %lazy_measure14 = tail call i64 @___lazy_measure(i64 %qalloc.i37) + %___future_measure14 = tail call i64 @___future_measure(i64 %qalloc.i37, i64 0) tail call void @___qfree(i64 %qalloc.i37) - %read_bool16 = tail call i1 @___read_future_bool(i64 %lazy_measure14) - tail call void @___dec_future_refcount(i64 %lazy_measure14) + %read_bool16 = tail call i1 @___read_future_bool(i64 %___future_measure14) + tail call void @___dec_future_refcount(i64 %___future_measure14) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool16) - %lazy_measure22 = tail call i64 @___lazy_measure(i64 %qalloc.i41) + %___future_measure22 = tail call i64 @___future_measure(i64 %qalloc.i41, i64 0) tail call void @___qfree(i64 %qalloc.i41) - %read_bool24 = tail call i1 @___read_future_bool(i64 %lazy_measure22) - tail call void @___dec_future_refcount(i64 %lazy_measure22) + %read_bool24 = tail call i1 @___read_future_bool(i64 %___future_measure22) + tail call void @___dec_future_refcount(i64 %___future_measure22) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool24) - %lazy_measure30 = tail call i64 @___lazy_measure(i64 %qalloc.i47) + %___future_measure30 = tail call i64 @___future_measure(i64 %qalloc.i47, i64 0) tail call void @___qfree(i64 %qalloc.i47) - %read_bool32 = tail call i1 @___read_future_bool(i64 %lazy_measure30) - tail call void @___dec_future_refcount(i64 %lazy_measure30) + %read_bool32 = tail call i1 @___read_future_bool(i64 %___future_measure30) + tail call void @___dec_future_refcount(i64 %___future_measure30) tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool32) ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[StimPlugin]/quantum_replay_quest-sol-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[StimPlugin]/quantum_replay_quest-sol-x86_64-windows-gnu.ll index 26706639..742ca1f2 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[StimPlugin]/quantum_replay_quest-sol-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_replay/test_quantum_replay[StimPlugin]/quantum_replay_quest-sol-x86_64-windows-gnu.ll @@ -64,35 +64,35 @@ cond_29_case_0.i49: ; preds = %__hugr__.__tk2_sol_ __hugr__.__tk2_sol_qalloc.25.exit50: ; preds = %__hugr__.__tk2_sol_qalloc.25.exit44 tail call void @___reset(i64 %qalloc.i47) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i41, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rpp(i64 %qalloc.i41, i64 %qalloc.i47, double 0x3FF921FB54442D18, double 0.000000e+00) tail call void @___rp(i64 %qalloc.i47, double 0xBFF921FB54442D18, double 0.000000e+00) tail call void @___rp(i64 %qalloc.i41, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) tail call void @___rz(i64 %qalloc.i41, double 0xBFF921FB54442D18) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) - %lazy_measure14 = tail call i64 @___lazy_measure(i64 %qalloc.i37) + %___future_measure14 = tail call i64 @___future_measure(i64 %qalloc.i37, i64 0) tail call void @___qfree(i64 %qalloc.i37) - %read_bool16 = tail call i1 @___read_future_bool(i64 %lazy_measure14) - tail call void @___dec_future_refcount(i64 %lazy_measure14) + %read_bool16 = tail call i1 @___read_future_bool(i64 %___future_measure14) + tail call void @___dec_future_refcount(i64 %___future_measure14) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool16) - %lazy_measure22 = tail call i64 @___lazy_measure(i64 %qalloc.i41) + %___future_measure22 = tail call i64 @___future_measure(i64 %qalloc.i41, i64 0) tail call void @___qfree(i64 %qalloc.i41) - %read_bool24 = tail call i1 @___read_future_bool(i64 %lazy_measure22) - tail call void @___dec_future_refcount(i64 %lazy_measure22) + %read_bool24 = tail call i1 @___read_future_bool(i64 %___future_measure22) + tail call void @___dec_future_refcount(i64 %___future_measure22) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool24) - %lazy_measure30 = tail call i64 @___lazy_measure(i64 %qalloc.i47) + %___future_measure30 = tail call i64 @___future_measure(i64 %qalloc.i47, i64 0) tail call void @___qfree(i64 %qalloc.i47) - %read_bool32 = tail call i1 @___read_future_bool(i64 %lazy_measure30) - tail call void @___dec_future_refcount(i64 %lazy_measure30) + %read_bool32 = tail call i1 @___read_future_bool(i64 %___future_measure30) + tail call void @___dec_future_refcount(i64 %___future_measure30) tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool32) ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_replay/test_recursive_condition/recursive_condition-helios-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_replay/test_recursive_condition/recursive_condition-helios-aarch64-apple-darwin.ll index 885d99ad..2e4dcf5e 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_replay/test_recursive_condition/recursive_condition-helios-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_replay/test_recursive_condition/recursive_condition-helios-aarch64-apple-darwin.ll @@ -23,10 +23,10 @@ __hugr__.__tk2_helios_qalloc.32.exit.i: ; preds = %tailrecurse.i 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) + %___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) + %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(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool.i) br i1 %read_bool.i, label %tailrecurse.i, label %__hugr__.__main__.recursive_condition.5.exit diff --git a/selene-sim/python/tests/resources/from_guppy/test_replay/test_recursive_condition/recursive_condition-helios-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_replay/test_recursive_condition/recursive_condition-helios-aarch64-unknown-linux-gnu.ll index 18540c13..5ec13699 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_replay/test_recursive_condition/recursive_condition-helios-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_replay/test_recursive_condition/recursive_condition-helios-aarch64-unknown-linux-gnu.ll @@ -23,10 +23,10 @@ __hugr__.__tk2_helios_qalloc.32.exit.i: ; preds = %tailrecurse.i 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) + %___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) + %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(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool.i) br i1 %read_bool.i, label %tailrecurse.i, label %__hugr__.__main__.recursive_condition.5.exit diff --git a/selene-sim/python/tests/resources/from_guppy/test_replay/test_recursive_condition/recursive_condition-helios-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_replay/test_recursive_condition/recursive_condition-helios-x86_64-apple-darwin.ll index 002e9cb5..a736b389 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_replay/test_recursive_condition/recursive_condition-helios-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_replay/test_recursive_condition/recursive_condition-helios-x86_64-apple-darwin.ll @@ -23,10 +23,10 @@ __hugr__.__tk2_helios_qalloc.32.exit.i: ; preds = %tailrecurse.i 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) + %___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) + %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(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool.i) br i1 %read_bool.i, label %tailrecurse.i, label %__hugr__.__main__.recursive_condition.5.exit diff --git a/selene-sim/python/tests/resources/from_guppy/test_replay/test_recursive_condition/recursive_condition-helios-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_replay/test_recursive_condition/recursive_condition-helios-x86_64-unknown-linux-gnu.ll index 847c855e..78ec1b50 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_replay/test_recursive_condition/recursive_condition-helios-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_replay/test_recursive_condition/recursive_condition-helios-x86_64-unknown-linux-gnu.ll @@ -23,10 +23,10 @@ __hugr__.__tk2_helios_qalloc.32.exit.i: ; preds = %tailrecurse.i 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) + %___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) + %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(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool.i) br i1 %read_bool.i, label %tailrecurse.i, label %__hugr__.__main__.recursive_condition.5.exit diff --git a/selene-sim/python/tests/resources/from_guppy/test_replay/test_recursive_condition/recursive_condition-helios-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_replay/test_recursive_condition/recursive_condition-helios-x86_64-windows-gnu.ll index 4e742deb..ecd840cb 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_replay/test_recursive_condition/recursive_condition-helios-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_replay/test_recursive_condition/recursive_condition-helios-x86_64-windows-gnu.ll @@ -23,10 +23,10 @@ __hugr__.__tk2_helios_qalloc.32.exit.i: ; preds = %tailrecurse.i 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) + %___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) + %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(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool.i) br i1 %read_bool.i, label %tailrecurse.i, label %__hugr__.__main__.recursive_condition.5.exit diff --git a/selene-sim/python/tests/resources/from_guppy/test_replay/test_recursive_condition/recursive_condition-sol-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_replay/test_recursive_condition/recursive_condition-sol-aarch64-apple-darwin.ll index 9d189a77..862161a0 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_replay/test_recursive_condition/recursive_condition-sol-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_replay/test_recursive_condition/recursive_condition-sol-aarch64-apple-darwin.ll @@ -23,10 +23,10 @@ __hugr__.__tk2_sol_qalloc.32.exit.i: ; preds = %tailrecurse.i tail call void @___reset(i64 %qalloc.i.i) tail call void @___rp(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) + %___future_measure.i = tail call i64 @___future_measure(i64 %qalloc.i.i, i64 0) 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) + %read_bool.i = tail call i1 @___read_future_bool(i64 %___future_measure.i) + tail call void @___dec_future_refcount(i64 %___future_measure.i) tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool.i) br i1 %read_bool.i, label %tailrecurse.i, label %__hugr__.__main__.recursive_condition.5.exit @@ -34,7 +34,7 @@ __hugr__.__main__.recursive_condition.5.exit: ; preds = %__hugr__.__tk2_sol_ ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_replay/test_recursive_condition/recursive_condition-sol-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_replay/test_recursive_condition/recursive_condition-sol-aarch64-unknown-linux-gnu.ll index 59232e93..053ecb17 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_replay/test_recursive_condition/recursive_condition-sol-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_replay/test_recursive_condition/recursive_condition-sol-aarch64-unknown-linux-gnu.ll @@ -23,10 +23,10 @@ __hugr__.__tk2_sol_qalloc.32.exit.i: ; preds = %tailrecurse.i tail call void @___reset(i64 %qalloc.i.i) tail call void @___rp(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) + %___future_measure.i = tail call i64 @___future_measure(i64 %qalloc.i.i, i64 0) 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) + %read_bool.i = tail call i1 @___read_future_bool(i64 %___future_measure.i) + tail call void @___dec_future_refcount(i64 %___future_measure.i) tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool.i) br i1 %read_bool.i, label %tailrecurse.i, label %__hugr__.__main__.recursive_condition.5.exit @@ -34,7 +34,7 @@ __hugr__.__main__.recursive_condition.5.exit: ; preds = %__hugr__.__tk2_sol_ ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_replay/test_recursive_condition/recursive_condition-sol-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_replay/test_recursive_condition/recursive_condition-sol-x86_64-apple-darwin.ll index ce965837..3e0363c8 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_replay/test_recursive_condition/recursive_condition-sol-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_replay/test_recursive_condition/recursive_condition-sol-x86_64-apple-darwin.ll @@ -23,10 +23,10 @@ __hugr__.__tk2_sol_qalloc.32.exit.i: ; preds = %tailrecurse.i tail call void @___reset(i64 %qalloc.i.i) tail call void @___rp(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) + %___future_measure.i = tail call i64 @___future_measure(i64 %qalloc.i.i, i64 0) 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) + %read_bool.i = tail call i1 @___read_future_bool(i64 %___future_measure.i) + tail call void @___dec_future_refcount(i64 %___future_measure.i) tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool.i) br i1 %read_bool.i, label %tailrecurse.i, label %__hugr__.__main__.recursive_condition.5.exit @@ -34,7 +34,7 @@ __hugr__.__main__.recursive_condition.5.exit: ; preds = %__hugr__.__tk2_sol_ ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_replay/test_recursive_condition/recursive_condition-sol-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_replay/test_recursive_condition/recursive_condition-sol-x86_64-unknown-linux-gnu.ll index abd9db51..c3f32ec5 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_replay/test_recursive_condition/recursive_condition-sol-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_replay/test_recursive_condition/recursive_condition-sol-x86_64-unknown-linux-gnu.ll @@ -23,10 +23,10 @@ __hugr__.__tk2_sol_qalloc.32.exit.i: ; preds = %tailrecurse.i tail call void @___reset(i64 %qalloc.i.i) tail call void @___rp(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) + %___future_measure.i = tail call i64 @___future_measure(i64 %qalloc.i.i, i64 0) 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) + %read_bool.i = tail call i1 @___read_future_bool(i64 %___future_measure.i) + tail call void @___dec_future_refcount(i64 %___future_measure.i) tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool.i) br i1 %read_bool.i, label %tailrecurse.i, label %__hugr__.__main__.recursive_condition.5.exit @@ -34,7 +34,7 @@ __hugr__.__main__.recursive_condition.5.exit: ; preds = %__hugr__.__tk2_sol_ ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_replay/test_recursive_condition/recursive_condition-sol-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_replay/test_recursive_condition/recursive_condition-sol-x86_64-windows-gnu.ll index 51ca3471..da496b58 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_replay/test_recursive_condition/recursive_condition-sol-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_replay/test_recursive_condition/recursive_condition-sol-x86_64-windows-gnu.ll @@ -23,10 +23,10 @@ __hugr__.__tk2_sol_qalloc.32.exit.i: ; preds = %tailrecurse.i tail call void @___reset(i64 %qalloc.i.i) tail call void @___rp(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) + %___future_measure.i = tail call i64 @___future_measure(i64 %qalloc.i.i, i64 0) 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) + %read_bool.i = tail call i1 @___read_future_bool(i64 %___future_measure.i) + tail call void @___dec_future_refcount(i64 %___future_measure.i) tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool.i) br i1 %read_bool.i, label %tailrecurse.i, label %__hugr__.__main__.recursive_condition.5.exit @@ -34,7 +34,7 @@ __hugr__.__main__.recursive_condition.5.exit: ; preds = %__hugr__.__tk2_sol_ ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_runtimes/test_simple_vs_softrz/simple_vs_softrz-helios-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_runtimes/test_simple_vs_softrz/simple_vs_softrz-helios-aarch64-apple-darwin.ll index 952a95ee..1ec6f4d3 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_runtimes/test_simple_vs_softrz/simple_vs_softrz-helios-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_runtimes/test_simple_vs_softrz/simple_vs_softrz-helios-aarch64-apple-darwin.ll @@ -197,7 +197,7 @@ panic.i745: ; preds = %__barray_check_boun %40 = or disjoint i64 %36, 1 store i64 %40, ptr %3, align 4 %41 = load i64, ptr %2, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %41) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %41) tail call void @___qfree(i64 %41) %42 = load i64, ptr %1, align 4 %43 = trunc i64 %42 to i1 @@ -206,7 +206,7 @@ panic.i745: ; preds = %__barray_check_boun cond_exit_180: ; preds = %.thread %44 = and i64 %42, -2 store i64 %44, ptr %1, align 4 - store i64 %lazy_measure, ptr %0, align 4 + store i64 %___lazy_measure, ptr %0, align 4 %45 = load i64, ptr %3, align 4 %46 = and i64 %45, 2 %.not791 = icmp eq i64 %46, 0 @@ -216,7 +216,7 @@ cond_exit_180: ; preds = %.thread %47 = or disjoint i64 %45, 2 store i64 %47, ptr %3, align 4 %48 = load i64, ptr %10, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %48) + %___lazy_measure.1 = tail call i64 @___lazy_measure(i64 %48) tail call void @___qfree(i64 %48) %49 = load i64, ptr %1, align 4 %50 = and i64 %49, 2 @@ -227,7 +227,7 @@ __barray_check_bounds.exit744.2: ; preds = %.thread.1 %51 = and i64 %49, -3 store i64 %51, ptr %1, align 4 %52 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %lazy_measure.1, ptr %52, align 4 + store i64 %___lazy_measure.1, ptr %52, align 4 %53 = load i64, ptr %3, align 4 %54 = and i64 %53, 4 %.not793 = icmp eq i64 %54, 0 @@ -237,7 +237,7 @@ __barray_check_bounds.exit740.2: ; preds = %__barray_check_boun %55 = or disjoint i64 %53, 4 store i64 %55, ptr %3, align 4 %56 = load i64, ptr %14, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %56) + %___lazy_measure.2 = tail call i64 @___lazy_measure(i64 %56) tail call void @___qfree(i64 %56) %57 = load i64, ptr %1, align 4 %58 = and i64 %57, 4 @@ -248,7 +248,7 @@ cond_exit_180.2: ; preds = %__barray_check_boun %59 = and i64 %57, -5 store i64 %59, ptr %1, align 4 %60 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %lazy_measure.2, ptr %60, align 4 + store i64 %___lazy_measure.2, ptr %60, align 4 %61 = load i64, ptr %3, align 4 %62 = or i64 %61, -8 store i64 %62, ptr %3, align 4 diff --git a/selene-sim/python/tests/resources/from_guppy/test_runtimes/test_simple_vs_softrz/simple_vs_softrz-helios-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_runtimes/test_simple_vs_softrz/simple_vs_softrz-helios-aarch64-unknown-linux-gnu.ll index 705f268b..81ff3c55 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_runtimes/test_simple_vs_softrz/simple_vs_softrz-helios-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_runtimes/test_simple_vs_softrz/simple_vs_softrz-helios-aarch64-unknown-linux-gnu.ll @@ -197,7 +197,7 @@ panic.i745: ; preds = %__barray_check_boun %40 = or disjoint i64 %36, 1 store i64 %40, ptr %3, align 4 %41 = load i64, ptr %2, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %41) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %41) tail call void @___qfree(i64 %41) %42 = load i64, ptr %1, align 4 %43 = trunc i64 %42 to i1 @@ -206,7 +206,7 @@ panic.i745: ; preds = %__barray_check_boun cond_exit_180: ; preds = %.thread %44 = and i64 %42, -2 store i64 %44, ptr %1, align 4 - store i64 %lazy_measure, ptr %0, align 4 + store i64 %___lazy_measure, ptr %0, align 4 %45 = load i64, ptr %3, align 4 %46 = and i64 %45, 2 %.not791 = icmp eq i64 %46, 0 @@ -216,7 +216,7 @@ cond_exit_180: ; preds = %.thread %47 = or disjoint i64 %45, 2 store i64 %47, ptr %3, align 4 %48 = load i64, ptr %10, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %48) + %___lazy_measure.1 = tail call i64 @___lazy_measure(i64 %48) tail call void @___qfree(i64 %48) %49 = load i64, ptr %1, align 4 %50 = and i64 %49, 2 @@ -227,7 +227,7 @@ __barray_check_bounds.exit744.2: ; preds = %.thread.1 %51 = and i64 %49, -3 store i64 %51, ptr %1, align 4 %52 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %lazy_measure.1, ptr %52, align 4 + store i64 %___lazy_measure.1, ptr %52, align 4 %53 = load i64, ptr %3, align 4 %54 = and i64 %53, 4 %.not793 = icmp eq i64 %54, 0 @@ -237,7 +237,7 @@ __barray_check_bounds.exit740.2: ; preds = %__barray_check_boun %55 = or disjoint i64 %53, 4 store i64 %55, ptr %3, align 4 %56 = load i64, ptr %14, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %56) + %___lazy_measure.2 = tail call i64 @___lazy_measure(i64 %56) tail call void @___qfree(i64 %56) %57 = load i64, ptr %1, align 4 %58 = and i64 %57, 4 @@ -248,7 +248,7 @@ cond_exit_180.2: ; preds = %__barray_check_boun %59 = and i64 %57, -5 store i64 %59, ptr %1, align 4 %60 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %lazy_measure.2, ptr %60, align 4 + store i64 %___lazy_measure.2, ptr %60, align 4 %61 = load i64, ptr %3, align 4 %62 = or i64 %61, -8 store i64 %62, ptr %3, align 4 diff --git a/selene-sim/python/tests/resources/from_guppy/test_runtimes/test_simple_vs_softrz/simple_vs_softrz-helios-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_runtimes/test_simple_vs_softrz/simple_vs_softrz-helios-x86_64-apple-darwin.ll index 97320465..c20ff58b 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_runtimes/test_simple_vs_softrz/simple_vs_softrz-helios-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_runtimes/test_simple_vs_softrz/simple_vs_softrz-helios-x86_64-apple-darwin.ll @@ -197,7 +197,7 @@ panic.i745: ; preds = %__barray_check_boun %40 = or disjoint i64 %36, 1 store i64 %40, ptr %3, align 4 %41 = load i64, ptr %2, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %41) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %41) tail call void @___qfree(i64 %41) %42 = load i64, ptr %1, align 4 %43 = trunc i64 %42 to i1 @@ -206,7 +206,7 @@ panic.i745: ; preds = %__barray_check_boun cond_exit_180: ; preds = %.thread %44 = and i64 %42, -2 store i64 %44, ptr %1, align 4 - store i64 %lazy_measure, ptr %0, align 4 + store i64 %___lazy_measure, ptr %0, align 4 %45 = load i64, ptr %3, align 4 %46 = and i64 %45, 2 %.not791 = icmp eq i64 %46, 0 @@ -216,7 +216,7 @@ cond_exit_180: ; preds = %.thread %47 = or disjoint i64 %45, 2 store i64 %47, ptr %3, align 4 %48 = load i64, ptr %10, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %48) + %___lazy_measure.1 = tail call i64 @___lazy_measure(i64 %48) tail call void @___qfree(i64 %48) %49 = load i64, ptr %1, align 4 %50 = and i64 %49, 2 @@ -227,7 +227,7 @@ __barray_check_bounds.exit744.2: ; preds = %.thread.1 %51 = and i64 %49, -3 store i64 %51, ptr %1, align 4 %52 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %lazy_measure.1, ptr %52, align 4 + store i64 %___lazy_measure.1, ptr %52, align 4 %53 = load i64, ptr %3, align 4 %54 = and i64 %53, 4 %.not793 = icmp eq i64 %54, 0 @@ -237,7 +237,7 @@ __barray_check_bounds.exit740.2: ; preds = %__barray_check_boun %55 = or disjoint i64 %53, 4 store i64 %55, ptr %3, align 4 %56 = load i64, ptr %14, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %56) + %___lazy_measure.2 = tail call i64 @___lazy_measure(i64 %56) tail call void @___qfree(i64 %56) %57 = load i64, ptr %1, align 4 %58 = and i64 %57, 4 @@ -248,7 +248,7 @@ cond_exit_180.2: ; preds = %__barray_check_boun %59 = and i64 %57, -5 store i64 %59, ptr %1, align 4 %60 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %lazy_measure.2, ptr %60, align 4 + store i64 %___lazy_measure.2, ptr %60, align 4 %61 = load i64, ptr %3, align 4 %62 = or i64 %61, -8 store i64 %62, ptr %3, align 4 diff --git a/selene-sim/python/tests/resources/from_guppy/test_runtimes/test_simple_vs_softrz/simple_vs_softrz-helios-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_runtimes/test_simple_vs_softrz/simple_vs_softrz-helios-x86_64-unknown-linux-gnu.ll index 542c8a00..23439b52 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_runtimes/test_simple_vs_softrz/simple_vs_softrz-helios-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_runtimes/test_simple_vs_softrz/simple_vs_softrz-helios-x86_64-unknown-linux-gnu.ll @@ -197,7 +197,7 @@ panic.i745: ; preds = %__barray_check_boun %40 = or disjoint i64 %36, 1 store i64 %40, ptr %3, align 4 %41 = load i64, ptr %2, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %41) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %41) tail call void @___qfree(i64 %41) %42 = load i64, ptr %1, align 4 %43 = trunc i64 %42 to i1 @@ -206,7 +206,7 @@ panic.i745: ; preds = %__barray_check_boun cond_exit_180: ; preds = %.thread %44 = and i64 %42, -2 store i64 %44, ptr %1, align 4 - store i64 %lazy_measure, ptr %0, align 4 + store i64 %___lazy_measure, ptr %0, align 4 %45 = load i64, ptr %3, align 4 %46 = and i64 %45, 2 %.not791 = icmp eq i64 %46, 0 @@ -216,7 +216,7 @@ cond_exit_180: ; preds = %.thread %47 = or disjoint i64 %45, 2 store i64 %47, ptr %3, align 4 %48 = load i64, ptr %10, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %48) + %___lazy_measure.1 = tail call i64 @___lazy_measure(i64 %48) tail call void @___qfree(i64 %48) %49 = load i64, ptr %1, align 4 %50 = and i64 %49, 2 @@ -227,7 +227,7 @@ __barray_check_bounds.exit744.2: ; preds = %.thread.1 %51 = and i64 %49, -3 store i64 %51, ptr %1, align 4 %52 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %lazy_measure.1, ptr %52, align 4 + store i64 %___lazy_measure.1, ptr %52, align 4 %53 = load i64, ptr %3, align 4 %54 = and i64 %53, 4 %.not793 = icmp eq i64 %54, 0 @@ -237,7 +237,7 @@ __barray_check_bounds.exit740.2: ; preds = %__barray_check_boun %55 = or disjoint i64 %53, 4 store i64 %55, ptr %3, align 4 %56 = load i64, ptr %14, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %56) + %___lazy_measure.2 = tail call i64 @___lazy_measure(i64 %56) tail call void @___qfree(i64 %56) %57 = load i64, ptr %1, align 4 %58 = and i64 %57, 4 @@ -248,7 +248,7 @@ cond_exit_180.2: ; preds = %__barray_check_boun %59 = and i64 %57, -5 store i64 %59, ptr %1, align 4 %60 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %lazy_measure.2, ptr %60, align 4 + store i64 %___lazy_measure.2, ptr %60, align 4 %61 = load i64, ptr %3, align 4 %62 = or i64 %61, -8 store i64 %62, ptr %3, align 4 diff --git a/selene-sim/python/tests/resources/from_guppy/test_runtimes/test_simple_vs_softrz/simple_vs_softrz-helios-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_runtimes/test_simple_vs_softrz/simple_vs_softrz-helios-x86_64-windows-gnu.ll index c7521058..3250aada 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_runtimes/test_simple_vs_softrz/simple_vs_softrz-helios-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_runtimes/test_simple_vs_softrz/simple_vs_softrz-helios-x86_64-windows-gnu.ll @@ -197,7 +197,7 @@ panic.i745: ; preds = %__barray_check_boun %40 = or disjoint i64 %36, 1 store i64 %40, ptr %3, align 4 %41 = load i64, ptr %2, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %41) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %41) tail call void @___qfree(i64 %41) %42 = load i64, ptr %1, align 4 %43 = trunc i64 %42 to i1 @@ -206,7 +206,7 @@ panic.i745: ; preds = %__barray_check_boun cond_exit_180: ; preds = %.thread %44 = and i64 %42, -2 store i64 %44, ptr %1, align 4 - store i64 %lazy_measure, ptr %0, align 4 + store i64 %___lazy_measure, ptr %0, align 4 %45 = load i64, ptr %3, align 4 %46 = and i64 %45, 2 %.not791 = icmp eq i64 %46, 0 @@ -216,7 +216,7 @@ cond_exit_180: ; preds = %.thread %47 = or disjoint i64 %45, 2 store i64 %47, ptr %3, align 4 %48 = load i64, ptr %10, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %48) + %___lazy_measure.1 = tail call i64 @___lazy_measure(i64 %48) tail call void @___qfree(i64 %48) %49 = load i64, ptr %1, align 4 %50 = and i64 %49, 2 @@ -227,7 +227,7 @@ __barray_check_bounds.exit744.2: ; preds = %.thread.1 %51 = and i64 %49, -3 store i64 %51, ptr %1, align 4 %52 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %lazy_measure.1, ptr %52, align 4 + store i64 %___lazy_measure.1, ptr %52, align 4 %53 = load i64, ptr %3, align 4 %54 = and i64 %53, 4 %.not793 = icmp eq i64 %54, 0 @@ -237,7 +237,7 @@ __barray_check_bounds.exit740.2: ; preds = %__barray_check_boun %55 = or disjoint i64 %53, 4 store i64 %55, ptr %3, align 4 %56 = load i64, ptr %14, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %56) + %___lazy_measure.2 = tail call i64 @___lazy_measure(i64 %56) tail call void @___qfree(i64 %56) %57 = load i64, ptr %1, align 4 %58 = and i64 %57, 4 @@ -248,7 +248,7 @@ cond_exit_180.2: ; preds = %__barray_check_boun %59 = and i64 %57, -5 store i64 %59, ptr %1, align 4 %60 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %lazy_measure.2, ptr %60, align 4 + store i64 %___lazy_measure.2, ptr %60, align 4 %61 = load i64, ptr %3, align 4 %62 = or i64 %61, -8 store i64 %62, ptr %3, align 4 diff --git a/selene-sim/python/tests/resources/from_guppy/test_runtimes/test_simple_vs_softrz/simple_vs_softrz-sol-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_runtimes/test_simple_vs_softrz/simple_vs_softrz-sol-aarch64-apple-darwin.ll index 2c122470..6e66a847 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_runtimes/test_simple_vs_softrz/simple_vs_softrz-sol-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_runtimes/test_simple_vs_softrz/simple_vs_softrz-sol-aarch64-apple-darwin.ll @@ -197,7 +197,7 @@ panic.i745: ; preds = %__barray_check_boun %40 = or disjoint i64 %36, 1 store i64 %40, ptr %3, align 4 %41 = load i64, ptr %2, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %41) + %___future_measure = tail call i64 @___future_measure(i64 %41, i64 0) tail call void @___qfree(i64 %41) %42 = load i64, ptr %1, align 4 %43 = trunc i64 %42 to i1 @@ -206,7 +206,7 @@ panic.i745: ; preds = %__barray_check_boun cond_exit_180: ; preds = %.thread %44 = and i64 %42, -2 store i64 %44, ptr %1, align 4 - store i64 %lazy_measure, ptr %0, align 4 + store i64 %___future_measure, ptr %0, align 4 %45 = load i64, ptr %3, align 4 %46 = and i64 %45, 2 %.not791 = icmp eq i64 %46, 0 @@ -216,7 +216,7 @@ cond_exit_180: ; preds = %.thread %47 = or disjoint i64 %45, 2 store i64 %47, ptr %3, align 4 %48 = load i64, ptr %10, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %48) + %___future_measure.1 = tail call i64 @___future_measure(i64 %48, i64 0) tail call void @___qfree(i64 %48) %49 = load i64, ptr %1, align 4 %50 = and i64 %49, 2 @@ -227,7 +227,7 @@ __barray_check_bounds.exit744.2: ; preds = %.thread.1 %51 = and i64 %49, -3 store i64 %51, ptr %1, align 4 %52 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %lazy_measure.1, ptr %52, align 4 + store i64 %___future_measure.1, ptr %52, align 4 %53 = load i64, ptr %3, align 4 %54 = and i64 %53, 4 %.not793 = icmp eq i64 %54, 0 @@ -237,7 +237,7 @@ __barray_check_bounds.exit740.2: ; preds = %__barray_check_boun %55 = or disjoint i64 %53, 4 store i64 %55, ptr %3, align 4 %56 = load i64, ptr %14, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %56) + %___future_measure.2 = tail call i64 @___future_measure(i64 %56, i64 0) tail call void @___qfree(i64 %56) %57 = load i64, ptr %1, align 4 %58 = and i64 %57, 4 @@ -248,7 +248,7 @@ cond_exit_180.2: ; preds = %__barray_check_boun %59 = and i64 %57, -5 store i64 %59, ptr %1, align 4 %60 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %lazy_measure.2, ptr %60, align 4 + store i64 %___future_measure.2, ptr %60, align 4 %61 = load i64, ptr %3, align 4 %62 = or i64 %61, -8 store i64 %62, ptr %3, align 4 @@ -402,7 +402,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_runtimes/test_simple_vs_softrz/simple_vs_softrz-sol-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_runtimes/test_simple_vs_softrz/simple_vs_softrz-sol-aarch64-unknown-linux-gnu.ll index b00fa7e2..17019fde 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_runtimes/test_simple_vs_softrz/simple_vs_softrz-sol-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_runtimes/test_simple_vs_softrz/simple_vs_softrz-sol-aarch64-unknown-linux-gnu.ll @@ -197,7 +197,7 @@ panic.i745: ; preds = %__barray_check_boun %40 = or disjoint i64 %36, 1 store i64 %40, ptr %3, align 4 %41 = load i64, ptr %2, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %41) + %___future_measure = tail call i64 @___future_measure(i64 %41, i64 0) tail call void @___qfree(i64 %41) %42 = load i64, ptr %1, align 4 %43 = trunc i64 %42 to i1 @@ -206,7 +206,7 @@ panic.i745: ; preds = %__barray_check_boun cond_exit_180: ; preds = %.thread %44 = and i64 %42, -2 store i64 %44, ptr %1, align 4 - store i64 %lazy_measure, ptr %0, align 4 + store i64 %___future_measure, ptr %0, align 4 %45 = load i64, ptr %3, align 4 %46 = and i64 %45, 2 %.not791 = icmp eq i64 %46, 0 @@ -216,7 +216,7 @@ cond_exit_180: ; preds = %.thread %47 = or disjoint i64 %45, 2 store i64 %47, ptr %3, align 4 %48 = load i64, ptr %10, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %48) + %___future_measure.1 = tail call i64 @___future_measure(i64 %48, i64 0) tail call void @___qfree(i64 %48) %49 = load i64, ptr %1, align 4 %50 = and i64 %49, 2 @@ -227,7 +227,7 @@ __barray_check_bounds.exit744.2: ; preds = %.thread.1 %51 = and i64 %49, -3 store i64 %51, ptr %1, align 4 %52 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %lazy_measure.1, ptr %52, align 4 + store i64 %___future_measure.1, ptr %52, align 4 %53 = load i64, ptr %3, align 4 %54 = and i64 %53, 4 %.not793 = icmp eq i64 %54, 0 @@ -237,7 +237,7 @@ __barray_check_bounds.exit740.2: ; preds = %__barray_check_boun %55 = or disjoint i64 %53, 4 store i64 %55, ptr %3, align 4 %56 = load i64, ptr %14, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %56) + %___future_measure.2 = tail call i64 @___future_measure(i64 %56, i64 0) tail call void @___qfree(i64 %56) %57 = load i64, ptr %1, align 4 %58 = and i64 %57, 4 @@ -248,7 +248,7 @@ cond_exit_180.2: ; preds = %__barray_check_boun %59 = and i64 %57, -5 store i64 %59, ptr %1, align 4 %60 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %lazy_measure.2, ptr %60, align 4 + store i64 %___future_measure.2, ptr %60, align 4 %61 = load i64, ptr %3, align 4 %62 = or i64 %61, -8 store i64 %62, ptr %3, align 4 @@ -402,7 +402,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_runtimes/test_simple_vs_softrz/simple_vs_softrz-sol-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_runtimes/test_simple_vs_softrz/simple_vs_softrz-sol-x86_64-apple-darwin.ll index 886411db..daeb06c8 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_runtimes/test_simple_vs_softrz/simple_vs_softrz-sol-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_runtimes/test_simple_vs_softrz/simple_vs_softrz-sol-x86_64-apple-darwin.ll @@ -197,7 +197,7 @@ panic.i745: ; preds = %__barray_check_boun %40 = or disjoint i64 %36, 1 store i64 %40, ptr %3, align 4 %41 = load i64, ptr %2, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %41) + %___future_measure = tail call i64 @___future_measure(i64 %41, i64 0) tail call void @___qfree(i64 %41) %42 = load i64, ptr %1, align 4 %43 = trunc i64 %42 to i1 @@ -206,7 +206,7 @@ panic.i745: ; preds = %__barray_check_boun cond_exit_180: ; preds = %.thread %44 = and i64 %42, -2 store i64 %44, ptr %1, align 4 - store i64 %lazy_measure, ptr %0, align 4 + store i64 %___future_measure, ptr %0, align 4 %45 = load i64, ptr %3, align 4 %46 = and i64 %45, 2 %.not791 = icmp eq i64 %46, 0 @@ -216,7 +216,7 @@ cond_exit_180: ; preds = %.thread %47 = or disjoint i64 %45, 2 store i64 %47, ptr %3, align 4 %48 = load i64, ptr %10, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %48) + %___future_measure.1 = tail call i64 @___future_measure(i64 %48, i64 0) tail call void @___qfree(i64 %48) %49 = load i64, ptr %1, align 4 %50 = and i64 %49, 2 @@ -227,7 +227,7 @@ __barray_check_bounds.exit744.2: ; preds = %.thread.1 %51 = and i64 %49, -3 store i64 %51, ptr %1, align 4 %52 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %lazy_measure.1, ptr %52, align 4 + store i64 %___future_measure.1, ptr %52, align 4 %53 = load i64, ptr %3, align 4 %54 = and i64 %53, 4 %.not793 = icmp eq i64 %54, 0 @@ -237,7 +237,7 @@ __barray_check_bounds.exit740.2: ; preds = %__barray_check_boun %55 = or disjoint i64 %53, 4 store i64 %55, ptr %3, align 4 %56 = load i64, ptr %14, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %56) + %___future_measure.2 = tail call i64 @___future_measure(i64 %56, i64 0) tail call void @___qfree(i64 %56) %57 = load i64, ptr %1, align 4 %58 = and i64 %57, 4 @@ -248,7 +248,7 @@ cond_exit_180.2: ; preds = %__barray_check_boun %59 = and i64 %57, -5 store i64 %59, ptr %1, align 4 %60 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %lazy_measure.2, ptr %60, align 4 + store i64 %___future_measure.2, ptr %60, align 4 %61 = load i64, ptr %3, align 4 %62 = or i64 %61, -8 store i64 %62, ptr %3, align 4 @@ -402,7 +402,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_runtimes/test_simple_vs_softrz/simple_vs_softrz-sol-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_runtimes/test_simple_vs_softrz/simple_vs_softrz-sol-x86_64-unknown-linux-gnu.ll index a5ba3bc7..7c4f3de7 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_runtimes/test_simple_vs_softrz/simple_vs_softrz-sol-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_runtimes/test_simple_vs_softrz/simple_vs_softrz-sol-x86_64-unknown-linux-gnu.ll @@ -197,7 +197,7 @@ panic.i745: ; preds = %__barray_check_boun %40 = or disjoint i64 %36, 1 store i64 %40, ptr %3, align 4 %41 = load i64, ptr %2, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %41) + %___future_measure = tail call i64 @___future_measure(i64 %41, i64 0) tail call void @___qfree(i64 %41) %42 = load i64, ptr %1, align 4 %43 = trunc i64 %42 to i1 @@ -206,7 +206,7 @@ panic.i745: ; preds = %__barray_check_boun cond_exit_180: ; preds = %.thread %44 = and i64 %42, -2 store i64 %44, ptr %1, align 4 - store i64 %lazy_measure, ptr %0, align 4 + store i64 %___future_measure, ptr %0, align 4 %45 = load i64, ptr %3, align 4 %46 = and i64 %45, 2 %.not791 = icmp eq i64 %46, 0 @@ -216,7 +216,7 @@ cond_exit_180: ; preds = %.thread %47 = or disjoint i64 %45, 2 store i64 %47, ptr %3, align 4 %48 = load i64, ptr %10, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %48) + %___future_measure.1 = tail call i64 @___future_measure(i64 %48, i64 0) tail call void @___qfree(i64 %48) %49 = load i64, ptr %1, align 4 %50 = and i64 %49, 2 @@ -227,7 +227,7 @@ __barray_check_bounds.exit744.2: ; preds = %.thread.1 %51 = and i64 %49, -3 store i64 %51, ptr %1, align 4 %52 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %lazy_measure.1, ptr %52, align 4 + store i64 %___future_measure.1, ptr %52, align 4 %53 = load i64, ptr %3, align 4 %54 = and i64 %53, 4 %.not793 = icmp eq i64 %54, 0 @@ -237,7 +237,7 @@ __barray_check_bounds.exit740.2: ; preds = %__barray_check_boun %55 = or disjoint i64 %53, 4 store i64 %55, ptr %3, align 4 %56 = load i64, ptr %14, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %56) + %___future_measure.2 = tail call i64 @___future_measure(i64 %56, i64 0) tail call void @___qfree(i64 %56) %57 = load i64, ptr %1, align 4 %58 = and i64 %57, 4 @@ -248,7 +248,7 @@ cond_exit_180.2: ; preds = %__barray_check_boun %59 = and i64 %57, -5 store i64 %59, ptr %1, align 4 %60 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %lazy_measure.2, ptr %60, align 4 + store i64 %___future_measure.2, ptr %60, align 4 %61 = load i64, ptr %3, align 4 %62 = or i64 %61, -8 store i64 %62, ptr %3, align 4 @@ -402,7 +402,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_runtimes/test_simple_vs_softrz/simple_vs_softrz-sol-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_runtimes/test_simple_vs_softrz/simple_vs_softrz-sol-x86_64-windows-gnu.ll index 3d5952d0..1e4fd1f9 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_runtimes/test_simple_vs_softrz/simple_vs_softrz-sol-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_runtimes/test_simple_vs_softrz/simple_vs_softrz-sol-x86_64-windows-gnu.ll @@ -197,7 +197,7 @@ panic.i745: ; preds = %__barray_check_boun %40 = or disjoint i64 %36, 1 store i64 %40, ptr %3, align 4 %41 = load i64, ptr %2, align 4 - %lazy_measure = tail call i64 @___lazy_measure(i64 %41) + %___future_measure = tail call i64 @___future_measure(i64 %41, i64 0) tail call void @___qfree(i64 %41) %42 = load i64, ptr %1, align 4 %43 = trunc i64 %42 to i1 @@ -206,7 +206,7 @@ panic.i745: ; preds = %__barray_check_boun cond_exit_180: ; preds = %.thread %44 = and i64 %42, -2 store i64 %44, ptr %1, align 4 - store i64 %lazy_measure, ptr %0, align 4 + store i64 %___future_measure, ptr %0, align 4 %45 = load i64, ptr %3, align 4 %46 = and i64 %45, 2 %.not791 = icmp eq i64 %46, 0 @@ -216,7 +216,7 @@ cond_exit_180: ; preds = %.thread %47 = or disjoint i64 %45, 2 store i64 %47, ptr %3, align 4 %48 = load i64, ptr %10, align 4 - %lazy_measure.1 = tail call i64 @___lazy_measure(i64 %48) + %___future_measure.1 = tail call i64 @___future_measure(i64 %48, i64 0) tail call void @___qfree(i64 %48) %49 = load i64, ptr %1, align 4 %50 = and i64 %49, 2 @@ -227,7 +227,7 @@ __barray_check_bounds.exit744.2: ; preds = %.thread.1 %51 = and i64 %49, -3 store i64 %51, ptr %1, align 4 %52 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %lazy_measure.1, ptr %52, align 4 + store i64 %___future_measure.1, ptr %52, align 4 %53 = load i64, ptr %3, align 4 %54 = and i64 %53, 4 %.not793 = icmp eq i64 %54, 0 @@ -237,7 +237,7 @@ __barray_check_bounds.exit740.2: ; preds = %__barray_check_boun %55 = or disjoint i64 %53, 4 store i64 %55, ptr %3, align 4 %56 = load i64, ptr %14, align 4 - %lazy_measure.2 = tail call i64 @___lazy_measure(i64 %56) + %___future_measure.2 = tail call i64 @___future_measure(i64 %56, i64 0) tail call void @___qfree(i64 %56) %57 = load i64, ptr %1, align 4 %58 = and i64 %57, 4 @@ -248,7 +248,7 @@ cond_exit_180.2: ; preds = %__barray_check_boun %59 = and i64 %57, -5 store i64 %59, ptr %1, align 4 %60 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %lazy_measure.2, ptr %60, align 4 + store i64 %___future_measure.2, ptr %60, align 4 %61 = load i64, ptr %3, align 4 %62 = or i64 %61, -8 store i64 %62, ptr %3, align 4 @@ -402,7 +402,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_timeout/test_timeout/non_terminating_with_results-helios-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_timeout/test_timeout/non_terminating_with_results-helios-aarch64-apple-darwin.ll index a47b5a2e..7905528a 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_timeout/test_timeout/non_terminating_with_results-helios-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_timeout/test_timeout/non_terminating_with_results-helios-aarch64-apple-darwin.ll @@ -22,10 +22,10 @@ __hugr__.__tk2_helios_qalloc.16.exit: ; preds = %alloca_block, %__hu tail call void @___reset(i64 %qalloc.i10) tail call void @___rxy(i64 %qalloc.i10, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i10, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i10) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i10) tail call void @___qfree(i64 %qalloc.i10) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_r.F13F95F2.0, i64 11, i1 %read_bool) %qalloc.i = tail call i64 @___qalloc() %not_max.not.not.i = icmp eq i64 %qalloc.i, -1 diff --git a/selene-sim/python/tests/resources/from_guppy/test_timeout/test_timeout/non_terminating_with_results-helios-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_timeout/test_timeout/non_terminating_with_results-helios-aarch64-unknown-linux-gnu.ll index 42cfcc76..ea1bad78 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_timeout/test_timeout/non_terminating_with_results-helios-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_timeout/test_timeout/non_terminating_with_results-helios-aarch64-unknown-linux-gnu.ll @@ -22,10 +22,10 @@ __hugr__.__tk2_helios_qalloc.16.exit: ; preds = %alloca_block, %__hu tail call void @___reset(i64 %qalloc.i10) tail call void @___rxy(i64 %qalloc.i10, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i10, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i10) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i10) tail call void @___qfree(i64 %qalloc.i10) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_r.F13F95F2.0, i64 11, i1 %read_bool) %qalloc.i = tail call i64 @___qalloc() %not_max.not.not.i = icmp eq i64 %qalloc.i, -1 diff --git a/selene-sim/python/tests/resources/from_guppy/test_timeout/test_timeout/non_terminating_with_results-helios-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_timeout/test_timeout/non_terminating_with_results-helios-x86_64-apple-darwin.ll index dc0cedda..c2c93745 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_timeout/test_timeout/non_terminating_with_results-helios-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_timeout/test_timeout/non_terminating_with_results-helios-x86_64-apple-darwin.ll @@ -22,10 +22,10 @@ __hugr__.__tk2_helios_qalloc.16.exit: ; preds = %alloca_block, %__hu tail call void @___reset(i64 %qalloc.i10) tail call void @___rxy(i64 %qalloc.i10, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i10, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i10) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i10) tail call void @___qfree(i64 %qalloc.i10) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_r.F13F95F2.0, i64 11, i1 %read_bool) %qalloc.i = tail call i64 @___qalloc() %not_max.not.not.i = icmp eq i64 %qalloc.i, -1 diff --git a/selene-sim/python/tests/resources/from_guppy/test_timeout/test_timeout/non_terminating_with_results-helios-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_timeout/test_timeout/non_terminating_with_results-helios-x86_64-unknown-linux-gnu.ll index 71be0d68..9f253f7b 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_timeout/test_timeout/non_terminating_with_results-helios-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_timeout/test_timeout/non_terminating_with_results-helios-x86_64-unknown-linux-gnu.ll @@ -22,10 +22,10 @@ __hugr__.__tk2_helios_qalloc.16.exit: ; preds = %alloca_block, %__hu tail call void @___reset(i64 %qalloc.i10) tail call void @___rxy(i64 %qalloc.i10, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i10, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i10) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i10) tail call void @___qfree(i64 %qalloc.i10) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_r.F13F95F2.0, i64 11, i1 %read_bool) %qalloc.i = tail call i64 @___qalloc() %not_max.not.not.i = icmp eq i64 %qalloc.i, -1 diff --git a/selene-sim/python/tests/resources/from_guppy/test_timeout/test_timeout/non_terminating_with_results-helios-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_timeout/test_timeout/non_terminating_with_results-helios-x86_64-windows-gnu.ll index d010367f..d970c3ec 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_timeout/test_timeout/non_terminating_with_results-helios-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_timeout/test_timeout/non_terminating_with_results-helios-x86_64-windows-gnu.ll @@ -22,10 +22,10 @@ __hugr__.__tk2_helios_qalloc.16.exit: ; preds = %alloca_block, %__hu tail call void @___reset(i64 %qalloc.i10) tail call void @___rxy(i64 %qalloc.i10, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i10, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i10) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i10) tail call void @___qfree(i64 %qalloc.i10) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_r.F13F95F2.0, i64 11, i1 %read_bool) %qalloc.i = tail call i64 @___qalloc() %not_max.not.not.i = icmp eq i64 %qalloc.i, -1 diff --git a/selene-sim/python/tests/resources/from_guppy/test_timeout/test_timeout/non_terminating_with_results-sol-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_timeout/test_timeout/non_terminating_with_results-sol-aarch64-apple-darwin.ll index eeca75f5..d45395b2 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_timeout/test_timeout/non_terminating_with_results-sol-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_timeout/test_timeout/non_terminating_with_results-sol-aarch64-apple-darwin.ll @@ -22,17 +22,17 @@ __hugr__.__tk2_sol_qalloc.16.exit: ; preds = %alloca_block, %__hu tail call void @___reset(i64 %qalloc.i10) tail call void @___rp(i64 %qalloc.i10, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i10, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i10) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i10, i64 0) tail call void @___qfree(i64 %qalloc.i10) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_r.F13F95F2.0, i64 11, i1 %read_bool) %qalloc.i = tail call i64 @___qalloc() %not_max.not.not.i = icmp eq i64 %qalloc.i, -1 br i1 %not_max.not.not.i, label %cond_20_case_0.i, label %__hugr__.__tk2_sol_qalloc.16.exit } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_timeout/test_timeout/non_terminating_with_results-sol-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_timeout/test_timeout/non_terminating_with_results-sol-aarch64-unknown-linux-gnu.ll index 3364ed5e..2bb5d457 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_timeout/test_timeout/non_terminating_with_results-sol-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_timeout/test_timeout/non_terminating_with_results-sol-aarch64-unknown-linux-gnu.ll @@ -22,17 +22,17 @@ __hugr__.__tk2_sol_qalloc.16.exit: ; preds = %alloca_block, %__hu tail call void @___reset(i64 %qalloc.i10) tail call void @___rp(i64 %qalloc.i10, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i10, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i10) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i10, i64 0) tail call void @___qfree(i64 %qalloc.i10) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_r.F13F95F2.0, i64 11, i1 %read_bool) %qalloc.i = tail call i64 @___qalloc() %not_max.not.not.i = icmp eq i64 %qalloc.i, -1 br i1 %not_max.not.not.i, label %cond_20_case_0.i, label %__hugr__.__tk2_sol_qalloc.16.exit } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_timeout/test_timeout/non_terminating_with_results-sol-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_timeout/test_timeout/non_terminating_with_results-sol-x86_64-apple-darwin.ll index bd9e68a5..696374ca 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_timeout/test_timeout/non_terminating_with_results-sol-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_timeout/test_timeout/non_terminating_with_results-sol-x86_64-apple-darwin.ll @@ -22,17 +22,17 @@ __hugr__.__tk2_sol_qalloc.16.exit: ; preds = %alloca_block, %__hu tail call void @___reset(i64 %qalloc.i10) tail call void @___rp(i64 %qalloc.i10, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i10, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i10) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i10, i64 0) tail call void @___qfree(i64 %qalloc.i10) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_r.F13F95F2.0, i64 11, i1 %read_bool) %qalloc.i = tail call i64 @___qalloc() %not_max.not.not.i = icmp eq i64 %qalloc.i, -1 br i1 %not_max.not.not.i, label %cond_20_case_0.i, label %__hugr__.__tk2_sol_qalloc.16.exit } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_timeout/test_timeout/non_terminating_with_results-sol-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_timeout/test_timeout/non_terminating_with_results-sol-x86_64-unknown-linux-gnu.ll index a32c01cc..b5240428 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_timeout/test_timeout/non_terminating_with_results-sol-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_timeout/test_timeout/non_terminating_with_results-sol-x86_64-unknown-linux-gnu.ll @@ -22,17 +22,17 @@ __hugr__.__tk2_sol_qalloc.16.exit: ; preds = %alloca_block, %__hu tail call void @___reset(i64 %qalloc.i10) tail call void @___rp(i64 %qalloc.i10, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i10, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i10) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i10, i64 0) tail call void @___qfree(i64 %qalloc.i10) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_r.F13F95F2.0, i64 11, i1 %read_bool) %qalloc.i = tail call i64 @___qalloc() %not_max.not.not.i = icmp eq i64 %qalloc.i, -1 br i1 %not_max.not.not.i, label %cond_20_case_0.i, label %__hugr__.__tk2_sol_qalloc.16.exit } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_timeout/test_timeout/non_terminating_with_results-sol-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_timeout/test_timeout/non_terminating_with_results-sol-x86_64-windows-gnu.ll index 7c30514a..b791beee 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_timeout/test_timeout/non_terminating_with_results-sol-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_timeout/test_timeout/non_terminating_with_results-sol-x86_64-windows-gnu.ll @@ -22,17 +22,17 @@ __hugr__.__tk2_sol_qalloc.16.exit: ; preds = %alloca_block, %__hu tail call void @___reset(i64 %qalloc.i10) tail call void @___rp(i64 %qalloc.i10, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i10, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i10) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i10, i64 0) tail call void @___qfree(i64 %qalloc.i10) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_r.F13F95F2.0, i64 11, i1 %read_bool) %qalloc.i = tail call i64 @___qalloc() %not_max.not.not.i = icmp eq i64 %qalloc.i, -1 br i1 %not_max.not.not.i, label %cond_20_case_0.i, label %__hugr__.__tk2_sol_qalloc.16.exit } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace/trace_test-helios-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace/trace_test-helios-aarch64-apple-darwin.ll deleted file mode 100644 index 345fa847..00000000 --- a/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace/trace_test-helios-aarch64-apple-darwin.ll +++ /dev/null @@ -1,647 +0,0 @@ -; ModuleID = 'hugr' -source_filename = "hugr" -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_Index out .DD115165.0" = private constant [29 x i8] c"\1CEXIT:INT:Index out of bounds" -@"e_Array alre.5A300C2A.0" = private constant [57 x i8] c"8EXIT:INT:Array already contains an element at this index" -@"e_Array elem.E746B1A3.0" = private constant [43 x i8] c"*EXIT:INT:Array element is already borrowed" -@"e_Array cont.EFA5AC45.0" = private constant [70 x i8] c"EEXIT:INT:Array contains non-borrowed elements and cannot be discarded" -@"e_Some array.A77EF32E.0" = private constant [48 x i8] c"/EXIT:INT:Some array elements have been borrowed" -@res_outcomes.9CB6D2E7.0 = private constant [22 x i8] c"\15USER:BOOLARR:outcomes" -@"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." - -define void @__hugr__.__main__.main.1() local_unnamed_addr { -alloca_block: - %0 = tail call ptr @heap_alloc(i64 10) - %1 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %1, align 1 - %2 = tail call ptr @heap_alloc(i64 80) - %3 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %3, align 1 - %4 = tail call ptr @heap_alloc(i64 80) - %5 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %5, align 1 - %qalloc.i = tail call i64 @___qalloc() - %not_max.not.not.i = icmp eq i64 %qalloc.i, -1 - br i1 %not_max.not.not.i, label %cond_442_case_0.i, label %__hugr__.__tk2_helios_qalloc.438.exit - -cond_442_case_0.i: ; preds = %cond_exit_12.8, %cond_exit_12.7, %cond_exit_12.6, %cond_exit_12.5, %cond_exit_12.4, %cond_exit_12.3, %cond_exit_12.2, %cond_exit_12.1, %cond_exit_12, %alloca_block - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_helios_qalloc.438.exit: ; preds = %alloca_block - tail call void @___reset(i64 %qalloc.i) - %6 = load i64, ptr %5, align 4 - %7 = trunc i64 %6 to i1 - br i1 %7, label %cond_exit_12, label %panic.i - -panic.i: ; preds = %__barray_check_bounds.exit.9, %__hugr__.__tk2_helios_qalloc.438.exit.8, %__hugr__.__tk2_helios_qalloc.438.exit.7, %__hugr__.__tk2_helios_qalloc.438.exit.6, %__hugr__.__tk2_helios_qalloc.438.exit.5, %__hugr__.__tk2_helios_qalloc.438.exit.4, %__hugr__.__tk2_helios_qalloc.438.exit.3, %__hugr__.__tk2_helios_qalloc.438.exit.2, %__hugr__.__tk2_helios_qalloc.438.exit.1, %__hugr__.__tk2_helios_qalloc.438.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -cond_exit_12: ; preds = %__hugr__.__tk2_helios_qalloc.438.exit - %8 = and i64 %6, -2 - store i64 %8, ptr %5, align 4 - store i64 %qalloc.i, ptr %4, align 4 - %qalloc.i.1 = tail call i64 @___qalloc() - %not_max.not.not.i.1 = icmp eq i64 %qalloc.i.1, -1 - br i1 %not_max.not.not.i.1, label %cond_442_case_0.i, label %__hugr__.__tk2_helios_qalloc.438.exit.1 - -__hugr__.__tk2_helios_qalloc.438.exit.1: ; preds = %cond_exit_12 - tail call void @___reset(i64 %qalloc.i.1) - %9 = load i64, ptr %5, align 4 - %10 = and i64 %9, 2 - %.not = icmp eq i64 %10, 0 - br i1 %.not, label %panic.i, label %cond_exit_12.1 - -cond_exit_12.1: ; preds = %__hugr__.__tk2_helios_qalloc.438.exit.1 - %11 = and i64 %9, -3 - store i64 %11, ptr %5, align 4 - %12 = getelementptr inbounds nuw i8, ptr %4, i64 8 - store i64 %qalloc.i.1, ptr %12, align 4 - %qalloc.i.2 = tail call i64 @___qalloc() - %not_max.not.not.i.2 = icmp eq i64 %qalloc.i.2, -1 - br i1 %not_max.not.not.i.2, label %cond_442_case_0.i, label %__hugr__.__tk2_helios_qalloc.438.exit.2 - -__hugr__.__tk2_helios_qalloc.438.exit.2: ; preds = %cond_exit_12.1 - tail call void @___reset(i64 %qalloc.i.2) - %13 = load i64, ptr %5, align 4 - %14 = and i64 %13, 4 - %.not1192 = icmp eq i64 %14, 0 - br i1 %.not1192, label %panic.i, label %cond_exit_12.2 - -cond_exit_12.2: ; preds = %__hugr__.__tk2_helios_qalloc.438.exit.2 - %15 = and i64 %13, -5 - store i64 %15, ptr %5, align 4 - %16 = getelementptr inbounds nuw i8, ptr %4, i64 16 - store i64 %qalloc.i.2, ptr %16, align 4 - %qalloc.i.3 = tail call i64 @___qalloc() - %not_max.not.not.i.3 = icmp eq i64 %qalloc.i.3, -1 - br i1 %not_max.not.not.i.3, label %cond_442_case_0.i, label %__hugr__.__tk2_helios_qalloc.438.exit.3 - -__hugr__.__tk2_helios_qalloc.438.exit.3: ; preds = %cond_exit_12.2 - tail call void @___reset(i64 %qalloc.i.3) - %17 = load i64, ptr %5, align 4 - %18 = and i64 %17, 8 - %.not1193 = icmp eq i64 %18, 0 - br i1 %.not1193, label %panic.i, label %cond_exit_12.3 - -cond_exit_12.3: ; preds = %__hugr__.__tk2_helios_qalloc.438.exit.3 - %19 = and i64 %17, -9 - store i64 %19, ptr %5, align 4 - %20 = getelementptr inbounds nuw i8, ptr %4, i64 24 - store i64 %qalloc.i.3, ptr %20, align 4 - %qalloc.i.4 = tail call i64 @___qalloc() - %not_max.not.not.i.4 = icmp eq i64 %qalloc.i.4, -1 - br i1 %not_max.not.not.i.4, label %cond_442_case_0.i, label %__hugr__.__tk2_helios_qalloc.438.exit.4 - -__hugr__.__tk2_helios_qalloc.438.exit.4: ; preds = %cond_exit_12.3 - tail call void @___reset(i64 %qalloc.i.4) - %21 = load i64, ptr %5, align 4 - %22 = and i64 %21, 16 - %.not1194 = icmp eq i64 %22, 0 - br i1 %.not1194, label %panic.i, label %cond_exit_12.4 - -cond_exit_12.4: ; preds = %__hugr__.__tk2_helios_qalloc.438.exit.4 - %23 = and i64 %21, -17 - store i64 %23, ptr %5, align 4 - %24 = getelementptr inbounds nuw i8, ptr %4, i64 32 - store i64 %qalloc.i.4, ptr %24, align 4 - %qalloc.i.5 = tail call i64 @___qalloc() - %not_max.not.not.i.5 = icmp eq i64 %qalloc.i.5, -1 - br i1 %not_max.not.not.i.5, label %cond_442_case_0.i, label %__hugr__.__tk2_helios_qalloc.438.exit.5 - -__hugr__.__tk2_helios_qalloc.438.exit.5: ; preds = %cond_exit_12.4 - tail call void @___reset(i64 %qalloc.i.5) - %25 = load i64, ptr %5, align 4 - %26 = and i64 %25, 32 - %.not1195 = icmp eq i64 %26, 0 - br i1 %.not1195, label %panic.i, label %cond_exit_12.5 - -cond_exit_12.5: ; preds = %__hugr__.__tk2_helios_qalloc.438.exit.5 - %27 = and i64 %25, -33 - store i64 %27, ptr %5, align 4 - %28 = getelementptr inbounds nuw i8, ptr %4, i64 40 - store i64 %qalloc.i.5, ptr %28, align 4 - %qalloc.i.6 = tail call i64 @___qalloc() - %not_max.not.not.i.6 = icmp eq i64 %qalloc.i.6, -1 - br i1 %not_max.not.not.i.6, label %cond_442_case_0.i, label %__hugr__.__tk2_helios_qalloc.438.exit.6 - -__hugr__.__tk2_helios_qalloc.438.exit.6: ; preds = %cond_exit_12.5 - tail call void @___reset(i64 %qalloc.i.6) - %29 = load i64, ptr %5, align 4 - %30 = and i64 %29, 64 - %.not1196 = icmp eq i64 %30, 0 - br i1 %.not1196, label %panic.i, label %cond_exit_12.6 - -cond_exit_12.6: ; preds = %__hugr__.__tk2_helios_qalloc.438.exit.6 - %31 = and i64 %29, -65 - store i64 %31, ptr %5, align 4 - %32 = getelementptr inbounds nuw i8, ptr %4, i64 48 - store i64 %qalloc.i.6, ptr %32, align 4 - %qalloc.i.7 = tail call i64 @___qalloc() - %not_max.not.not.i.7 = icmp eq i64 %qalloc.i.7, -1 - br i1 %not_max.not.not.i.7, label %cond_442_case_0.i, label %__hugr__.__tk2_helios_qalloc.438.exit.7 - -__hugr__.__tk2_helios_qalloc.438.exit.7: ; preds = %cond_exit_12.6 - tail call void @___reset(i64 %qalloc.i.7) - %33 = load i64, ptr %5, align 4 - %34 = and i64 %33, 128 - %.not1197 = icmp eq i64 %34, 0 - br i1 %.not1197, label %panic.i, label %cond_exit_12.7 - -cond_exit_12.7: ; preds = %__hugr__.__tk2_helios_qalloc.438.exit.7 - %35 = and i64 %33, -129 - store i64 %35, ptr %5, align 4 - %36 = getelementptr inbounds nuw i8, ptr %4, i64 56 - store i64 %qalloc.i.7, ptr %36, align 4 - %qalloc.i.8 = tail call i64 @___qalloc() - %not_max.not.not.i.8 = icmp eq i64 %qalloc.i.8, -1 - br i1 %not_max.not.not.i.8, label %cond_442_case_0.i, label %__hugr__.__tk2_helios_qalloc.438.exit.8 - -__hugr__.__tk2_helios_qalloc.438.exit.8: ; preds = %cond_exit_12.7 - tail call void @___reset(i64 %qalloc.i.8) - %37 = load i64, ptr %5, align 4 - %38 = and i64 %37, 256 - %.not1198 = icmp eq i64 %38, 0 - br i1 %.not1198, label %panic.i, label %cond_exit_12.8 - -cond_exit_12.8: ; preds = %__hugr__.__tk2_helios_qalloc.438.exit.8 - %39 = and i64 %37, -257 - store i64 %39, ptr %5, align 4 - %40 = getelementptr inbounds nuw i8, ptr %4, i64 64 - store i64 %qalloc.i.8, ptr %40, align 4 - %qalloc.i.9 = tail call i64 @___qalloc() - %not_max.not.not.i.9 = icmp eq i64 %qalloc.i.9, -1 - br i1 %not_max.not.not.i.9, label %cond_442_case_0.i, label %__barray_check_bounds.exit.9 - -__barray_check_bounds.exit.9: ; preds = %cond_exit_12.8 - tail call void @___reset(i64 %qalloc.i.9) - %41 = load i64, ptr %5, align 4 - %42 = and i64 %41, 512 - %.not1199 = icmp eq i64 %42, 0 - br i1 %.not1199, label %panic.i, label %cond_exit_12.9 - -cond_exit_12.9: ; preds = %__barray_check_bounds.exit.9 - %43 = and i64 %41, -513 - store i64 %43, ptr %5, align 4 - %44 = getelementptr inbounds nuw i8, ptr %4, i64 72 - store i64 %qalloc.i.9, ptr %44, align 4 - %45 = load i64, ptr %5, align 4 - %46 = trunc i64 %45 to i1 - br i1 %46, label %panic.i1117, label %__barray_mask_borrow.exit - -panic.i1117: ; preds = %cond_exit_12.9 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit: ; preds = %cond_exit_12.9 - %47 = or disjoint i64 %45, 1 - store i64 %47, ptr %5, align 4 - %48 = load i64, ptr %4, align 4 - tail call void @___rxy(i64 %48, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %48, double 0x400921FB54442D18) - %49 = load i64, ptr %5, align 4 - %50 = trunc i64 %49 to i1 - br i1 %50, label %__barray_mask_return.exit1119, label %panic.i1118 - -panic.i1118: ; preds = %__barray_mask_borrow.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1119: ; preds = %__barray_mask_borrow.exit - %51 = and i64 %49, -2 - store i64 %51, ptr %5, align 4 - store i64 %48, ptr %4, align 4 - br label %__barray_check_bounds.exit1121 - -__barray_check_bounds.exit1121: ; preds = %__barray_mask_return.exit1119, %__barray_mask_return.exit1135 - %52 = phi i64 [ 1, %__barray_mask_return.exit1119 ], [ %74, %__barray_mask_return.exit1135 ] - %"116_0.01189" = phi i64 [ 0, %__barray_mask_return.exit1119 ], [ %52, %__barray_mask_return.exit1135 ] - %53 = load i64, ptr %5, align 4 - %54 = lshr i64 %53, %"116_0.01189" - %55 = trunc i64 %54 to i1 - br i1 %55, label %panic.i1122, label %__barray_check_bounds.exit1125 - -panic.i1122: ; preds = %__barray_check_bounds.exit1121 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1125: ; preds = %__barray_check_bounds.exit1121 - %56 = shl nuw nsw i64 1, %"116_0.01189" - %57 = xor i64 %53, %56 - store i64 %57, ptr %5, align 4 - %58 = getelementptr inbounds nuw i64, ptr %4, i64 %"116_0.01189" - %59 = load i64, ptr %58, align 4 - %60 = lshr i64 %57, %52 - %61 = trunc i64 %60 to i1 - br i1 %61, label %panic.i1126, label %__barray_check_bounds.exit1129 - -panic.i1126: ; preds = %__barray_check_bounds.exit1125 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1129: ; preds = %__barray_check_bounds.exit1125 - %62 = shl nuw nsw i64 2, %"116_0.01189" - %63 = xor i64 %57, %62 - store i64 %63, ptr %5, align 4 - %64 = getelementptr inbounds nuw i64, ptr %4, i64 %52 - %65 = load i64, ptr %64, align 4 - tail call void @___rxy(i64 %65, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rzz(i64 %59, i64 %65, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %59, double 0xBFF921FB54442D18) - tail call void @___rxy(i64 %65, double 0x3FF921FB54442D18, double 0x400921FB54442D18) - tail call void @___rz(i64 %65, double 0xBFF921FB54442D18) - %66 = load i64, ptr %5, align 4 - %67 = lshr i64 %66, %"116_0.01189" - %68 = trunc i64 %67 to i1 - br i1 %68, label %__barray_check_bounds.exit1133, label %panic.i1130 - -panic.i1130: ; preds = %__barray_check_bounds.exit1129 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_check_bounds.exit1133: ; preds = %__barray_check_bounds.exit1129 - %69 = xor i64 %66, %56 - store i64 %69, ptr %5, align 4 - store i64 %59, ptr %58, align 4 - %70 = load i64, ptr %5, align 4 - %71 = lshr i64 %70, %52 - %72 = trunc i64 %71 to i1 - br i1 %72, label %__barray_mask_return.exit1135, label %panic.i1134 - -panic.i1134: ; preds = %__barray_check_bounds.exit1133 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1135: ; preds = %__barray_check_bounds.exit1133 - %73 = xor i64 %70, %62 - store i64 %73, ptr %5, align 4 - store i64 %65, ptr %64, align 4 - %74 = add nuw nsw i64 %52, 1 - %exitcond = icmp eq i64 %74, 10 - br i1 %exitcond, label %loop_body346.preheader, label %__barray_check_bounds.exit1121 - -out_of_bounds.i1136: ; preds = %.thread - tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") - unreachable - -__barray_check_bounds.exit1137: ; preds = %.thread - %75 = load i64, ptr %3, align 4 - %76 = lshr i64 %75, %"237_2.01203" - %77 = trunc i64 %76 to i1 - br i1 %77, label %cond_exit_241, label %panic.i1138 - -panic.i1138: ; preds = %__barray_check_bounds.exit1137 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -mask_block_ok.i: ; preds = %cond_exit_241 - %78 = load i64, ptr %5, align 4 - %79 = or i64 %78, -1024 - store i64 %79, ptr %5, align 4 - %80 = icmp eq i64 %79, -1 - br i1 %80, label %loop_body455.preheader.preheader, label %mask_block_err.i - -mask_block_err.i: ; preds = %mask_block_ok.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -loop_body346.preheader: ; preds = %__barray_mask_return.exit1135, %cond_exit_241 - %"237_0.sroa.15.01204" = phi i64 [ %81, %cond_exit_241 ], [ 0, %__barray_mask_return.exit1135 ] - %"237_2.01203" = phi i64 [ %89, %cond_exit_241 ], [ 0, %__barray_mask_return.exit1135 ] - %81 = add nuw nsw i64 %"237_0.sroa.15.01204", 1 - %82 = load i64, ptr %5, align 4 - %83 = lshr i64 %82, %"237_0.sroa.15.01204" - %84 = trunc i64 %83 to i1 - br i1 %84, label %panic.i1142, label %.thread - -panic.i1142: ; preds = %loop_body346.preheader - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -.thread: ; preds = %loop_body346.preheader - %85 = shl nuw nsw i64 1, %"237_0.sroa.15.01204" - %86 = xor i64 %82, %85 - store i64 %86, ptr %5, align 4 - %87 = getelementptr inbounds nuw i64, ptr %4, i64 %"237_0.sroa.15.01204" - %88 = load i64, ptr %87, align 4 - %89 = add i64 %"237_2.01203", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %88) - tail call void @___qfree(i64 %88) - %90 = icmp ult i64 %"237_2.01203", 10 - br i1 %90, label %__barray_check_bounds.exit1137, label %out_of_bounds.i1136 - -cond_exit_241: ; preds = %__barray_check_bounds.exit1137 - %91 = shl nuw nsw i64 1, %"237_2.01203" - %92 = xor i64 %75, %91 - store i64 %92, ptr %3, align 4 - %93 = getelementptr inbounds nuw i64, ptr %2, i64 %"237_2.01203" - store i64 %lazy_measure, ptr %93, align 4 - %94 = icmp samesign ugt i64 %"237_0.sroa.15.01204", 8 - br i1 %94, label %mask_block_ok.i, label %loop_body346.preheader - -loop_body455.preheader.preheader: ; preds = %mask_block_ok.i - tail call void @heap_free(ptr nonnull %4) - tail call void @heap_free(ptr nonnull %5) - br label %__barray_check_bounds.exit1145 - -__barray_check_bounds.exit1145: ; preds = %cond_exit_307, %loop_body455.preheader.preheader - %"303_0.sroa.15.01191" = phi i64 [ %95, %cond_exit_307 ], [ 0, %loop_body455.preheader.preheader ] - %95 = add nuw nsw i64 %"303_0.sroa.15.01191", 1 - %96 = load i64, ptr %3, align 4 - %97 = lshr i64 %96, %"303_0.sroa.15.01191" - %98 = trunc i64 %97 to i1 - br i1 %98, label %panic.i1146, label %__barray_check_bounds.exit1149 - -panic.i1146: ; preds = %__barray_check_bounds.exit1145 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1149: ; preds = %__barray_check_bounds.exit1145 - %99 = shl nuw nsw i64 1, %"303_0.sroa.15.01191" - %100 = xor i64 %96, %99 - store i64 %100, ptr %3, align 4 - %101 = getelementptr inbounds nuw i64, ptr %2, i64 %"303_0.sroa.15.01191" - %102 = load i64, ptr %101, align 4 - tail call void @___inc_future_refcount(i64 %102) - %103 = load i64, ptr %3, align 4 - %104 = lshr i64 %103, %"303_0.sroa.15.01191" - %105 = trunc i64 %104 to i1 - br i1 %105, label %__barray_check_bounds.exit1153, label %panic.i1150 - -panic.i1150: ; preds = %__barray_check_bounds.exit1149 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_check_bounds.exit1153: ; preds = %__barray_check_bounds.exit1149 - %106 = xor i64 %103, %99 - store i64 %106, ptr %3, align 4 - store i64 %102, ptr %101, align 4 - %read_bool = tail call i1 @___read_future_bool(i64 %102) - tail call void @___dec_future_refcount(i64 %102) - %107 = load i64, ptr %1, align 4 - %108 = lshr i64 %107, %"303_0.sroa.15.01191" - %109 = trunc i64 %108 to i1 - br i1 %109, label %cond_exit_307, label %panic.i1154 - -panic.i1154: ; preds = %__barray_check_bounds.exit1153 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -mask_block_err.i1159: ; preds = %cond_exit_488.9 - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_mask_borrow.exit1167: ; preds = %__barray_check_bounds.exit1163.preheader - %110 = or disjoint i64 %163, 1 - store i64 %110, ptr %3, align 4 - %111 = load i64, ptr %2, align 4 - tail call void @___dec_future_refcount(i64 %111) - br label %cond_exit_488 - -cond_exit_488: ; preds = %__barray_mask_borrow.exit1167, %__barray_check_bounds.exit1163.preheader - %112 = load i64, ptr %3, align 4 - %113 = and i64 %112, 2 - %.not1206 = icmp eq i64 %113, 0 - br i1 %.not1206, label %__barray_mask_borrow.exit1167.1, label %cond_exit_488.1 - -__barray_mask_borrow.exit1167.1: ; preds = %cond_exit_488 - %114 = or disjoint i64 %112, 2 - store i64 %114, ptr %3, align 4 - %115 = getelementptr inbounds nuw i8, ptr %2, i64 8 - %116 = load i64, ptr %115, align 4 - tail call void @___dec_future_refcount(i64 %116) - br label %cond_exit_488.1 - -cond_exit_488.1: ; preds = %__barray_mask_borrow.exit1167.1, %cond_exit_488 - %117 = load i64, ptr %3, align 4 - %118 = and i64 %117, 4 - %.not1207 = icmp eq i64 %118, 0 - br i1 %.not1207, label %__barray_mask_borrow.exit1167.2, label %cond_exit_488.2 - -__barray_mask_borrow.exit1167.2: ; preds = %cond_exit_488.1 - %119 = or disjoint i64 %117, 4 - store i64 %119, ptr %3, align 4 - %120 = getelementptr inbounds nuw i8, ptr %2, i64 16 - %121 = load i64, ptr %120, align 4 - tail call void @___dec_future_refcount(i64 %121) - br label %cond_exit_488.2 - -cond_exit_488.2: ; preds = %__barray_mask_borrow.exit1167.2, %cond_exit_488.1 - %122 = load i64, ptr %3, align 4 - %123 = and i64 %122, 8 - %.not1208 = icmp eq i64 %123, 0 - br i1 %.not1208, label %__barray_mask_borrow.exit1167.3, label %cond_exit_488.3 - -__barray_mask_borrow.exit1167.3: ; preds = %cond_exit_488.2 - %124 = or disjoint i64 %122, 8 - store i64 %124, ptr %3, align 4 - %125 = getelementptr inbounds nuw i8, ptr %2, i64 24 - %126 = load i64, ptr %125, align 4 - tail call void @___dec_future_refcount(i64 %126) - br label %cond_exit_488.3 - -cond_exit_488.3: ; preds = %__barray_mask_borrow.exit1167.3, %cond_exit_488.2 - %127 = load i64, ptr %3, align 4 - %128 = and i64 %127, 16 - %.not1209 = icmp eq i64 %128, 0 - br i1 %.not1209, label %__barray_mask_borrow.exit1167.4, label %cond_exit_488.4 - -__barray_mask_borrow.exit1167.4: ; preds = %cond_exit_488.3 - %129 = or disjoint i64 %127, 16 - store i64 %129, ptr %3, align 4 - %130 = getelementptr inbounds nuw i8, ptr %2, i64 32 - %131 = load i64, ptr %130, align 4 - tail call void @___dec_future_refcount(i64 %131) - br label %cond_exit_488.4 - -cond_exit_488.4: ; preds = %__barray_mask_borrow.exit1167.4, %cond_exit_488.3 - %132 = load i64, ptr %3, align 4 - %133 = and i64 %132, 32 - %.not1210 = icmp eq i64 %133, 0 - br i1 %.not1210, label %__barray_mask_borrow.exit1167.5, label %cond_exit_488.5 - -__barray_mask_borrow.exit1167.5: ; preds = %cond_exit_488.4 - %134 = or disjoint i64 %132, 32 - store i64 %134, ptr %3, align 4 - %135 = getelementptr inbounds nuw i8, ptr %2, i64 40 - %136 = load i64, ptr %135, align 4 - tail call void @___dec_future_refcount(i64 %136) - br label %cond_exit_488.5 - -cond_exit_488.5: ; preds = %__barray_mask_borrow.exit1167.5, %cond_exit_488.4 - %137 = load i64, ptr %3, align 4 - %138 = and i64 %137, 64 - %.not1211 = icmp eq i64 %138, 0 - br i1 %.not1211, label %__barray_mask_borrow.exit1167.6, label %cond_exit_488.6 - -__barray_mask_borrow.exit1167.6: ; preds = %cond_exit_488.5 - %139 = or disjoint i64 %137, 64 - store i64 %139, ptr %3, align 4 - %140 = getelementptr inbounds nuw i8, ptr %2, i64 48 - %141 = load i64, ptr %140, align 4 - tail call void @___dec_future_refcount(i64 %141) - br label %cond_exit_488.6 - -cond_exit_488.6: ; preds = %__barray_mask_borrow.exit1167.6, %cond_exit_488.5 - %142 = load i64, ptr %3, align 4 - %143 = and i64 %142, 128 - %.not1212 = icmp eq i64 %143, 0 - br i1 %.not1212, label %__barray_mask_borrow.exit1167.7, label %cond_exit_488.7 - -__barray_mask_borrow.exit1167.7: ; preds = %cond_exit_488.6 - %144 = or disjoint i64 %142, 128 - store i64 %144, ptr %3, align 4 - %145 = getelementptr inbounds nuw i8, ptr %2, i64 56 - %146 = load i64, ptr %145, align 4 - tail call void @___dec_future_refcount(i64 %146) - br label %cond_exit_488.7 - -cond_exit_488.7: ; preds = %__barray_mask_borrow.exit1167.7, %cond_exit_488.6 - %147 = load i64, ptr %3, align 4 - %148 = and i64 %147, 256 - %.not1213 = icmp eq i64 %148, 0 - br i1 %.not1213, label %__barray_mask_borrow.exit1167.8, label %cond_exit_488.8 - -__barray_mask_borrow.exit1167.8: ; preds = %cond_exit_488.7 - %149 = or disjoint i64 %147, 256 - store i64 %149, ptr %3, align 4 - %150 = getelementptr inbounds nuw i8, ptr %2, i64 64 - %151 = load i64, ptr %150, align 4 - tail call void @___dec_future_refcount(i64 %151) - br label %cond_exit_488.8 - -cond_exit_488.8: ; preds = %__barray_mask_borrow.exit1167.8, %cond_exit_488.7 - %152 = load i64, ptr %3, align 4 - %153 = and i64 %152, 512 - %.not1214 = icmp eq i64 %153, 0 - br i1 %.not1214, label %__barray_mask_borrow.exit1167.9, label %cond_exit_488.9 - -__barray_mask_borrow.exit1167.9: ; preds = %cond_exit_488.8 - %154 = or disjoint i64 %152, 512 - store i64 %154, ptr %3, align 4 - %155 = getelementptr inbounds nuw i8, ptr %2, i64 72 - %156 = load i64, ptr %155, align 4 - tail call void @___dec_future_refcount(i64 %156) - br label %cond_exit_488.9 - -cond_exit_488.9: ; preds = %__barray_mask_borrow.exit1167.9, %cond_exit_488.8 - %157 = load i64, ptr %3, align 4 - %158 = or i64 %157, -1024 - store i64 %158, ptr %3, align 4 - %159 = icmp eq i64 %158, -1 - br i1 %159, label %loop_out454, label %mask_block_err.i1159 - -cond_exit_307: ; preds = %__barray_check_bounds.exit1153 - %160 = xor i64 %107, %99 - store i64 %160, ptr %1, align 4 - %161 = getelementptr inbounds nuw i1, ptr %0, i64 %"303_0.sroa.15.01191" - store i1 %read_bool, ptr %161, align 1 - %162 = icmp eq i64 %"303_0.sroa.15.01191", 9 - br i1 %162, label %__barray_check_bounds.exit1163.preheader, label %__barray_check_bounds.exit1145 - -__barray_check_bounds.exit1163.preheader: ; preds = %cond_exit_307 - %163 = load i64, ptr %3, align 4 - %164 = trunc i64 %163 to i1 - br i1 %164, label %cond_exit_488, label %__barray_mask_borrow.exit1167 - -loop_out454: ; preds = %cond_exit_488.9 - tail call void @heap_free(ptr %2) - tail call void @heap_free(ptr nonnull %3) - %165 = load i64, ptr %1, align 4 - %166 = and i64 %165, 1023 - store i64 %166, ptr %1, align 4 - %167 = icmp eq i64 %166, 0 - br i1 %167, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1168 - -mask_block_err.i1168: ; preds = %loop_out454 - tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") - unreachable - -__barray_check_none_borrowed.exit: ; preds = %loop_out454 - %168 = tail call ptr @heap_alloc(i64 10) - %169 = tail call ptr @heap_alloc(i64 8) - store i64 0, ptr %169, align 1 - tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(10) %168, ptr noundef nonnull align 1 dereferenceable(10) %0, i64 10, i1 false) - tail call void @heap_free(ptr nonnull %168) - %170 = load i64, ptr %1, align 4 - %171 = and i64 %170, 1023 - store i64 %171, ptr %1, align 4 - %172 = icmp eq i64 %171, 0 - br i1 %172, label %__barray_check_none_borrowed.exit1172, label %mask_block_err.i1170 - -mask_block_err.i1170: ; preds = %__barray_check_none_borrowed.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") - unreachable - -__barray_check_none_borrowed.exit1172: ; preds = %__barray_check_none_borrowed.exit - %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 - %y_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 4 - %arr_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 8 - %mask_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 16 - %173 = alloca [10 x i1], align 1 - call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(10) %173, i8 0, i64 10, i1 false) - store i32 10, ptr %out_arr_alloca, align 8 - store i32 1, ptr %y_ptr, align 4 - store ptr %0, ptr %arr_ptr, align 8 - store ptr %173, ptr %mask_ptr, align 8 - call void @print_bool_arr(ptr nonnull @res_outcomes.9CB6D2E7.0, i64 21, ptr nonnull %out_arr_alloca) - ret void -} - -declare ptr @heap_alloc(i64) local_unnamed_addr - -; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) -declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immarg) #0 - -; Function Attrs: noreturn -declare void @panic(i32, ptr) local_unnamed_addr #1 - -declare void @heap_free(ptr) local_unnamed_addr - -declare i64 @___lazy_measure(i64) local_unnamed_addr - -declare void @___qfree(i64) local_unnamed_addr - -declare void @___inc_future_refcount(i64) local_unnamed_addr - -declare void @___dec_future_refcount(i64) local_unnamed_addr - -declare i1 @___read_future_bool(i64) local_unnamed_addr - -; Function Attrs: mustprogress 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) #2 - -declare void @print_bool_arr(ptr, i64, ptr) local_unnamed_addr - -declare void @___rxy(i64, double, double) local_unnamed_addr - -declare void @___rz(i64, double) local_unnamed_addr - -declare void @___rzz(i64, i64, double) local_unnamed_addr - -declare i64 @___qalloc() local_unnamed_addr - -declare void @___reset(i64) local_unnamed_addr - -define i64 @qmain(i64 %0) local_unnamed_addr { -entry: - tail call void @setup(i64 %0) - tail call void @__hugr__.__main__.main.1() - %1 = tail call i64 @teardown() - ret i64 %1 -} - -declare void @setup(i64) local_unnamed_addr - -declare i64 @teardown() local_unnamed_addr - -attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } -attributes #1 = { noreturn } -attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) } - -!name = !{!0} - -!0 = !{!"mainlib"} diff --git a/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace/trace_test-helios-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace/trace_test-helios-aarch64-unknown-linux-gnu.ll deleted file mode 100644 index d818baaf..00000000 --- a/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace/trace_test-helios-aarch64-unknown-linux-gnu.ll +++ /dev/null @@ -1,647 +0,0 @@ -; ModuleID = 'hugr' -source_filename = "hugr" -target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32" -target triple = "aarch64-unknown-linux-gnu" - -@"e_Index out .DD115165.0" = private constant [29 x i8] c"\1CEXIT:INT:Index out of bounds" -@"e_Array alre.5A300C2A.0" = private constant [57 x i8] c"8EXIT:INT:Array already contains an element at this index" -@"e_Array elem.E746B1A3.0" = private constant [43 x i8] c"*EXIT:INT:Array element is already borrowed" -@"e_Array cont.EFA5AC45.0" = private constant [70 x i8] c"EEXIT:INT:Array contains non-borrowed elements and cannot be discarded" -@"e_Some array.A77EF32E.0" = private constant [48 x i8] c"/EXIT:INT:Some array elements have been borrowed" -@res_outcomes.9CB6D2E7.0 = private constant [22 x i8] c"\15USER:BOOLARR:outcomes" -@"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." - -define void @__hugr__.__main__.main.1() local_unnamed_addr { -alloca_block: - %0 = tail call ptr @heap_alloc(i64 10) - %1 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %1, align 1 - %2 = tail call ptr @heap_alloc(i64 80) - %3 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %3, align 1 - %4 = tail call ptr @heap_alloc(i64 80) - %5 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %5, align 1 - %qalloc.i = tail call i64 @___qalloc() - %not_max.not.not.i = icmp eq i64 %qalloc.i, -1 - br i1 %not_max.not.not.i, label %cond_442_case_0.i, label %__hugr__.__tk2_helios_qalloc.438.exit - -cond_442_case_0.i: ; preds = %cond_exit_12.8, %cond_exit_12.7, %cond_exit_12.6, %cond_exit_12.5, %cond_exit_12.4, %cond_exit_12.3, %cond_exit_12.2, %cond_exit_12.1, %cond_exit_12, %alloca_block - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_helios_qalloc.438.exit: ; preds = %alloca_block - tail call void @___reset(i64 %qalloc.i) - %6 = load i64, ptr %5, align 4 - %7 = trunc i64 %6 to i1 - br i1 %7, label %cond_exit_12, label %panic.i - -panic.i: ; preds = %__barray_check_bounds.exit.9, %__hugr__.__tk2_helios_qalloc.438.exit.8, %__hugr__.__tk2_helios_qalloc.438.exit.7, %__hugr__.__tk2_helios_qalloc.438.exit.6, %__hugr__.__tk2_helios_qalloc.438.exit.5, %__hugr__.__tk2_helios_qalloc.438.exit.4, %__hugr__.__tk2_helios_qalloc.438.exit.3, %__hugr__.__tk2_helios_qalloc.438.exit.2, %__hugr__.__tk2_helios_qalloc.438.exit.1, %__hugr__.__tk2_helios_qalloc.438.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -cond_exit_12: ; preds = %__hugr__.__tk2_helios_qalloc.438.exit - %8 = and i64 %6, -2 - store i64 %8, ptr %5, align 4 - store i64 %qalloc.i, ptr %4, align 4 - %qalloc.i.1 = tail call i64 @___qalloc() - %not_max.not.not.i.1 = icmp eq i64 %qalloc.i.1, -1 - br i1 %not_max.not.not.i.1, label %cond_442_case_0.i, label %__hugr__.__tk2_helios_qalloc.438.exit.1 - -__hugr__.__tk2_helios_qalloc.438.exit.1: ; preds = %cond_exit_12 - tail call void @___reset(i64 %qalloc.i.1) - %9 = load i64, ptr %5, align 4 - %10 = and i64 %9, 2 - %.not = icmp eq i64 %10, 0 - br i1 %.not, label %panic.i, label %cond_exit_12.1 - -cond_exit_12.1: ; preds = %__hugr__.__tk2_helios_qalloc.438.exit.1 - %11 = and i64 %9, -3 - store i64 %11, ptr %5, align 4 - %12 = getelementptr inbounds nuw i8, ptr %4, i64 8 - store i64 %qalloc.i.1, ptr %12, align 4 - %qalloc.i.2 = tail call i64 @___qalloc() - %not_max.not.not.i.2 = icmp eq i64 %qalloc.i.2, -1 - br i1 %not_max.not.not.i.2, label %cond_442_case_0.i, label %__hugr__.__tk2_helios_qalloc.438.exit.2 - -__hugr__.__tk2_helios_qalloc.438.exit.2: ; preds = %cond_exit_12.1 - tail call void @___reset(i64 %qalloc.i.2) - %13 = load i64, ptr %5, align 4 - %14 = and i64 %13, 4 - %.not1192 = icmp eq i64 %14, 0 - br i1 %.not1192, label %panic.i, label %cond_exit_12.2 - -cond_exit_12.2: ; preds = %__hugr__.__tk2_helios_qalloc.438.exit.2 - %15 = and i64 %13, -5 - store i64 %15, ptr %5, align 4 - %16 = getelementptr inbounds nuw i8, ptr %4, i64 16 - store i64 %qalloc.i.2, ptr %16, align 4 - %qalloc.i.3 = tail call i64 @___qalloc() - %not_max.not.not.i.3 = icmp eq i64 %qalloc.i.3, -1 - br i1 %not_max.not.not.i.3, label %cond_442_case_0.i, label %__hugr__.__tk2_helios_qalloc.438.exit.3 - -__hugr__.__tk2_helios_qalloc.438.exit.3: ; preds = %cond_exit_12.2 - tail call void @___reset(i64 %qalloc.i.3) - %17 = load i64, ptr %5, align 4 - %18 = and i64 %17, 8 - %.not1193 = icmp eq i64 %18, 0 - br i1 %.not1193, label %panic.i, label %cond_exit_12.3 - -cond_exit_12.3: ; preds = %__hugr__.__tk2_helios_qalloc.438.exit.3 - %19 = and i64 %17, -9 - store i64 %19, ptr %5, align 4 - %20 = getelementptr inbounds nuw i8, ptr %4, i64 24 - store i64 %qalloc.i.3, ptr %20, align 4 - %qalloc.i.4 = tail call i64 @___qalloc() - %not_max.not.not.i.4 = icmp eq i64 %qalloc.i.4, -1 - br i1 %not_max.not.not.i.4, label %cond_442_case_0.i, label %__hugr__.__tk2_helios_qalloc.438.exit.4 - -__hugr__.__tk2_helios_qalloc.438.exit.4: ; preds = %cond_exit_12.3 - tail call void @___reset(i64 %qalloc.i.4) - %21 = load i64, ptr %5, align 4 - %22 = and i64 %21, 16 - %.not1194 = icmp eq i64 %22, 0 - br i1 %.not1194, label %panic.i, label %cond_exit_12.4 - -cond_exit_12.4: ; preds = %__hugr__.__tk2_helios_qalloc.438.exit.4 - %23 = and i64 %21, -17 - store i64 %23, ptr %5, align 4 - %24 = getelementptr inbounds nuw i8, ptr %4, i64 32 - store i64 %qalloc.i.4, ptr %24, align 4 - %qalloc.i.5 = tail call i64 @___qalloc() - %not_max.not.not.i.5 = icmp eq i64 %qalloc.i.5, -1 - br i1 %not_max.not.not.i.5, label %cond_442_case_0.i, label %__hugr__.__tk2_helios_qalloc.438.exit.5 - -__hugr__.__tk2_helios_qalloc.438.exit.5: ; preds = %cond_exit_12.4 - tail call void @___reset(i64 %qalloc.i.5) - %25 = load i64, ptr %5, align 4 - %26 = and i64 %25, 32 - %.not1195 = icmp eq i64 %26, 0 - br i1 %.not1195, label %panic.i, label %cond_exit_12.5 - -cond_exit_12.5: ; preds = %__hugr__.__tk2_helios_qalloc.438.exit.5 - %27 = and i64 %25, -33 - store i64 %27, ptr %5, align 4 - %28 = getelementptr inbounds nuw i8, ptr %4, i64 40 - store i64 %qalloc.i.5, ptr %28, align 4 - %qalloc.i.6 = tail call i64 @___qalloc() - %not_max.not.not.i.6 = icmp eq i64 %qalloc.i.6, -1 - br i1 %not_max.not.not.i.6, label %cond_442_case_0.i, label %__hugr__.__tk2_helios_qalloc.438.exit.6 - -__hugr__.__tk2_helios_qalloc.438.exit.6: ; preds = %cond_exit_12.5 - tail call void @___reset(i64 %qalloc.i.6) - %29 = load i64, ptr %5, align 4 - %30 = and i64 %29, 64 - %.not1196 = icmp eq i64 %30, 0 - br i1 %.not1196, label %panic.i, label %cond_exit_12.6 - -cond_exit_12.6: ; preds = %__hugr__.__tk2_helios_qalloc.438.exit.6 - %31 = and i64 %29, -65 - store i64 %31, ptr %5, align 4 - %32 = getelementptr inbounds nuw i8, ptr %4, i64 48 - store i64 %qalloc.i.6, ptr %32, align 4 - %qalloc.i.7 = tail call i64 @___qalloc() - %not_max.not.not.i.7 = icmp eq i64 %qalloc.i.7, -1 - br i1 %not_max.not.not.i.7, label %cond_442_case_0.i, label %__hugr__.__tk2_helios_qalloc.438.exit.7 - -__hugr__.__tk2_helios_qalloc.438.exit.7: ; preds = %cond_exit_12.6 - tail call void @___reset(i64 %qalloc.i.7) - %33 = load i64, ptr %5, align 4 - %34 = and i64 %33, 128 - %.not1197 = icmp eq i64 %34, 0 - br i1 %.not1197, label %panic.i, label %cond_exit_12.7 - -cond_exit_12.7: ; preds = %__hugr__.__tk2_helios_qalloc.438.exit.7 - %35 = and i64 %33, -129 - store i64 %35, ptr %5, align 4 - %36 = getelementptr inbounds nuw i8, ptr %4, i64 56 - store i64 %qalloc.i.7, ptr %36, align 4 - %qalloc.i.8 = tail call i64 @___qalloc() - %not_max.not.not.i.8 = icmp eq i64 %qalloc.i.8, -1 - br i1 %not_max.not.not.i.8, label %cond_442_case_0.i, label %__hugr__.__tk2_helios_qalloc.438.exit.8 - -__hugr__.__tk2_helios_qalloc.438.exit.8: ; preds = %cond_exit_12.7 - tail call void @___reset(i64 %qalloc.i.8) - %37 = load i64, ptr %5, align 4 - %38 = and i64 %37, 256 - %.not1198 = icmp eq i64 %38, 0 - br i1 %.not1198, label %panic.i, label %cond_exit_12.8 - -cond_exit_12.8: ; preds = %__hugr__.__tk2_helios_qalloc.438.exit.8 - %39 = and i64 %37, -257 - store i64 %39, ptr %5, align 4 - %40 = getelementptr inbounds nuw i8, ptr %4, i64 64 - store i64 %qalloc.i.8, ptr %40, align 4 - %qalloc.i.9 = tail call i64 @___qalloc() - %not_max.not.not.i.9 = icmp eq i64 %qalloc.i.9, -1 - br i1 %not_max.not.not.i.9, label %cond_442_case_0.i, label %__barray_check_bounds.exit.9 - -__barray_check_bounds.exit.9: ; preds = %cond_exit_12.8 - tail call void @___reset(i64 %qalloc.i.9) - %41 = load i64, ptr %5, align 4 - %42 = and i64 %41, 512 - %.not1199 = icmp eq i64 %42, 0 - br i1 %.not1199, label %panic.i, label %cond_exit_12.9 - -cond_exit_12.9: ; preds = %__barray_check_bounds.exit.9 - %43 = and i64 %41, -513 - store i64 %43, ptr %5, align 4 - %44 = getelementptr inbounds nuw i8, ptr %4, i64 72 - store i64 %qalloc.i.9, ptr %44, align 4 - %45 = load i64, ptr %5, align 4 - %46 = trunc i64 %45 to i1 - br i1 %46, label %panic.i1117, label %__barray_mask_borrow.exit - -panic.i1117: ; preds = %cond_exit_12.9 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit: ; preds = %cond_exit_12.9 - %47 = or disjoint i64 %45, 1 - store i64 %47, ptr %5, align 4 - %48 = load i64, ptr %4, align 4 - tail call void @___rxy(i64 %48, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %48, double 0x400921FB54442D18) - %49 = load i64, ptr %5, align 4 - %50 = trunc i64 %49 to i1 - br i1 %50, label %__barray_mask_return.exit1119, label %panic.i1118 - -panic.i1118: ; preds = %__barray_mask_borrow.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1119: ; preds = %__barray_mask_borrow.exit - %51 = and i64 %49, -2 - store i64 %51, ptr %5, align 4 - store i64 %48, ptr %4, align 4 - br label %__barray_check_bounds.exit1121 - -__barray_check_bounds.exit1121: ; preds = %__barray_mask_return.exit1119, %__barray_mask_return.exit1135 - %52 = phi i64 [ 1, %__barray_mask_return.exit1119 ], [ %74, %__barray_mask_return.exit1135 ] - %"116_0.01189" = phi i64 [ 0, %__barray_mask_return.exit1119 ], [ %52, %__barray_mask_return.exit1135 ] - %53 = load i64, ptr %5, align 4 - %54 = lshr i64 %53, %"116_0.01189" - %55 = trunc i64 %54 to i1 - br i1 %55, label %panic.i1122, label %__barray_check_bounds.exit1125 - -panic.i1122: ; preds = %__barray_check_bounds.exit1121 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1125: ; preds = %__barray_check_bounds.exit1121 - %56 = shl nuw nsw i64 1, %"116_0.01189" - %57 = xor i64 %53, %56 - store i64 %57, ptr %5, align 4 - %58 = getelementptr inbounds nuw i64, ptr %4, i64 %"116_0.01189" - %59 = load i64, ptr %58, align 4 - %60 = lshr i64 %57, %52 - %61 = trunc i64 %60 to i1 - br i1 %61, label %panic.i1126, label %__barray_check_bounds.exit1129 - -panic.i1126: ; preds = %__barray_check_bounds.exit1125 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1129: ; preds = %__barray_check_bounds.exit1125 - %62 = shl nuw nsw i64 2, %"116_0.01189" - %63 = xor i64 %57, %62 - store i64 %63, ptr %5, align 4 - %64 = getelementptr inbounds nuw i64, ptr %4, i64 %52 - %65 = load i64, ptr %64, align 4 - tail call void @___rxy(i64 %65, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rzz(i64 %59, i64 %65, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %59, double 0xBFF921FB54442D18) - tail call void @___rxy(i64 %65, double 0x3FF921FB54442D18, double 0x400921FB54442D18) - tail call void @___rz(i64 %65, double 0xBFF921FB54442D18) - %66 = load i64, ptr %5, align 4 - %67 = lshr i64 %66, %"116_0.01189" - %68 = trunc i64 %67 to i1 - br i1 %68, label %__barray_check_bounds.exit1133, label %panic.i1130 - -panic.i1130: ; preds = %__barray_check_bounds.exit1129 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_check_bounds.exit1133: ; preds = %__barray_check_bounds.exit1129 - %69 = xor i64 %66, %56 - store i64 %69, ptr %5, align 4 - store i64 %59, ptr %58, align 4 - %70 = load i64, ptr %5, align 4 - %71 = lshr i64 %70, %52 - %72 = trunc i64 %71 to i1 - br i1 %72, label %__barray_mask_return.exit1135, label %panic.i1134 - -panic.i1134: ; preds = %__barray_check_bounds.exit1133 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1135: ; preds = %__barray_check_bounds.exit1133 - %73 = xor i64 %70, %62 - store i64 %73, ptr %5, align 4 - store i64 %65, ptr %64, align 4 - %74 = add nuw nsw i64 %52, 1 - %exitcond = icmp eq i64 %74, 10 - br i1 %exitcond, label %loop_body346.preheader, label %__barray_check_bounds.exit1121 - -out_of_bounds.i1136: ; preds = %.thread - tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") - unreachable - -__barray_check_bounds.exit1137: ; preds = %.thread - %75 = load i64, ptr %3, align 4 - %76 = lshr i64 %75, %"237_2.01203" - %77 = trunc i64 %76 to i1 - br i1 %77, label %cond_exit_241, label %panic.i1138 - -panic.i1138: ; preds = %__barray_check_bounds.exit1137 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -mask_block_ok.i: ; preds = %cond_exit_241 - %78 = load i64, ptr %5, align 4 - %79 = or i64 %78, -1024 - store i64 %79, ptr %5, align 4 - %80 = icmp eq i64 %79, -1 - br i1 %80, label %loop_body455.preheader.preheader, label %mask_block_err.i - -mask_block_err.i: ; preds = %mask_block_ok.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -loop_body346.preheader: ; preds = %__barray_mask_return.exit1135, %cond_exit_241 - %"237_0.sroa.15.01204" = phi i64 [ %81, %cond_exit_241 ], [ 0, %__barray_mask_return.exit1135 ] - %"237_2.01203" = phi i64 [ %89, %cond_exit_241 ], [ 0, %__barray_mask_return.exit1135 ] - %81 = add nuw nsw i64 %"237_0.sroa.15.01204", 1 - %82 = load i64, ptr %5, align 4 - %83 = lshr i64 %82, %"237_0.sroa.15.01204" - %84 = trunc i64 %83 to i1 - br i1 %84, label %panic.i1142, label %.thread - -panic.i1142: ; preds = %loop_body346.preheader - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -.thread: ; preds = %loop_body346.preheader - %85 = shl nuw nsw i64 1, %"237_0.sroa.15.01204" - %86 = xor i64 %82, %85 - store i64 %86, ptr %5, align 4 - %87 = getelementptr inbounds nuw i64, ptr %4, i64 %"237_0.sroa.15.01204" - %88 = load i64, ptr %87, align 4 - %89 = add i64 %"237_2.01203", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %88) - tail call void @___qfree(i64 %88) - %90 = icmp ult i64 %"237_2.01203", 10 - br i1 %90, label %__barray_check_bounds.exit1137, label %out_of_bounds.i1136 - -cond_exit_241: ; preds = %__barray_check_bounds.exit1137 - %91 = shl nuw nsw i64 1, %"237_2.01203" - %92 = xor i64 %75, %91 - store i64 %92, ptr %3, align 4 - %93 = getelementptr inbounds nuw i64, ptr %2, i64 %"237_2.01203" - store i64 %lazy_measure, ptr %93, align 4 - %94 = icmp samesign ugt i64 %"237_0.sroa.15.01204", 8 - br i1 %94, label %mask_block_ok.i, label %loop_body346.preheader - -loop_body455.preheader.preheader: ; preds = %mask_block_ok.i - tail call void @heap_free(ptr nonnull %4) - tail call void @heap_free(ptr nonnull %5) - br label %__barray_check_bounds.exit1145 - -__barray_check_bounds.exit1145: ; preds = %cond_exit_307, %loop_body455.preheader.preheader - %"303_0.sroa.15.01191" = phi i64 [ %95, %cond_exit_307 ], [ 0, %loop_body455.preheader.preheader ] - %95 = add nuw nsw i64 %"303_0.sroa.15.01191", 1 - %96 = load i64, ptr %3, align 4 - %97 = lshr i64 %96, %"303_0.sroa.15.01191" - %98 = trunc i64 %97 to i1 - br i1 %98, label %panic.i1146, label %__barray_check_bounds.exit1149 - -panic.i1146: ; preds = %__barray_check_bounds.exit1145 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1149: ; preds = %__barray_check_bounds.exit1145 - %99 = shl nuw nsw i64 1, %"303_0.sroa.15.01191" - %100 = xor i64 %96, %99 - store i64 %100, ptr %3, align 4 - %101 = getelementptr inbounds nuw i64, ptr %2, i64 %"303_0.sroa.15.01191" - %102 = load i64, ptr %101, align 4 - tail call void @___inc_future_refcount(i64 %102) - %103 = load i64, ptr %3, align 4 - %104 = lshr i64 %103, %"303_0.sroa.15.01191" - %105 = trunc i64 %104 to i1 - br i1 %105, label %__barray_check_bounds.exit1153, label %panic.i1150 - -panic.i1150: ; preds = %__barray_check_bounds.exit1149 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_check_bounds.exit1153: ; preds = %__barray_check_bounds.exit1149 - %106 = xor i64 %103, %99 - store i64 %106, ptr %3, align 4 - store i64 %102, ptr %101, align 4 - %read_bool = tail call i1 @___read_future_bool(i64 %102) - tail call void @___dec_future_refcount(i64 %102) - %107 = load i64, ptr %1, align 4 - %108 = lshr i64 %107, %"303_0.sroa.15.01191" - %109 = trunc i64 %108 to i1 - br i1 %109, label %cond_exit_307, label %panic.i1154 - -panic.i1154: ; preds = %__barray_check_bounds.exit1153 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -mask_block_err.i1159: ; preds = %cond_exit_488.9 - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_mask_borrow.exit1167: ; preds = %__barray_check_bounds.exit1163.preheader - %110 = or disjoint i64 %163, 1 - store i64 %110, ptr %3, align 4 - %111 = load i64, ptr %2, align 4 - tail call void @___dec_future_refcount(i64 %111) - br label %cond_exit_488 - -cond_exit_488: ; preds = %__barray_mask_borrow.exit1167, %__barray_check_bounds.exit1163.preheader - %112 = load i64, ptr %3, align 4 - %113 = and i64 %112, 2 - %.not1206 = icmp eq i64 %113, 0 - br i1 %.not1206, label %__barray_mask_borrow.exit1167.1, label %cond_exit_488.1 - -__barray_mask_borrow.exit1167.1: ; preds = %cond_exit_488 - %114 = or disjoint i64 %112, 2 - store i64 %114, ptr %3, align 4 - %115 = getelementptr inbounds nuw i8, ptr %2, i64 8 - %116 = load i64, ptr %115, align 4 - tail call void @___dec_future_refcount(i64 %116) - br label %cond_exit_488.1 - -cond_exit_488.1: ; preds = %__barray_mask_borrow.exit1167.1, %cond_exit_488 - %117 = load i64, ptr %3, align 4 - %118 = and i64 %117, 4 - %.not1207 = icmp eq i64 %118, 0 - br i1 %.not1207, label %__barray_mask_borrow.exit1167.2, label %cond_exit_488.2 - -__barray_mask_borrow.exit1167.2: ; preds = %cond_exit_488.1 - %119 = or disjoint i64 %117, 4 - store i64 %119, ptr %3, align 4 - %120 = getelementptr inbounds nuw i8, ptr %2, i64 16 - %121 = load i64, ptr %120, align 4 - tail call void @___dec_future_refcount(i64 %121) - br label %cond_exit_488.2 - -cond_exit_488.2: ; preds = %__barray_mask_borrow.exit1167.2, %cond_exit_488.1 - %122 = load i64, ptr %3, align 4 - %123 = and i64 %122, 8 - %.not1208 = icmp eq i64 %123, 0 - br i1 %.not1208, label %__barray_mask_borrow.exit1167.3, label %cond_exit_488.3 - -__barray_mask_borrow.exit1167.3: ; preds = %cond_exit_488.2 - %124 = or disjoint i64 %122, 8 - store i64 %124, ptr %3, align 4 - %125 = getelementptr inbounds nuw i8, ptr %2, i64 24 - %126 = load i64, ptr %125, align 4 - tail call void @___dec_future_refcount(i64 %126) - br label %cond_exit_488.3 - -cond_exit_488.3: ; preds = %__barray_mask_borrow.exit1167.3, %cond_exit_488.2 - %127 = load i64, ptr %3, align 4 - %128 = and i64 %127, 16 - %.not1209 = icmp eq i64 %128, 0 - br i1 %.not1209, label %__barray_mask_borrow.exit1167.4, label %cond_exit_488.4 - -__barray_mask_borrow.exit1167.4: ; preds = %cond_exit_488.3 - %129 = or disjoint i64 %127, 16 - store i64 %129, ptr %3, align 4 - %130 = getelementptr inbounds nuw i8, ptr %2, i64 32 - %131 = load i64, ptr %130, align 4 - tail call void @___dec_future_refcount(i64 %131) - br label %cond_exit_488.4 - -cond_exit_488.4: ; preds = %__barray_mask_borrow.exit1167.4, %cond_exit_488.3 - %132 = load i64, ptr %3, align 4 - %133 = and i64 %132, 32 - %.not1210 = icmp eq i64 %133, 0 - br i1 %.not1210, label %__barray_mask_borrow.exit1167.5, label %cond_exit_488.5 - -__barray_mask_borrow.exit1167.5: ; preds = %cond_exit_488.4 - %134 = or disjoint i64 %132, 32 - store i64 %134, ptr %3, align 4 - %135 = getelementptr inbounds nuw i8, ptr %2, i64 40 - %136 = load i64, ptr %135, align 4 - tail call void @___dec_future_refcount(i64 %136) - br label %cond_exit_488.5 - -cond_exit_488.5: ; preds = %__barray_mask_borrow.exit1167.5, %cond_exit_488.4 - %137 = load i64, ptr %3, align 4 - %138 = and i64 %137, 64 - %.not1211 = icmp eq i64 %138, 0 - br i1 %.not1211, label %__barray_mask_borrow.exit1167.6, label %cond_exit_488.6 - -__barray_mask_borrow.exit1167.6: ; preds = %cond_exit_488.5 - %139 = or disjoint i64 %137, 64 - store i64 %139, ptr %3, align 4 - %140 = getelementptr inbounds nuw i8, ptr %2, i64 48 - %141 = load i64, ptr %140, align 4 - tail call void @___dec_future_refcount(i64 %141) - br label %cond_exit_488.6 - -cond_exit_488.6: ; preds = %__barray_mask_borrow.exit1167.6, %cond_exit_488.5 - %142 = load i64, ptr %3, align 4 - %143 = and i64 %142, 128 - %.not1212 = icmp eq i64 %143, 0 - br i1 %.not1212, label %__barray_mask_borrow.exit1167.7, label %cond_exit_488.7 - -__barray_mask_borrow.exit1167.7: ; preds = %cond_exit_488.6 - %144 = or disjoint i64 %142, 128 - store i64 %144, ptr %3, align 4 - %145 = getelementptr inbounds nuw i8, ptr %2, i64 56 - %146 = load i64, ptr %145, align 4 - tail call void @___dec_future_refcount(i64 %146) - br label %cond_exit_488.7 - -cond_exit_488.7: ; preds = %__barray_mask_borrow.exit1167.7, %cond_exit_488.6 - %147 = load i64, ptr %3, align 4 - %148 = and i64 %147, 256 - %.not1213 = icmp eq i64 %148, 0 - br i1 %.not1213, label %__barray_mask_borrow.exit1167.8, label %cond_exit_488.8 - -__barray_mask_borrow.exit1167.8: ; preds = %cond_exit_488.7 - %149 = or disjoint i64 %147, 256 - store i64 %149, ptr %3, align 4 - %150 = getelementptr inbounds nuw i8, ptr %2, i64 64 - %151 = load i64, ptr %150, align 4 - tail call void @___dec_future_refcount(i64 %151) - br label %cond_exit_488.8 - -cond_exit_488.8: ; preds = %__barray_mask_borrow.exit1167.8, %cond_exit_488.7 - %152 = load i64, ptr %3, align 4 - %153 = and i64 %152, 512 - %.not1214 = icmp eq i64 %153, 0 - br i1 %.not1214, label %__barray_mask_borrow.exit1167.9, label %cond_exit_488.9 - -__barray_mask_borrow.exit1167.9: ; preds = %cond_exit_488.8 - %154 = or disjoint i64 %152, 512 - store i64 %154, ptr %3, align 4 - %155 = getelementptr inbounds nuw i8, ptr %2, i64 72 - %156 = load i64, ptr %155, align 4 - tail call void @___dec_future_refcount(i64 %156) - br label %cond_exit_488.9 - -cond_exit_488.9: ; preds = %__barray_mask_borrow.exit1167.9, %cond_exit_488.8 - %157 = load i64, ptr %3, align 4 - %158 = or i64 %157, -1024 - store i64 %158, ptr %3, align 4 - %159 = icmp eq i64 %158, -1 - br i1 %159, label %loop_out454, label %mask_block_err.i1159 - -cond_exit_307: ; preds = %__barray_check_bounds.exit1153 - %160 = xor i64 %107, %99 - store i64 %160, ptr %1, align 4 - %161 = getelementptr inbounds nuw i1, ptr %0, i64 %"303_0.sroa.15.01191" - store i1 %read_bool, ptr %161, align 1 - %162 = icmp eq i64 %"303_0.sroa.15.01191", 9 - br i1 %162, label %__barray_check_bounds.exit1163.preheader, label %__barray_check_bounds.exit1145 - -__barray_check_bounds.exit1163.preheader: ; preds = %cond_exit_307 - %163 = load i64, ptr %3, align 4 - %164 = trunc i64 %163 to i1 - br i1 %164, label %cond_exit_488, label %__barray_mask_borrow.exit1167 - -loop_out454: ; preds = %cond_exit_488.9 - tail call void @heap_free(ptr %2) - tail call void @heap_free(ptr nonnull %3) - %165 = load i64, ptr %1, align 4 - %166 = and i64 %165, 1023 - store i64 %166, ptr %1, align 4 - %167 = icmp eq i64 %166, 0 - br i1 %167, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1168 - -mask_block_err.i1168: ; preds = %loop_out454 - tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") - unreachable - -__barray_check_none_borrowed.exit: ; preds = %loop_out454 - %168 = tail call ptr @heap_alloc(i64 10) - %169 = tail call ptr @heap_alloc(i64 8) - store i64 0, ptr %169, align 1 - tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(10) %168, ptr noundef nonnull align 1 dereferenceable(10) %0, i64 10, i1 false) - tail call void @heap_free(ptr nonnull %168) - %170 = load i64, ptr %1, align 4 - %171 = and i64 %170, 1023 - store i64 %171, ptr %1, align 4 - %172 = icmp eq i64 %171, 0 - br i1 %172, label %__barray_check_none_borrowed.exit1172, label %mask_block_err.i1170 - -mask_block_err.i1170: ; preds = %__barray_check_none_borrowed.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") - unreachable - -__barray_check_none_borrowed.exit1172: ; preds = %__barray_check_none_borrowed.exit - %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 - %y_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 4 - %arr_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 8 - %mask_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 16 - %173 = alloca [10 x i1], align 1 - call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(10) %173, i8 0, i64 10, i1 false) - store i32 10, ptr %out_arr_alloca, align 8 - store i32 1, ptr %y_ptr, align 4 - store ptr %0, ptr %arr_ptr, align 8 - store ptr %173, ptr %mask_ptr, align 8 - call void @print_bool_arr(ptr nonnull @res_outcomes.9CB6D2E7.0, i64 21, ptr nonnull %out_arr_alloca) - ret void -} - -declare ptr @heap_alloc(i64) local_unnamed_addr - -; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) -declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immarg) #0 - -; Function Attrs: noreturn -declare void @panic(i32, ptr) local_unnamed_addr #1 - -declare void @heap_free(ptr) local_unnamed_addr - -declare i64 @___lazy_measure(i64) local_unnamed_addr - -declare void @___qfree(i64) local_unnamed_addr - -declare void @___inc_future_refcount(i64) local_unnamed_addr - -declare void @___dec_future_refcount(i64) local_unnamed_addr - -declare i1 @___read_future_bool(i64) local_unnamed_addr - -; Function Attrs: mustprogress 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) #2 - -declare void @print_bool_arr(ptr, i64, ptr) local_unnamed_addr - -declare void @___rxy(i64, double, double) local_unnamed_addr - -declare void @___rz(i64, double) local_unnamed_addr - -declare void @___rzz(i64, i64, double) local_unnamed_addr - -declare i64 @___qalloc() local_unnamed_addr - -declare void @___reset(i64) local_unnamed_addr - -define i64 @qmain(i64 %0) local_unnamed_addr { -entry: - tail call void @setup(i64 %0) - tail call void @__hugr__.__main__.main.1() - %1 = tail call i64 @teardown() - ret i64 %1 -} - -declare void @setup(i64) local_unnamed_addr - -declare i64 @teardown() local_unnamed_addr - -attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } -attributes #1 = { noreturn } -attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) } - -!name = !{!0} - -!0 = !{!"mainlib"} diff --git a/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace/trace_test-helios-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace/trace_test-helios-x86_64-apple-darwin.ll deleted file mode 100644 index ffbfb432..00000000 --- a/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace/trace_test-helios-x86_64-apple-darwin.ll +++ /dev/null @@ -1,647 +0,0 @@ -; ModuleID = 'hugr' -source_filename = "hugr" -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_Index out .DD115165.0" = private constant [29 x i8] c"\1CEXIT:INT:Index out of bounds" -@"e_Array alre.5A300C2A.0" = private constant [57 x i8] c"8EXIT:INT:Array already contains an element at this index" -@"e_Array elem.E746B1A3.0" = private constant [43 x i8] c"*EXIT:INT:Array element is already borrowed" -@"e_Array cont.EFA5AC45.0" = private constant [70 x i8] c"EEXIT:INT:Array contains non-borrowed elements and cannot be discarded" -@"e_Some array.A77EF32E.0" = private constant [48 x i8] c"/EXIT:INT:Some array elements have been borrowed" -@res_outcomes.9CB6D2E7.0 = private constant [22 x i8] c"\15USER:BOOLARR:outcomes" -@"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." - -define void @__hugr__.__main__.main.1() local_unnamed_addr { -alloca_block: - %0 = tail call ptr @heap_alloc(i64 10) - %1 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %1, align 1 - %2 = tail call ptr @heap_alloc(i64 80) - %3 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %3, align 1 - %4 = tail call ptr @heap_alloc(i64 80) - %5 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %5, align 1 - %qalloc.i = tail call i64 @___qalloc() - %not_max.not.not.i = icmp eq i64 %qalloc.i, -1 - br i1 %not_max.not.not.i, label %cond_442_case_0.i, label %__barray_check_bounds.exit - -cond_442_case_0.i: ; preds = %cond_exit_12.8, %cond_exit_12.7, %cond_exit_12.6, %cond_exit_12.5, %cond_exit_12.4, %cond_exit_12.3, %cond_exit_12.2, %cond_exit_12.1, %cond_exit_12, %alloca_block - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__barray_check_bounds.exit: ; preds = %alloca_block - tail call void @___reset(i64 %qalloc.i) - %6 = load i64, ptr %5, align 4 - %7 = trunc i64 %6 to i1 - br i1 %7, label %cond_exit_12, label %panic.i - -panic.i: ; preds = %__barray_check_bounds.exit.9, %__barray_check_bounds.exit.8, %__barray_check_bounds.exit.7, %__barray_check_bounds.exit.6, %__barray_check_bounds.exit.5, %__barray_check_bounds.exit.4, %__barray_check_bounds.exit.3, %__barray_check_bounds.exit.2, %__barray_check_bounds.exit.1, %__barray_check_bounds.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -cond_exit_12: ; preds = %__barray_check_bounds.exit - %8 = and i64 %6, -2 - store i64 %8, ptr %5, align 4 - store i64 %qalloc.i, ptr %4, align 4 - %qalloc.i.1 = tail call i64 @___qalloc() - %not_max.not.not.i.1 = icmp eq i64 %qalloc.i.1, -1 - br i1 %not_max.not.not.i.1, label %cond_442_case_0.i, label %__barray_check_bounds.exit.1 - -__barray_check_bounds.exit.1: ; preds = %cond_exit_12 - tail call void @___reset(i64 %qalloc.i.1) - %9 = load i64, ptr %5, align 4 - %10 = and i64 %9, 2 - %.not = icmp eq i64 %10, 0 - br i1 %.not, label %panic.i, label %cond_exit_12.1 - -cond_exit_12.1: ; preds = %__barray_check_bounds.exit.1 - %11 = and i64 %9, -3 - store i64 %11, ptr %5, align 4 - %12 = getelementptr inbounds nuw i8, ptr %4, i64 8 - store i64 %qalloc.i.1, ptr %12, align 4 - %qalloc.i.2 = tail call i64 @___qalloc() - %not_max.not.not.i.2 = icmp eq i64 %qalloc.i.2, -1 - br i1 %not_max.not.not.i.2, label %cond_442_case_0.i, label %__barray_check_bounds.exit.2 - -__barray_check_bounds.exit.2: ; preds = %cond_exit_12.1 - tail call void @___reset(i64 %qalloc.i.2) - %13 = load i64, ptr %5, align 4 - %14 = and i64 %13, 4 - %.not1199 = icmp eq i64 %14, 0 - br i1 %.not1199, label %panic.i, label %cond_exit_12.2 - -cond_exit_12.2: ; preds = %__barray_check_bounds.exit.2 - %15 = and i64 %13, -5 - store i64 %15, ptr %5, align 4 - %16 = getelementptr inbounds nuw i8, ptr %4, i64 16 - store i64 %qalloc.i.2, ptr %16, align 4 - %qalloc.i.3 = tail call i64 @___qalloc() - %not_max.not.not.i.3 = icmp eq i64 %qalloc.i.3, -1 - br i1 %not_max.not.not.i.3, label %cond_442_case_0.i, label %__barray_check_bounds.exit.3 - -__barray_check_bounds.exit.3: ; preds = %cond_exit_12.2 - tail call void @___reset(i64 %qalloc.i.3) - %17 = load i64, ptr %5, align 4 - %18 = and i64 %17, 8 - %.not1200 = icmp eq i64 %18, 0 - br i1 %.not1200, label %panic.i, label %cond_exit_12.3 - -cond_exit_12.3: ; preds = %__barray_check_bounds.exit.3 - %19 = and i64 %17, -9 - store i64 %19, ptr %5, align 4 - %20 = getelementptr inbounds nuw i8, ptr %4, i64 24 - store i64 %qalloc.i.3, ptr %20, align 4 - %qalloc.i.4 = tail call i64 @___qalloc() - %not_max.not.not.i.4 = icmp eq i64 %qalloc.i.4, -1 - br i1 %not_max.not.not.i.4, label %cond_442_case_0.i, label %__barray_check_bounds.exit.4 - -__barray_check_bounds.exit.4: ; preds = %cond_exit_12.3 - tail call void @___reset(i64 %qalloc.i.4) - %21 = load i64, ptr %5, align 4 - %22 = and i64 %21, 16 - %.not1201 = icmp eq i64 %22, 0 - br i1 %.not1201, label %panic.i, label %cond_exit_12.4 - -cond_exit_12.4: ; preds = %__barray_check_bounds.exit.4 - %23 = and i64 %21, -17 - store i64 %23, ptr %5, align 4 - %24 = getelementptr inbounds nuw i8, ptr %4, i64 32 - store i64 %qalloc.i.4, ptr %24, align 4 - %qalloc.i.5 = tail call i64 @___qalloc() - %not_max.not.not.i.5 = icmp eq i64 %qalloc.i.5, -1 - br i1 %not_max.not.not.i.5, label %cond_442_case_0.i, label %__barray_check_bounds.exit.5 - -__barray_check_bounds.exit.5: ; preds = %cond_exit_12.4 - tail call void @___reset(i64 %qalloc.i.5) - %25 = load i64, ptr %5, align 4 - %26 = and i64 %25, 32 - %.not1202 = icmp eq i64 %26, 0 - br i1 %.not1202, label %panic.i, label %cond_exit_12.5 - -cond_exit_12.5: ; preds = %__barray_check_bounds.exit.5 - %27 = and i64 %25, -33 - store i64 %27, ptr %5, align 4 - %28 = getelementptr inbounds nuw i8, ptr %4, i64 40 - store i64 %qalloc.i.5, ptr %28, align 4 - %qalloc.i.6 = tail call i64 @___qalloc() - %not_max.not.not.i.6 = icmp eq i64 %qalloc.i.6, -1 - br i1 %not_max.not.not.i.6, label %cond_442_case_0.i, label %__barray_check_bounds.exit.6 - -__barray_check_bounds.exit.6: ; preds = %cond_exit_12.5 - tail call void @___reset(i64 %qalloc.i.6) - %29 = load i64, ptr %5, align 4 - %30 = and i64 %29, 64 - %.not1203 = icmp eq i64 %30, 0 - br i1 %.not1203, label %panic.i, label %cond_exit_12.6 - -cond_exit_12.6: ; preds = %__barray_check_bounds.exit.6 - %31 = and i64 %29, -65 - store i64 %31, ptr %5, align 4 - %32 = getelementptr inbounds nuw i8, ptr %4, i64 48 - store i64 %qalloc.i.6, ptr %32, align 4 - %qalloc.i.7 = tail call i64 @___qalloc() - %not_max.not.not.i.7 = icmp eq i64 %qalloc.i.7, -1 - br i1 %not_max.not.not.i.7, label %cond_442_case_0.i, label %__barray_check_bounds.exit.7 - -__barray_check_bounds.exit.7: ; preds = %cond_exit_12.6 - tail call void @___reset(i64 %qalloc.i.7) - %33 = load i64, ptr %5, align 4 - %34 = and i64 %33, 128 - %.not1204 = icmp eq i64 %34, 0 - br i1 %.not1204, label %panic.i, label %cond_exit_12.7 - -cond_exit_12.7: ; preds = %__barray_check_bounds.exit.7 - %35 = and i64 %33, -129 - store i64 %35, ptr %5, align 4 - %36 = getelementptr inbounds nuw i8, ptr %4, i64 56 - store i64 %qalloc.i.7, ptr %36, align 4 - %qalloc.i.8 = tail call i64 @___qalloc() - %not_max.not.not.i.8 = icmp eq i64 %qalloc.i.8, -1 - br i1 %not_max.not.not.i.8, label %cond_442_case_0.i, label %__barray_check_bounds.exit.8 - -__barray_check_bounds.exit.8: ; preds = %cond_exit_12.7 - tail call void @___reset(i64 %qalloc.i.8) - %37 = load i64, ptr %5, align 4 - %38 = and i64 %37, 256 - %.not1205 = icmp eq i64 %38, 0 - br i1 %.not1205, label %panic.i, label %cond_exit_12.8 - -cond_exit_12.8: ; preds = %__barray_check_bounds.exit.8 - %39 = and i64 %37, -257 - store i64 %39, ptr %5, align 4 - %40 = getelementptr inbounds nuw i8, ptr %4, i64 64 - store i64 %qalloc.i.8, ptr %40, align 4 - %qalloc.i.9 = tail call i64 @___qalloc() - %not_max.not.not.i.9 = icmp eq i64 %qalloc.i.9, -1 - br i1 %not_max.not.not.i.9, label %cond_442_case_0.i, label %__barray_check_bounds.exit.9 - -__barray_check_bounds.exit.9: ; preds = %cond_exit_12.8 - tail call void @___reset(i64 %qalloc.i.9) - %41 = load i64, ptr %5, align 4 - %42 = and i64 %41, 512 - %.not1206 = icmp eq i64 %42, 0 - br i1 %.not1206, label %panic.i, label %cond_exit_12.9 - -cond_exit_12.9: ; preds = %__barray_check_bounds.exit.9 - %43 = and i64 %41, -513 - store i64 %43, ptr %5, align 4 - %44 = getelementptr inbounds nuw i8, ptr %4, i64 72 - store i64 %qalloc.i.9, ptr %44, align 4 - %45 = load i64, ptr %5, align 4 - %46 = trunc i64 %45 to i1 - br i1 %46, label %panic.i1117, label %__barray_mask_borrow.exit - -panic.i1117: ; preds = %cond_exit_12.9 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit: ; preds = %cond_exit_12.9 - %47 = or disjoint i64 %45, 1 - store i64 %47, ptr %5, align 4 - %48 = load i64, ptr %4, align 4 - tail call void @___rxy(i64 %48, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %48, double 0x400921FB54442D18) - %49 = load i64, ptr %5, align 4 - %50 = trunc i64 %49 to i1 - br i1 %50, label %__barray_mask_return.exit1119, label %panic.i1118 - -panic.i1118: ; preds = %__barray_mask_borrow.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1119: ; preds = %__barray_mask_borrow.exit - %51 = and i64 %49, -2 - store i64 %51, ptr %5, align 4 - store i64 %48, ptr %4, align 4 - br label %__barray_check_bounds.exit1121 - -__barray_check_bounds.exit1121: ; preds = %__barray_mask_return.exit1119, %__barray_mask_return.exit1135 - %52 = phi i64 [ 1, %__barray_mask_return.exit1119 ], [ %74, %__barray_mask_return.exit1135 ] - %"116_0.01189" = phi i64 [ 0, %__barray_mask_return.exit1119 ], [ %52, %__barray_mask_return.exit1135 ] - %53 = load i64, ptr %5, align 4 - %54 = lshr i64 %53, %"116_0.01189" - %55 = trunc i64 %54 to i1 - br i1 %55, label %panic.i1122, label %__barray_check_bounds.exit1125 - -panic.i1122: ; preds = %__barray_check_bounds.exit1121 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1125: ; preds = %__barray_check_bounds.exit1121 - %56 = shl nuw nsw i64 1, %"116_0.01189" - %57 = xor i64 %53, %56 - store i64 %57, ptr %5, align 4 - %58 = getelementptr inbounds nuw i64, ptr %4, i64 %"116_0.01189" - %59 = load i64, ptr %58, align 4 - %60 = lshr i64 %57, %52 - %61 = trunc i64 %60 to i1 - br i1 %61, label %panic.i1126, label %__barray_check_bounds.exit1129 - -panic.i1126: ; preds = %__barray_check_bounds.exit1125 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1129: ; preds = %__barray_check_bounds.exit1125 - %62 = shl nuw nsw i64 2, %"116_0.01189" - %63 = xor i64 %57, %62 - store i64 %63, ptr %5, align 4 - %64 = getelementptr inbounds nuw i64, ptr %4, i64 %52 - %65 = load i64, ptr %64, align 4 - tail call void @___rxy(i64 %65, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rzz(i64 %59, i64 %65, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %59, double 0xBFF921FB54442D18) - tail call void @___rxy(i64 %65, double 0x3FF921FB54442D18, double 0x400921FB54442D18) - tail call void @___rz(i64 %65, double 0xBFF921FB54442D18) - %66 = load i64, ptr %5, align 4 - %67 = lshr i64 %66, %"116_0.01189" - %68 = trunc i64 %67 to i1 - br i1 %68, label %__barray_check_bounds.exit1133, label %panic.i1130 - -panic.i1130: ; preds = %__barray_check_bounds.exit1129 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_check_bounds.exit1133: ; preds = %__barray_check_bounds.exit1129 - %69 = xor i64 %66, %56 - store i64 %69, ptr %5, align 4 - store i64 %59, ptr %58, align 4 - %70 = load i64, ptr %5, align 4 - %71 = lshr i64 %70, %52 - %72 = trunc i64 %71 to i1 - br i1 %72, label %__barray_mask_return.exit1135, label %panic.i1134 - -panic.i1134: ; preds = %__barray_check_bounds.exit1133 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1135: ; preds = %__barray_check_bounds.exit1133 - %73 = xor i64 %70, %62 - store i64 %73, ptr %5, align 4 - store i64 %65, ptr %64, align 4 - %74 = add nuw nsw i64 %52, 1 - %exitcond1192 = icmp eq i64 %74, 10 - br i1 %exitcond1192, label %loop_body346.preheader, label %__barray_check_bounds.exit1121 - -out_of_bounds.i1136: ; preds = %.thread - tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") - unreachable - -__barray_check_bounds.exit1137: ; preds = %.thread - %75 = load i64, ptr %3, align 4 - %76 = lshr i64 %75, %"237_2.01196" - %77 = trunc i64 %76 to i1 - br i1 %77, label %cond_exit_241, label %panic.i1138 - -panic.i1138: ; preds = %__barray_check_bounds.exit1137 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -mask_block_ok.i: ; preds = %cond_exit_241 - %78 = load i64, ptr %5, align 4 - %79 = or i64 %78, -1024 - store i64 %79, ptr %5, align 4 - %80 = icmp eq i64 %79, -1 - br i1 %80, label %loop_body455.preheader.preheader, label %mask_block_err.i - -mask_block_err.i: ; preds = %mask_block_ok.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -loop_body346.preheader: ; preds = %__barray_mask_return.exit1135, %cond_exit_241 - %"237_0.sroa.15.01197" = phi i64 [ %81, %cond_exit_241 ], [ 0, %__barray_mask_return.exit1135 ] - %"237_2.01196" = phi i64 [ %89, %cond_exit_241 ], [ 0, %__barray_mask_return.exit1135 ] - %81 = add nuw nsw i64 %"237_0.sroa.15.01197", 1 - %82 = load i64, ptr %5, align 4 - %83 = lshr i64 %82, %"237_0.sroa.15.01197" - %84 = trunc i64 %83 to i1 - br i1 %84, label %panic.i1142, label %.thread - -panic.i1142: ; preds = %loop_body346.preheader - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -.thread: ; preds = %loop_body346.preheader - %85 = shl nuw nsw i64 1, %"237_0.sroa.15.01197" - %86 = xor i64 %82, %85 - store i64 %86, ptr %5, align 4 - %87 = getelementptr inbounds nuw i64, ptr %4, i64 %"237_0.sroa.15.01197" - %88 = load i64, ptr %87, align 4 - %89 = add i64 %"237_2.01196", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %88) - tail call void @___qfree(i64 %88) - %90 = icmp ult i64 %"237_2.01196", 10 - br i1 %90, label %__barray_check_bounds.exit1137, label %out_of_bounds.i1136 - -cond_exit_241: ; preds = %__barray_check_bounds.exit1137 - %91 = shl nuw nsw i64 1, %"237_2.01196" - %92 = xor i64 %75, %91 - store i64 %92, ptr %3, align 4 - %93 = getelementptr inbounds nuw i64, ptr %2, i64 %"237_2.01196" - store i64 %lazy_measure, ptr %93, align 4 - %94 = icmp samesign ugt i64 %"237_0.sroa.15.01197", 8 - br i1 %94, label %mask_block_ok.i, label %loop_body346.preheader - -loop_body455.preheader.preheader: ; preds = %mask_block_ok.i - tail call void @heap_free(ptr nonnull %4) - tail call void @heap_free(ptr nonnull %5) - br label %__barray_check_bounds.exit1145 - -__barray_check_bounds.exit1145: ; preds = %cond_exit_307, %loop_body455.preheader.preheader - %"303_0.sroa.15.01191" = phi i64 [ %95, %cond_exit_307 ], [ 0, %loop_body455.preheader.preheader ] - %95 = add nuw nsw i64 %"303_0.sroa.15.01191", 1 - %96 = load i64, ptr %3, align 4 - %97 = lshr i64 %96, %"303_0.sroa.15.01191" - %98 = trunc i64 %97 to i1 - br i1 %98, label %panic.i1146, label %__barray_check_bounds.exit1149 - -panic.i1146: ; preds = %__barray_check_bounds.exit1145 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1149: ; preds = %__barray_check_bounds.exit1145 - %99 = shl nuw nsw i64 1, %"303_0.sroa.15.01191" - %100 = xor i64 %96, %99 - store i64 %100, ptr %3, align 4 - %101 = getelementptr inbounds nuw i64, ptr %2, i64 %"303_0.sroa.15.01191" - %102 = load i64, ptr %101, align 4 - tail call void @___inc_future_refcount(i64 %102) - %103 = load i64, ptr %3, align 4 - %104 = lshr i64 %103, %"303_0.sroa.15.01191" - %105 = trunc i64 %104 to i1 - br i1 %105, label %__barray_check_bounds.exit1153, label %panic.i1150 - -panic.i1150: ; preds = %__barray_check_bounds.exit1149 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_check_bounds.exit1153: ; preds = %__barray_check_bounds.exit1149 - %106 = xor i64 %103, %99 - store i64 %106, ptr %3, align 4 - store i64 %102, ptr %101, align 4 - %read_bool = tail call i1 @___read_future_bool(i64 %102) - tail call void @___dec_future_refcount(i64 %102) - %107 = load i64, ptr %1, align 4 - %108 = lshr i64 %107, %"303_0.sroa.15.01191" - %109 = trunc i64 %108 to i1 - br i1 %109, label %cond_exit_307, label %panic.i1154 - -panic.i1154: ; preds = %__barray_check_bounds.exit1153 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -mask_block_err.i1159: ; preds = %cond_exit_488.9 - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_mask_borrow.exit1167: ; preds = %__barray_check_bounds.exit1163.preheader - %110 = or disjoint i64 %163, 1 - store i64 %110, ptr %3, align 4 - %111 = load i64, ptr %2, align 4 - tail call void @___dec_future_refcount(i64 %111) - br label %cond_exit_488 - -cond_exit_488: ; preds = %__barray_mask_borrow.exit1167, %__barray_check_bounds.exit1163.preheader - %112 = load i64, ptr %3, align 4 - %113 = and i64 %112, 2 - %.not1207 = icmp eq i64 %113, 0 - br i1 %.not1207, label %__barray_mask_borrow.exit1167.1, label %cond_exit_488.1 - -__barray_mask_borrow.exit1167.1: ; preds = %cond_exit_488 - %114 = or disjoint i64 %112, 2 - store i64 %114, ptr %3, align 4 - %115 = getelementptr inbounds nuw i8, ptr %2, i64 8 - %116 = load i64, ptr %115, align 4 - tail call void @___dec_future_refcount(i64 %116) - br label %cond_exit_488.1 - -cond_exit_488.1: ; preds = %__barray_mask_borrow.exit1167.1, %cond_exit_488 - %117 = load i64, ptr %3, align 4 - %118 = and i64 %117, 4 - %.not1208 = icmp eq i64 %118, 0 - br i1 %.not1208, label %__barray_mask_borrow.exit1167.2, label %cond_exit_488.2 - -__barray_mask_borrow.exit1167.2: ; preds = %cond_exit_488.1 - %119 = or disjoint i64 %117, 4 - store i64 %119, ptr %3, align 4 - %120 = getelementptr inbounds nuw i8, ptr %2, i64 16 - %121 = load i64, ptr %120, align 4 - tail call void @___dec_future_refcount(i64 %121) - br label %cond_exit_488.2 - -cond_exit_488.2: ; preds = %__barray_mask_borrow.exit1167.2, %cond_exit_488.1 - %122 = load i64, ptr %3, align 4 - %123 = and i64 %122, 8 - %.not1209 = icmp eq i64 %123, 0 - br i1 %.not1209, label %__barray_mask_borrow.exit1167.3, label %cond_exit_488.3 - -__barray_mask_borrow.exit1167.3: ; preds = %cond_exit_488.2 - %124 = or disjoint i64 %122, 8 - store i64 %124, ptr %3, align 4 - %125 = getelementptr inbounds nuw i8, ptr %2, i64 24 - %126 = load i64, ptr %125, align 4 - tail call void @___dec_future_refcount(i64 %126) - br label %cond_exit_488.3 - -cond_exit_488.3: ; preds = %__barray_mask_borrow.exit1167.3, %cond_exit_488.2 - %127 = load i64, ptr %3, align 4 - %128 = and i64 %127, 16 - %.not1210 = icmp eq i64 %128, 0 - br i1 %.not1210, label %__barray_mask_borrow.exit1167.4, label %cond_exit_488.4 - -__barray_mask_borrow.exit1167.4: ; preds = %cond_exit_488.3 - %129 = or disjoint i64 %127, 16 - store i64 %129, ptr %3, align 4 - %130 = getelementptr inbounds nuw i8, ptr %2, i64 32 - %131 = load i64, ptr %130, align 4 - tail call void @___dec_future_refcount(i64 %131) - br label %cond_exit_488.4 - -cond_exit_488.4: ; preds = %__barray_mask_borrow.exit1167.4, %cond_exit_488.3 - %132 = load i64, ptr %3, align 4 - %133 = and i64 %132, 32 - %.not1211 = icmp eq i64 %133, 0 - br i1 %.not1211, label %__barray_mask_borrow.exit1167.5, label %cond_exit_488.5 - -__barray_mask_borrow.exit1167.5: ; preds = %cond_exit_488.4 - %134 = or disjoint i64 %132, 32 - store i64 %134, ptr %3, align 4 - %135 = getelementptr inbounds nuw i8, ptr %2, i64 40 - %136 = load i64, ptr %135, align 4 - tail call void @___dec_future_refcount(i64 %136) - br label %cond_exit_488.5 - -cond_exit_488.5: ; preds = %__barray_mask_borrow.exit1167.5, %cond_exit_488.4 - %137 = load i64, ptr %3, align 4 - %138 = and i64 %137, 64 - %.not1212 = icmp eq i64 %138, 0 - br i1 %.not1212, label %__barray_mask_borrow.exit1167.6, label %cond_exit_488.6 - -__barray_mask_borrow.exit1167.6: ; preds = %cond_exit_488.5 - %139 = or disjoint i64 %137, 64 - store i64 %139, ptr %3, align 4 - %140 = getelementptr inbounds nuw i8, ptr %2, i64 48 - %141 = load i64, ptr %140, align 4 - tail call void @___dec_future_refcount(i64 %141) - br label %cond_exit_488.6 - -cond_exit_488.6: ; preds = %__barray_mask_borrow.exit1167.6, %cond_exit_488.5 - %142 = load i64, ptr %3, align 4 - %143 = and i64 %142, 128 - %.not1213 = icmp eq i64 %143, 0 - br i1 %.not1213, label %__barray_mask_borrow.exit1167.7, label %cond_exit_488.7 - -__barray_mask_borrow.exit1167.7: ; preds = %cond_exit_488.6 - %144 = or disjoint i64 %142, 128 - store i64 %144, ptr %3, align 4 - %145 = getelementptr inbounds nuw i8, ptr %2, i64 56 - %146 = load i64, ptr %145, align 4 - tail call void @___dec_future_refcount(i64 %146) - br label %cond_exit_488.7 - -cond_exit_488.7: ; preds = %__barray_mask_borrow.exit1167.7, %cond_exit_488.6 - %147 = load i64, ptr %3, align 4 - %148 = and i64 %147, 256 - %.not1214 = icmp eq i64 %148, 0 - br i1 %.not1214, label %__barray_mask_borrow.exit1167.8, label %cond_exit_488.8 - -__barray_mask_borrow.exit1167.8: ; preds = %cond_exit_488.7 - %149 = or disjoint i64 %147, 256 - store i64 %149, ptr %3, align 4 - %150 = getelementptr inbounds nuw i8, ptr %2, i64 64 - %151 = load i64, ptr %150, align 4 - tail call void @___dec_future_refcount(i64 %151) - br label %cond_exit_488.8 - -cond_exit_488.8: ; preds = %__barray_mask_borrow.exit1167.8, %cond_exit_488.7 - %152 = load i64, ptr %3, align 4 - %153 = and i64 %152, 512 - %.not1215 = icmp eq i64 %153, 0 - br i1 %.not1215, label %__barray_mask_borrow.exit1167.9, label %cond_exit_488.9 - -__barray_mask_borrow.exit1167.9: ; preds = %cond_exit_488.8 - %154 = or disjoint i64 %152, 512 - store i64 %154, ptr %3, align 4 - %155 = getelementptr inbounds nuw i8, ptr %2, i64 72 - %156 = load i64, ptr %155, align 4 - tail call void @___dec_future_refcount(i64 %156) - br label %cond_exit_488.9 - -cond_exit_488.9: ; preds = %__barray_mask_borrow.exit1167.9, %cond_exit_488.8 - %157 = load i64, ptr %3, align 4 - %158 = or i64 %157, -1024 - store i64 %158, ptr %3, align 4 - %159 = icmp eq i64 %158, -1 - br i1 %159, label %loop_out454, label %mask_block_err.i1159 - -cond_exit_307: ; preds = %__barray_check_bounds.exit1153 - %160 = xor i64 %107, %99 - store i64 %160, ptr %1, align 4 - %161 = getelementptr inbounds nuw i1, ptr %0, i64 %"303_0.sroa.15.01191" - store i1 %read_bool, ptr %161, align 1 - %162 = icmp eq i64 %"303_0.sroa.15.01191", 9 - br i1 %162, label %__barray_check_bounds.exit1163.preheader, label %__barray_check_bounds.exit1145 - -__barray_check_bounds.exit1163.preheader: ; preds = %cond_exit_307 - %163 = load i64, ptr %3, align 4 - %164 = trunc i64 %163 to i1 - br i1 %164, label %cond_exit_488, label %__barray_mask_borrow.exit1167 - -loop_out454: ; preds = %cond_exit_488.9 - tail call void @heap_free(ptr %2) - tail call void @heap_free(ptr nonnull %3) - %165 = load i64, ptr %1, align 4 - %166 = and i64 %165, 1023 - store i64 %166, ptr %1, align 4 - %167 = icmp eq i64 %166, 0 - br i1 %167, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1168 - -mask_block_err.i1168: ; preds = %loop_out454 - tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") - unreachable - -__barray_check_none_borrowed.exit: ; preds = %loop_out454 - %168 = tail call ptr @heap_alloc(i64 10) - %169 = tail call ptr @heap_alloc(i64 8) - store i64 0, ptr %169, align 1 - tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(10) %168, ptr noundef nonnull align 1 dereferenceable(10) %0, i64 10, i1 false) - tail call void @heap_free(ptr nonnull %168) - %170 = load i64, ptr %1, align 4 - %171 = and i64 %170, 1023 - store i64 %171, ptr %1, align 4 - %172 = icmp eq i64 %171, 0 - br i1 %172, label %__barray_check_none_borrowed.exit1172, label %mask_block_err.i1170 - -mask_block_err.i1170: ; preds = %__barray_check_none_borrowed.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") - unreachable - -__barray_check_none_borrowed.exit1172: ; preds = %__barray_check_none_borrowed.exit - %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 - %y_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 4 - %arr_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 8 - %mask_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 16 - %173 = alloca [10 x i1], align 1 - call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(10) %173, i8 0, i64 10, i1 false) - store i32 10, ptr %out_arr_alloca, align 8 - store i32 1, ptr %y_ptr, align 4 - store ptr %0, ptr %arr_ptr, align 8 - store ptr %173, ptr %mask_ptr, align 8 - call void @print_bool_arr(ptr nonnull @res_outcomes.9CB6D2E7.0, i64 21, ptr nonnull %out_arr_alloca) - ret void -} - -declare ptr @heap_alloc(i64) local_unnamed_addr - -; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) -declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immarg) #0 - -; Function Attrs: noreturn -declare void @panic(i32, ptr) local_unnamed_addr #1 - -declare void @heap_free(ptr) local_unnamed_addr - -declare i64 @___lazy_measure(i64) local_unnamed_addr - -declare void @___qfree(i64) local_unnamed_addr - -declare void @___inc_future_refcount(i64) local_unnamed_addr - -declare void @___dec_future_refcount(i64) local_unnamed_addr - -declare i1 @___read_future_bool(i64) local_unnamed_addr - -; Function Attrs: mustprogress 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) #2 - -declare void @print_bool_arr(ptr, i64, ptr) local_unnamed_addr - -declare void @___rxy(i64, double, double) local_unnamed_addr - -declare void @___rz(i64, double) local_unnamed_addr - -declare void @___rzz(i64, i64, double) local_unnamed_addr - -declare i64 @___qalloc() local_unnamed_addr - -declare void @___reset(i64) local_unnamed_addr - -define i64 @qmain(i64 %0) local_unnamed_addr { -entry: - tail call void @setup(i64 %0) - tail call void @__hugr__.__main__.main.1() - %1 = tail call i64 @teardown() - ret i64 %1 -} - -declare void @setup(i64) local_unnamed_addr - -declare i64 @teardown() local_unnamed_addr - -attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } -attributes #1 = { noreturn } -attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) } - -!name = !{!0} - -!0 = !{!"mainlib"} diff --git a/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace/trace_test-helios-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace/trace_test-helios-x86_64-unknown-linux-gnu.ll deleted file mode 100644 index ee5498f8..00000000 --- a/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace/trace_test-helios-x86_64-unknown-linux-gnu.ll +++ /dev/null @@ -1,647 +0,0 @@ -; ModuleID = 'hugr' -source_filename = "hugr" -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_Index out .DD115165.0" = private constant [29 x i8] c"\1CEXIT:INT:Index out of bounds" -@"e_Array alre.5A300C2A.0" = private constant [57 x i8] c"8EXIT:INT:Array already contains an element at this index" -@"e_Array elem.E746B1A3.0" = private constant [43 x i8] c"*EXIT:INT:Array element is already borrowed" -@"e_Array cont.EFA5AC45.0" = private constant [70 x i8] c"EEXIT:INT:Array contains non-borrowed elements and cannot be discarded" -@"e_Some array.A77EF32E.0" = private constant [48 x i8] c"/EXIT:INT:Some array elements have been borrowed" -@res_outcomes.9CB6D2E7.0 = private constant [22 x i8] c"\15USER:BOOLARR:outcomes" -@"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." - -define void @__hugr__.__main__.main.1() local_unnamed_addr { -alloca_block: - %0 = tail call ptr @heap_alloc(i64 10) - %1 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %1, align 1 - %2 = tail call ptr @heap_alloc(i64 80) - %3 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %3, align 1 - %4 = tail call ptr @heap_alloc(i64 80) - %5 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %5, align 1 - %qalloc.i = tail call i64 @___qalloc() - %not_max.not.not.i = icmp eq i64 %qalloc.i, -1 - br i1 %not_max.not.not.i, label %cond_442_case_0.i, label %__barray_check_bounds.exit - -cond_442_case_0.i: ; preds = %cond_exit_12.8, %cond_exit_12.7, %cond_exit_12.6, %cond_exit_12.5, %cond_exit_12.4, %cond_exit_12.3, %cond_exit_12.2, %cond_exit_12.1, %cond_exit_12, %alloca_block - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__barray_check_bounds.exit: ; preds = %alloca_block - tail call void @___reset(i64 %qalloc.i) - %6 = load i64, ptr %5, align 4 - %7 = trunc i64 %6 to i1 - br i1 %7, label %cond_exit_12, label %panic.i - -panic.i: ; preds = %__barray_check_bounds.exit.9, %__barray_check_bounds.exit.8, %__barray_check_bounds.exit.7, %__barray_check_bounds.exit.6, %__barray_check_bounds.exit.5, %__barray_check_bounds.exit.4, %__barray_check_bounds.exit.3, %__barray_check_bounds.exit.2, %__barray_check_bounds.exit.1, %__barray_check_bounds.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -cond_exit_12: ; preds = %__barray_check_bounds.exit - %8 = and i64 %6, -2 - store i64 %8, ptr %5, align 4 - store i64 %qalloc.i, ptr %4, align 4 - %qalloc.i.1 = tail call i64 @___qalloc() - %not_max.not.not.i.1 = icmp eq i64 %qalloc.i.1, -1 - br i1 %not_max.not.not.i.1, label %cond_442_case_0.i, label %__barray_check_bounds.exit.1 - -__barray_check_bounds.exit.1: ; preds = %cond_exit_12 - tail call void @___reset(i64 %qalloc.i.1) - %9 = load i64, ptr %5, align 4 - %10 = and i64 %9, 2 - %.not = icmp eq i64 %10, 0 - br i1 %.not, label %panic.i, label %cond_exit_12.1 - -cond_exit_12.1: ; preds = %__barray_check_bounds.exit.1 - %11 = and i64 %9, -3 - store i64 %11, ptr %5, align 4 - %12 = getelementptr inbounds nuw i8, ptr %4, i64 8 - store i64 %qalloc.i.1, ptr %12, align 4 - %qalloc.i.2 = tail call i64 @___qalloc() - %not_max.not.not.i.2 = icmp eq i64 %qalloc.i.2, -1 - br i1 %not_max.not.not.i.2, label %cond_442_case_0.i, label %__barray_check_bounds.exit.2 - -__barray_check_bounds.exit.2: ; preds = %cond_exit_12.1 - tail call void @___reset(i64 %qalloc.i.2) - %13 = load i64, ptr %5, align 4 - %14 = and i64 %13, 4 - %.not1199 = icmp eq i64 %14, 0 - br i1 %.not1199, label %panic.i, label %cond_exit_12.2 - -cond_exit_12.2: ; preds = %__barray_check_bounds.exit.2 - %15 = and i64 %13, -5 - store i64 %15, ptr %5, align 4 - %16 = getelementptr inbounds nuw i8, ptr %4, i64 16 - store i64 %qalloc.i.2, ptr %16, align 4 - %qalloc.i.3 = tail call i64 @___qalloc() - %not_max.not.not.i.3 = icmp eq i64 %qalloc.i.3, -1 - br i1 %not_max.not.not.i.3, label %cond_442_case_0.i, label %__barray_check_bounds.exit.3 - -__barray_check_bounds.exit.3: ; preds = %cond_exit_12.2 - tail call void @___reset(i64 %qalloc.i.3) - %17 = load i64, ptr %5, align 4 - %18 = and i64 %17, 8 - %.not1200 = icmp eq i64 %18, 0 - br i1 %.not1200, label %panic.i, label %cond_exit_12.3 - -cond_exit_12.3: ; preds = %__barray_check_bounds.exit.3 - %19 = and i64 %17, -9 - store i64 %19, ptr %5, align 4 - %20 = getelementptr inbounds nuw i8, ptr %4, i64 24 - store i64 %qalloc.i.3, ptr %20, align 4 - %qalloc.i.4 = tail call i64 @___qalloc() - %not_max.not.not.i.4 = icmp eq i64 %qalloc.i.4, -1 - br i1 %not_max.not.not.i.4, label %cond_442_case_0.i, label %__barray_check_bounds.exit.4 - -__barray_check_bounds.exit.4: ; preds = %cond_exit_12.3 - tail call void @___reset(i64 %qalloc.i.4) - %21 = load i64, ptr %5, align 4 - %22 = and i64 %21, 16 - %.not1201 = icmp eq i64 %22, 0 - br i1 %.not1201, label %panic.i, label %cond_exit_12.4 - -cond_exit_12.4: ; preds = %__barray_check_bounds.exit.4 - %23 = and i64 %21, -17 - store i64 %23, ptr %5, align 4 - %24 = getelementptr inbounds nuw i8, ptr %4, i64 32 - store i64 %qalloc.i.4, ptr %24, align 4 - %qalloc.i.5 = tail call i64 @___qalloc() - %not_max.not.not.i.5 = icmp eq i64 %qalloc.i.5, -1 - br i1 %not_max.not.not.i.5, label %cond_442_case_0.i, label %__barray_check_bounds.exit.5 - -__barray_check_bounds.exit.5: ; preds = %cond_exit_12.4 - tail call void @___reset(i64 %qalloc.i.5) - %25 = load i64, ptr %5, align 4 - %26 = and i64 %25, 32 - %.not1202 = icmp eq i64 %26, 0 - br i1 %.not1202, label %panic.i, label %cond_exit_12.5 - -cond_exit_12.5: ; preds = %__barray_check_bounds.exit.5 - %27 = and i64 %25, -33 - store i64 %27, ptr %5, align 4 - %28 = getelementptr inbounds nuw i8, ptr %4, i64 40 - store i64 %qalloc.i.5, ptr %28, align 4 - %qalloc.i.6 = tail call i64 @___qalloc() - %not_max.not.not.i.6 = icmp eq i64 %qalloc.i.6, -1 - br i1 %not_max.not.not.i.6, label %cond_442_case_0.i, label %__barray_check_bounds.exit.6 - -__barray_check_bounds.exit.6: ; preds = %cond_exit_12.5 - tail call void @___reset(i64 %qalloc.i.6) - %29 = load i64, ptr %5, align 4 - %30 = and i64 %29, 64 - %.not1203 = icmp eq i64 %30, 0 - br i1 %.not1203, label %panic.i, label %cond_exit_12.6 - -cond_exit_12.6: ; preds = %__barray_check_bounds.exit.6 - %31 = and i64 %29, -65 - store i64 %31, ptr %5, align 4 - %32 = getelementptr inbounds nuw i8, ptr %4, i64 48 - store i64 %qalloc.i.6, ptr %32, align 4 - %qalloc.i.7 = tail call i64 @___qalloc() - %not_max.not.not.i.7 = icmp eq i64 %qalloc.i.7, -1 - br i1 %not_max.not.not.i.7, label %cond_442_case_0.i, label %__barray_check_bounds.exit.7 - -__barray_check_bounds.exit.7: ; preds = %cond_exit_12.6 - tail call void @___reset(i64 %qalloc.i.7) - %33 = load i64, ptr %5, align 4 - %34 = and i64 %33, 128 - %.not1204 = icmp eq i64 %34, 0 - br i1 %.not1204, label %panic.i, label %cond_exit_12.7 - -cond_exit_12.7: ; preds = %__barray_check_bounds.exit.7 - %35 = and i64 %33, -129 - store i64 %35, ptr %5, align 4 - %36 = getelementptr inbounds nuw i8, ptr %4, i64 56 - store i64 %qalloc.i.7, ptr %36, align 4 - %qalloc.i.8 = tail call i64 @___qalloc() - %not_max.not.not.i.8 = icmp eq i64 %qalloc.i.8, -1 - br i1 %not_max.not.not.i.8, label %cond_442_case_0.i, label %__barray_check_bounds.exit.8 - -__barray_check_bounds.exit.8: ; preds = %cond_exit_12.7 - tail call void @___reset(i64 %qalloc.i.8) - %37 = load i64, ptr %5, align 4 - %38 = and i64 %37, 256 - %.not1205 = icmp eq i64 %38, 0 - br i1 %.not1205, label %panic.i, label %cond_exit_12.8 - -cond_exit_12.8: ; preds = %__barray_check_bounds.exit.8 - %39 = and i64 %37, -257 - store i64 %39, ptr %5, align 4 - %40 = getelementptr inbounds nuw i8, ptr %4, i64 64 - store i64 %qalloc.i.8, ptr %40, align 4 - %qalloc.i.9 = tail call i64 @___qalloc() - %not_max.not.not.i.9 = icmp eq i64 %qalloc.i.9, -1 - br i1 %not_max.not.not.i.9, label %cond_442_case_0.i, label %__barray_check_bounds.exit.9 - -__barray_check_bounds.exit.9: ; preds = %cond_exit_12.8 - tail call void @___reset(i64 %qalloc.i.9) - %41 = load i64, ptr %5, align 4 - %42 = and i64 %41, 512 - %.not1206 = icmp eq i64 %42, 0 - br i1 %.not1206, label %panic.i, label %cond_exit_12.9 - -cond_exit_12.9: ; preds = %__barray_check_bounds.exit.9 - %43 = and i64 %41, -513 - store i64 %43, ptr %5, align 4 - %44 = getelementptr inbounds nuw i8, ptr %4, i64 72 - store i64 %qalloc.i.9, ptr %44, align 4 - %45 = load i64, ptr %5, align 4 - %46 = trunc i64 %45 to i1 - br i1 %46, label %panic.i1117, label %__barray_mask_borrow.exit - -panic.i1117: ; preds = %cond_exit_12.9 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit: ; preds = %cond_exit_12.9 - %47 = or disjoint i64 %45, 1 - store i64 %47, ptr %5, align 4 - %48 = load i64, ptr %4, align 4 - tail call void @___rxy(i64 %48, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %48, double 0x400921FB54442D18) - %49 = load i64, ptr %5, align 4 - %50 = trunc i64 %49 to i1 - br i1 %50, label %__barray_mask_return.exit1119, label %panic.i1118 - -panic.i1118: ; preds = %__barray_mask_borrow.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1119: ; preds = %__barray_mask_borrow.exit - %51 = and i64 %49, -2 - store i64 %51, ptr %5, align 4 - store i64 %48, ptr %4, align 4 - br label %__barray_check_bounds.exit1121 - -__barray_check_bounds.exit1121: ; preds = %__barray_mask_return.exit1119, %__barray_mask_return.exit1135 - %52 = phi i64 [ 1, %__barray_mask_return.exit1119 ], [ %74, %__barray_mask_return.exit1135 ] - %"116_0.01189" = phi i64 [ 0, %__barray_mask_return.exit1119 ], [ %52, %__barray_mask_return.exit1135 ] - %53 = load i64, ptr %5, align 4 - %54 = lshr i64 %53, %"116_0.01189" - %55 = trunc i64 %54 to i1 - br i1 %55, label %panic.i1122, label %__barray_check_bounds.exit1125 - -panic.i1122: ; preds = %__barray_check_bounds.exit1121 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1125: ; preds = %__barray_check_bounds.exit1121 - %56 = shl nuw nsw i64 1, %"116_0.01189" - %57 = xor i64 %53, %56 - store i64 %57, ptr %5, align 4 - %58 = getelementptr inbounds nuw i64, ptr %4, i64 %"116_0.01189" - %59 = load i64, ptr %58, align 4 - %60 = lshr i64 %57, %52 - %61 = trunc i64 %60 to i1 - br i1 %61, label %panic.i1126, label %__barray_check_bounds.exit1129 - -panic.i1126: ; preds = %__barray_check_bounds.exit1125 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1129: ; preds = %__barray_check_bounds.exit1125 - %62 = shl nuw nsw i64 2, %"116_0.01189" - %63 = xor i64 %57, %62 - store i64 %63, ptr %5, align 4 - %64 = getelementptr inbounds nuw i64, ptr %4, i64 %52 - %65 = load i64, ptr %64, align 4 - tail call void @___rxy(i64 %65, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rzz(i64 %59, i64 %65, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %59, double 0xBFF921FB54442D18) - tail call void @___rxy(i64 %65, double 0x3FF921FB54442D18, double 0x400921FB54442D18) - tail call void @___rz(i64 %65, double 0xBFF921FB54442D18) - %66 = load i64, ptr %5, align 4 - %67 = lshr i64 %66, %"116_0.01189" - %68 = trunc i64 %67 to i1 - br i1 %68, label %__barray_check_bounds.exit1133, label %panic.i1130 - -panic.i1130: ; preds = %__barray_check_bounds.exit1129 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_check_bounds.exit1133: ; preds = %__barray_check_bounds.exit1129 - %69 = xor i64 %66, %56 - store i64 %69, ptr %5, align 4 - store i64 %59, ptr %58, align 4 - %70 = load i64, ptr %5, align 4 - %71 = lshr i64 %70, %52 - %72 = trunc i64 %71 to i1 - br i1 %72, label %__barray_mask_return.exit1135, label %panic.i1134 - -panic.i1134: ; preds = %__barray_check_bounds.exit1133 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1135: ; preds = %__barray_check_bounds.exit1133 - %73 = xor i64 %70, %62 - store i64 %73, ptr %5, align 4 - store i64 %65, ptr %64, align 4 - %74 = add nuw nsw i64 %52, 1 - %exitcond1192 = icmp eq i64 %74, 10 - br i1 %exitcond1192, label %loop_body346.preheader, label %__barray_check_bounds.exit1121 - -out_of_bounds.i1136: ; preds = %.thread - tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") - unreachable - -__barray_check_bounds.exit1137: ; preds = %.thread - %75 = load i64, ptr %3, align 4 - %76 = lshr i64 %75, %"237_2.01196" - %77 = trunc i64 %76 to i1 - br i1 %77, label %cond_exit_241, label %panic.i1138 - -panic.i1138: ; preds = %__barray_check_bounds.exit1137 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -mask_block_ok.i: ; preds = %cond_exit_241 - %78 = load i64, ptr %5, align 4 - %79 = or i64 %78, -1024 - store i64 %79, ptr %5, align 4 - %80 = icmp eq i64 %79, -1 - br i1 %80, label %loop_body455.preheader.preheader, label %mask_block_err.i - -mask_block_err.i: ; preds = %mask_block_ok.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -loop_body346.preheader: ; preds = %__barray_mask_return.exit1135, %cond_exit_241 - %"237_0.sroa.15.01197" = phi i64 [ %81, %cond_exit_241 ], [ 0, %__barray_mask_return.exit1135 ] - %"237_2.01196" = phi i64 [ %89, %cond_exit_241 ], [ 0, %__barray_mask_return.exit1135 ] - %81 = add nuw nsw i64 %"237_0.sroa.15.01197", 1 - %82 = load i64, ptr %5, align 4 - %83 = lshr i64 %82, %"237_0.sroa.15.01197" - %84 = trunc i64 %83 to i1 - br i1 %84, label %panic.i1142, label %.thread - -panic.i1142: ; preds = %loop_body346.preheader - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -.thread: ; preds = %loop_body346.preheader - %85 = shl nuw nsw i64 1, %"237_0.sroa.15.01197" - %86 = xor i64 %82, %85 - store i64 %86, ptr %5, align 4 - %87 = getelementptr inbounds nuw i64, ptr %4, i64 %"237_0.sroa.15.01197" - %88 = load i64, ptr %87, align 4 - %89 = add i64 %"237_2.01196", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %88) - tail call void @___qfree(i64 %88) - %90 = icmp ult i64 %"237_2.01196", 10 - br i1 %90, label %__barray_check_bounds.exit1137, label %out_of_bounds.i1136 - -cond_exit_241: ; preds = %__barray_check_bounds.exit1137 - %91 = shl nuw nsw i64 1, %"237_2.01196" - %92 = xor i64 %75, %91 - store i64 %92, ptr %3, align 4 - %93 = getelementptr inbounds nuw i64, ptr %2, i64 %"237_2.01196" - store i64 %lazy_measure, ptr %93, align 4 - %94 = icmp samesign ugt i64 %"237_0.sroa.15.01197", 8 - br i1 %94, label %mask_block_ok.i, label %loop_body346.preheader - -loop_body455.preheader.preheader: ; preds = %mask_block_ok.i - tail call void @heap_free(ptr nonnull %4) - tail call void @heap_free(ptr nonnull %5) - br label %__barray_check_bounds.exit1145 - -__barray_check_bounds.exit1145: ; preds = %cond_exit_307, %loop_body455.preheader.preheader - %"303_0.sroa.15.01191" = phi i64 [ %95, %cond_exit_307 ], [ 0, %loop_body455.preheader.preheader ] - %95 = add nuw nsw i64 %"303_0.sroa.15.01191", 1 - %96 = load i64, ptr %3, align 4 - %97 = lshr i64 %96, %"303_0.sroa.15.01191" - %98 = trunc i64 %97 to i1 - br i1 %98, label %panic.i1146, label %__barray_check_bounds.exit1149 - -panic.i1146: ; preds = %__barray_check_bounds.exit1145 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1149: ; preds = %__barray_check_bounds.exit1145 - %99 = shl nuw nsw i64 1, %"303_0.sroa.15.01191" - %100 = xor i64 %96, %99 - store i64 %100, ptr %3, align 4 - %101 = getelementptr inbounds nuw i64, ptr %2, i64 %"303_0.sroa.15.01191" - %102 = load i64, ptr %101, align 4 - tail call void @___inc_future_refcount(i64 %102) - %103 = load i64, ptr %3, align 4 - %104 = lshr i64 %103, %"303_0.sroa.15.01191" - %105 = trunc i64 %104 to i1 - br i1 %105, label %__barray_check_bounds.exit1153, label %panic.i1150 - -panic.i1150: ; preds = %__barray_check_bounds.exit1149 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_check_bounds.exit1153: ; preds = %__barray_check_bounds.exit1149 - %106 = xor i64 %103, %99 - store i64 %106, ptr %3, align 4 - store i64 %102, ptr %101, align 4 - %read_bool = tail call i1 @___read_future_bool(i64 %102) - tail call void @___dec_future_refcount(i64 %102) - %107 = load i64, ptr %1, align 4 - %108 = lshr i64 %107, %"303_0.sroa.15.01191" - %109 = trunc i64 %108 to i1 - br i1 %109, label %cond_exit_307, label %panic.i1154 - -panic.i1154: ; preds = %__barray_check_bounds.exit1153 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -mask_block_err.i1159: ; preds = %cond_exit_488.9 - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_mask_borrow.exit1167: ; preds = %__barray_check_bounds.exit1163.preheader - %110 = or disjoint i64 %163, 1 - store i64 %110, ptr %3, align 4 - %111 = load i64, ptr %2, align 4 - tail call void @___dec_future_refcount(i64 %111) - br label %cond_exit_488 - -cond_exit_488: ; preds = %__barray_mask_borrow.exit1167, %__barray_check_bounds.exit1163.preheader - %112 = load i64, ptr %3, align 4 - %113 = and i64 %112, 2 - %.not1207 = icmp eq i64 %113, 0 - br i1 %.not1207, label %__barray_mask_borrow.exit1167.1, label %cond_exit_488.1 - -__barray_mask_borrow.exit1167.1: ; preds = %cond_exit_488 - %114 = or disjoint i64 %112, 2 - store i64 %114, ptr %3, align 4 - %115 = getelementptr inbounds nuw i8, ptr %2, i64 8 - %116 = load i64, ptr %115, align 4 - tail call void @___dec_future_refcount(i64 %116) - br label %cond_exit_488.1 - -cond_exit_488.1: ; preds = %__barray_mask_borrow.exit1167.1, %cond_exit_488 - %117 = load i64, ptr %3, align 4 - %118 = and i64 %117, 4 - %.not1208 = icmp eq i64 %118, 0 - br i1 %.not1208, label %__barray_mask_borrow.exit1167.2, label %cond_exit_488.2 - -__barray_mask_borrow.exit1167.2: ; preds = %cond_exit_488.1 - %119 = or disjoint i64 %117, 4 - store i64 %119, ptr %3, align 4 - %120 = getelementptr inbounds nuw i8, ptr %2, i64 16 - %121 = load i64, ptr %120, align 4 - tail call void @___dec_future_refcount(i64 %121) - br label %cond_exit_488.2 - -cond_exit_488.2: ; preds = %__barray_mask_borrow.exit1167.2, %cond_exit_488.1 - %122 = load i64, ptr %3, align 4 - %123 = and i64 %122, 8 - %.not1209 = icmp eq i64 %123, 0 - br i1 %.not1209, label %__barray_mask_borrow.exit1167.3, label %cond_exit_488.3 - -__barray_mask_borrow.exit1167.3: ; preds = %cond_exit_488.2 - %124 = or disjoint i64 %122, 8 - store i64 %124, ptr %3, align 4 - %125 = getelementptr inbounds nuw i8, ptr %2, i64 24 - %126 = load i64, ptr %125, align 4 - tail call void @___dec_future_refcount(i64 %126) - br label %cond_exit_488.3 - -cond_exit_488.3: ; preds = %__barray_mask_borrow.exit1167.3, %cond_exit_488.2 - %127 = load i64, ptr %3, align 4 - %128 = and i64 %127, 16 - %.not1210 = icmp eq i64 %128, 0 - br i1 %.not1210, label %__barray_mask_borrow.exit1167.4, label %cond_exit_488.4 - -__barray_mask_borrow.exit1167.4: ; preds = %cond_exit_488.3 - %129 = or disjoint i64 %127, 16 - store i64 %129, ptr %3, align 4 - %130 = getelementptr inbounds nuw i8, ptr %2, i64 32 - %131 = load i64, ptr %130, align 4 - tail call void @___dec_future_refcount(i64 %131) - br label %cond_exit_488.4 - -cond_exit_488.4: ; preds = %__barray_mask_borrow.exit1167.4, %cond_exit_488.3 - %132 = load i64, ptr %3, align 4 - %133 = and i64 %132, 32 - %.not1211 = icmp eq i64 %133, 0 - br i1 %.not1211, label %__barray_mask_borrow.exit1167.5, label %cond_exit_488.5 - -__barray_mask_borrow.exit1167.5: ; preds = %cond_exit_488.4 - %134 = or disjoint i64 %132, 32 - store i64 %134, ptr %3, align 4 - %135 = getelementptr inbounds nuw i8, ptr %2, i64 40 - %136 = load i64, ptr %135, align 4 - tail call void @___dec_future_refcount(i64 %136) - br label %cond_exit_488.5 - -cond_exit_488.5: ; preds = %__barray_mask_borrow.exit1167.5, %cond_exit_488.4 - %137 = load i64, ptr %3, align 4 - %138 = and i64 %137, 64 - %.not1212 = icmp eq i64 %138, 0 - br i1 %.not1212, label %__barray_mask_borrow.exit1167.6, label %cond_exit_488.6 - -__barray_mask_borrow.exit1167.6: ; preds = %cond_exit_488.5 - %139 = or disjoint i64 %137, 64 - store i64 %139, ptr %3, align 4 - %140 = getelementptr inbounds nuw i8, ptr %2, i64 48 - %141 = load i64, ptr %140, align 4 - tail call void @___dec_future_refcount(i64 %141) - br label %cond_exit_488.6 - -cond_exit_488.6: ; preds = %__barray_mask_borrow.exit1167.6, %cond_exit_488.5 - %142 = load i64, ptr %3, align 4 - %143 = and i64 %142, 128 - %.not1213 = icmp eq i64 %143, 0 - br i1 %.not1213, label %__barray_mask_borrow.exit1167.7, label %cond_exit_488.7 - -__barray_mask_borrow.exit1167.7: ; preds = %cond_exit_488.6 - %144 = or disjoint i64 %142, 128 - store i64 %144, ptr %3, align 4 - %145 = getelementptr inbounds nuw i8, ptr %2, i64 56 - %146 = load i64, ptr %145, align 4 - tail call void @___dec_future_refcount(i64 %146) - br label %cond_exit_488.7 - -cond_exit_488.7: ; preds = %__barray_mask_borrow.exit1167.7, %cond_exit_488.6 - %147 = load i64, ptr %3, align 4 - %148 = and i64 %147, 256 - %.not1214 = icmp eq i64 %148, 0 - br i1 %.not1214, label %__barray_mask_borrow.exit1167.8, label %cond_exit_488.8 - -__barray_mask_borrow.exit1167.8: ; preds = %cond_exit_488.7 - %149 = or disjoint i64 %147, 256 - store i64 %149, ptr %3, align 4 - %150 = getelementptr inbounds nuw i8, ptr %2, i64 64 - %151 = load i64, ptr %150, align 4 - tail call void @___dec_future_refcount(i64 %151) - br label %cond_exit_488.8 - -cond_exit_488.8: ; preds = %__barray_mask_borrow.exit1167.8, %cond_exit_488.7 - %152 = load i64, ptr %3, align 4 - %153 = and i64 %152, 512 - %.not1215 = icmp eq i64 %153, 0 - br i1 %.not1215, label %__barray_mask_borrow.exit1167.9, label %cond_exit_488.9 - -__barray_mask_borrow.exit1167.9: ; preds = %cond_exit_488.8 - %154 = or disjoint i64 %152, 512 - store i64 %154, ptr %3, align 4 - %155 = getelementptr inbounds nuw i8, ptr %2, i64 72 - %156 = load i64, ptr %155, align 4 - tail call void @___dec_future_refcount(i64 %156) - br label %cond_exit_488.9 - -cond_exit_488.9: ; preds = %__barray_mask_borrow.exit1167.9, %cond_exit_488.8 - %157 = load i64, ptr %3, align 4 - %158 = or i64 %157, -1024 - store i64 %158, ptr %3, align 4 - %159 = icmp eq i64 %158, -1 - br i1 %159, label %loop_out454, label %mask_block_err.i1159 - -cond_exit_307: ; preds = %__barray_check_bounds.exit1153 - %160 = xor i64 %107, %99 - store i64 %160, ptr %1, align 4 - %161 = getelementptr inbounds nuw i1, ptr %0, i64 %"303_0.sroa.15.01191" - store i1 %read_bool, ptr %161, align 1 - %162 = icmp eq i64 %"303_0.sroa.15.01191", 9 - br i1 %162, label %__barray_check_bounds.exit1163.preheader, label %__barray_check_bounds.exit1145 - -__barray_check_bounds.exit1163.preheader: ; preds = %cond_exit_307 - %163 = load i64, ptr %3, align 4 - %164 = trunc i64 %163 to i1 - br i1 %164, label %cond_exit_488, label %__barray_mask_borrow.exit1167 - -loop_out454: ; preds = %cond_exit_488.9 - tail call void @heap_free(ptr %2) - tail call void @heap_free(ptr nonnull %3) - %165 = load i64, ptr %1, align 4 - %166 = and i64 %165, 1023 - store i64 %166, ptr %1, align 4 - %167 = icmp eq i64 %166, 0 - br i1 %167, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1168 - -mask_block_err.i1168: ; preds = %loop_out454 - tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") - unreachable - -__barray_check_none_borrowed.exit: ; preds = %loop_out454 - %168 = tail call ptr @heap_alloc(i64 10) - %169 = tail call ptr @heap_alloc(i64 8) - store i64 0, ptr %169, align 1 - tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(10) %168, ptr noundef nonnull align 1 dereferenceable(10) %0, i64 10, i1 false) - tail call void @heap_free(ptr nonnull %168) - %170 = load i64, ptr %1, align 4 - %171 = and i64 %170, 1023 - store i64 %171, ptr %1, align 4 - %172 = icmp eq i64 %171, 0 - br i1 %172, label %__barray_check_none_borrowed.exit1172, label %mask_block_err.i1170 - -mask_block_err.i1170: ; preds = %__barray_check_none_borrowed.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") - unreachable - -__barray_check_none_borrowed.exit1172: ; preds = %__barray_check_none_borrowed.exit - %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 - %y_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 4 - %arr_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 8 - %mask_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 16 - %173 = alloca [10 x i1], align 1 - call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(10) %173, i8 0, i64 10, i1 false) - store i32 10, ptr %out_arr_alloca, align 8 - store i32 1, ptr %y_ptr, align 4 - store ptr %0, ptr %arr_ptr, align 8 - store ptr %173, ptr %mask_ptr, align 8 - call void @print_bool_arr(ptr nonnull @res_outcomes.9CB6D2E7.0, i64 21, ptr nonnull %out_arr_alloca) - ret void -} - -declare ptr @heap_alloc(i64) local_unnamed_addr - -; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) -declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immarg) #0 - -; Function Attrs: noreturn -declare void @panic(i32, ptr) local_unnamed_addr #1 - -declare void @heap_free(ptr) local_unnamed_addr - -declare i64 @___lazy_measure(i64) local_unnamed_addr - -declare void @___qfree(i64) local_unnamed_addr - -declare void @___inc_future_refcount(i64) local_unnamed_addr - -declare void @___dec_future_refcount(i64) local_unnamed_addr - -declare i1 @___read_future_bool(i64) local_unnamed_addr - -; Function Attrs: mustprogress 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) #2 - -declare void @print_bool_arr(ptr, i64, ptr) local_unnamed_addr - -declare void @___rxy(i64, double, double) local_unnamed_addr - -declare void @___rz(i64, double) local_unnamed_addr - -declare void @___rzz(i64, i64, double) local_unnamed_addr - -declare i64 @___qalloc() local_unnamed_addr - -declare void @___reset(i64) local_unnamed_addr - -define i64 @qmain(i64 %0) local_unnamed_addr { -entry: - tail call void @setup(i64 %0) - tail call void @__hugr__.__main__.main.1() - %1 = tail call i64 @teardown() - ret i64 %1 -} - -declare void @setup(i64) local_unnamed_addr - -declare i64 @teardown() local_unnamed_addr - -attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } -attributes #1 = { noreturn } -attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) } - -!name = !{!0} - -!0 = !{!"mainlib"} diff --git a/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace/trace_test-helios-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace/trace_test-helios-x86_64-windows-gnu.ll deleted file mode 100644 index ca6a39f5..00000000 --- a/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace/trace_test-helios-x86_64-windows-gnu.ll +++ /dev/null @@ -1,647 +0,0 @@ -; ModuleID = 'hugr' -source_filename = "hugr" -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-gnu" - -@"e_Index out .DD115165.0" = private constant [29 x i8] c"\1CEXIT:INT:Index out of bounds" -@"e_Array alre.5A300C2A.0" = private constant [57 x i8] c"8EXIT:INT:Array already contains an element at this index" -@"e_Array elem.E746B1A3.0" = private constant [43 x i8] c"*EXIT:INT:Array element is already borrowed" -@"e_Array cont.EFA5AC45.0" = private constant [70 x i8] c"EEXIT:INT:Array contains non-borrowed elements and cannot be discarded" -@"e_Some array.A77EF32E.0" = private constant [48 x i8] c"/EXIT:INT:Some array elements have been borrowed" -@res_outcomes.9CB6D2E7.0 = private constant [22 x i8] c"\15USER:BOOLARR:outcomes" -@"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." - -define void @__hugr__.__main__.main.1() local_unnamed_addr { -alloca_block: - %0 = tail call ptr @heap_alloc(i64 10) - %1 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %1, align 1 - %2 = tail call ptr @heap_alloc(i64 80) - %3 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %3, align 1 - %4 = tail call ptr @heap_alloc(i64 80) - %5 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %5, align 1 - %qalloc.i = tail call i64 @___qalloc() - %not_max.not.not.i = icmp eq i64 %qalloc.i, -1 - br i1 %not_max.not.not.i, label %cond_442_case_0.i, label %__barray_check_bounds.exit - -cond_442_case_0.i: ; preds = %cond_exit_12.8, %cond_exit_12.7, %cond_exit_12.6, %cond_exit_12.5, %cond_exit_12.4, %cond_exit_12.3, %cond_exit_12.2, %cond_exit_12.1, %cond_exit_12, %alloca_block - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__barray_check_bounds.exit: ; preds = %alloca_block - tail call void @___reset(i64 %qalloc.i) - %6 = load i64, ptr %5, align 4 - %7 = trunc i64 %6 to i1 - br i1 %7, label %cond_exit_12, label %panic.i - -panic.i: ; preds = %__barray_check_bounds.exit.9, %__barray_check_bounds.exit.8, %__barray_check_bounds.exit.7, %__barray_check_bounds.exit.6, %__barray_check_bounds.exit.5, %__barray_check_bounds.exit.4, %__barray_check_bounds.exit.3, %__barray_check_bounds.exit.2, %__barray_check_bounds.exit.1, %__barray_check_bounds.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -cond_exit_12: ; preds = %__barray_check_bounds.exit - %8 = and i64 %6, -2 - store i64 %8, ptr %5, align 4 - store i64 %qalloc.i, ptr %4, align 4 - %qalloc.i.1 = tail call i64 @___qalloc() - %not_max.not.not.i.1 = icmp eq i64 %qalloc.i.1, -1 - br i1 %not_max.not.not.i.1, label %cond_442_case_0.i, label %__barray_check_bounds.exit.1 - -__barray_check_bounds.exit.1: ; preds = %cond_exit_12 - tail call void @___reset(i64 %qalloc.i.1) - %9 = load i64, ptr %5, align 4 - %10 = and i64 %9, 2 - %.not = icmp eq i64 %10, 0 - br i1 %.not, label %panic.i, label %cond_exit_12.1 - -cond_exit_12.1: ; preds = %__barray_check_bounds.exit.1 - %11 = and i64 %9, -3 - store i64 %11, ptr %5, align 4 - %12 = getelementptr inbounds nuw i8, ptr %4, i64 8 - store i64 %qalloc.i.1, ptr %12, align 4 - %qalloc.i.2 = tail call i64 @___qalloc() - %not_max.not.not.i.2 = icmp eq i64 %qalloc.i.2, -1 - br i1 %not_max.not.not.i.2, label %cond_442_case_0.i, label %__barray_check_bounds.exit.2 - -__barray_check_bounds.exit.2: ; preds = %cond_exit_12.1 - tail call void @___reset(i64 %qalloc.i.2) - %13 = load i64, ptr %5, align 4 - %14 = and i64 %13, 4 - %.not1199 = icmp eq i64 %14, 0 - br i1 %.not1199, label %panic.i, label %cond_exit_12.2 - -cond_exit_12.2: ; preds = %__barray_check_bounds.exit.2 - %15 = and i64 %13, -5 - store i64 %15, ptr %5, align 4 - %16 = getelementptr inbounds nuw i8, ptr %4, i64 16 - store i64 %qalloc.i.2, ptr %16, align 4 - %qalloc.i.3 = tail call i64 @___qalloc() - %not_max.not.not.i.3 = icmp eq i64 %qalloc.i.3, -1 - br i1 %not_max.not.not.i.3, label %cond_442_case_0.i, label %__barray_check_bounds.exit.3 - -__barray_check_bounds.exit.3: ; preds = %cond_exit_12.2 - tail call void @___reset(i64 %qalloc.i.3) - %17 = load i64, ptr %5, align 4 - %18 = and i64 %17, 8 - %.not1200 = icmp eq i64 %18, 0 - br i1 %.not1200, label %panic.i, label %cond_exit_12.3 - -cond_exit_12.3: ; preds = %__barray_check_bounds.exit.3 - %19 = and i64 %17, -9 - store i64 %19, ptr %5, align 4 - %20 = getelementptr inbounds nuw i8, ptr %4, i64 24 - store i64 %qalloc.i.3, ptr %20, align 4 - %qalloc.i.4 = tail call i64 @___qalloc() - %not_max.not.not.i.4 = icmp eq i64 %qalloc.i.4, -1 - br i1 %not_max.not.not.i.4, label %cond_442_case_0.i, label %__barray_check_bounds.exit.4 - -__barray_check_bounds.exit.4: ; preds = %cond_exit_12.3 - tail call void @___reset(i64 %qalloc.i.4) - %21 = load i64, ptr %5, align 4 - %22 = and i64 %21, 16 - %.not1201 = icmp eq i64 %22, 0 - br i1 %.not1201, label %panic.i, label %cond_exit_12.4 - -cond_exit_12.4: ; preds = %__barray_check_bounds.exit.4 - %23 = and i64 %21, -17 - store i64 %23, ptr %5, align 4 - %24 = getelementptr inbounds nuw i8, ptr %4, i64 32 - store i64 %qalloc.i.4, ptr %24, align 4 - %qalloc.i.5 = tail call i64 @___qalloc() - %not_max.not.not.i.5 = icmp eq i64 %qalloc.i.5, -1 - br i1 %not_max.not.not.i.5, label %cond_442_case_0.i, label %__barray_check_bounds.exit.5 - -__barray_check_bounds.exit.5: ; preds = %cond_exit_12.4 - tail call void @___reset(i64 %qalloc.i.5) - %25 = load i64, ptr %5, align 4 - %26 = and i64 %25, 32 - %.not1202 = icmp eq i64 %26, 0 - br i1 %.not1202, label %panic.i, label %cond_exit_12.5 - -cond_exit_12.5: ; preds = %__barray_check_bounds.exit.5 - %27 = and i64 %25, -33 - store i64 %27, ptr %5, align 4 - %28 = getelementptr inbounds nuw i8, ptr %4, i64 40 - store i64 %qalloc.i.5, ptr %28, align 4 - %qalloc.i.6 = tail call i64 @___qalloc() - %not_max.not.not.i.6 = icmp eq i64 %qalloc.i.6, -1 - br i1 %not_max.not.not.i.6, label %cond_442_case_0.i, label %__barray_check_bounds.exit.6 - -__barray_check_bounds.exit.6: ; preds = %cond_exit_12.5 - tail call void @___reset(i64 %qalloc.i.6) - %29 = load i64, ptr %5, align 4 - %30 = and i64 %29, 64 - %.not1203 = icmp eq i64 %30, 0 - br i1 %.not1203, label %panic.i, label %cond_exit_12.6 - -cond_exit_12.6: ; preds = %__barray_check_bounds.exit.6 - %31 = and i64 %29, -65 - store i64 %31, ptr %5, align 4 - %32 = getelementptr inbounds nuw i8, ptr %4, i64 48 - store i64 %qalloc.i.6, ptr %32, align 4 - %qalloc.i.7 = tail call i64 @___qalloc() - %not_max.not.not.i.7 = icmp eq i64 %qalloc.i.7, -1 - br i1 %not_max.not.not.i.7, label %cond_442_case_0.i, label %__barray_check_bounds.exit.7 - -__barray_check_bounds.exit.7: ; preds = %cond_exit_12.6 - tail call void @___reset(i64 %qalloc.i.7) - %33 = load i64, ptr %5, align 4 - %34 = and i64 %33, 128 - %.not1204 = icmp eq i64 %34, 0 - br i1 %.not1204, label %panic.i, label %cond_exit_12.7 - -cond_exit_12.7: ; preds = %__barray_check_bounds.exit.7 - %35 = and i64 %33, -129 - store i64 %35, ptr %5, align 4 - %36 = getelementptr inbounds nuw i8, ptr %4, i64 56 - store i64 %qalloc.i.7, ptr %36, align 4 - %qalloc.i.8 = tail call i64 @___qalloc() - %not_max.not.not.i.8 = icmp eq i64 %qalloc.i.8, -1 - br i1 %not_max.not.not.i.8, label %cond_442_case_0.i, label %__barray_check_bounds.exit.8 - -__barray_check_bounds.exit.8: ; preds = %cond_exit_12.7 - tail call void @___reset(i64 %qalloc.i.8) - %37 = load i64, ptr %5, align 4 - %38 = and i64 %37, 256 - %.not1205 = icmp eq i64 %38, 0 - br i1 %.not1205, label %panic.i, label %cond_exit_12.8 - -cond_exit_12.8: ; preds = %__barray_check_bounds.exit.8 - %39 = and i64 %37, -257 - store i64 %39, ptr %5, align 4 - %40 = getelementptr inbounds nuw i8, ptr %4, i64 64 - store i64 %qalloc.i.8, ptr %40, align 4 - %qalloc.i.9 = tail call i64 @___qalloc() - %not_max.not.not.i.9 = icmp eq i64 %qalloc.i.9, -1 - br i1 %not_max.not.not.i.9, label %cond_442_case_0.i, label %__barray_check_bounds.exit.9 - -__barray_check_bounds.exit.9: ; preds = %cond_exit_12.8 - tail call void @___reset(i64 %qalloc.i.9) - %41 = load i64, ptr %5, align 4 - %42 = and i64 %41, 512 - %.not1206 = icmp eq i64 %42, 0 - br i1 %.not1206, label %panic.i, label %cond_exit_12.9 - -cond_exit_12.9: ; preds = %__barray_check_bounds.exit.9 - %43 = and i64 %41, -513 - store i64 %43, ptr %5, align 4 - %44 = getelementptr inbounds nuw i8, ptr %4, i64 72 - store i64 %qalloc.i.9, ptr %44, align 4 - %45 = load i64, ptr %5, align 4 - %46 = trunc i64 %45 to i1 - br i1 %46, label %panic.i1117, label %__barray_mask_borrow.exit - -panic.i1117: ; preds = %cond_exit_12.9 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit: ; preds = %cond_exit_12.9 - %47 = or disjoint i64 %45, 1 - store i64 %47, ptr %5, align 4 - %48 = load i64, ptr %4, align 4 - tail call void @___rxy(i64 %48, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %48, double 0x400921FB54442D18) - %49 = load i64, ptr %5, align 4 - %50 = trunc i64 %49 to i1 - br i1 %50, label %__barray_mask_return.exit1119, label %panic.i1118 - -panic.i1118: ; preds = %__barray_mask_borrow.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1119: ; preds = %__barray_mask_borrow.exit - %51 = and i64 %49, -2 - store i64 %51, ptr %5, align 4 - store i64 %48, ptr %4, align 4 - br label %__barray_check_bounds.exit1121 - -__barray_check_bounds.exit1121: ; preds = %__barray_mask_return.exit1119, %__barray_mask_return.exit1135 - %52 = phi i64 [ 1, %__barray_mask_return.exit1119 ], [ %74, %__barray_mask_return.exit1135 ] - %"116_0.01189" = phi i64 [ 0, %__barray_mask_return.exit1119 ], [ %52, %__barray_mask_return.exit1135 ] - %53 = load i64, ptr %5, align 4 - %54 = lshr i64 %53, %"116_0.01189" - %55 = trunc i64 %54 to i1 - br i1 %55, label %panic.i1122, label %__barray_check_bounds.exit1125 - -panic.i1122: ; preds = %__barray_check_bounds.exit1121 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1125: ; preds = %__barray_check_bounds.exit1121 - %56 = shl nuw nsw i64 1, %"116_0.01189" - %57 = xor i64 %53, %56 - store i64 %57, ptr %5, align 4 - %58 = getelementptr inbounds nuw i64, ptr %4, i64 %"116_0.01189" - %59 = load i64, ptr %58, align 4 - %60 = lshr i64 %57, %52 - %61 = trunc i64 %60 to i1 - br i1 %61, label %panic.i1126, label %__barray_check_bounds.exit1129 - -panic.i1126: ; preds = %__barray_check_bounds.exit1125 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1129: ; preds = %__barray_check_bounds.exit1125 - %62 = shl nuw nsw i64 2, %"116_0.01189" - %63 = xor i64 %57, %62 - store i64 %63, ptr %5, align 4 - %64 = getelementptr inbounds nuw i64, ptr %4, i64 %52 - %65 = load i64, ptr %64, align 4 - tail call void @___rxy(i64 %65, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rzz(i64 %59, i64 %65, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %59, double 0xBFF921FB54442D18) - tail call void @___rxy(i64 %65, double 0x3FF921FB54442D18, double 0x400921FB54442D18) - tail call void @___rz(i64 %65, double 0xBFF921FB54442D18) - %66 = load i64, ptr %5, align 4 - %67 = lshr i64 %66, %"116_0.01189" - %68 = trunc i64 %67 to i1 - br i1 %68, label %__barray_check_bounds.exit1133, label %panic.i1130 - -panic.i1130: ; preds = %__barray_check_bounds.exit1129 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_check_bounds.exit1133: ; preds = %__barray_check_bounds.exit1129 - %69 = xor i64 %66, %56 - store i64 %69, ptr %5, align 4 - store i64 %59, ptr %58, align 4 - %70 = load i64, ptr %5, align 4 - %71 = lshr i64 %70, %52 - %72 = trunc i64 %71 to i1 - br i1 %72, label %__barray_mask_return.exit1135, label %panic.i1134 - -panic.i1134: ; preds = %__barray_check_bounds.exit1133 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1135: ; preds = %__barray_check_bounds.exit1133 - %73 = xor i64 %70, %62 - store i64 %73, ptr %5, align 4 - store i64 %65, ptr %64, align 4 - %74 = add nuw nsw i64 %52, 1 - %exitcond1192 = icmp eq i64 %74, 10 - br i1 %exitcond1192, label %loop_body346.preheader, label %__barray_check_bounds.exit1121 - -out_of_bounds.i1136: ; preds = %.thread - tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") - unreachable - -__barray_check_bounds.exit1137: ; preds = %.thread - %75 = load i64, ptr %3, align 4 - %76 = lshr i64 %75, %"237_2.01196" - %77 = trunc i64 %76 to i1 - br i1 %77, label %cond_exit_241, label %panic.i1138 - -panic.i1138: ; preds = %__barray_check_bounds.exit1137 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -mask_block_ok.i: ; preds = %cond_exit_241 - %78 = load i64, ptr %5, align 4 - %79 = or i64 %78, -1024 - store i64 %79, ptr %5, align 4 - %80 = icmp eq i64 %79, -1 - br i1 %80, label %loop_body455.preheader.preheader, label %mask_block_err.i - -mask_block_err.i: ; preds = %mask_block_ok.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -loop_body346.preheader: ; preds = %__barray_mask_return.exit1135, %cond_exit_241 - %"237_0.sroa.15.01197" = phi i64 [ %81, %cond_exit_241 ], [ 0, %__barray_mask_return.exit1135 ] - %"237_2.01196" = phi i64 [ %89, %cond_exit_241 ], [ 0, %__barray_mask_return.exit1135 ] - %81 = add nuw nsw i64 %"237_0.sroa.15.01197", 1 - %82 = load i64, ptr %5, align 4 - %83 = lshr i64 %82, %"237_0.sroa.15.01197" - %84 = trunc i64 %83 to i1 - br i1 %84, label %panic.i1142, label %.thread - -panic.i1142: ; preds = %loop_body346.preheader - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -.thread: ; preds = %loop_body346.preheader - %85 = shl nuw nsw i64 1, %"237_0.sroa.15.01197" - %86 = xor i64 %82, %85 - store i64 %86, ptr %5, align 4 - %87 = getelementptr inbounds nuw i64, ptr %4, i64 %"237_0.sroa.15.01197" - %88 = load i64, ptr %87, align 4 - %89 = add i64 %"237_2.01196", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %88) - tail call void @___qfree(i64 %88) - %90 = icmp ult i64 %"237_2.01196", 10 - br i1 %90, label %__barray_check_bounds.exit1137, label %out_of_bounds.i1136 - -cond_exit_241: ; preds = %__barray_check_bounds.exit1137 - %91 = shl nuw nsw i64 1, %"237_2.01196" - %92 = xor i64 %75, %91 - store i64 %92, ptr %3, align 4 - %93 = getelementptr inbounds nuw i64, ptr %2, i64 %"237_2.01196" - store i64 %lazy_measure, ptr %93, align 4 - %94 = icmp samesign ugt i64 %"237_0.sroa.15.01197", 8 - br i1 %94, label %mask_block_ok.i, label %loop_body346.preheader - -loop_body455.preheader.preheader: ; preds = %mask_block_ok.i - tail call void @heap_free(ptr nonnull %4) - tail call void @heap_free(ptr nonnull %5) - br label %__barray_check_bounds.exit1145 - -__barray_check_bounds.exit1145: ; preds = %cond_exit_307, %loop_body455.preheader.preheader - %"303_0.sroa.15.01191" = phi i64 [ %95, %cond_exit_307 ], [ 0, %loop_body455.preheader.preheader ] - %95 = add nuw nsw i64 %"303_0.sroa.15.01191", 1 - %96 = load i64, ptr %3, align 4 - %97 = lshr i64 %96, %"303_0.sroa.15.01191" - %98 = trunc i64 %97 to i1 - br i1 %98, label %panic.i1146, label %__barray_check_bounds.exit1149 - -panic.i1146: ; preds = %__barray_check_bounds.exit1145 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1149: ; preds = %__barray_check_bounds.exit1145 - %99 = shl nuw nsw i64 1, %"303_0.sroa.15.01191" - %100 = xor i64 %96, %99 - store i64 %100, ptr %3, align 4 - %101 = getelementptr inbounds nuw i64, ptr %2, i64 %"303_0.sroa.15.01191" - %102 = load i64, ptr %101, align 4 - tail call void @___inc_future_refcount(i64 %102) - %103 = load i64, ptr %3, align 4 - %104 = lshr i64 %103, %"303_0.sroa.15.01191" - %105 = trunc i64 %104 to i1 - br i1 %105, label %__barray_check_bounds.exit1153, label %panic.i1150 - -panic.i1150: ; preds = %__barray_check_bounds.exit1149 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_check_bounds.exit1153: ; preds = %__barray_check_bounds.exit1149 - %106 = xor i64 %103, %99 - store i64 %106, ptr %3, align 4 - store i64 %102, ptr %101, align 4 - %read_bool = tail call i1 @___read_future_bool(i64 %102) - tail call void @___dec_future_refcount(i64 %102) - %107 = load i64, ptr %1, align 4 - %108 = lshr i64 %107, %"303_0.sroa.15.01191" - %109 = trunc i64 %108 to i1 - br i1 %109, label %cond_exit_307, label %panic.i1154 - -panic.i1154: ; preds = %__barray_check_bounds.exit1153 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -mask_block_err.i1159: ; preds = %cond_exit_488.9 - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_mask_borrow.exit1167: ; preds = %__barray_check_bounds.exit1163.preheader - %110 = or disjoint i64 %163, 1 - store i64 %110, ptr %3, align 4 - %111 = load i64, ptr %2, align 4 - tail call void @___dec_future_refcount(i64 %111) - br label %cond_exit_488 - -cond_exit_488: ; preds = %__barray_mask_borrow.exit1167, %__barray_check_bounds.exit1163.preheader - %112 = load i64, ptr %3, align 4 - %113 = and i64 %112, 2 - %.not1207 = icmp eq i64 %113, 0 - br i1 %.not1207, label %__barray_mask_borrow.exit1167.1, label %cond_exit_488.1 - -__barray_mask_borrow.exit1167.1: ; preds = %cond_exit_488 - %114 = or disjoint i64 %112, 2 - store i64 %114, ptr %3, align 4 - %115 = getelementptr inbounds nuw i8, ptr %2, i64 8 - %116 = load i64, ptr %115, align 4 - tail call void @___dec_future_refcount(i64 %116) - br label %cond_exit_488.1 - -cond_exit_488.1: ; preds = %__barray_mask_borrow.exit1167.1, %cond_exit_488 - %117 = load i64, ptr %3, align 4 - %118 = and i64 %117, 4 - %.not1208 = icmp eq i64 %118, 0 - br i1 %.not1208, label %__barray_mask_borrow.exit1167.2, label %cond_exit_488.2 - -__barray_mask_borrow.exit1167.2: ; preds = %cond_exit_488.1 - %119 = or disjoint i64 %117, 4 - store i64 %119, ptr %3, align 4 - %120 = getelementptr inbounds nuw i8, ptr %2, i64 16 - %121 = load i64, ptr %120, align 4 - tail call void @___dec_future_refcount(i64 %121) - br label %cond_exit_488.2 - -cond_exit_488.2: ; preds = %__barray_mask_borrow.exit1167.2, %cond_exit_488.1 - %122 = load i64, ptr %3, align 4 - %123 = and i64 %122, 8 - %.not1209 = icmp eq i64 %123, 0 - br i1 %.not1209, label %__barray_mask_borrow.exit1167.3, label %cond_exit_488.3 - -__barray_mask_borrow.exit1167.3: ; preds = %cond_exit_488.2 - %124 = or disjoint i64 %122, 8 - store i64 %124, ptr %3, align 4 - %125 = getelementptr inbounds nuw i8, ptr %2, i64 24 - %126 = load i64, ptr %125, align 4 - tail call void @___dec_future_refcount(i64 %126) - br label %cond_exit_488.3 - -cond_exit_488.3: ; preds = %__barray_mask_borrow.exit1167.3, %cond_exit_488.2 - %127 = load i64, ptr %3, align 4 - %128 = and i64 %127, 16 - %.not1210 = icmp eq i64 %128, 0 - br i1 %.not1210, label %__barray_mask_borrow.exit1167.4, label %cond_exit_488.4 - -__barray_mask_borrow.exit1167.4: ; preds = %cond_exit_488.3 - %129 = or disjoint i64 %127, 16 - store i64 %129, ptr %3, align 4 - %130 = getelementptr inbounds nuw i8, ptr %2, i64 32 - %131 = load i64, ptr %130, align 4 - tail call void @___dec_future_refcount(i64 %131) - br label %cond_exit_488.4 - -cond_exit_488.4: ; preds = %__barray_mask_borrow.exit1167.4, %cond_exit_488.3 - %132 = load i64, ptr %3, align 4 - %133 = and i64 %132, 32 - %.not1211 = icmp eq i64 %133, 0 - br i1 %.not1211, label %__barray_mask_borrow.exit1167.5, label %cond_exit_488.5 - -__barray_mask_borrow.exit1167.5: ; preds = %cond_exit_488.4 - %134 = or disjoint i64 %132, 32 - store i64 %134, ptr %3, align 4 - %135 = getelementptr inbounds nuw i8, ptr %2, i64 40 - %136 = load i64, ptr %135, align 4 - tail call void @___dec_future_refcount(i64 %136) - br label %cond_exit_488.5 - -cond_exit_488.5: ; preds = %__barray_mask_borrow.exit1167.5, %cond_exit_488.4 - %137 = load i64, ptr %3, align 4 - %138 = and i64 %137, 64 - %.not1212 = icmp eq i64 %138, 0 - br i1 %.not1212, label %__barray_mask_borrow.exit1167.6, label %cond_exit_488.6 - -__barray_mask_borrow.exit1167.6: ; preds = %cond_exit_488.5 - %139 = or disjoint i64 %137, 64 - store i64 %139, ptr %3, align 4 - %140 = getelementptr inbounds nuw i8, ptr %2, i64 48 - %141 = load i64, ptr %140, align 4 - tail call void @___dec_future_refcount(i64 %141) - br label %cond_exit_488.6 - -cond_exit_488.6: ; preds = %__barray_mask_borrow.exit1167.6, %cond_exit_488.5 - %142 = load i64, ptr %3, align 4 - %143 = and i64 %142, 128 - %.not1213 = icmp eq i64 %143, 0 - br i1 %.not1213, label %__barray_mask_borrow.exit1167.7, label %cond_exit_488.7 - -__barray_mask_borrow.exit1167.7: ; preds = %cond_exit_488.6 - %144 = or disjoint i64 %142, 128 - store i64 %144, ptr %3, align 4 - %145 = getelementptr inbounds nuw i8, ptr %2, i64 56 - %146 = load i64, ptr %145, align 4 - tail call void @___dec_future_refcount(i64 %146) - br label %cond_exit_488.7 - -cond_exit_488.7: ; preds = %__barray_mask_borrow.exit1167.7, %cond_exit_488.6 - %147 = load i64, ptr %3, align 4 - %148 = and i64 %147, 256 - %.not1214 = icmp eq i64 %148, 0 - br i1 %.not1214, label %__barray_mask_borrow.exit1167.8, label %cond_exit_488.8 - -__barray_mask_borrow.exit1167.8: ; preds = %cond_exit_488.7 - %149 = or disjoint i64 %147, 256 - store i64 %149, ptr %3, align 4 - %150 = getelementptr inbounds nuw i8, ptr %2, i64 64 - %151 = load i64, ptr %150, align 4 - tail call void @___dec_future_refcount(i64 %151) - br label %cond_exit_488.8 - -cond_exit_488.8: ; preds = %__barray_mask_borrow.exit1167.8, %cond_exit_488.7 - %152 = load i64, ptr %3, align 4 - %153 = and i64 %152, 512 - %.not1215 = icmp eq i64 %153, 0 - br i1 %.not1215, label %__barray_mask_borrow.exit1167.9, label %cond_exit_488.9 - -__barray_mask_borrow.exit1167.9: ; preds = %cond_exit_488.8 - %154 = or disjoint i64 %152, 512 - store i64 %154, ptr %3, align 4 - %155 = getelementptr inbounds nuw i8, ptr %2, i64 72 - %156 = load i64, ptr %155, align 4 - tail call void @___dec_future_refcount(i64 %156) - br label %cond_exit_488.9 - -cond_exit_488.9: ; preds = %__barray_mask_borrow.exit1167.9, %cond_exit_488.8 - %157 = load i64, ptr %3, align 4 - %158 = or i64 %157, -1024 - store i64 %158, ptr %3, align 4 - %159 = icmp eq i64 %158, -1 - br i1 %159, label %loop_out454, label %mask_block_err.i1159 - -cond_exit_307: ; preds = %__barray_check_bounds.exit1153 - %160 = xor i64 %107, %99 - store i64 %160, ptr %1, align 4 - %161 = getelementptr inbounds nuw i1, ptr %0, i64 %"303_0.sroa.15.01191" - store i1 %read_bool, ptr %161, align 1 - %162 = icmp eq i64 %"303_0.sroa.15.01191", 9 - br i1 %162, label %__barray_check_bounds.exit1163.preheader, label %__barray_check_bounds.exit1145 - -__barray_check_bounds.exit1163.preheader: ; preds = %cond_exit_307 - %163 = load i64, ptr %3, align 4 - %164 = trunc i64 %163 to i1 - br i1 %164, label %cond_exit_488, label %__barray_mask_borrow.exit1167 - -loop_out454: ; preds = %cond_exit_488.9 - tail call void @heap_free(ptr %2) - tail call void @heap_free(ptr nonnull %3) - %165 = load i64, ptr %1, align 4 - %166 = and i64 %165, 1023 - store i64 %166, ptr %1, align 4 - %167 = icmp eq i64 %166, 0 - br i1 %167, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1168 - -mask_block_err.i1168: ; preds = %loop_out454 - tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") - unreachable - -__barray_check_none_borrowed.exit: ; preds = %loop_out454 - %168 = tail call ptr @heap_alloc(i64 10) - %169 = tail call ptr @heap_alloc(i64 8) - store i64 0, ptr %169, align 1 - tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(10) %168, ptr noundef nonnull align 1 dereferenceable(10) %0, i64 10, i1 false) - tail call void @heap_free(ptr nonnull %168) - %170 = load i64, ptr %1, align 4 - %171 = and i64 %170, 1023 - store i64 %171, ptr %1, align 4 - %172 = icmp eq i64 %171, 0 - br i1 %172, label %__barray_check_none_borrowed.exit1172, label %mask_block_err.i1170 - -mask_block_err.i1170: ; preds = %__barray_check_none_borrowed.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") - unreachable - -__barray_check_none_borrowed.exit1172: ; preds = %__barray_check_none_borrowed.exit - %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 - %y_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 4 - %arr_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 8 - %mask_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 16 - %173 = alloca [10 x i1], align 1 - call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(10) %173, i8 0, i64 10, i1 false) - store i32 10, ptr %out_arr_alloca, align 8 - store i32 1, ptr %y_ptr, align 4 - store ptr %0, ptr %arr_ptr, align 8 - store ptr %173, ptr %mask_ptr, align 8 - call void @print_bool_arr(ptr nonnull @res_outcomes.9CB6D2E7.0, i64 21, ptr nonnull %out_arr_alloca) - ret void -} - -declare ptr @heap_alloc(i64) local_unnamed_addr - -; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) -declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immarg) #0 - -; Function Attrs: noreturn -declare void @panic(i32, ptr) local_unnamed_addr #1 - -declare void @heap_free(ptr) local_unnamed_addr - -declare i64 @___lazy_measure(i64) local_unnamed_addr - -declare void @___qfree(i64) local_unnamed_addr - -declare void @___inc_future_refcount(i64) local_unnamed_addr - -declare void @___dec_future_refcount(i64) local_unnamed_addr - -declare i1 @___read_future_bool(i64) local_unnamed_addr - -; Function Attrs: mustprogress 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) #2 - -declare void @print_bool_arr(ptr, i64, ptr) local_unnamed_addr - -declare void @___rxy(i64, double, double) local_unnamed_addr - -declare void @___rz(i64, double) local_unnamed_addr - -declare void @___rzz(i64, i64, double) local_unnamed_addr - -declare i64 @___qalloc() local_unnamed_addr - -declare void @___reset(i64) local_unnamed_addr - -define i64 @qmain(i64 %0) local_unnamed_addr { -entry: - tail call void @setup(i64 %0) - tail call void @__hugr__.__main__.main.1() - %1 = tail call i64 @teardown() - ret i64 %1 -} - -declare void @setup(i64) local_unnamed_addr - -declare i64 @teardown() local_unnamed_addr - -attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } -attributes #1 = { noreturn } -attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) } - -!name = !{!0} - -!0 = !{!"mainlib"} diff --git a/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace/trace_test-sol-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace/trace_test-sol-aarch64-apple-darwin.ll deleted file mode 100644 index 50ba00d9..00000000 --- a/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace/trace_test-sol-aarch64-apple-darwin.ll +++ /dev/null @@ -1,647 +0,0 @@ -; ModuleID = 'hugr' -source_filename = "hugr" -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_Index out .DD115165.0" = private constant [29 x i8] c"\1CEXIT:INT:Index out of bounds" -@"e_Array alre.5A300C2A.0" = private constant [57 x i8] c"8EXIT:INT:Array already contains an element at this index" -@"e_Array elem.E746B1A3.0" = private constant [43 x i8] c"*EXIT:INT:Array element is already borrowed" -@"e_Array cont.EFA5AC45.0" = private constant [70 x i8] c"EEXIT:INT:Array contains non-borrowed elements and cannot be discarded" -@"e_Some array.A77EF32E.0" = private constant [48 x i8] c"/EXIT:INT:Some array elements have been borrowed" -@res_outcomes.9CB6D2E7.0 = private constant [22 x i8] c"\15USER:BOOLARR:outcomes" -@"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." - -define void @__hugr__.__main__.main.1() local_unnamed_addr { -alloca_block: - %0 = tail call ptr @heap_alloc(i64 10) - %1 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %1, align 1 - %2 = tail call ptr @heap_alloc(i64 80) - %3 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %3, align 1 - %4 = tail call ptr @heap_alloc(i64 80) - %5 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %5, align 1 - %qalloc.i = tail call i64 @___qalloc() - %not_max.not.not.i = icmp eq i64 %qalloc.i, -1 - br i1 %not_max.not.not.i, label %cond_441_case_0.i, label %__hugr__.__tk2_sol_qalloc.437.exit - -cond_441_case_0.i: ; preds = %cond_exit_12.8, %cond_exit_12.7, %cond_exit_12.6, %cond_exit_12.5, %cond_exit_12.4, %cond_exit_12.3, %cond_exit_12.2, %cond_exit_12.1, %cond_exit_12, %alloca_block - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_sol_qalloc.437.exit: ; preds = %alloca_block - tail call void @___reset(i64 %qalloc.i) - %6 = load i64, ptr %5, align 4 - %7 = trunc i64 %6 to i1 - br i1 %7, label %cond_exit_12, label %panic.i - -panic.i: ; preds = %__barray_check_bounds.exit.9, %__hugr__.__tk2_sol_qalloc.437.exit.8, %__hugr__.__tk2_sol_qalloc.437.exit.7, %__hugr__.__tk2_sol_qalloc.437.exit.6, %__hugr__.__tk2_sol_qalloc.437.exit.5, %__hugr__.__tk2_sol_qalloc.437.exit.4, %__hugr__.__tk2_sol_qalloc.437.exit.3, %__hugr__.__tk2_sol_qalloc.437.exit.2, %__hugr__.__tk2_sol_qalloc.437.exit.1, %__hugr__.__tk2_sol_qalloc.437.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -cond_exit_12: ; preds = %__hugr__.__tk2_sol_qalloc.437.exit - %8 = and i64 %6, -2 - store i64 %8, ptr %5, align 4 - store i64 %qalloc.i, ptr %4, align 4 - %qalloc.i.1 = tail call i64 @___qalloc() - %not_max.not.not.i.1 = icmp eq i64 %qalloc.i.1, -1 - br i1 %not_max.not.not.i.1, label %cond_441_case_0.i, label %__hugr__.__tk2_sol_qalloc.437.exit.1 - -__hugr__.__tk2_sol_qalloc.437.exit.1: ; preds = %cond_exit_12 - tail call void @___reset(i64 %qalloc.i.1) - %9 = load i64, ptr %5, align 4 - %10 = and i64 %9, 2 - %.not = icmp eq i64 %10, 0 - br i1 %.not, label %panic.i, label %cond_exit_12.1 - -cond_exit_12.1: ; preds = %__hugr__.__tk2_sol_qalloc.437.exit.1 - %11 = and i64 %9, -3 - store i64 %11, ptr %5, align 4 - %12 = getelementptr inbounds nuw i8, ptr %4, i64 8 - store i64 %qalloc.i.1, ptr %12, align 4 - %qalloc.i.2 = tail call i64 @___qalloc() - %not_max.not.not.i.2 = icmp eq i64 %qalloc.i.2, -1 - br i1 %not_max.not.not.i.2, label %cond_441_case_0.i, label %__hugr__.__tk2_sol_qalloc.437.exit.2 - -__hugr__.__tk2_sol_qalloc.437.exit.2: ; preds = %cond_exit_12.1 - tail call void @___reset(i64 %qalloc.i.2) - %13 = load i64, ptr %5, align 4 - %14 = and i64 %13, 4 - %.not1192 = icmp eq i64 %14, 0 - br i1 %.not1192, label %panic.i, label %cond_exit_12.2 - -cond_exit_12.2: ; preds = %__hugr__.__tk2_sol_qalloc.437.exit.2 - %15 = and i64 %13, -5 - store i64 %15, ptr %5, align 4 - %16 = getelementptr inbounds nuw i8, ptr %4, i64 16 - store i64 %qalloc.i.2, ptr %16, align 4 - %qalloc.i.3 = tail call i64 @___qalloc() - %not_max.not.not.i.3 = icmp eq i64 %qalloc.i.3, -1 - br i1 %not_max.not.not.i.3, label %cond_441_case_0.i, label %__hugr__.__tk2_sol_qalloc.437.exit.3 - -__hugr__.__tk2_sol_qalloc.437.exit.3: ; preds = %cond_exit_12.2 - tail call void @___reset(i64 %qalloc.i.3) - %17 = load i64, ptr %5, align 4 - %18 = and i64 %17, 8 - %.not1193 = icmp eq i64 %18, 0 - br i1 %.not1193, label %panic.i, label %cond_exit_12.3 - -cond_exit_12.3: ; preds = %__hugr__.__tk2_sol_qalloc.437.exit.3 - %19 = and i64 %17, -9 - store i64 %19, ptr %5, align 4 - %20 = getelementptr inbounds nuw i8, ptr %4, i64 24 - store i64 %qalloc.i.3, ptr %20, align 4 - %qalloc.i.4 = tail call i64 @___qalloc() - %not_max.not.not.i.4 = icmp eq i64 %qalloc.i.4, -1 - br i1 %not_max.not.not.i.4, label %cond_441_case_0.i, label %__hugr__.__tk2_sol_qalloc.437.exit.4 - -__hugr__.__tk2_sol_qalloc.437.exit.4: ; preds = %cond_exit_12.3 - tail call void @___reset(i64 %qalloc.i.4) - %21 = load i64, ptr %5, align 4 - %22 = and i64 %21, 16 - %.not1194 = icmp eq i64 %22, 0 - br i1 %.not1194, label %panic.i, label %cond_exit_12.4 - -cond_exit_12.4: ; preds = %__hugr__.__tk2_sol_qalloc.437.exit.4 - %23 = and i64 %21, -17 - store i64 %23, ptr %5, align 4 - %24 = getelementptr inbounds nuw i8, ptr %4, i64 32 - store i64 %qalloc.i.4, ptr %24, align 4 - %qalloc.i.5 = tail call i64 @___qalloc() - %not_max.not.not.i.5 = icmp eq i64 %qalloc.i.5, -1 - br i1 %not_max.not.not.i.5, label %cond_441_case_0.i, label %__hugr__.__tk2_sol_qalloc.437.exit.5 - -__hugr__.__tk2_sol_qalloc.437.exit.5: ; preds = %cond_exit_12.4 - tail call void @___reset(i64 %qalloc.i.5) - %25 = load i64, ptr %5, align 4 - %26 = and i64 %25, 32 - %.not1195 = icmp eq i64 %26, 0 - br i1 %.not1195, label %panic.i, label %cond_exit_12.5 - -cond_exit_12.5: ; preds = %__hugr__.__tk2_sol_qalloc.437.exit.5 - %27 = and i64 %25, -33 - store i64 %27, ptr %5, align 4 - %28 = getelementptr inbounds nuw i8, ptr %4, i64 40 - store i64 %qalloc.i.5, ptr %28, align 4 - %qalloc.i.6 = tail call i64 @___qalloc() - %not_max.not.not.i.6 = icmp eq i64 %qalloc.i.6, -1 - br i1 %not_max.not.not.i.6, label %cond_441_case_0.i, label %__hugr__.__tk2_sol_qalloc.437.exit.6 - -__hugr__.__tk2_sol_qalloc.437.exit.6: ; preds = %cond_exit_12.5 - tail call void @___reset(i64 %qalloc.i.6) - %29 = load i64, ptr %5, align 4 - %30 = and i64 %29, 64 - %.not1196 = icmp eq i64 %30, 0 - br i1 %.not1196, label %panic.i, label %cond_exit_12.6 - -cond_exit_12.6: ; preds = %__hugr__.__tk2_sol_qalloc.437.exit.6 - %31 = and i64 %29, -65 - store i64 %31, ptr %5, align 4 - %32 = getelementptr inbounds nuw i8, ptr %4, i64 48 - store i64 %qalloc.i.6, ptr %32, align 4 - %qalloc.i.7 = tail call i64 @___qalloc() - %not_max.not.not.i.7 = icmp eq i64 %qalloc.i.7, -1 - br i1 %not_max.not.not.i.7, label %cond_441_case_0.i, label %__hugr__.__tk2_sol_qalloc.437.exit.7 - -__hugr__.__tk2_sol_qalloc.437.exit.7: ; preds = %cond_exit_12.6 - tail call void @___reset(i64 %qalloc.i.7) - %33 = load i64, ptr %5, align 4 - %34 = and i64 %33, 128 - %.not1197 = icmp eq i64 %34, 0 - br i1 %.not1197, label %panic.i, label %cond_exit_12.7 - -cond_exit_12.7: ; preds = %__hugr__.__tk2_sol_qalloc.437.exit.7 - %35 = and i64 %33, -129 - store i64 %35, ptr %5, align 4 - %36 = getelementptr inbounds nuw i8, ptr %4, i64 56 - store i64 %qalloc.i.7, ptr %36, align 4 - %qalloc.i.8 = tail call i64 @___qalloc() - %not_max.not.not.i.8 = icmp eq i64 %qalloc.i.8, -1 - br i1 %not_max.not.not.i.8, label %cond_441_case_0.i, label %__hugr__.__tk2_sol_qalloc.437.exit.8 - -__hugr__.__tk2_sol_qalloc.437.exit.8: ; preds = %cond_exit_12.7 - tail call void @___reset(i64 %qalloc.i.8) - %37 = load i64, ptr %5, align 4 - %38 = and i64 %37, 256 - %.not1198 = icmp eq i64 %38, 0 - br i1 %.not1198, label %panic.i, label %cond_exit_12.8 - -cond_exit_12.8: ; preds = %__hugr__.__tk2_sol_qalloc.437.exit.8 - %39 = and i64 %37, -257 - store i64 %39, ptr %5, align 4 - %40 = getelementptr inbounds nuw i8, ptr %4, i64 64 - store i64 %qalloc.i.8, ptr %40, align 4 - %qalloc.i.9 = tail call i64 @___qalloc() - %not_max.not.not.i.9 = icmp eq i64 %qalloc.i.9, -1 - br i1 %not_max.not.not.i.9, label %cond_441_case_0.i, label %__barray_check_bounds.exit.9 - -__barray_check_bounds.exit.9: ; preds = %cond_exit_12.8 - tail call void @___reset(i64 %qalloc.i.9) - %41 = load i64, ptr %5, align 4 - %42 = and i64 %41, 512 - %.not1199 = icmp eq i64 %42, 0 - br i1 %.not1199, label %panic.i, label %cond_exit_12.9 - -cond_exit_12.9: ; preds = %__barray_check_bounds.exit.9 - %43 = and i64 %41, -513 - store i64 %43, ptr %5, align 4 - %44 = getelementptr inbounds nuw i8, ptr %4, i64 72 - store i64 %qalloc.i.9, ptr %44, align 4 - %45 = load i64, ptr %5, align 4 - %46 = trunc i64 %45 to i1 - br i1 %46, label %panic.i1117, label %__barray_mask_borrow.exit - -panic.i1117: ; preds = %cond_exit_12.9 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit: ; preds = %cond_exit_12.9 - %47 = or disjoint i64 %45, 1 - store i64 %47, ptr %5, align 4 - %48 = load i64, ptr %4, align 4 - tail call void @___rp(i64 %48, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %48, double 0x400921FB54442D18) - %49 = load i64, ptr %5, align 4 - %50 = trunc i64 %49 to i1 - br i1 %50, label %__barray_mask_return.exit1119, label %panic.i1118 - -panic.i1118: ; preds = %__barray_mask_borrow.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1119: ; preds = %__barray_mask_borrow.exit - %51 = and i64 %49, -2 - store i64 %51, ptr %5, align 4 - store i64 %48, ptr %4, align 4 - br label %__barray_check_bounds.exit1121 - -__barray_check_bounds.exit1121: ; preds = %__barray_mask_return.exit1119, %__barray_mask_return.exit1135 - %52 = phi i64 [ 1, %__barray_mask_return.exit1119 ], [ %74, %__barray_mask_return.exit1135 ] - %"116_0.01189" = phi i64 [ 0, %__barray_mask_return.exit1119 ], [ %52, %__barray_mask_return.exit1135 ] - %53 = load i64, ptr %5, align 4 - %54 = lshr i64 %53, %"116_0.01189" - %55 = trunc i64 %54 to i1 - br i1 %55, label %panic.i1122, label %__barray_check_bounds.exit1125 - -panic.i1122: ; preds = %__barray_check_bounds.exit1121 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1125: ; preds = %__barray_check_bounds.exit1121 - %56 = shl nuw nsw i64 1, %"116_0.01189" - %57 = xor i64 %53, %56 - store i64 %57, ptr %5, align 4 - %58 = getelementptr inbounds nuw i64, ptr %4, i64 %"116_0.01189" - %59 = load i64, ptr %58, align 4 - %60 = lshr i64 %57, %52 - %61 = trunc i64 %60 to i1 - br i1 %61, label %panic.i1126, label %__barray_check_bounds.exit1129 - -panic.i1126: ; preds = %__barray_check_bounds.exit1125 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1129: ; preds = %__barray_check_bounds.exit1125 - %62 = shl nuw nsw i64 2, %"116_0.01189" - %63 = xor i64 %57, %62 - store i64 %63, ptr %5, align 4 - %64 = getelementptr inbounds nuw i64, ptr %4, i64 %52 - %65 = load i64, ptr %64, align 4 - tail call void @___rp(i64 %59, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rpp(i64 %59, i64 %65, double 0x3FF921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %65, double 0xBFF921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %59, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %59, double 0xBFF921FB54442D18) - %66 = load i64, ptr %5, align 4 - %67 = lshr i64 %66, %"116_0.01189" - %68 = trunc i64 %67 to i1 - br i1 %68, label %__barray_check_bounds.exit1133, label %panic.i1130 - -panic.i1130: ; preds = %__barray_check_bounds.exit1129 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_check_bounds.exit1133: ; preds = %__barray_check_bounds.exit1129 - %69 = xor i64 %66, %56 - store i64 %69, ptr %5, align 4 - store i64 %59, ptr %58, align 4 - %70 = load i64, ptr %5, align 4 - %71 = lshr i64 %70, %52 - %72 = trunc i64 %71 to i1 - br i1 %72, label %__barray_mask_return.exit1135, label %panic.i1134 - -panic.i1134: ; preds = %__barray_check_bounds.exit1133 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1135: ; preds = %__barray_check_bounds.exit1133 - %73 = xor i64 %70, %62 - store i64 %73, ptr %5, align 4 - store i64 %65, ptr %64, align 4 - %74 = add nuw nsw i64 %52, 1 - %exitcond = icmp eq i64 %74, 10 - br i1 %exitcond, label %loop_body346.preheader, label %__barray_check_bounds.exit1121 - -out_of_bounds.i1136: ; preds = %.thread - tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") - unreachable - -__barray_check_bounds.exit1137: ; preds = %.thread - %75 = load i64, ptr %3, align 4 - %76 = lshr i64 %75, %"237_2.01203" - %77 = trunc i64 %76 to i1 - br i1 %77, label %cond_exit_241, label %panic.i1138 - -panic.i1138: ; preds = %__barray_check_bounds.exit1137 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -mask_block_ok.i: ; preds = %cond_exit_241 - %78 = load i64, ptr %5, align 4 - %79 = or i64 %78, -1024 - store i64 %79, ptr %5, align 4 - %80 = icmp eq i64 %79, -1 - br i1 %80, label %loop_body455.preheader.preheader, label %mask_block_err.i - -mask_block_err.i: ; preds = %mask_block_ok.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -loop_body346.preheader: ; preds = %__barray_mask_return.exit1135, %cond_exit_241 - %"237_0.sroa.15.01204" = phi i64 [ %81, %cond_exit_241 ], [ 0, %__barray_mask_return.exit1135 ] - %"237_2.01203" = phi i64 [ %89, %cond_exit_241 ], [ 0, %__barray_mask_return.exit1135 ] - %81 = add nuw nsw i64 %"237_0.sroa.15.01204", 1 - %82 = load i64, ptr %5, align 4 - %83 = lshr i64 %82, %"237_0.sroa.15.01204" - %84 = trunc i64 %83 to i1 - br i1 %84, label %panic.i1142, label %.thread - -panic.i1142: ; preds = %loop_body346.preheader - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -.thread: ; preds = %loop_body346.preheader - %85 = shl nuw nsw i64 1, %"237_0.sroa.15.01204" - %86 = xor i64 %82, %85 - store i64 %86, ptr %5, align 4 - %87 = getelementptr inbounds nuw i64, ptr %4, i64 %"237_0.sroa.15.01204" - %88 = load i64, ptr %87, align 4 - %89 = add i64 %"237_2.01203", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %88) - tail call void @___qfree(i64 %88) - %90 = icmp ult i64 %"237_2.01203", 10 - br i1 %90, label %__barray_check_bounds.exit1137, label %out_of_bounds.i1136 - -cond_exit_241: ; preds = %__barray_check_bounds.exit1137 - %91 = shl nuw nsw i64 1, %"237_2.01203" - %92 = xor i64 %75, %91 - store i64 %92, ptr %3, align 4 - %93 = getelementptr inbounds nuw i64, ptr %2, i64 %"237_2.01203" - store i64 %lazy_measure, ptr %93, align 4 - %94 = icmp samesign ugt i64 %"237_0.sroa.15.01204", 8 - br i1 %94, label %mask_block_ok.i, label %loop_body346.preheader - -loop_body455.preheader.preheader: ; preds = %mask_block_ok.i - tail call void @heap_free(ptr nonnull %4) - tail call void @heap_free(ptr nonnull %5) - br label %__barray_check_bounds.exit1145 - -__barray_check_bounds.exit1145: ; preds = %cond_exit_307, %loop_body455.preheader.preheader - %"303_0.sroa.15.01191" = phi i64 [ %95, %cond_exit_307 ], [ 0, %loop_body455.preheader.preheader ] - %95 = add nuw nsw i64 %"303_0.sroa.15.01191", 1 - %96 = load i64, ptr %3, align 4 - %97 = lshr i64 %96, %"303_0.sroa.15.01191" - %98 = trunc i64 %97 to i1 - br i1 %98, label %panic.i1146, label %__barray_check_bounds.exit1149 - -panic.i1146: ; preds = %__barray_check_bounds.exit1145 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1149: ; preds = %__barray_check_bounds.exit1145 - %99 = shl nuw nsw i64 1, %"303_0.sroa.15.01191" - %100 = xor i64 %96, %99 - store i64 %100, ptr %3, align 4 - %101 = getelementptr inbounds nuw i64, ptr %2, i64 %"303_0.sroa.15.01191" - %102 = load i64, ptr %101, align 4 - tail call void @___inc_future_refcount(i64 %102) - %103 = load i64, ptr %3, align 4 - %104 = lshr i64 %103, %"303_0.sroa.15.01191" - %105 = trunc i64 %104 to i1 - br i1 %105, label %__barray_check_bounds.exit1153, label %panic.i1150 - -panic.i1150: ; preds = %__barray_check_bounds.exit1149 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_check_bounds.exit1153: ; preds = %__barray_check_bounds.exit1149 - %106 = xor i64 %103, %99 - store i64 %106, ptr %3, align 4 - store i64 %102, ptr %101, align 4 - %read_bool = tail call i1 @___read_future_bool(i64 %102) - tail call void @___dec_future_refcount(i64 %102) - %107 = load i64, ptr %1, align 4 - %108 = lshr i64 %107, %"303_0.sroa.15.01191" - %109 = trunc i64 %108 to i1 - br i1 %109, label %cond_exit_307, label %panic.i1154 - -panic.i1154: ; preds = %__barray_check_bounds.exit1153 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -mask_block_err.i1159: ; preds = %cond_exit_487.9 - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_mask_borrow.exit1167: ; preds = %__barray_check_bounds.exit1163.preheader - %110 = or disjoint i64 %163, 1 - store i64 %110, ptr %3, align 4 - %111 = load i64, ptr %2, align 4 - tail call void @___dec_future_refcount(i64 %111) - br label %cond_exit_487 - -cond_exit_487: ; preds = %__barray_mask_borrow.exit1167, %__barray_check_bounds.exit1163.preheader - %112 = load i64, ptr %3, align 4 - %113 = and i64 %112, 2 - %.not1206 = icmp eq i64 %113, 0 - br i1 %.not1206, label %__barray_mask_borrow.exit1167.1, label %cond_exit_487.1 - -__barray_mask_borrow.exit1167.1: ; preds = %cond_exit_487 - %114 = or disjoint i64 %112, 2 - store i64 %114, ptr %3, align 4 - %115 = getelementptr inbounds nuw i8, ptr %2, i64 8 - %116 = load i64, ptr %115, align 4 - tail call void @___dec_future_refcount(i64 %116) - br label %cond_exit_487.1 - -cond_exit_487.1: ; preds = %__barray_mask_borrow.exit1167.1, %cond_exit_487 - %117 = load i64, ptr %3, align 4 - %118 = and i64 %117, 4 - %.not1207 = icmp eq i64 %118, 0 - br i1 %.not1207, label %__barray_mask_borrow.exit1167.2, label %cond_exit_487.2 - -__barray_mask_borrow.exit1167.2: ; preds = %cond_exit_487.1 - %119 = or disjoint i64 %117, 4 - store i64 %119, ptr %3, align 4 - %120 = getelementptr inbounds nuw i8, ptr %2, i64 16 - %121 = load i64, ptr %120, align 4 - tail call void @___dec_future_refcount(i64 %121) - br label %cond_exit_487.2 - -cond_exit_487.2: ; preds = %__barray_mask_borrow.exit1167.2, %cond_exit_487.1 - %122 = load i64, ptr %3, align 4 - %123 = and i64 %122, 8 - %.not1208 = icmp eq i64 %123, 0 - br i1 %.not1208, label %__barray_mask_borrow.exit1167.3, label %cond_exit_487.3 - -__barray_mask_borrow.exit1167.3: ; preds = %cond_exit_487.2 - %124 = or disjoint i64 %122, 8 - store i64 %124, ptr %3, align 4 - %125 = getelementptr inbounds nuw i8, ptr %2, i64 24 - %126 = load i64, ptr %125, align 4 - tail call void @___dec_future_refcount(i64 %126) - br label %cond_exit_487.3 - -cond_exit_487.3: ; preds = %__barray_mask_borrow.exit1167.3, %cond_exit_487.2 - %127 = load i64, ptr %3, align 4 - %128 = and i64 %127, 16 - %.not1209 = icmp eq i64 %128, 0 - br i1 %.not1209, label %__barray_mask_borrow.exit1167.4, label %cond_exit_487.4 - -__barray_mask_borrow.exit1167.4: ; preds = %cond_exit_487.3 - %129 = or disjoint i64 %127, 16 - store i64 %129, ptr %3, align 4 - %130 = getelementptr inbounds nuw i8, ptr %2, i64 32 - %131 = load i64, ptr %130, align 4 - tail call void @___dec_future_refcount(i64 %131) - br label %cond_exit_487.4 - -cond_exit_487.4: ; preds = %__barray_mask_borrow.exit1167.4, %cond_exit_487.3 - %132 = load i64, ptr %3, align 4 - %133 = and i64 %132, 32 - %.not1210 = icmp eq i64 %133, 0 - br i1 %.not1210, label %__barray_mask_borrow.exit1167.5, label %cond_exit_487.5 - -__barray_mask_borrow.exit1167.5: ; preds = %cond_exit_487.4 - %134 = or disjoint i64 %132, 32 - store i64 %134, ptr %3, align 4 - %135 = getelementptr inbounds nuw i8, ptr %2, i64 40 - %136 = load i64, ptr %135, align 4 - tail call void @___dec_future_refcount(i64 %136) - br label %cond_exit_487.5 - -cond_exit_487.5: ; preds = %__barray_mask_borrow.exit1167.5, %cond_exit_487.4 - %137 = load i64, ptr %3, align 4 - %138 = and i64 %137, 64 - %.not1211 = icmp eq i64 %138, 0 - br i1 %.not1211, label %__barray_mask_borrow.exit1167.6, label %cond_exit_487.6 - -__barray_mask_borrow.exit1167.6: ; preds = %cond_exit_487.5 - %139 = or disjoint i64 %137, 64 - store i64 %139, ptr %3, align 4 - %140 = getelementptr inbounds nuw i8, ptr %2, i64 48 - %141 = load i64, ptr %140, align 4 - tail call void @___dec_future_refcount(i64 %141) - br label %cond_exit_487.6 - -cond_exit_487.6: ; preds = %__barray_mask_borrow.exit1167.6, %cond_exit_487.5 - %142 = load i64, ptr %3, align 4 - %143 = and i64 %142, 128 - %.not1212 = icmp eq i64 %143, 0 - br i1 %.not1212, label %__barray_mask_borrow.exit1167.7, label %cond_exit_487.7 - -__barray_mask_borrow.exit1167.7: ; preds = %cond_exit_487.6 - %144 = or disjoint i64 %142, 128 - store i64 %144, ptr %3, align 4 - %145 = getelementptr inbounds nuw i8, ptr %2, i64 56 - %146 = load i64, ptr %145, align 4 - tail call void @___dec_future_refcount(i64 %146) - br label %cond_exit_487.7 - -cond_exit_487.7: ; preds = %__barray_mask_borrow.exit1167.7, %cond_exit_487.6 - %147 = load i64, ptr %3, align 4 - %148 = and i64 %147, 256 - %.not1213 = icmp eq i64 %148, 0 - br i1 %.not1213, label %__barray_mask_borrow.exit1167.8, label %cond_exit_487.8 - -__barray_mask_borrow.exit1167.8: ; preds = %cond_exit_487.7 - %149 = or disjoint i64 %147, 256 - store i64 %149, ptr %3, align 4 - %150 = getelementptr inbounds nuw i8, ptr %2, i64 64 - %151 = load i64, ptr %150, align 4 - tail call void @___dec_future_refcount(i64 %151) - br label %cond_exit_487.8 - -cond_exit_487.8: ; preds = %__barray_mask_borrow.exit1167.8, %cond_exit_487.7 - %152 = load i64, ptr %3, align 4 - %153 = and i64 %152, 512 - %.not1214 = icmp eq i64 %153, 0 - br i1 %.not1214, label %__barray_mask_borrow.exit1167.9, label %cond_exit_487.9 - -__barray_mask_borrow.exit1167.9: ; preds = %cond_exit_487.8 - %154 = or disjoint i64 %152, 512 - store i64 %154, ptr %3, align 4 - %155 = getelementptr inbounds nuw i8, ptr %2, i64 72 - %156 = load i64, ptr %155, align 4 - tail call void @___dec_future_refcount(i64 %156) - br label %cond_exit_487.9 - -cond_exit_487.9: ; preds = %__barray_mask_borrow.exit1167.9, %cond_exit_487.8 - %157 = load i64, ptr %3, align 4 - %158 = or i64 %157, -1024 - store i64 %158, ptr %3, align 4 - %159 = icmp eq i64 %158, -1 - br i1 %159, label %loop_out454, label %mask_block_err.i1159 - -cond_exit_307: ; preds = %__barray_check_bounds.exit1153 - %160 = xor i64 %107, %99 - store i64 %160, ptr %1, align 4 - %161 = getelementptr inbounds nuw i1, ptr %0, i64 %"303_0.sroa.15.01191" - store i1 %read_bool, ptr %161, align 1 - %162 = icmp eq i64 %"303_0.sroa.15.01191", 9 - br i1 %162, label %__barray_check_bounds.exit1163.preheader, label %__barray_check_bounds.exit1145 - -__barray_check_bounds.exit1163.preheader: ; preds = %cond_exit_307 - %163 = load i64, ptr %3, align 4 - %164 = trunc i64 %163 to i1 - br i1 %164, label %cond_exit_487, label %__barray_mask_borrow.exit1167 - -loop_out454: ; preds = %cond_exit_487.9 - tail call void @heap_free(ptr %2) - tail call void @heap_free(ptr nonnull %3) - %165 = load i64, ptr %1, align 4 - %166 = and i64 %165, 1023 - store i64 %166, ptr %1, align 4 - %167 = icmp eq i64 %166, 0 - br i1 %167, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1168 - -mask_block_err.i1168: ; preds = %loop_out454 - tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") - unreachable - -__barray_check_none_borrowed.exit: ; preds = %loop_out454 - %168 = tail call ptr @heap_alloc(i64 10) - %169 = tail call ptr @heap_alloc(i64 8) - store i64 0, ptr %169, align 1 - tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(10) %168, ptr noundef nonnull align 1 dereferenceable(10) %0, i64 10, i1 false) - tail call void @heap_free(ptr nonnull %168) - %170 = load i64, ptr %1, align 4 - %171 = and i64 %170, 1023 - store i64 %171, ptr %1, align 4 - %172 = icmp eq i64 %171, 0 - br i1 %172, label %__barray_check_none_borrowed.exit1172, label %mask_block_err.i1170 - -mask_block_err.i1170: ; preds = %__barray_check_none_borrowed.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") - unreachable - -__barray_check_none_borrowed.exit1172: ; preds = %__barray_check_none_borrowed.exit - %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 - %y_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 4 - %arr_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 8 - %mask_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 16 - %173 = alloca [10 x i1], align 1 - call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(10) %173, i8 0, i64 10, i1 false) - store i32 10, ptr %out_arr_alloca, align 8 - store i32 1, ptr %y_ptr, align 4 - store ptr %0, ptr %arr_ptr, align 8 - store ptr %173, ptr %mask_ptr, align 8 - call void @print_bool_arr(ptr nonnull @res_outcomes.9CB6D2E7.0, i64 21, ptr nonnull %out_arr_alloca) - ret void -} - -declare ptr @heap_alloc(i64) local_unnamed_addr - -; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) -declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immarg) #0 - -; Function Attrs: noreturn -declare void @panic(i32, ptr) local_unnamed_addr #1 - -declare void @heap_free(ptr) local_unnamed_addr - -declare i64 @___lazy_measure(i64) local_unnamed_addr - -declare void @___qfree(i64) local_unnamed_addr - -declare void @___inc_future_refcount(i64) local_unnamed_addr - -declare void @___dec_future_refcount(i64) local_unnamed_addr - -declare i1 @___read_future_bool(i64) local_unnamed_addr - -; Function Attrs: mustprogress 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) #2 - -declare void @print_bool_arr(ptr, i64, ptr) local_unnamed_addr - -declare void @___rp(i64, double, double) local_unnamed_addr - -declare void @___rz(i64, double) local_unnamed_addr - -declare void @___rpp(i64, i64, double, double) local_unnamed_addr - -declare i64 @___qalloc() local_unnamed_addr - -declare void @___reset(i64) local_unnamed_addr - -define i64 @qmain(i64 %0) local_unnamed_addr { -entry: - tail call void @setup(i64 %0) - tail call void @__hugr__.__main__.main.1() - %1 = tail call i64 @teardown() - ret i64 %1 -} - -declare void @setup(i64) local_unnamed_addr - -declare i64 @teardown() local_unnamed_addr - -attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } -attributes #1 = { noreturn } -attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) } - -!name = !{!0} - -!0 = !{!"mainlib"} diff --git a/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace/trace_test-sol-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace/trace_test-sol-aarch64-unknown-linux-gnu.ll deleted file mode 100644 index d206b654..00000000 --- a/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace/trace_test-sol-aarch64-unknown-linux-gnu.ll +++ /dev/null @@ -1,647 +0,0 @@ -; ModuleID = 'hugr' -source_filename = "hugr" -target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32" -target triple = "aarch64-unknown-linux-gnu" - -@"e_Index out .DD115165.0" = private constant [29 x i8] c"\1CEXIT:INT:Index out of bounds" -@"e_Array alre.5A300C2A.0" = private constant [57 x i8] c"8EXIT:INT:Array already contains an element at this index" -@"e_Array elem.E746B1A3.0" = private constant [43 x i8] c"*EXIT:INT:Array element is already borrowed" -@"e_Array cont.EFA5AC45.0" = private constant [70 x i8] c"EEXIT:INT:Array contains non-borrowed elements and cannot be discarded" -@"e_Some array.A77EF32E.0" = private constant [48 x i8] c"/EXIT:INT:Some array elements have been borrowed" -@res_outcomes.9CB6D2E7.0 = private constant [22 x i8] c"\15USER:BOOLARR:outcomes" -@"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." - -define void @__hugr__.__main__.main.1() local_unnamed_addr { -alloca_block: - %0 = tail call ptr @heap_alloc(i64 10) - %1 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %1, align 1 - %2 = tail call ptr @heap_alloc(i64 80) - %3 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %3, align 1 - %4 = tail call ptr @heap_alloc(i64 80) - %5 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %5, align 1 - %qalloc.i = tail call i64 @___qalloc() - %not_max.not.not.i = icmp eq i64 %qalloc.i, -1 - br i1 %not_max.not.not.i, label %cond_441_case_0.i, label %__hugr__.__tk2_sol_qalloc.437.exit - -cond_441_case_0.i: ; preds = %cond_exit_12.8, %cond_exit_12.7, %cond_exit_12.6, %cond_exit_12.5, %cond_exit_12.4, %cond_exit_12.3, %cond_exit_12.2, %cond_exit_12.1, %cond_exit_12, %alloca_block - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_sol_qalloc.437.exit: ; preds = %alloca_block - tail call void @___reset(i64 %qalloc.i) - %6 = load i64, ptr %5, align 4 - %7 = trunc i64 %6 to i1 - br i1 %7, label %cond_exit_12, label %panic.i - -panic.i: ; preds = %__barray_check_bounds.exit.9, %__hugr__.__tk2_sol_qalloc.437.exit.8, %__hugr__.__tk2_sol_qalloc.437.exit.7, %__hugr__.__tk2_sol_qalloc.437.exit.6, %__hugr__.__tk2_sol_qalloc.437.exit.5, %__hugr__.__tk2_sol_qalloc.437.exit.4, %__hugr__.__tk2_sol_qalloc.437.exit.3, %__hugr__.__tk2_sol_qalloc.437.exit.2, %__hugr__.__tk2_sol_qalloc.437.exit.1, %__hugr__.__tk2_sol_qalloc.437.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -cond_exit_12: ; preds = %__hugr__.__tk2_sol_qalloc.437.exit - %8 = and i64 %6, -2 - store i64 %8, ptr %5, align 4 - store i64 %qalloc.i, ptr %4, align 4 - %qalloc.i.1 = tail call i64 @___qalloc() - %not_max.not.not.i.1 = icmp eq i64 %qalloc.i.1, -1 - br i1 %not_max.not.not.i.1, label %cond_441_case_0.i, label %__hugr__.__tk2_sol_qalloc.437.exit.1 - -__hugr__.__tk2_sol_qalloc.437.exit.1: ; preds = %cond_exit_12 - tail call void @___reset(i64 %qalloc.i.1) - %9 = load i64, ptr %5, align 4 - %10 = and i64 %9, 2 - %.not = icmp eq i64 %10, 0 - br i1 %.not, label %panic.i, label %cond_exit_12.1 - -cond_exit_12.1: ; preds = %__hugr__.__tk2_sol_qalloc.437.exit.1 - %11 = and i64 %9, -3 - store i64 %11, ptr %5, align 4 - %12 = getelementptr inbounds nuw i8, ptr %4, i64 8 - store i64 %qalloc.i.1, ptr %12, align 4 - %qalloc.i.2 = tail call i64 @___qalloc() - %not_max.not.not.i.2 = icmp eq i64 %qalloc.i.2, -1 - br i1 %not_max.not.not.i.2, label %cond_441_case_0.i, label %__hugr__.__tk2_sol_qalloc.437.exit.2 - -__hugr__.__tk2_sol_qalloc.437.exit.2: ; preds = %cond_exit_12.1 - tail call void @___reset(i64 %qalloc.i.2) - %13 = load i64, ptr %5, align 4 - %14 = and i64 %13, 4 - %.not1192 = icmp eq i64 %14, 0 - br i1 %.not1192, label %panic.i, label %cond_exit_12.2 - -cond_exit_12.2: ; preds = %__hugr__.__tk2_sol_qalloc.437.exit.2 - %15 = and i64 %13, -5 - store i64 %15, ptr %5, align 4 - %16 = getelementptr inbounds nuw i8, ptr %4, i64 16 - store i64 %qalloc.i.2, ptr %16, align 4 - %qalloc.i.3 = tail call i64 @___qalloc() - %not_max.not.not.i.3 = icmp eq i64 %qalloc.i.3, -1 - br i1 %not_max.not.not.i.3, label %cond_441_case_0.i, label %__hugr__.__tk2_sol_qalloc.437.exit.3 - -__hugr__.__tk2_sol_qalloc.437.exit.3: ; preds = %cond_exit_12.2 - tail call void @___reset(i64 %qalloc.i.3) - %17 = load i64, ptr %5, align 4 - %18 = and i64 %17, 8 - %.not1193 = icmp eq i64 %18, 0 - br i1 %.not1193, label %panic.i, label %cond_exit_12.3 - -cond_exit_12.3: ; preds = %__hugr__.__tk2_sol_qalloc.437.exit.3 - %19 = and i64 %17, -9 - store i64 %19, ptr %5, align 4 - %20 = getelementptr inbounds nuw i8, ptr %4, i64 24 - store i64 %qalloc.i.3, ptr %20, align 4 - %qalloc.i.4 = tail call i64 @___qalloc() - %not_max.not.not.i.4 = icmp eq i64 %qalloc.i.4, -1 - br i1 %not_max.not.not.i.4, label %cond_441_case_0.i, label %__hugr__.__tk2_sol_qalloc.437.exit.4 - -__hugr__.__tk2_sol_qalloc.437.exit.4: ; preds = %cond_exit_12.3 - tail call void @___reset(i64 %qalloc.i.4) - %21 = load i64, ptr %5, align 4 - %22 = and i64 %21, 16 - %.not1194 = icmp eq i64 %22, 0 - br i1 %.not1194, label %panic.i, label %cond_exit_12.4 - -cond_exit_12.4: ; preds = %__hugr__.__tk2_sol_qalloc.437.exit.4 - %23 = and i64 %21, -17 - store i64 %23, ptr %5, align 4 - %24 = getelementptr inbounds nuw i8, ptr %4, i64 32 - store i64 %qalloc.i.4, ptr %24, align 4 - %qalloc.i.5 = tail call i64 @___qalloc() - %not_max.not.not.i.5 = icmp eq i64 %qalloc.i.5, -1 - br i1 %not_max.not.not.i.5, label %cond_441_case_0.i, label %__hugr__.__tk2_sol_qalloc.437.exit.5 - -__hugr__.__tk2_sol_qalloc.437.exit.5: ; preds = %cond_exit_12.4 - tail call void @___reset(i64 %qalloc.i.5) - %25 = load i64, ptr %5, align 4 - %26 = and i64 %25, 32 - %.not1195 = icmp eq i64 %26, 0 - br i1 %.not1195, label %panic.i, label %cond_exit_12.5 - -cond_exit_12.5: ; preds = %__hugr__.__tk2_sol_qalloc.437.exit.5 - %27 = and i64 %25, -33 - store i64 %27, ptr %5, align 4 - %28 = getelementptr inbounds nuw i8, ptr %4, i64 40 - store i64 %qalloc.i.5, ptr %28, align 4 - %qalloc.i.6 = tail call i64 @___qalloc() - %not_max.not.not.i.6 = icmp eq i64 %qalloc.i.6, -1 - br i1 %not_max.not.not.i.6, label %cond_441_case_0.i, label %__hugr__.__tk2_sol_qalloc.437.exit.6 - -__hugr__.__tk2_sol_qalloc.437.exit.6: ; preds = %cond_exit_12.5 - tail call void @___reset(i64 %qalloc.i.6) - %29 = load i64, ptr %5, align 4 - %30 = and i64 %29, 64 - %.not1196 = icmp eq i64 %30, 0 - br i1 %.not1196, label %panic.i, label %cond_exit_12.6 - -cond_exit_12.6: ; preds = %__hugr__.__tk2_sol_qalloc.437.exit.6 - %31 = and i64 %29, -65 - store i64 %31, ptr %5, align 4 - %32 = getelementptr inbounds nuw i8, ptr %4, i64 48 - store i64 %qalloc.i.6, ptr %32, align 4 - %qalloc.i.7 = tail call i64 @___qalloc() - %not_max.not.not.i.7 = icmp eq i64 %qalloc.i.7, -1 - br i1 %not_max.not.not.i.7, label %cond_441_case_0.i, label %__hugr__.__tk2_sol_qalloc.437.exit.7 - -__hugr__.__tk2_sol_qalloc.437.exit.7: ; preds = %cond_exit_12.6 - tail call void @___reset(i64 %qalloc.i.7) - %33 = load i64, ptr %5, align 4 - %34 = and i64 %33, 128 - %.not1197 = icmp eq i64 %34, 0 - br i1 %.not1197, label %panic.i, label %cond_exit_12.7 - -cond_exit_12.7: ; preds = %__hugr__.__tk2_sol_qalloc.437.exit.7 - %35 = and i64 %33, -129 - store i64 %35, ptr %5, align 4 - %36 = getelementptr inbounds nuw i8, ptr %4, i64 56 - store i64 %qalloc.i.7, ptr %36, align 4 - %qalloc.i.8 = tail call i64 @___qalloc() - %not_max.not.not.i.8 = icmp eq i64 %qalloc.i.8, -1 - br i1 %not_max.not.not.i.8, label %cond_441_case_0.i, label %__hugr__.__tk2_sol_qalloc.437.exit.8 - -__hugr__.__tk2_sol_qalloc.437.exit.8: ; preds = %cond_exit_12.7 - tail call void @___reset(i64 %qalloc.i.8) - %37 = load i64, ptr %5, align 4 - %38 = and i64 %37, 256 - %.not1198 = icmp eq i64 %38, 0 - br i1 %.not1198, label %panic.i, label %cond_exit_12.8 - -cond_exit_12.8: ; preds = %__hugr__.__tk2_sol_qalloc.437.exit.8 - %39 = and i64 %37, -257 - store i64 %39, ptr %5, align 4 - %40 = getelementptr inbounds nuw i8, ptr %4, i64 64 - store i64 %qalloc.i.8, ptr %40, align 4 - %qalloc.i.9 = tail call i64 @___qalloc() - %not_max.not.not.i.9 = icmp eq i64 %qalloc.i.9, -1 - br i1 %not_max.not.not.i.9, label %cond_441_case_0.i, label %__barray_check_bounds.exit.9 - -__barray_check_bounds.exit.9: ; preds = %cond_exit_12.8 - tail call void @___reset(i64 %qalloc.i.9) - %41 = load i64, ptr %5, align 4 - %42 = and i64 %41, 512 - %.not1199 = icmp eq i64 %42, 0 - br i1 %.not1199, label %panic.i, label %cond_exit_12.9 - -cond_exit_12.9: ; preds = %__barray_check_bounds.exit.9 - %43 = and i64 %41, -513 - store i64 %43, ptr %5, align 4 - %44 = getelementptr inbounds nuw i8, ptr %4, i64 72 - store i64 %qalloc.i.9, ptr %44, align 4 - %45 = load i64, ptr %5, align 4 - %46 = trunc i64 %45 to i1 - br i1 %46, label %panic.i1117, label %__barray_mask_borrow.exit - -panic.i1117: ; preds = %cond_exit_12.9 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit: ; preds = %cond_exit_12.9 - %47 = or disjoint i64 %45, 1 - store i64 %47, ptr %5, align 4 - %48 = load i64, ptr %4, align 4 - tail call void @___rp(i64 %48, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %48, double 0x400921FB54442D18) - %49 = load i64, ptr %5, align 4 - %50 = trunc i64 %49 to i1 - br i1 %50, label %__barray_mask_return.exit1119, label %panic.i1118 - -panic.i1118: ; preds = %__barray_mask_borrow.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1119: ; preds = %__barray_mask_borrow.exit - %51 = and i64 %49, -2 - store i64 %51, ptr %5, align 4 - store i64 %48, ptr %4, align 4 - br label %__barray_check_bounds.exit1121 - -__barray_check_bounds.exit1121: ; preds = %__barray_mask_return.exit1119, %__barray_mask_return.exit1135 - %52 = phi i64 [ 1, %__barray_mask_return.exit1119 ], [ %74, %__barray_mask_return.exit1135 ] - %"116_0.01189" = phi i64 [ 0, %__barray_mask_return.exit1119 ], [ %52, %__barray_mask_return.exit1135 ] - %53 = load i64, ptr %5, align 4 - %54 = lshr i64 %53, %"116_0.01189" - %55 = trunc i64 %54 to i1 - br i1 %55, label %panic.i1122, label %__barray_check_bounds.exit1125 - -panic.i1122: ; preds = %__barray_check_bounds.exit1121 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1125: ; preds = %__barray_check_bounds.exit1121 - %56 = shl nuw nsw i64 1, %"116_0.01189" - %57 = xor i64 %53, %56 - store i64 %57, ptr %5, align 4 - %58 = getelementptr inbounds nuw i64, ptr %4, i64 %"116_0.01189" - %59 = load i64, ptr %58, align 4 - %60 = lshr i64 %57, %52 - %61 = trunc i64 %60 to i1 - br i1 %61, label %panic.i1126, label %__barray_check_bounds.exit1129 - -panic.i1126: ; preds = %__barray_check_bounds.exit1125 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1129: ; preds = %__barray_check_bounds.exit1125 - %62 = shl nuw nsw i64 2, %"116_0.01189" - %63 = xor i64 %57, %62 - store i64 %63, ptr %5, align 4 - %64 = getelementptr inbounds nuw i64, ptr %4, i64 %52 - %65 = load i64, ptr %64, align 4 - tail call void @___rp(i64 %59, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rpp(i64 %59, i64 %65, double 0x3FF921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %65, double 0xBFF921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %59, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %59, double 0xBFF921FB54442D18) - %66 = load i64, ptr %5, align 4 - %67 = lshr i64 %66, %"116_0.01189" - %68 = trunc i64 %67 to i1 - br i1 %68, label %__barray_check_bounds.exit1133, label %panic.i1130 - -panic.i1130: ; preds = %__barray_check_bounds.exit1129 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_check_bounds.exit1133: ; preds = %__barray_check_bounds.exit1129 - %69 = xor i64 %66, %56 - store i64 %69, ptr %5, align 4 - store i64 %59, ptr %58, align 4 - %70 = load i64, ptr %5, align 4 - %71 = lshr i64 %70, %52 - %72 = trunc i64 %71 to i1 - br i1 %72, label %__barray_mask_return.exit1135, label %panic.i1134 - -panic.i1134: ; preds = %__barray_check_bounds.exit1133 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1135: ; preds = %__barray_check_bounds.exit1133 - %73 = xor i64 %70, %62 - store i64 %73, ptr %5, align 4 - store i64 %65, ptr %64, align 4 - %74 = add nuw nsw i64 %52, 1 - %exitcond = icmp eq i64 %74, 10 - br i1 %exitcond, label %loop_body346.preheader, label %__barray_check_bounds.exit1121 - -out_of_bounds.i1136: ; preds = %.thread - tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") - unreachable - -__barray_check_bounds.exit1137: ; preds = %.thread - %75 = load i64, ptr %3, align 4 - %76 = lshr i64 %75, %"237_2.01203" - %77 = trunc i64 %76 to i1 - br i1 %77, label %cond_exit_241, label %panic.i1138 - -panic.i1138: ; preds = %__barray_check_bounds.exit1137 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -mask_block_ok.i: ; preds = %cond_exit_241 - %78 = load i64, ptr %5, align 4 - %79 = or i64 %78, -1024 - store i64 %79, ptr %5, align 4 - %80 = icmp eq i64 %79, -1 - br i1 %80, label %loop_body455.preheader.preheader, label %mask_block_err.i - -mask_block_err.i: ; preds = %mask_block_ok.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -loop_body346.preheader: ; preds = %__barray_mask_return.exit1135, %cond_exit_241 - %"237_0.sroa.15.01204" = phi i64 [ %81, %cond_exit_241 ], [ 0, %__barray_mask_return.exit1135 ] - %"237_2.01203" = phi i64 [ %89, %cond_exit_241 ], [ 0, %__barray_mask_return.exit1135 ] - %81 = add nuw nsw i64 %"237_0.sroa.15.01204", 1 - %82 = load i64, ptr %5, align 4 - %83 = lshr i64 %82, %"237_0.sroa.15.01204" - %84 = trunc i64 %83 to i1 - br i1 %84, label %panic.i1142, label %.thread - -panic.i1142: ; preds = %loop_body346.preheader - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -.thread: ; preds = %loop_body346.preheader - %85 = shl nuw nsw i64 1, %"237_0.sroa.15.01204" - %86 = xor i64 %82, %85 - store i64 %86, ptr %5, align 4 - %87 = getelementptr inbounds nuw i64, ptr %4, i64 %"237_0.sroa.15.01204" - %88 = load i64, ptr %87, align 4 - %89 = add i64 %"237_2.01203", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %88) - tail call void @___qfree(i64 %88) - %90 = icmp ult i64 %"237_2.01203", 10 - br i1 %90, label %__barray_check_bounds.exit1137, label %out_of_bounds.i1136 - -cond_exit_241: ; preds = %__barray_check_bounds.exit1137 - %91 = shl nuw nsw i64 1, %"237_2.01203" - %92 = xor i64 %75, %91 - store i64 %92, ptr %3, align 4 - %93 = getelementptr inbounds nuw i64, ptr %2, i64 %"237_2.01203" - store i64 %lazy_measure, ptr %93, align 4 - %94 = icmp samesign ugt i64 %"237_0.sroa.15.01204", 8 - br i1 %94, label %mask_block_ok.i, label %loop_body346.preheader - -loop_body455.preheader.preheader: ; preds = %mask_block_ok.i - tail call void @heap_free(ptr nonnull %4) - tail call void @heap_free(ptr nonnull %5) - br label %__barray_check_bounds.exit1145 - -__barray_check_bounds.exit1145: ; preds = %cond_exit_307, %loop_body455.preheader.preheader - %"303_0.sroa.15.01191" = phi i64 [ %95, %cond_exit_307 ], [ 0, %loop_body455.preheader.preheader ] - %95 = add nuw nsw i64 %"303_0.sroa.15.01191", 1 - %96 = load i64, ptr %3, align 4 - %97 = lshr i64 %96, %"303_0.sroa.15.01191" - %98 = trunc i64 %97 to i1 - br i1 %98, label %panic.i1146, label %__barray_check_bounds.exit1149 - -panic.i1146: ; preds = %__barray_check_bounds.exit1145 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1149: ; preds = %__barray_check_bounds.exit1145 - %99 = shl nuw nsw i64 1, %"303_0.sroa.15.01191" - %100 = xor i64 %96, %99 - store i64 %100, ptr %3, align 4 - %101 = getelementptr inbounds nuw i64, ptr %2, i64 %"303_0.sroa.15.01191" - %102 = load i64, ptr %101, align 4 - tail call void @___inc_future_refcount(i64 %102) - %103 = load i64, ptr %3, align 4 - %104 = lshr i64 %103, %"303_0.sroa.15.01191" - %105 = trunc i64 %104 to i1 - br i1 %105, label %__barray_check_bounds.exit1153, label %panic.i1150 - -panic.i1150: ; preds = %__barray_check_bounds.exit1149 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_check_bounds.exit1153: ; preds = %__barray_check_bounds.exit1149 - %106 = xor i64 %103, %99 - store i64 %106, ptr %3, align 4 - store i64 %102, ptr %101, align 4 - %read_bool = tail call i1 @___read_future_bool(i64 %102) - tail call void @___dec_future_refcount(i64 %102) - %107 = load i64, ptr %1, align 4 - %108 = lshr i64 %107, %"303_0.sroa.15.01191" - %109 = trunc i64 %108 to i1 - br i1 %109, label %cond_exit_307, label %panic.i1154 - -panic.i1154: ; preds = %__barray_check_bounds.exit1153 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -mask_block_err.i1159: ; preds = %cond_exit_487.9 - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_mask_borrow.exit1167: ; preds = %__barray_check_bounds.exit1163.preheader - %110 = or disjoint i64 %163, 1 - store i64 %110, ptr %3, align 4 - %111 = load i64, ptr %2, align 4 - tail call void @___dec_future_refcount(i64 %111) - br label %cond_exit_487 - -cond_exit_487: ; preds = %__barray_mask_borrow.exit1167, %__barray_check_bounds.exit1163.preheader - %112 = load i64, ptr %3, align 4 - %113 = and i64 %112, 2 - %.not1206 = icmp eq i64 %113, 0 - br i1 %.not1206, label %__barray_mask_borrow.exit1167.1, label %cond_exit_487.1 - -__barray_mask_borrow.exit1167.1: ; preds = %cond_exit_487 - %114 = or disjoint i64 %112, 2 - store i64 %114, ptr %3, align 4 - %115 = getelementptr inbounds nuw i8, ptr %2, i64 8 - %116 = load i64, ptr %115, align 4 - tail call void @___dec_future_refcount(i64 %116) - br label %cond_exit_487.1 - -cond_exit_487.1: ; preds = %__barray_mask_borrow.exit1167.1, %cond_exit_487 - %117 = load i64, ptr %3, align 4 - %118 = and i64 %117, 4 - %.not1207 = icmp eq i64 %118, 0 - br i1 %.not1207, label %__barray_mask_borrow.exit1167.2, label %cond_exit_487.2 - -__barray_mask_borrow.exit1167.2: ; preds = %cond_exit_487.1 - %119 = or disjoint i64 %117, 4 - store i64 %119, ptr %3, align 4 - %120 = getelementptr inbounds nuw i8, ptr %2, i64 16 - %121 = load i64, ptr %120, align 4 - tail call void @___dec_future_refcount(i64 %121) - br label %cond_exit_487.2 - -cond_exit_487.2: ; preds = %__barray_mask_borrow.exit1167.2, %cond_exit_487.1 - %122 = load i64, ptr %3, align 4 - %123 = and i64 %122, 8 - %.not1208 = icmp eq i64 %123, 0 - br i1 %.not1208, label %__barray_mask_borrow.exit1167.3, label %cond_exit_487.3 - -__barray_mask_borrow.exit1167.3: ; preds = %cond_exit_487.2 - %124 = or disjoint i64 %122, 8 - store i64 %124, ptr %3, align 4 - %125 = getelementptr inbounds nuw i8, ptr %2, i64 24 - %126 = load i64, ptr %125, align 4 - tail call void @___dec_future_refcount(i64 %126) - br label %cond_exit_487.3 - -cond_exit_487.3: ; preds = %__barray_mask_borrow.exit1167.3, %cond_exit_487.2 - %127 = load i64, ptr %3, align 4 - %128 = and i64 %127, 16 - %.not1209 = icmp eq i64 %128, 0 - br i1 %.not1209, label %__barray_mask_borrow.exit1167.4, label %cond_exit_487.4 - -__barray_mask_borrow.exit1167.4: ; preds = %cond_exit_487.3 - %129 = or disjoint i64 %127, 16 - store i64 %129, ptr %3, align 4 - %130 = getelementptr inbounds nuw i8, ptr %2, i64 32 - %131 = load i64, ptr %130, align 4 - tail call void @___dec_future_refcount(i64 %131) - br label %cond_exit_487.4 - -cond_exit_487.4: ; preds = %__barray_mask_borrow.exit1167.4, %cond_exit_487.3 - %132 = load i64, ptr %3, align 4 - %133 = and i64 %132, 32 - %.not1210 = icmp eq i64 %133, 0 - br i1 %.not1210, label %__barray_mask_borrow.exit1167.5, label %cond_exit_487.5 - -__barray_mask_borrow.exit1167.5: ; preds = %cond_exit_487.4 - %134 = or disjoint i64 %132, 32 - store i64 %134, ptr %3, align 4 - %135 = getelementptr inbounds nuw i8, ptr %2, i64 40 - %136 = load i64, ptr %135, align 4 - tail call void @___dec_future_refcount(i64 %136) - br label %cond_exit_487.5 - -cond_exit_487.5: ; preds = %__barray_mask_borrow.exit1167.5, %cond_exit_487.4 - %137 = load i64, ptr %3, align 4 - %138 = and i64 %137, 64 - %.not1211 = icmp eq i64 %138, 0 - br i1 %.not1211, label %__barray_mask_borrow.exit1167.6, label %cond_exit_487.6 - -__barray_mask_borrow.exit1167.6: ; preds = %cond_exit_487.5 - %139 = or disjoint i64 %137, 64 - store i64 %139, ptr %3, align 4 - %140 = getelementptr inbounds nuw i8, ptr %2, i64 48 - %141 = load i64, ptr %140, align 4 - tail call void @___dec_future_refcount(i64 %141) - br label %cond_exit_487.6 - -cond_exit_487.6: ; preds = %__barray_mask_borrow.exit1167.6, %cond_exit_487.5 - %142 = load i64, ptr %3, align 4 - %143 = and i64 %142, 128 - %.not1212 = icmp eq i64 %143, 0 - br i1 %.not1212, label %__barray_mask_borrow.exit1167.7, label %cond_exit_487.7 - -__barray_mask_borrow.exit1167.7: ; preds = %cond_exit_487.6 - %144 = or disjoint i64 %142, 128 - store i64 %144, ptr %3, align 4 - %145 = getelementptr inbounds nuw i8, ptr %2, i64 56 - %146 = load i64, ptr %145, align 4 - tail call void @___dec_future_refcount(i64 %146) - br label %cond_exit_487.7 - -cond_exit_487.7: ; preds = %__barray_mask_borrow.exit1167.7, %cond_exit_487.6 - %147 = load i64, ptr %3, align 4 - %148 = and i64 %147, 256 - %.not1213 = icmp eq i64 %148, 0 - br i1 %.not1213, label %__barray_mask_borrow.exit1167.8, label %cond_exit_487.8 - -__barray_mask_borrow.exit1167.8: ; preds = %cond_exit_487.7 - %149 = or disjoint i64 %147, 256 - store i64 %149, ptr %3, align 4 - %150 = getelementptr inbounds nuw i8, ptr %2, i64 64 - %151 = load i64, ptr %150, align 4 - tail call void @___dec_future_refcount(i64 %151) - br label %cond_exit_487.8 - -cond_exit_487.8: ; preds = %__barray_mask_borrow.exit1167.8, %cond_exit_487.7 - %152 = load i64, ptr %3, align 4 - %153 = and i64 %152, 512 - %.not1214 = icmp eq i64 %153, 0 - br i1 %.not1214, label %__barray_mask_borrow.exit1167.9, label %cond_exit_487.9 - -__barray_mask_borrow.exit1167.9: ; preds = %cond_exit_487.8 - %154 = or disjoint i64 %152, 512 - store i64 %154, ptr %3, align 4 - %155 = getelementptr inbounds nuw i8, ptr %2, i64 72 - %156 = load i64, ptr %155, align 4 - tail call void @___dec_future_refcount(i64 %156) - br label %cond_exit_487.9 - -cond_exit_487.9: ; preds = %__barray_mask_borrow.exit1167.9, %cond_exit_487.8 - %157 = load i64, ptr %3, align 4 - %158 = or i64 %157, -1024 - store i64 %158, ptr %3, align 4 - %159 = icmp eq i64 %158, -1 - br i1 %159, label %loop_out454, label %mask_block_err.i1159 - -cond_exit_307: ; preds = %__barray_check_bounds.exit1153 - %160 = xor i64 %107, %99 - store i64 %160, ptr %1, align 4 - %161 = getelementptr inbounds nuw i1, ptr %0, i64 %"303_0.sroa.15.01191" - store i1 %read_bool, ptr %161, align 1 - %162 = icmp eq i64 %"303_0.sroa.15.01191", 9 - br i1 %162, label %__barray_check_bounds.exit1163.preheader, label %__barray_check_bounds.exit1145 - -__barray_check_bounds.exit1163.preheader: ; preds = %cond_exit_307 - %163 = load i64, ptr %3, align 4 - %164 = trunc i64 %163 to i1 - br i1 %164, label %cond_exit_487, label %__barray_mask_borrow.exit1167 - -loop_out454: ; preds = %cond_exit_487.9 - tail call void @heap_free(ptr %2) - tail call void @heap_free(ptr nonnull %3) - %165 = load i64, ptr %1, align 4 - %166 = and i64 %165, 1023 - store i64 %166, ptr %1, align 4 - %167 = icmp eq i64 %166, 0 - br i1 %167, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1168 - -mask_block_err.i1168: ; preds = %loop_out454 - tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") - unreachable - -__barray_check_none_borrowed.exit: ; preds = %loop_out454 - %168 = tail call ptr @heap_alloc(i64 10) - %169 = tail call ptr @heap_alloc(i64 8) - store i64 0, ptr %169, align 1 - tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(10) %168, ptr noundef nonnull align 1 dereferenceable(10) %0, i64 10, i1 false) - tail call void @heap_free(ptr nonnull %168) - %170 = load i64, ptr %1, align 4 - %171 = and i64 %170, 1023 - store i64 %171, ptr %1, align 4 - %172 = icmp eq i64 %171, 0 - br i1 %172, label %__barray_check_none_borrowed.exit1172, label %mask_block_err.i1170 - -mask_block_err.i1170: ; preds = %__barray_check_none_borrowed.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") - unreachable - -__barray_check_none_borrowed.exit1172: ; preds = %__barray_check_none_borrowed.exit - %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 - %y_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 4 - %arr_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 8 - %mask_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 16 - %173 = alloca [10 x i1], align 1 - call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(10) %173, i8 0, i64 10, i1 false) - store i32 10, ptr %out_arr_alloca, align 8 - store i32 1, ptr %y_ptr, align 4 - store ptr %0, ptr %arr_ptr, align 8 - store ptr %173, ptr %mask_ptr, align 8 - call void @print_bool_arr(ptr nonnull @res_outcomes.9CB6D2E7.0, i64 21, ptr nonnull %out_arr_alloca) - ret void -} - -declare ptr @heap_alloc(i64) local_unnamed_addr - -; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) -declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immarg) #0 - -; Function Attrs: noreturn -declare void @panic(i32, ptr) local_unnamed_addr #1 - -declare void @heap_free(ptr) local_unnamed_addr - -declare i64 @___lazy_measure(i64) local_unnamed_addr - -declare void @___qfree(i64) local_unnamed_addr - -declare void @___inc_future_refcount(i64) local_unnamed_addr - -declare void @___dec_future_refcount(i64) local_unnamed_addr - -declare i1 @___read_future_bool(i64) local_unnamed_addr - -; Function Attrs: mustprogress 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) #2 - -declare void @print_bool_arr(ptr, i64, ptr) local_unnamed_addr - -declare void @___rp(i64, double, double) local_unnamed_addr - -declare void @___rz(i64, double) local_unnamed_addr - -declare void @___rpp(i64, i64, double, double) local_unnamed_addr - -declare i64 @___qalloc() local_unnamed_addr - -declare void @___reset(i64) local_unnamed_addr - -define i64 @qmain(i64 %0) local_unnamed_addr { -entry: - tail call void @setup(i64 %0) - tail call void @__hugr__.__main__.main.1() - %1 = tail call i64 @teardown() - ret i64 %1 -} - -declare void @setup(i64) local_unnamed_addr - -declare i64 @teardown() local_unnamed_addr - -attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } -attributes #1 = { noreturn } -attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) } - -!name = !{!0} - -!0 = !{!"mainlib"} diff --git a/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace/trace_test-sol-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace/trace_test-sol-x86_64-apple-darwin.ll deleted file mode 100644 index 8e546f44..00000000 --- a/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace/trace_test-sol-x86_64-apple-darwin.ll +++ /dev/null @@ -1,647 +0,0 @@ -; ModuleID = 'hugr' -source_filename = "hugr" -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_Index out .DD115165.0" = private constant [29 x i8] c"\1CEXIT:INT:Index out of bounds" -@"e_Array alre.5A300C2A.0" = private constant [57 x i8] c"8EXIT:INT:Array already contains an element at this index" -@"e_Array elem.E746B1A3.0" = private constant [43 x i8] c"*EXIT:INT:Array element is already borrowed" -@"e_Array cont.EFA5AC45.0" = private constant [70 x i8] c"EEXIT:INT:Array contains non-borrowed elements and cannot be discarded" -@"e_Some array.A77EF32E.0" = private constant [48 x i8] c"/EXIT:INT:Some array elements have been borrowed" -@res_outcomes.9CB6D2E7.0 = private constant [22 x i8] c"\15USER:BOOLARR:outcomes" -@"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." - -define void @__hugr__.__main__.main.1() local_unnamed_addr { -alloca_block: - %0 = tail call ptr @heap_alloc(i64 10) - %1 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %1, align 1 - %2 = tail call ptr @heap_alloc(i64 80) - %3 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %3, align 1 - %4 = tail call ptr @heap_alloc(i64 80) - %5 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %5, align 1 - %qalloc.i = tail call i64 @___qalloc() - %not_max.not.not.i = icmp eq i64 %qalloc.i, -1 - br i1 %not_max.not.not.i, label %cond_441_case_0.i, label %__barray_check_bounds.exit - -cond_441_case_0.i: ; preds = %cond_exit_12.8, %cond_exit_12.7, %cond_exit_12.6, %cond_exit_12.5, %cond_exit_12.4, %cond_exit_12.3, %cond_exit_12.2, %cond_exit_12.1, %cond_exit_12, %alloca_block - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__barray_check_bounds.exit: ; preds = %alloca_block - tail call void @___reset(i64 %qalloc.i) - %6 = load i64, ptr %5, align 4 - %7 = trunc i64 %6 to i1 - br i1 %7, label %cond_exit_12, label %panic.i - -panic.i: ; preds = %__barray_check_bounds.exit.9, %__barray_check_bounds.exit.8, %__barray_check_bounds.exit.7, %__barray_check_bounds.exit.6, %__barray_check_bounds.exit.5, %__barray_check_bounds.exit.4, %__barray_check_bounds.exit.3, %__barray_check_bounds.exit.2, %__barray_check_bounds.exit.1, %__barray_check_bounds.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -cond_exit_12: ; preds = %__barray_check_bounds.exit - %8 = and i64 %6, -2 - store i64 %8, ptr %5, align 4 - store i64 %qalloc.i, ptr %4, align 4 - %qalloc.i.1 = tail call i64 @___qalloc() - %not_max.not.not.i.1 = icmp eq i64 %qalloc.i.1, -1 - br i1 %not_max.not.not.i.1, label %cond_441_case_0.i, label %__barray_check_bounds.exit.1 - -__barray_check_bounds.exit.1: ; preds = %cond_exit_12 - tail call void @___reset(i64 %qalloc.i.1) - %9 = load i64, ptr %5, align 4 - %10 = and i64 %9, 2 - %.not = icmp eq i64 %10, 0 - br i1 %.not, label %panic.i, label %cond_exit_12.1 - -cond_exit_12.1: ; preds = %__barray_check_bounds.exit.1 - %11 = and i64 %9, -3 - store i64 %11, ptr %5, align 4 - %12 = getelementptr inbounds nuw i8, ptr %4, i64 8 - store i64 %qalloc.i.1, ptr %12, align 4 - %qalloc.i.2 = tail call i64 @___qalloc() - %not_max.not.not.i.2 = icmp eq i64 %qalloc.i.2, -1 - br i1 %not_max.not.not.i.2, label %cond_441_case_0.i, label %__barray_check_bounds.exit.2 - -__barray_check_bounds.exit.2: ; preds = %cond_exit_12.1 - tail call void @___reset(i64 %qalloc.i.2) - %13 = load i64, ptr %5, align 4 - %14 = and i64 %13, 4 - %.not1199 = icmp eq i64 %14, 0 - br i1 %.not1199, label %panic.i, label %cond_exit_12.2 - -cond_exit_12.2: ; preds = %__barray_check_bounds.exit.2 - %15 = and i64 %13, -5 - store i64 %15, ptr %5, align 4 - %16 = getelementptr inbounds nuw i8, ptr %4, i64 16 - store i64 %qalloc.i.2, ptr %16, align 4 - %qalloc.i.3 = tail call i64 @___qalloc() - %not_max.not.not.i.3 = icmp eq i64 %qalloc.i.3, -1 - br i1 %not_max.not.not.i.3, label %cond_441_case_0.i, label %__barray_check_bounds.exit.3 - -__barray_check_bounds.exit.3: ; preds = %cond_exit_12.2 - tail call void @___reset(i64 %qalloc.i.3) - %17 = load i64, ptr %5, align 4 - %18 = and i64 %17, 8 - %.not1200 = icmp eq i64 %18, 0 - br i1 %.not1200, label %panic.i, label %cond_exit_12.3 - -cond_exit_12.3: ; preds = %__barray_check_bounds.exit.3 - %19 = and i64 %17, -9 - store i64 %19, ptr %5, align 4 - %20 = getelementptr inbounds nuw i8, ptr %4, i64 24 - store i64 %qalloc.i.3, ptr %20, align 4 - %qalloc.i.4 = tail call i64 @___qalloc() - %not_max.not.not.i.4 = icmp eq i64 %qalloc.i.4, -1 - br i1 %not_max.not.not.i.4, label %cond_441_case_0.i, label %__barray_check_bounds.exit.4 - -__barray_check_bounds.exit.4: ; preds = %cond_exit_12.3 - tail call void @___reset(i64 %qalloc.i.4) - %21 = load i64, ptr %5, align 4 - %22 = and i64 %21, 16 - %.not1201 = icmp eq i64 %22, 0 - br i1 %.not1201, label %panic.i, label %cond_exit_12.4 - -cond_exit_12.4: ; preds = %__barray_check_bounds.exit.4 - %23 = and i64 %21, -17 - store i64 %23, ptr %5, align 4 - %24 = getelementptr inbounds nuw i8, ptr %4, i64 32 - store i64 %qalloc.i.4, ptr %24, align 4 - %qalloc.i.5 = tail call i64 @___qalloc() - %not_max.not.not.i.5 = icmp eq i64 %qalloc.i.5, -1 - br i1 %not_max.not.not.i.5, label %cond_441_case_0.i, label %__barray_check_bounds.exit.5 - -__barray_check_bounds.exit.5: ; preds = %cond_exit_12.4 - tail call void @___reset(i64 %qalloc.i.5) - %25 = load i64, ptr %5, align 4 - %26 = and i64 %25, 32 - %.not1202 = icmp eq i64 %26, 0 - br i1 %.not1202, label %panic.i, label %cond_exit_12.5 - -cond_exit_12.5: ; preds = %__barray_check_bounds.exit.5 - %27 = and i64 %25, -33 - store i64 %27, ptr %5, align 4 - %28 = getelementptr inbounds nuw i8, ptr %4, i64 40 - store i64 %qalloc.i.5, ptr %28, align 4 - %qalloc.i.6 = tail call i64 @___qalloc() - %not_max.not.not.i.6 = icmp eq i64 %qalloc.i.6, -1 - br i1 %not_max.not.not.i.6, label %cond_441_case_0.i, label %__barray_check_bounds.exit.6 - -__barray_check_bounds.exit.6: ; preds = %cond_exit_12.5 - tail call void @___reset(i64 %qalloc.i.6) - %29 = load i64, ptr %5, align 4 - %30 = and i64 %29, 64 - %.not1203 = icmp eq i64 %30, 0 - br i1 %.not1203, label %panic.i, label %cond_exit_12.6 - -cond_exit_12.6: ; preds = %__barray_check_bounds.exit.6 - %31 = and i64 %29, -65 - store i64 %31, ptr %5, align 4 - %32 = getelementptr inbounds nuw i8, ptr %4, i64 48 - store i64 %qalloc.i.6, ptr %32, align 4 - %qalloc.i.7 = tail call i64 @___qalloc() - %not_max.not.not.i.7 = icmp eq i64 %qalloc.i.7, -1 - br i1 %not_max.not.not.i.7, label %cond_441_case_0.i, label %__barray_check_bounds.exit.7 - -__barray_check_bounds.exit.7: ; preds = %cond_exit_12.6 - tail call void @___reset(i64 %qalloc.i.7) - %33 = load i64, ptr %5, align 4 - %34 = and i64 %33, 128 - %.not1204 = icmp eq i64 %34, 0 - br i1 %.not1204, label %panic.i, label %cond_exit_12.7 - -cond_exit_12.7: ; preds = %__barray_check_bounds.exit.7 - %35 = and i64 %33, -129 - store i64 %35, ptr %5, align 4 - %36 = getelementptr inbounds nuw i8, ptr %4, i64 56 - store i64 %qalloc.i.7, ptr %36, align 4 - %qalloc.i.8 = tail call i64 @___qalloc() - %not_max.not.not.i.8 = icmp eq i64 %qalloc.i.8, -1 - br i1 %not_max.not.not.i.8, label %cond_441_case_0.i, label %__barray_check_bounds.exit.8 - -__barray_check_bounds.exit.8: ; preds = %cond_exit_12.7 - tail call void @___reset(i64 %qalloc.i.8) - %37 = load i64, ptr %5, align 4 - %38 = and i64 %37, 256 - %.not1205 = icmp eq i64 %38, 0 - br i1 %.not1205, label %panic.i, label %cond_exit_12.8 - -cond_exit_12.8: ; preds = %__barray_check_bounds.exit.8 - %39 = and i64 %37, -257 - store i64 %39, ptr %5, align 4 - %40 = getelementptr inbounds nuw i8, ptr %4, i64 64 - store i64 %qalloc.i.8, ptr %40, align 4 - %qalloc.i.9 = tail call i64 @___qalloc() - %not_max.not.not.i.9 = icmp eq i64 %qalloc.i.9, -1 - br i1 %not_max.not.not.i.9, label %cond_441_case_0.i, label %__barray_check_bounds.exit.9 - -__barray_check_bounds.exit.9: ; preds = %cond_exit_12.8 - tail call void @___reset(i64 %qalloc.i.9) - %41 = load i64, ptr %5, align 4 - %42 = and i64 %41, 512 - %.not1206 = icmp eq i64 %42, 0 - br i1 %.not1206, label %panic.i, label %cond_exit_12.9 - -cond_exit_12.9: ; preds = %__barray_check_bounds.exit.9 - %43 = and i64 %41, -513 - store i64 %43, ptr %5, align 4 - %44 = getelementptr inbounds nuw i8, ptr %4, i64 72 - store i64 %qalloc.i.9, ptr %44, align 4 - %45 = load i64, ptr %5, align 4 - %46 = trunc i64 %45 to i1 - br i1 %46, label %panic.i1117, label %__barray_mask_borrow.exit - -panic.i1117: ; preds = %cond_exit_12.9 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit: ; preds = %cond_exit_12.9 - %47 = or disjoint i64 %45, 1 - store i64 %47, ptr %5, align 4 - %48 = load i64, ptr %4, align 4 - tail call void @___rp(i64 %48, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %48, double 0x400921FB54442D18) - %49 = load i64, ptr %5, align 4 - %50 = trunc i64 %49 to i1 - br i1 %50, label %__barray_mask_return.exit1119, label %panic.i1118 - -panic.i1118: ; preds = %__barray_mask_borrow.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1119: ; preds = %__barray_mask_borrow.exit - %51 = and i64 %49, -2 - store i64 %51, ptr %5, align 4 - store i64 %48, ptr %4, align 4 - br label %__barray_check_bounds.exit1121 - -__barray_check_bounds.exit1121: ; preds = %__barray_mask_return.exit1119, %__barray_mask_return.exit1135 - %52 = phi i64 [ 1, %__barray_mask_return.exit1119 ], [ %74, %__barray_mask_return.exit1135 ] - %"116_0.01189" = phi i64 [ 0, %__barray_mask_return.exit1119 ], [ %52, %__barray_mask_return.exit1135 ] - %53 = load i64, ptr %5, align 4 - %54 = lshr i64 %53, %"116_0.01189" - %55 = trunc i64 %54 to i1 - br i1 %55, label %panic.i1122, label %__barray_check_bounds.exit1125 - -panic.i1122: ; preds = %__barray_check_bounds.exit1121 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1125: ; preds = %__barray_check_bounds.exit1121 - %56 = shl nuw nsw i64 1, %"116_0.01189" - %57 = xor i64 %53, %56 - store i64 %57, ptr %5, align 4 - %58 = getelementptr inbounds nuw i64, ptr %4, i64 %"116_0.01189" - %59 = load i64, ptr %58, align 4 - %60 = lshr i64 %57, %52 - %61 = trunc i64 %60 to i1 - br i1 %61, label %panic.i1126, label %__barray_check_bounds.exit1129 - -panic.i1126: ; preds = %__barray_check_bounds.exit1125 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1129: ; preds = %__barray_check_bounds.exit1125 - %62 = shl nuw nsw i64 2, %"116_0.01189" - %63 = xor i64 %57, %62 - store i64 %63, ptr %5, align 4 - %64 = getelementptr inbounds nuw i64, ptr %4, i64 %52 - %65 = load i64, ptr %64, align 4 - tail call void @___rp(i64 %59, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rpp(i64 %59, i64 %65, double 0x3FF921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %65, double 0xBFF921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %59, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %59, double 0xBFF921FB54442D18) - %66 = load i64, ptr %5, align 4 - %67 = lshr i64 %66, %"116_0.01189" - %68 = trunc i64 %67 to i1 - br i1 %68, label %__barray_check_bounds.exit1133, label %panic.i1130 - -panic.i1130: ; preds = %__barray_check_bounds.exit1129 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_check_bounds.exit1133: ; preds = %__barray_check_bounds.exit1129 - %69 = xor i64 %66, %56 - store i64 %69, ptr %5, align 4 - store i64 %59, ptr %58, align 4 - %70 = load i64, ptr %5, align 4 - %71 = lshr i64 %70, %52 - %72 = trunc i64 %71 to i1 - br i1 %72, label %__barray_mask_return.exit1135, label %panic.i1134 - -panic.i1134: ; preds = %__barray_check_bounds.exit1133 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1135: ; preds = %__barray_check_bounds.exit1133 - %73 = xor i64 %70, %62 - store i64 %73, ptr %5, align 4 - store i64 %65, ptr %64, align 4 - %74 = add nuw nsw i64 %52, 1 - %exitcond1192 = icmp eq i64 %74, 10 - br i1 %exitcond1192, label %loop_body346.preheader, label %__barray_check_bounds.exit1121 - -out_of_bounds.i1136: ; preds = %.thread - tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") - unreachable - -__barray_check_bounds.exit1137: ; preds = %.thread - %75 = load i64, ptr %3, align 4 - %76 = lshr i64 %75, %"237_2.01196" - %77 = trunc i64 %76 to i1 - br i1 %77, label %cond_exit_241, label %panic.i1138 - -panic.i1138: ; preds = %__barray_check_bounds.exit1137 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -mask_block_ok.i: ; preds = %cond_exit_241 - %78 = load i64, ptr %5, align 4 - %79 = or i64 %78, -1024 - store i64 %79, ptr %5, align 4 - %80 = icmp eq i64 %79, -1 - br i1 %80, label %loop_body455.preheader.preheader, label %mask_block_err.i - -mask_block_err.i: ; preds = %mask_block_ok.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -loop_body346.preheader: ; preds = %__barray_mask_return.exit1135, %cond_exit_241 - %"237_0.sroa.15.01197" = phi i64 [ %81, %cond_exit_241 ], [ 0, %__barray_mask_return.exit1135 ] - %"237_2.01196" = phi i64 [ %89, %cond_exit_241 ], [ 0, %__barray_mask_return.exit1135 ] - %81 = add nuw nsw i64 %"237_0.sroa.15.01197", 1 - %82 = load i64, ptr %5, align 4 - %83 = lshr i64 %82, %"237_0.sroa.15.01197" - %84 = trunc i64 %83 to i1 - br i1 %84, label %panic.i1142, label %.thread - -panic.i1142: ; preds = %loop_body346.preheader - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -.thread: ; preds = %loop_body346.preheader - %85 = shl nuw nsw i64 1, %"237_0.sroa.15.01197" - %86 = xor i64 %82, %85 - store i64 %86, ptr %5, align 4 - %87 = getelementptr inbounds nuw i64, ptr %4, i64 %"237_0.sroa.15.01197" - %88 = load i64, ptr %87, align 4 - %89 = add i64 %"237_2.01196", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %88) - tail call void @___qfree(i64 %88) - %90 = icmp ult i64 %"237_2.01196", 10 - br i1 %90, label %__barray_check_bounds.exit1137, label %out_of_bounds.i1136 - -cond_exit_241: ; preds = %__barray_check_bounds.exit1137 - %91 = shl nuw nsw i64 1, %"237_2.01196" - %92 = xor i64 %75, %91 - store i64 %92, ptr %3, align 4 - %93 = getelementptr inbounds nuw i64, ptr %2, i64 %"237_2.01196" - store i64 %lazy_measure, ptr %93, align 4 - %94 = icmp samesign ugt i64 %"237_0.sroa.15.01197", 8 - br i1 %94, label %mask_block_ok.i, label %loop_body346.preheader - -loop_body455.preheader.preheader: ; preds = %mask_block_ok.i - tail call void @heap_free(ptr nonnull %4) - tail call void @heap_free(ptr nonnull %5) - br label %__barray_check_bounds.exit1145 - -__barray_check_bounds.exit1145: ; preds = %cond_exit_307, %loop_body455.preheader.preheader - %"303_0.sroa.15.01191" = phi i64 [ %95, %cond_exit_307 ], [ 0, %loop_body455.preheader.preheader ] - %95 = add nuw nsw i64 %"303_0.sroa.15.01191", 1 - %96 = load i64, ptr %3, align 4 - %97 = lshr i64 %96, %"303_0.sroa.15.01191" - %98 = trunc i64 %97 to i1 - br i1 %98, label %panic.i1146, label %__barray_check_bounds.exit1149 - -panic.i1146: ; preds = %__barray_check_bounds.exit1145 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1149: ; preds = %__barray_check_bounds.exit1145 - %99 = shl nuw nsw i64 1, %"303_0.sroa.15.01191" - %100 = xor i64 %96, %99 - store i64 %100, ptr %3, align 4 - %101 = getelementptr inbounds nuw i64, ptr %2, i64 %"303_0.sroa.15.01191" - %102 = load i64, ptr %101, align 4 - tail call void @___inc_future_refcount(i64 %102) - %103 = load i64, ptr %3, align 4 - %104 = lshr i64 %103, %"303_0.sroa.15.01191" - %105 = trunc i64 %104 to i1 - br i1 %105, label %__barray_check_bounds.exit1153, label %panic.i1150 - -panic.i1150: ; preds = %__barray_check_bounds.exit1149 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_check_bounds.exit1153: ; preds = %__barray_check_bounds.exit1149 - %106 = xor i64 %103, %99 - store i64 %106, ptr %3, align 4 - store i64 %102, ptr %101, align 4 - %read_bool = tail call i1 @___read_future_bool(i64 %102) - tail call void @___dec_future_refcount(i64 %102) - %107 = load i64, ptr %1, align 4 - %108 = lshr i64 %107, %"303_0.sroa.15.01191" - %109 = trunc i64 %108 to i1 - br i1 %109, label %cond_exit_307, label %panic.i1154 - -panic.i1154: ; preds = %__barray_check_bounds.exit1153 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -mask_block_err.i1159: ; preds = %cond_exit_487.9 - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_mask_borrow.exit1167: ; preds = %__barray_check_bounds.exit1163.preheader - %110 = or disjoint i64 %163, 1 - store i64 %110, ptr %3, align 4 - %111 = load i64, ptr %2, align 4 - tail call void @___dec_future_refcount(i64 %111) - br label %cond_exit_487 - -cond_exit_487: ; preds = %__barray_mask_borrow.exit1167, %__barray_check_bounds.exit1163.preheader - %112 = load i64, ptr %3, align 4 - %113 = and i64 %112, 2 - %.not1207 = icmp eq i64 %113, 0 - br i1 %.not1207, label %__barray_mask_borrow.exit1167.1, label %cond_exit_487.1 - -__barray_mask_borrow.exit1167.1: ; preds = %cond_exit_487 - %114 = or disjoint i64 %112, 2 - store i64 %114, ptr %3, align 4 - %115 = getelementptr inbounds nuw i8, ptr %2, i64 8 - %116 = load i64, ptr %115, align 4 - tail call void @___dec_future_refcount(i64 %116) - br label %cond_exit_487.1 - -cond_exit_487.1: ; preds = %__barray_mask_borrow.exit1167.1, %cond_exit_487 - %117 = load i64, ptr %3, align 4 - %118 = and i64 %117, 4 - %.not1208 = icmp eq i64 %118, 0 - br i1 %.not1208, label %__barray_mask_borrow.exit1167.2, label %cond_exit_487.2 - -__barray_mask_borrow.exit1167.2: ; preds = %cond_exit_487.1 - %119 = or disjoint i64 %117, 4 - store i64 %119, ptr %3, align 4 - %120 = getelementptr inbounds nuw i8, ptr %2, i64 16 - %121 = load i64, ptr %120, align 4 - tail call void @___dec_future_refcount(i64 %121) - br label %cond_exit_487.2 - -cond_exit_487.2: ; preds = %__barray_mask_borrow.exit1167.2, %cond_exit_487.1 - %122 = load i64, ptr %3, align 4 - %123 = and i64 %122, 8 - %.not1209 = icmp eq i64 %123, 0 - br i1 %.not1209, label %__barray_mask_borrow.exit1167.3, label %cond_exit_487.3 - -__barray_mask_borrow.exit1167.3: ; preds = %cond_exit_487.2 - %124 = or disjoint i64 %122, 8 - store i64 %124, ptr %3, align 4 - %125 = getelementptr inbounds nuw i8, ptr %2, i64 24 - %126 = load i64, ptr %125, align 4 - tail call void @___dec_future_refcount(i64 %126) - br label %cond_exit_487.3 - -cond_exit_487.3: ; preds = %__barray_mask_borrow.exit1167.3, %cond_exit_487.2 - %127 = load i64, ptr %3, align 4 - %128 = and i64 %127, 16 - %.not1210 = icmp eq i64 %128, 0 - br i1 %.not1210, label %__barray_mask_borrow.exit1167.4, label %cond_exit_487.4 - -__barray_mask_borrow.exit1167.4: ; preds = %cond_exit_487.3 - %129 = or disjoint i64 %127, 16 - store i64 %129, ptr %3, align 4 - %130 = getelementptr inbounds nuw i8, ptr %2, i64 32 - %131 = load i64, ptr %130, align 4 - tail call void @___dec_future_refcount(i64 %131) - br label %cond_exit_487.4 - -cond_exit_487.4: ; preds = %__barray_mask_borrow.exit1167.4, %cond_exit_487.3 - %132 = load i64, ptr %3, align 4 - %133 = and i64 %132, 32 - %.not1211 = icmp eq i64 %133, 0 - br i1 %.not1211, label %__barray_mask_borrow.exit1167.5, label %cond_exit_487.5 - -__barray_mask_borrow.exit1167.5: ; preds = %cond_exit_487.4 - %134 = or disjoint i64 %132, 32 - store i64 %134, ptr %3, align 4 - %135 = getelementptr inbounds nuw i8, ptr %2, i64 40 - %136 = load i64, ptr %135, align 4 - tail call void @___dec_future_refcount(i64 %136) - br label %cond_exit_487.5 - -cond_exit_487.5: ; preds = %__barray_mask_borrow.exit1167.5, %cond_exit_487.4 - %137 = load i64, ptr %3, align 4 - %138 = and i64 %137, 64 - %.not1212 = icmp eq i64 %138, 0 - br i1 %.not1212, label %__barray_mask_borrow.exit1167.6, label %cond_exit_487.6 - -__barray_mask_borrow.exit1167.6: ; preds = %cond_exit_487.5 - %139 = or disjoint i64 %137, 64 - store i64 %139, ptr %3, align 4 - %140 = getelementptr inbounds nuw i8, ptr %2, i64 48 - %141 = load i64, ptr %140, align 4 - tail call void @___dec_future_refcount(i64 %141) - br label %cond_exit_487.6 - -cond_exit_487.6: ; preds = %__barray_mask_borrow.exit1167.6, %cond_exit_487.5 - %142 = load i64, ptr %3, align 4 - %143 = and i64 %142, 128 - %.not1213 = icmp eq i64 %143, 0 - br i1 %.not1213, label %__barray_mask_borrow.exit1167.7, label %cond_exit_487.7 - -__barray_mask_borrow.exit1167.7: ; preds = %cond_exit_487.6 - %144 = or disjoint i64 %142, 128 - store i64 %144, ptr %3, align 4 - %145 = getelementptr inbounds nuw i8, ptr %2, i64 56 - %146 = load i64, ptr %145, align 4 - tail call void @___dec_future_refcount(i64 %146) - br label %cond_exit_487.7 - -cond_exit_487.7: ; preds = %__barray_mask_borrow.exit1167.7, %cond_exit_487.6 - %147 = load i64, ptr %3, align 4 - %148 = and i64 %147, 256 - %.not1214 = icmp eq i64 %148, 0 - br i1 %.not1214, label %__barray_mask_borrow.exit1167.8, label %cond_exit_487.8 - -__barray_mask_borrow.exit1167.8: ; preds = %cond_exit_487.7 - %149 = or disjoint i64 %147, 256 - store i64 %149, ptr %3, align 4 - %150 = getelementptr inbounds nuw i8, ptr %2, i64 64 - %151 = load i64, ptr %150, align 4 - tail call void @___dec_future_refcount(i64 %151) - br label %cond_exit_487.8 - -cond_exit_487.8: ; preds = %__barray_mask_borrow.exit1167.8, %cond_exit_487.7 - %152 = load i64, ptr %3, align 4 - %153 = and i64 %152, 512 - %.not1215 = icmp eq i64 %153, 0 - br i1 %.not1215, label %__barray_mask_borrow.exit1167.9, label %cond_exit_487.9 - -__barray_mask_borrow.exit1167.9: ; preds = %cond_exit_487.8 - %154 = or disjoint i64 %152, 512 - store i64 %154, ptr %3, align 4 - %155 = getelementptr inbounds nuw i8, ptr %2, i64 72 - %156 = load i64, ptr %155, align 4 - tail call void @___dec_future_refcount(i64 %156) - br label %cond_exit_487.9 - -cond_exit_487.9: ; preds = %__barray_mask_borrow.exit1167.9, %cond_exit_487.8 - %157 = load i64, ptr %3, align 4 - %158 = or i64 %157, -1024 - store i64 %158, ptr %3, align 4 - %159 = icmp eq i64 %158, -1 - br i1 %159, label %loop_out454, label %mask_block_err.i1159 - -cond_exit_307: ; preds = %__barray_check_bounds.exit1153 - %160 = xor i64 %107, %99 - store i64 %160, ptr %1, align 4 - %161 = getelementptr inbounds nuw i1, ptr %0, i64 %"303_0.sroa.15.01191" - store i1 %read_bool, ptr %161, align 1 - %162 = icmp eq i64 %"303_0.sroa.15.01191", 9 - br i1 %162, label %__barray_check_bounds.exit1163.preheader, label %__barray_check_bounds.exit1145 - -__barray_check_bounds.exit1163.preheader: ; preds = %cond_exit_307 - %163 = load i64, ptr %3, align 4 - %164 = trunc i64 %163 to i1 - br i1 %164, label %cond_exit_487, label %__barray_mask_borrow.exit1167 - -loop_out454: ; preds = %cond_exit_487.9 - tail call void @heap_free(ptr %2) - tail call void @heap_free(ptr nonnull %3) - %165 = load i64, ptr %1, align 4 - %166 = and i64 %165, 1023 - store i64 %166, ptr %1, align 4 - %167 = icmp eq i64 %166, 0 - br i1 %167, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1168 - -mask_block_err.i1168: ; preds = %loop_out454 - tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") - unreachable - -__barray_check_none_borrowed.exit: ; preds = %loop_out454 - %168 = tail call ptr @heap_alloc(i64 10) - %169 = tail call ptr @heap_alloc(i64 8) - store i64 0, ptr %169, align 1 - tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(10) %168, ptr noundef nonnull align 1 dereferenceable(10) %0, i64 10, i1 false) - tail call void @heap_free(ptr nonnull %168) - %170 = load i64, ptr %1, align 4 - %171 = and i64 %170, 1023 - store i64 %171, ptr %1, align 4 - %172 = icmp eq i64 %171, 0 - br i1 %172, label %__barray_check_none_borrowed.exit1172, label %mask_block_err.i1170 - -mask_block_err.i1170: ; preds = %__barray_check_none_borrowed.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") - unreachable - -__barray_check_none_borrowed.exit1172: ; preds = %__barray_check_none_borrowed.exit - %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 - %y_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 4 - %arr_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 8 - %mask_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 16 - %173 = alloca [10 x i1], align 1 - call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(10) %173, i8 0, i64 10, i1 false) - store i32 10, ptr %out_arr_alloca, align 8 - store i32 1, ptr %y_ptr, align 4 - store ptr %0, ptr %arr_ptr, align 8 - store ptr %173, ptr %mask_ptr, align 8 - call void @print_bool_arr(ptr nonnull @res_outcomes.9CB6D2E7.0, i64 21, ptr nonnull %out_arr_alloca) - ret void -} - -declare ptr @heap_alloc(i64) local_unnamed_addr - -; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) -declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immarg) #0 - -; Function Attrs: noreturn -declare void @panic(i32, ptr) local_unnamed_addr #1 - -declare void @heap_free(ptr) local_unnamed_addr - -declare i64 @___lazy_measure(i64) local_unnamed_addr - -declare void @___qfree(i64) local_unnamed_addr - -declare void @___inc_future_refcount(i64) local_unnamed_addr - -declare void @___dec_future_refcount(i64) local_unnamed_addr - -declare i1 @___read_future_bool(i64) local_unnamed_addr - -; Function Attrs: mustprogress 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) #2 - -declare void @print_bool_arr(ptr, i64, ptr) local_unnamed_addr - -declare void @___rp(i64, double, double) local_unnamed_addr - -declare void @___rz(i64, double) local_unnamed_addr - -declare void @___rpp(i64, i64, double, double) local_unnamed_addr - -declare i64 @___qalloc() local_unnamed_addr - -declare void @___reset(i64) local_unnamed_addr - -define i64 @qmain(i64 %0) local_unnamed_addr { -entry: - tail call void @setup(i64 %0) - tail call void @__hugr__.__main__.main.1() - %1 = tail call i64 @teardown() - ret i64 %1 -} - -declare void @setup(i64) local_unnamed_addr - -declare i64 @teardown() local_unnamed_addr - -attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } -attributes #1 = { noreturn } -attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) } - -!name = !{!0} - -!0 = !{!"mainlib"} diff --git a/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace/trace_test-sol-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace/trace_test-sol-x86_64-unknown-linux-gnu.ll deleted file mode 100644 index bdf547f3..00000000 --- a/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace/trace_test-sol-x86_64-unknown-linux-gnu.ll +++ /dev/null @@ -1,647 +0,0 @@ -; ModuleID = 'hugr' -source_filename = "hugr" -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_Index out .DD115165.0" = private constant [29 x i8] c"\1CEXIT:INT:Index out of bounds" -@"e_Array alre.5A300C2A.0" = private constant [57 x i8] c"8EXIT:INT:Array already contains an element at this index" -@"e_Array elem.E746B1A3.0" = private constant [43 x i8] c"*EXIT:INT:Array element is already borrowed" -@"e_Array cont.EFA5AC45.0" = private constant [70 x i8] c"EEXIT:INT:Array contains non-borrowed elements and cannot be discarded" -@"e_Some array.A77EF32E.0" = private constant [48 x i8] c"/EXIT:INT:Some array elements have been borrowed" -@res_outcomes.9CB6D2E7.0 = private constant [22 x i8] c"\15USER:BOOLARR:outcomes" -@"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." - -define void @__hugr__.__main__.main.1() local_unnamed_addr { -alloca_block: - %0 = tail call ptr @heap_alloc(i64 10) - %1 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %1, align 1 - %2 = tail call ptr @heap_alloc(i64 80) - %3 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %3, align 1 - %4 = tail call ptr @heap_alloc(i64 80) - %5 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %5, align 1 - %qalloc.i = tail call i64 @___qalloc() - %not_max.not.not.i = icmp eq i64 %qalloc.i, -1 - br i1 %not_max.not.not.i, label %cond_441_case_0.i, label %__barray_check_bounds.exit - -cond_441_case_0.i: ; preds = %cond_exit_12.8, %cond_exit_12.7, %cond_exit_12.6, %cond_exit_12.5, %cond_exit_12.4, %cond_exit_12.3, %cond_exit_12.2, %cond_exit_12.1, %cond_exit_12, %alloca_block - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__barray_check_bounds.exit: ; preds = %alloca_block - tail call void @___reset(i64 %qalloc.i) - %6 = load i64, ptr %5, align 4 - %7 = trunc i64 %6 to i1 - br i1 %7, label %cond_exit_12, label %panic.i - -panic.i: ; preds = %__barray_check_bounds.exit.9, %__barray_check_bounds.exit.8, %__barray_check_bounds.exit.7, %__barray_check_bounds.exit.6, %__barray_check_bounds.exit.5, %__barray_check_bounds.exit.4, %__barray_check_bounds.exit.3, %__barray_check_bounds.exit.2, %__barray_check_bounds.exit.1, %__barray_check_bounds.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -cond_exit_12: ; preds = %__barray_check_bounds.exit - %8 = and i64 %6, -2 - store i64 %8, ptr %5, align 4 - store i64 %qalloc.i, ptr %4, align 4 - %qalloc.i.1 = tail call i64 @___qalloc() - %not_max.not.not.i.1 = icmp eq i64 %qalloc.i.1, -1 - br i1 %not_max.not.not.i.1, label %cond_441_case_0.i, label %__barray_check_bounds.exit.1 - -__barray_check_bounds.exit.1: ; preds = %cond_exit_12 - tail call void @___reset(i64 %qalloc.i.1) - %9 = load i64, ptr %5, align 4 - %10 = and i64 %9, 2 - %.not = icmp eq i64 %10, 0 - br i1 %.not, label %panic.i, label %cond_exit_12.1 - -cond_exit_12.1: ; preds = %__barray_check_bounds.exit.1 - %11 = and i64 %9, -3 - store i64 %11, ptr %5, align 4 - %12 = getelementptr inbounds nuw i8, ptr %4, i64 8 - store i64 %qalloc.i.1, ptr %12, align 4 - %qalloc.i.2 = tail call i64 @___qalloc() - %not_max.not.not.i.2 = icmp eq i64 %qalloc.i.2, -1 - br i1 %not_max.not.not.i.2, label %cond_441_case_0.i, label %__barray_check_bounds.exit.2 - -__barray_check_bounds.exit.2: ; preds = %cond_exit_12.1 - tail call void @___reset(i64 %qalloc.i.2) - %13 = load i64, ptr %5, align 4 - %14 = and i64 %13, 4 - %.not1199 = icmp eq i64 %14, 0 - br i1 %.not1199, label %panic.i, label %cond_exit_12.2 - -cond_exit_12.2: ; preds = %__barray_check_bounds.exit.2 - %15 = and i64 %13, -5 - store i64 %15, ptr %5, align 4 - %16 = getelementptr inbounds nuw i8, ptr %4, i64 16 - store i64 %qalloc.i.2, ptr %16, align 4 - %qalloc.i.3 = tail call i64 @___qalloc() - %not_max.not.not.i.3 = icmp eq i64 %qalloc.i.3, -1 - br i1 %not_max.not.not.i.3, label %cond_441_case_0.i, label %__barray_check_bounds.exit.3 - -__barray_check_bounds.exit.3: ; preds = %cond_exit_12.2 - tail call void @___reset(i64 %qalloc.i.3) - %17 = load i64, ptr %5, align 4 - %18 = and i64 %17, 8 - %.not1200 = icmp eq i64 %18, 0 - br i1 %.not1200, label %panic.i, label %cond_exit_12.3 - -cond_exit_12.3: ; preds = %__barray_check_bounds.exit.3 - %19 = and i64 %17, -9 - store i64 %19, ptr %5, align 4 - %20 = getelementptr inbounds nuw i8, ptr %4, i64 24 - store i64 %qalloc.i.3, ptr %20, align 4 - %qalloc.i.4 = tail call i64 @___qalloc() - %not_max.not.not.i.4 = icmp eq i64 %qalloc.i.4, -1 - br i1 %not_max.not.not.i.4, label %cond_441_case_0.i, label %__barray_check_bounds.exit.4 - -__barray_check_bounds.exit.4: ; preds = %cond_exit_12.3 - tail call void @___reset(i64 %qalloc.i.4) - %21 = load i64, ptr %5, align 4 - %22 = and i64 %21, 16 - %.not1201 = icmp eq i64 %22, 0 - br i1 %.not1201, label %panic.i, label %cond_exit_12.4 - -cond_exit_12.4: ; preds = %__barray_check_bounds.exit.4 - %23 = and i64 %21, -17 - store i64 %23, ptr %5, align 4 - %24 = getelementptr inbounds nuw i8, ptr %4, i64 32 - store i64 %qalloc.i.4, ptr %24, align 4 - %qalloc.i.5 = tail call i64 @___qalloc() - %not_max.not.not.i.5 = icmp eq i64 %qalloc.i.5, -1 - br i1 %not_max.not.not.i.5, label %cond_441_case_0.i, label %__barray_check_bounds.exit.5 - -__barray_check_bounds.exit.5: ; preds = %cond_exit_12.4 - tail call void @___reset(i64 %qalloc.i.5) - %25 = load i64, ptr %5, align 4 - %26 = and i64 %25, 32 - %.not1202 = icmp eq i64 %26, 0 - br i1 %.not1202, label %panic.i, label %cond_exit_12.5 - -cond_exit_12.5: ; preds = %__barray_check_bounds.exit.5 - %27 = and i64 %25, -33 - store i64 %27, ptr %5, align 4 - %28 = getelementptr inbounds nuw i8, ptr %4, i64 40 - store i64 %qalloc.i.5, ptr %28, align 4 - %qalloc.i.6 = tail call i64 @___qalloc() - %not_max.not.not.i.6 = icmp eq i64 %qalloc.i.6, -1 - br i1 %not_max.not.not.i.6, label %cond_441_case_0.i, label %__barray_check_bounds.exit.6 - -__barray_check_bounds.exit.6: ; preds = %cond_exit_12.5 - tail call void @___reset(i64 %qalloc.i.6) - %29 = load i64, ptr %5, align 4 - %30 = and i64 %29, 64 - %.not1203 = icmp eq i64 %30, 0 - br i1 %.not1203, label %panic.i, label %cond_exit_12.6 - -cond_exit_12.6: ; preds = %__barray_check_bounds.exit.6 - %31 = and i64 %29, -65 - store i64 %31, ptr %5, align 4 - %32 = getelementptr inbounds nuw i8, ptr %4, i64 48 - store i64 %qalloc.i.6, ptr %32, align 4 - %qalloc.i.7 = tail call i64 @___qalloc() - %not_max.not.not.i.7 = icmp eq i64 %qalloc.i.7, -1 - br i1 %not_max.not.not.i.7, label %cond_441_case_0.i, label %__barray_check_bounds.exit.7 - -__barray_check_bounds.exit.7: ; preds = %cond_exit_12.6 - tail call void @___reset(i64 %qalloc.i.7) - %33 = load i64, ptr %5, align 4 - %34 = and i64 %33, 128 - %.not1204 = icmp eq i64 %34, 0 - br i1 %.not1204, label %panic.i, label %cond_exit_12.7 - -cond_exit_12.7: ; preds = %__barray_check_bounds.exit.7 - %35 = and i64 %33, -129 - store i64 %35, ptr %5, align 4 - %36 = getelementptr inbounds nuw i8, ptr %4, i64 56 - store i64 %qalloc.i.7, ptr %36, align 4 - %qalloc.i.8 = tail call i64 @___qalloc() - %not_max.not.not.i.8 = icmp eq i64 %qalloc.i.8, -1 - br i1 %not_max.not.not.i.8, label %cond_441_case_0.i, label %__barray_check_bounds.exit.8 - -__barray_check_bounds.exit.8: ; preds = %cond_exit_12.7 - tail call void @___reset(i64 %qalloc.i.8) - %37 = load i64, ptr %5, align 4 - %38 = and i64 %37, 256 - %.not1205 = icmp eq i64 %38, 0 - br i1 %.not1205, label %panic.i, label %cond_exit_12.8 - -cond_exit_12.8: ; preds = %__barray_check_bounds.exit.8 - %39 = and i64 %37, -257 - store i64 %39, ptr %5, align 4 - %40 = getelementptr inbounds nuw i8, ptr %4, i64 64 - store i64 %qalloc.i.8, ptr %40, align 4 - %qalloc.i.9 = tail call i64 @___qalloc() - %not_max.not.not.i.9 = icmp eq i64 %qalloc.i.9, -1 - br i1 %not_max.not.not.i.9, label %cond_441_case_0.i, label %__barray_check_bounds.exit.9 - -__barray_check_bounds.exit.9: ; preds = %cond_exit_12.8 - tail call void @___reset(i64 %qalloc.i.9) - %41 = load i64, ptr %5, align 4 - %42 = and i64 %41, 512 - %.not1206 = icmp eq i64 %42, 0 - br i1 %.not1206, label %panic.i, label %cond_exit_12.9 - -cond_exit_12.9: ; preds = %__barray_check_bounds.exit.9 - %43 = and i64 %41, -513 - store i64 %43, ptr %5, align 4 - %44 = getelementptr inbounds nuw i8, ptr %4, i64 72 - store i64 %qalloc.i.9, ptr %44, align 4 - %45 = load i64, ptr %5, align 4 - %46 = trunc i64 %45 to i1 - br i1 %46, label %panic.i1117, label %__barray_mask_borrow.exit - -panic.i1117: ; preds = %cond_exit_12.9 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit: ; preds = %cond_exit_12.9 - %47 = or disjoint i64 %45, 1 - store i64 %47, ptr %5, align 4 - %48 = load i64, ptr %4, align 4 - tail call void @___rp(i64 %48, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %48, double 0x400921FB54442D18) - %49 = load i64, ptr %5, align 4 - %50 = trunc i64 %49 to i1 - br i1 %50, label %__barray_mask_return.exit1119, label %panic.i1118 - -panic.i1118: ; preds = %__barray_mask_borrow.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1119: ; preds = %__barray_mask_borrow.exit - %51 = and i64 %49, -2 - store i64 %51, ptr %5, align 4 - store i64 %48, ptr %4, align 4 - br label %__barray_check_bounds.exit1121 - -__barray_check_bounds.exit1121: ; preds = %__barray_mask_return.exit1119, %__barray_mask_return.exit1135 - %52 = phi i64 [ 1, %__barray_mask_return.exit1119 ], [ %74, %__barray_mask_return.exit1135 ] - %"116_0.01189" = phi i64 [ 0, %__barray_mask_return.exit1119 ], [ %52, %__barray_mask_return.exit1135 ] - %53 = load i64, ptr %5, align 4 - %54 = lshr i64 %53, %"116_0.01189" - %55 = trunc i64 %54 to i1 - br i1 %55, label %panic.i1122, label %__barray_check_bounds.exit1125 - -panic.i1122: ; preds = %__barray_check_bounds.exit1121 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1125: ; preds = %__barray_check_bounds.exit1121 - %56 = shl nuw nsw i64 1, %"116_0.01189" - %57 = xor i64 %53, %56 - store i64 %57, ptr %5, align 4 - %58 = getelementptr inbounds nuw i64, ptr %4, i64 %"116_0.01189" - %59 = load i64, ptr %58, align 4 - %60 = lshr i64 %57, %52 - %61 = trunc i64 %60 to i1 - br i1 %61, label %panic.i1126, label %__barray_check_bounds.exit1129 - -panic.i1126: ; preds = %__barray_check_bounds.exit1125 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1129: ; preds = %__barray_check_bounds.exit1125 - %62 = shl nuw nsw i64 2, %"116_0.01189" - %63 = xor i64 %57, %62 - store i64 %63, ptr %5, align 4 - %64 = getelementptr inbounds nuw i64, ptr %4, i64 %52 - %65 = load i64, ptr %64, align 4 - tail call void @___rp(i64 %59, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rpp(i64 %59, i64 %65, double 0x3FF921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %65, double 0xBFF921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %59, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %59, double 0xBFF921FB54442D18) - %66 = load i64, ptr %5, align 4 - %67 = lshr i64 %66, %"116_0.01189" - %68 = trunc i64 %67 to i1 - br i1 %68, label %__barray_check_bounds.exit1133, label %panic.i1130 - -panic.i1130: ; preds = %__barray_check_bounds.exit1129 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_check_bounds.exit1133: ; preds = %__barray_check_bounds.exit1129 - %69 = xor i64 %66, %56 - store i64 %69, ptr %5, align 4 - store i64 %59, ptr %58, align 4 - %70 = load i64, ptr %5, align 4 - %71 = lshr i64 %70, %52 - %72 = trunc i64 %71 to i1 - br i1 %72, label %__barray_mask_return.exit1135, label %panic.i1134 - -panic.i1134: ; preds = %__barray_check_bounds.exit1133 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1135: ; preds = %__barray_check_bounds.exit1133 - %73 = xor i64 %70, %62 - store i64 %73, ptr %5, align 4 - store i64 %65, ptr %64, align 4 - %74 = add nuw nsw i64 %52, 1 - %exitcond1192 = icmp eq i64 %74, 10 - br i1 %exitcond1192, label %loop_body346.preheader, label %__barray_check_bounds.exit1121 - -out_of_bounds.i1136: ; preds = %.thread - tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") - unreachable - -__barray_check_bounds.exit1137: ; preds = %.thread - %75 = load i64, ptr %3, align 4 - %76 = lshr i64 %75, %"237_2.01196" - %77 = trunc i64 %76 to i1 - br i1 %77, label %cond_exit_241, label %panic.i1138 - -panic.i1138: ; preds = %__barray_check_bounds.exit1137 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -mask_block_ok.i: ; preds = %cond_exit_241 - %78 = load i64, ptr %5, align 4 - %79 = or i64 %78, -1024 - store i64 %79, ptr %5, align 4 - %80 = icmp eq i64 %79, -1 - br i1 %80, label %loop_body455.preheader.preheader, label %mask_block_err.i - -mask_block_err.i: ; preds = %mask_block_ok.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -loop_body346.preheader: ; preds = %__barray_mask_return.exit1135, %cond_exit_241 - %"237_0.sroa.15.01197" = phi i64 [ %81, %cond_exit_241 ], [ 0, %__barray_mask_return.exit1135 ] - %"237_2.01196" = phi i64 [ %89, %cond_exit_241 ], [ 0, %__barray_mask_return.exit1135 ] - %81 = add nuw nsw i64 %"237_0.sroa.15.01197", 1 - %82 = load i64, ptr %5, align 4 - %83 = lshr i64 %82, %"237_0.sroa.15.01197" - %84 = trunc i64 %83 to i1 - br i1 %84, label %panic.i1142, label %.thread - -panic.i1142: ; preds = %loop_body346.preheader - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -.thread: ; preds = %loop_body346.preheader - %85 = shl nuw nsw i64 1, %"237_0.sroa.15.01197" - %86 = xor i64 %82, %85 - store i64 %86, ptr %5, align 4 - %87 = getelementptr inbounds nuw i64, ptr %4, i64 %"237_0.sroa.15.01197" - %88 = load i64, ptr %87, align 4 - %89 = add i64 %"237_2.01196", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %88) - tail call void @___qfree(i64 %88) - %90 = icmp ult i64 %"237_2.01196", 10 - br i1 %90, label %__barray_check_bounds.exit1137, label %out_of_bounds.i1136 - -cond_exit_241: ; preds = %__barray_check_bounds.exit1137 - %91 = shl nuw nsw i64 1, %"237_2.01196" - %92 = xor i64 %75, %91 - store i64 %92, ptr %3, align 4 - %93 = getelementptr inbounds nuw i64, ptr %2, i64 %"237_2.01196" - store i64 %lazy_measure, ptr %93, align 4 - %94 = icmp samesign ugt i64 %"237_0.sroa.15.01197", 8 - br i1 %94, label %mask_block_ok.i, label %loop_body346.preheader - -loop_body455.preheader.preheader: ; preds = %mask_block_ok.i - tail call void @heap_free(ptr nonnull %4) - tail call void @heap_free(ptr nonnull %5) - br label %__barray_check_bounds.exit1145 - -__barray_check_bounds.exit1145: ; preds = %cond_exit_307, %loop_body455.preheader.preheader - %"303_0.sroa.15.01191" = phi i64 [ %95, %cond_exit_307 ], [ 0, %loop_body455.preheader.preheader ] - %95 = add nuw nsw i64 %"303_0.sroa.15.01191", 1 - %96 = load i64, ptr %3, align 4 - %97 = lshr i64 %96, %"303_0.sroa.15.01191" - %98 = trunc i64 %97 to i1 - br i1 %98, label %panic.i1146, label %__barray_check_bounds.exit1149 - -panic.i1146: ; preds = %__barray_check_bounds.exit1145 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1149: ; preds = %__barray_check_bounds.exit1145 - %99 = shl nuw nsw i64 1, %"303_0.sroa.15.01191" - %100 = xor i64 %96, %99 - store i64 %100, ptr %3, align 4 - %101 = getelementptr inbounds nuw i64, ptr %2, i64 %"303_0.sroa.15.01191" - %102 = load i64, ptr %101, align 4 - tail call void @___inc_future_refcount(i64 %102) - %103 = load i64, ptr %3, align 4 - %104 = lshr i64 %103, %"303_0.sroa.15.01191" - %105 = trunc i64 %104 to i1 - br i1 %105, label %__barray_check_bounds.exit1153, label %panic.i1150 - -panic.i1150: ; preds = %__barray_check_bounds.exit1149 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_check_bounds.exit1153: ; preds = %__barray_check_bounds.exit1149 - %106 = xor i64 %103, %99 - store i64 %106, ptr %3, align 4 - store i64 %102, ptr %101, align 4 - %read_bool = tail call i1 @___read_future_bool(i64 %102) - tail call void @___dec_future_refcount(i64 %102) - %107 = load i64, ptr %1, align 4 - %108 = lshr i64 %107, %"303_0.sroa.15.01191" - %109 = trunc i64 %108 to i1 - br i1 %109, label %cond_exit_307, label %panic.i1154 - -panic.i1154: ; preds = %__barray_check_bounds.exit1153 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -mask_block_err.i1159: ; preds = %cond_exit_487.9 - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_mask_borrow.exit1167: ; preds = %__barray_check_bounds.exit1163.preheader - %110 = or disjoint i64 %163, 1 - store i64 %110, ptr %3, align 4 - %111 = load i64, ptr %2, align 4 - tail call void @___dec_future_refcount(i64 %111) - br label %cond_exit_487 - -cond_exit_487: ; preds = %__barray_mask_borrow.exit1167, %__barray_check_bounds.exit1163.preheader - %112 = load i64, ptr %3, align 4 - %113 = and i64 %112, 2 - %.not1207 = icmp eq i64 %113, 0 - br i1 %.not1207, label %__barray_mask_borrow.exit1167.1, label %cond_exit_487.1 - -__barray_mask_borrow.exit1167.1: ; preds = %cond_exit_487 - %114 = or disjoint i64 %112, 2 - store i64 %114, ptr %3, align 4 - %115 = getelementptr inbounds nuw i8, ptr %2, i64 8 - %116 = load i64, ptr %115, align 4 - tail call void @___dec_future_refcount(i64 %116) - br label %cond_exit_487.1 - -cond_exit_487.1: ; preds = %__barray_mask_borrow.exit1167.1, %cond_exit_487 - %117 = load i64, ptr %3, align 4 - %118 = and i64 %117, 4 - %.not1208 = icmp eq i64 %118, 0 - br i1 %.not1208, label %__barray_mask_borrow.exit1167.2, label %cond_exit_487.2 - -__barray_mask_borrow.exit1167.2: ; preds = %cond_exit_487.1 - %119 = or disjoint i64 %117, 4 - store i64 %119, ptr %3, align 4 - %120 = getelementptr inbounds nuw i8, ptr %2, i64 16 - %121 = load i64, ptr %120, align 4 - tail call void @___dec_future_refcount(i64 %121) - br label %cond_exit_487.2 - -cond_exit_487.2: ; preds = %__barray_mask_borrow.exit1167.2, %cond_exit_487.1 - %122 = load i64, ptr %3, align 4 - %123 = and i64 %122, 8 - %.not1209 = icmp eq i64 %123, 0 - br i1 %.not1209, label %__barray_mask_borrow.exit1167.3, label %cond_exit_487.3 - -__barray_mask_borrow.exit1167.3: ; preds = %cond_exit_487.2 - %124 = or disjoint i64 %122, 8 - store i64 %124, ptr %3, align 4 - %125 = getelementptr inbounds nuw i8, ptr %2, i64 24 - %126 = load i64, ptr %125, align 4 - tail call void @___dec_future_refcount(i64 %126) - br label %cond_exit_487.3 - -cond_exit_487.3: ; preds = %__barray_mask_borrow.exit1167.3, %cond_exit_487.2 - %127 = load i64, ptr %3, align 4 - %128 = and i64 %127, 16 - %.not1210 = icmp eq i64 %128, 0 - br i1 %.not1210, label %__barray_mask_borrow.exit1167.4, label %cond_exit_487.4 - -__barray_mask_borrow.exit1167.4: ; preds = %cond_exit_487.3 - %129 = or disjoint i64 %127, 16 - store i64 %129, ptr %3, align 4 - %130 = getelementptr inbounds nuw i8, ptr %2, i64 32 - %131 = load i64, ptr %130, align 4 - tail call void @___dec_future_refcount(i64 %131) - br label %cond_exit_487.4 - -cond_exit_487.4: ; preds = %__barray_mask_borrow.exit1167.4, %cond_exit_487.3 - %132 = load i64, ptr %3, align 4 - %133 = and i64 %132, 32 - %.not1211 = icmp eq i64 %133, 0 - br i1 %.not1211, label %__barray_mask_borrow.exit1167.5, label %cond_exit_487.5 - -__barray_mask_borrow.exit1167.5: ; preds = %cond_exit_487.4 - %134 = or disjoint i64 %132, 32 - store i64 %134, ptr %3, align 4 - %135 = getelementptr inbounds nuw i8, ptr %2, i64 40 - %136 = load i64, ptr %135, align 4 - tail call void @___dec_future_refcount(i64 %136) - br label %cond_exit_487.5 - -cond_exit_487.5: ; preds = %__barray_mask_borrow.exit1167.5, %cond_exit_487.4 - %137 = load i64, ptr %3, align 4 - %138 = and i64 %137, 64 - %.not1212 = icmp eq i64 %138, 0 - br i1 %.not1212, label %__barray_mask_borrow.exit1167.6, label %cond_exit_487.6 - -__barray_mask_borrow.exit1167.6: ; preds = %cond_exit_487.5 - %139 = or disjoint i64 %137, 64 - store i64 %139, ptr %3, align 4 - %140 = getelementptr inbounds nuw i8, ptr %2, i64 48 - %141 = load i64, ptr %140, align 4 - tail call void @___dec_future_refcount(i64 %141) - br label %cond_exit_487.6 - -cond_exit_487.6: ; preds = %__barray_mask_borrow.exit1167.6, %cond_exit_487.5 - %142 = load i64, ptr %3, align 4 - %143 = and i64 %142, 128 - %.not1213 = icmp eq i64 %143, 0 - br i1 %.not1213, label %__barray_mask_borrow.exit1167.7, label %cond_exit_487.7 - -__barray_mask_borrow.exit1167.7: ; preds = %cond_exit_487.6 - %144 = or disjoint i64 %142, 128 - store i64 %144, ptr %3, align 4 - %145 = getelementptr inbounds nuw i8, ptr %2, i64 56 - %146 = load i64, ptr %145, align 4 - tail call void @___dec_future_refcount(i64 %146) - br label %cond_exit_487.7 - -cond_exit_487.7: ; preds = %__barray_mask_borrow.exit1167.7, %cond_exit_487.6 - %147 = load i64, ptr %3, align 4 - %148 = and i64 %147, 256 - %.not1214 = icmp eq i64 %148, 0 - br i1 %.not1214, label %__barray_mask_borrow.exit1167.8, label %cond_exit_487.8 - -__barray_mask_borrow.exit1167.8: ; preds = %cond_exit_487.7 - %149 = or disjoint i64 %147, 256 - store i64 %149, ptr %3, align 4 - %150 = getelementptr inbounds nuw i8, ptr %2, i64 64 - %151 = load i64, ptr %150, align 4 - tail call void @___dec_future_refcount(i64 %151) - br label %cond_exit_487.8 - -cond_exit_487.8: ; preds = %__barray_mask_borrow.exit1167.8, %cond_exit_487.7 - %152 = load i64, ptr %3, align 4 - %153 = and i64 %152, 512 - %.not1215 = icmp eq i64 %153, 0 - br i1 %.not1215, label %__barray_mask_borrow.exit1167.9, label %cond_exit_487.9 - -__barray_mask_borrow.exit1167.9: ; preds = %cond_exit_487.8 - %154 = or disjoint i64 %152, 512 - store i64 %154, ptr %3, align 4 - %155 = getelementptr inbounds nuw i8, ptr %2, i64 72 - %156 = load i64, ptr %155, align 4 - tail call void @___dec_future_refcount(i64 %156) - br label %cond_exit_487.9 - -cond_exit_487.9: ; preds = %__barray_mask_borrow.exit1167.9, %cond_exit_487.8 - %157 = load i64, ptr %3, align 4 - %158 = or i64 %157, -1024 - store i64 %158, ptr %3, align 4 - %159 = icmp eq i64 %158, -1 - br i1 %159, label %loop_out454, label %mask_block_err.i1159 - -cond_exit_307: ; preds = %__barray_check_bounds.exit1153 - %160 = xor i64 %107, %99 - store i64 %160, ptr %1, align 4 - %161 = getelementptr inbounds nuw i1, ptr %0, i64 %"303_0.sroa.15.01191" - store i1 %read_bool, ptr %161, align 1 - %162 = icmp eq i64 %"303_0.sroa.15.01191", 9 - br i1 %162, label %__barray_check_bounds.exit1163.preheader, label %__barray_check_bounds.exit1145 - -__barray_check_bounds.exit1163.preheader: ; preds = %cond_exit_307 - %163 = load i64, ptr %3, align 4 - %164 = trunc i64 %163 to i1 - br i1 %164, label %cond_exit_487, label %__barray_mask_borrow.exit1167 - -loop_out454: ; preds = %cond_exit_487.9 - tail call void @heap_free(ptr %2) - tail call void @heap_free(ptr nonnull %3) - %165 = load i64, ptr %1, align 4 - %166 = and i64 %165, 1023 - store i64 %166, ptr %1, align 4 - %167 = icmp eq i64 %166, 0 - br i1 %167, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1168 - -mask_block_err.i1168: ; preds = %loop_out454 - tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") - unreachable - -__barray_check_none_borrowed.exit: ; preds = %loop_out454 - %168 = tail call ptr @heap_alloc(i64 10) - %169 = tail call ptr @heap_alloc(i64 8) - store i64 0, ptr %169, align 1 - tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(10) %168, ptr noundef nonnull align 1 dereferenceable(10) %0, i64 10, i1 false) - tail call void @heap_free(ptr nonnull %168) - %170 = load i64, ptr %1, align 4 - %171 = and i64 %170, 1023 - store i64 %171, ptr %1, align 4 - %172 = icmp eq i64 %171, 0 - br i1 %172, label %__barray_check_none_borrowed.exit1172, label %mask_block_err.i1170 - -mask_block_err.i1170: ; preds = %__barray_check_none_borrowed.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") - unreachable - -__barray_check_none_borrowed.exit1172: ; preds = %__barray_check_none_borrowed.exit - %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 - %y_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 4 - %arr_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 8 - %mask_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 16 - %173 = alloca [10 x i1], align 1 - call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(10) %173, i8 0, i64 10, i1 false) - store i32 10, ptr %out_arr_alloca, align 8 - store i32 1, ptr %y_ptr, align 4 - store ptr %0, ptr %arr_ptr, align 8 - store ptr %173, ptr %mask_ptr, align 8 - call void @print_bool_arr(ptr nonnull @res_outcomes.9CB6D2E7.0, i64 21, ptr nonnull %out_arr_alloca) - ret void -} - -declare ptr @heap_alloc(i64) local_unnamed_addr - -; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) -declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immarg) #0 - -; Function Attrs: noreturn -declare void @panic(i32, ptr) local_unnamed_addr #1 - -declare void @heap_free(ptr) local_unnamed_addr - -declare i64 @___lazy_measure(i64) local_unnamed_addr - -declare void @___qfree(i64) local_unnamed_addr - -declare void @___inc_future_refcount(i64) local_unnamed_addr - -declare void @___dec_future_refcount(i64) local_unnamed_addr - -declare i1 @___read_future_bool(i64) local_unnamed_addr - -; Function Attrs: mustprogress 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) #2 - -declare void @print_bool_arr(ptr, i64, ptr) local_unnamed_addr - -declare void @___rp(i64, double, double) local_unnamed_addr - -declare void @___rz(i64, double) local_unnamed_addr - -declare void @___rpp(i64, i64, double, double) local_unnamed_addr - -declare i64 @___qalloc() local_unnamed_addr - -declare void @___reset(i64) local_unnamed_addr - -define i64 @qmain(i64 %0) local_unnamed_addr { -entry: - tail call void @setup(i64 %0) - tail call void @__hugr__.__main__.main.1() - %1 = tail call i64 @teardown() - ret i64 %1 -} - -declare void @setup(i64) local_unnamed_addr - -declare i64 @teardown() local_unnamed_addr - -attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } -attributes #1 = { noreturn } -attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) } - -!name = !{!0} - -!0 = !{!"mainlib"} diff --git a/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace/trace_test-sol-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace/trace_test-sol-x86_64-windows-gnu.ll deleted file mode 100644 index 837fd720..00000000 --- a/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace/trace_test-sol-x86_64-windows-gnu.ll +++ /dev/null @@ -1,647 +0,0 @@ -; ModuleID = 'hugr' -source_filename = "hugr" -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-gnu" - -@"e_Index out .DD115165.0" = private constant [29 x i8] c"\1CEXIT:INT:Index out of bounds" -@"e_Array alre.5A300C2A.0" = private constant [57 x i8] c"8EXIT:INT:Array already contains an element at this index" -@"e_Array elem.E746B1A3.0" = private constant [43 x i8] c"*EXIT:INT:Array element is already borrowed" -@"e_Array cont.EFA5AC45.0" = private constant [70 x i8] c"EEXIT:INT:Array contains non-borrowed elements and cannot be discarded" -@"e_Some array.A77EF32E.0" = private constant [48 x i8] c"/EXIT:INT:Some array elements have been borrowed" -@res_outcomes.9CB6D2E7.0 = private constant [22 x i8] c"\15USER:BOOLARR:outcomes" -@"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." - -define void @__hugr__.__main__.main.1() local_unnamed_addr { -alloca_block: - %0 = tail call ptr @heap_alloc(i64 10) - %1 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %1, align 1 - %2 = tail call ptr @heap_alloc(i64 80) - %3 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %3, align 1 - %4 = tail call ptr @heap_alloc(i64 80) - %5 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %5, align 1 - %qalloc.i = tail call i64 @___qalloc() - %not_max.not.not.i = icmp eq i64 %qalloc.i, -1 - br i1 %not_max.not.not.i, label %cond_441_case_0.i, label %__barray_check_bounds.exit - -cond_441_case_0.i: ; preds = %cond_exit_12.8, %cond_exit_12.7, %cond_exit_12.6, %cond_exit_12.5, %cond_exit_12.4, %cond_exit_12.3, %cond_exit_12.2, %cond_exit_12.1, %cond_exit_12, %alloca_block - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__barray_check_bounds.exit: ; preds = %alloca_block - tail call void @___reset(i64 %qalloc.i) - %6 = load i64, ptr %5, align 4 - %7 = trunc i64 %6 to i1 - br i1 %7, label %cond_exit_12, label %panic.i - -panic.i: ; preds = %__barray_check_bounds.exit.9, %__barray_check_bounds.exit.8, %__barray_check_bounds.exit.7, %__barray_check_bounds.exit.6, %__barray_check_bounds.exit.5, %__barray_check_bounds.exit.4, %__barray_check_bounds.exit.3, %__barray_check_bounds.exit.2, %__barray_check_bounds.exit.1, %__barray_check_bounds.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -cond_exit_12: ; preds = %__barray_check_bounds.exit - %8 = and i64 %6, -2 - store i64 %8, ptr %5, align 4 - store i64 %qalloc.i, ptr %4, align 4 - %qalloc.i.1 = tail call i64 @___qalloc() - %not_max.not.not.i.1 = icmp eq i64 %qalloc.i.1, -1 - br i1 %not_max.not.not.i.1, label %cond_441_case_0.i, label %__barray_check_bounds.exit.1 - -__barray_check_bounds.exit.1: ; preds = %cond_exit_12 - tail call void @___reset(i64 %qalloc.i.1) - %9 = load i64, ptr %5, align 4 - %10 = and i64 %9, 2 - %.not = icmp eq i64 %10, 0 - br i1 %.not, label %panic.i, label %cond_exit_12.1 - -cond_exit_12.1: ; preds = %__barray_check_bounds.exit.1 - %11 = and i64 %9, -3 - store i64 %11, ptr %5, align 4 - %12 = getelementptr inbounds nuw i8, ptr %4, i64 8 - store i64 %qalloc.i.1, ptr %12, align 4 - %qalloc.i.2 = tail call i64 @___qalloc() - %not_max.not.not.i.2 = icmp eq i64 %qalloc.i.2, -1 - br i1 %not_max.not.not.i.2, label %cond_441_case_0.i, label %__barray_check_bounds.exit.2 - -__barray_check_bounds.exit.2: ; preds = %cond_exit_12.1 - tail call void @___reset(i64 %qalloc.i.2) - %13 = load i64, ptr %5, align 4 - %14 = and i64 %13, 4 - %.not1199 = icmp eq i64 %14, 0 - br i1 %.not1199, label %panic.i, label %cond_exit_12.2 - -cond_exit_12.2: ; preds = %__barray_check_bounds.exit.2 - %15 = and i64 %13, -5 - store i64 %15, ptr %5, align 4 - %16 = getelementptr inbounds nuw i8, ptr %4, i64 16 - store i64 %qalloc.i.2, ptr %16, align 4 - %qalloc.i.3 = tail call i64 @___qalloc() - %not_max.not.not.i.3 = icmp eq i64 %qalloc.i.3, -1 - br i1 %not_max.not.not.i.3, label %cond_441_case_0.i, label %__barray_check_bounds.exit.3 - -__barray_check_bounds.exit.3: ; preds = %cond_exit_12.2 - tail call void @___reset(i64 %qalloc.i.3) - %17 = load i64, ptr %5, align 4 - %18 = and i64 %17, 8 - %.not1200 = icmp eq i64 %18, 0 - br i1 %.not1200, label %panic.i, label %cond_exit_12.3 - -cond_exit_12.3: ; preds = %__barray_check_bounds.exit.3 - %19 = and i64 %17, -9 - store i64 %19, ptr %5, align 4 - %20 = getelementptr inbounds nuw i8, ptr %4, i64 24 - store i64 %qalloc.i.3, ptr %20, align 4 - %qalloc.i.4 = tail call i64 @___qalloc() - %not_max.not.not.i.4 = icmp eq i64 %qalloc.i.4, -1 - br i1 %not_max.not.not.i.4, label %cond_441_case_0.i, label %__barray_check_bounds.exit.4 - -__barray_check_bounds.exit.4: ; preds = %cond_exit_12.3 - tail call void @___reset(i64 %qalloc.i.4) - %21 = load i64, ptr %5, align 4 - %22 = and i64 %21, 16 - %.not1201 = icmp eq i64 %22, 0 - br i1 %.not1201, label %panic.i, label %cond_exit_12.4 - -cond_exit_12.4: ; preds = %__barray_check_bounds.exit.4 - %23 = and i64 %21, -17 - store i64 %23, ptr %5, align 4 - %24 = getelementptr inbounds nuw i8, ptr %4, i64 32 - store i64 %qalloc.i.4, ptr %24, align 4 - %qalloc.i.5 = tail call i64 @___qalloc() - %not_max.not.not.i.5 = icmp eq i64 %qalloc.i.5, -1 - br i1 %not_max.not.not.i.5, label %cond_441_case_0.i, label %__barray_check_bounds.exit.5 - -__barray_check_bounds.exit.5: ; preds = %cond_exit_12.4 - tail call void @___reset(i64 %qalloc.i.5) - %25 = load i64, ptr %5, align 4 - %26 = and i64 %25, 32 - %.not1202 = icmp eq i64 %26, 0 - br i1 %.not1202, label %panic.i, label %cond_exit_12.5 - -cond_exit_12.5: ; preds = %__barray_check_bounds.exit.5 - %27 = and i64 %25, -33 - store i64 %27, ptr %5, align 4 - %28 = getelementptr inbounds nuw i8, ptr %4, i64 40 - store i64 %qalloc.i.5, ptr %28, align 4 - %qalloc.i.6 = tail call i64 @___qalloc() - %not_max.not.not.i.6 = icmp eq i64 %qalloc.i.6, -1 - br i1 %not_max.not.not.i.6, label %cond_441_case_0.i, label %__barray_check_bounds.exit.6 - -__barray_check_bounds.exit.6: ; preds = %cond_exit_12.5 - tail call void @___reset(i64 %qalloc.i.6) - %29 = load i64, ptr %5, align 4 - %30 = and i64 %29, 64 - %.not1203 = icmp eq i64 %30, 0 - br i1 %.not1203, label %panic.i, label %cond_exit_12.6 - -cond_exit_12.6: ; preds = %__barray_check_bounds.exit.6 - %31 = and i64 %29, -65 - store i64 %31, ptr %5, align 4 - %32 = getelementptr inbounds nuw i8, ptr %4, i64 48 - store i64 %qalloc.i.6, ptr %32, align 4 - %qalloc.i.7 = tail call i64 @___qalloc() - %not_max.not.not.i.7 = icmp eq i64 %qalloc.i.7, -1 - br i1 %not_max.not.not.i.7, label %cond_441_case_0.i, label %__barray_check_bounds.exit.7 - -__barray_check_bounds.exit.7: ; preds = %cond_exit_12.6 - tail call void @___reset(i64 %qalloc.i.7) - %33 = load i64, ptr %5, align 4 - %34 = and i64 %33, 128 - %.not1204 = icmp eq i64 %34, 0 - br i1 %.not1204, label %panic.i, label %cond_exit_12.7 - -cond_exit_12.7: ; preds = %__barray_check_bounds.exit.7 - %35 = and i64 %33, -129 - store i64 %35, ptr %5, align 4 - %36 = getelementptr inbounds nuw i8, ptr %4, i64 56 - store i64 %qalloc.i.7, ptr %36, align 4 - %qalloc.i.8 = tail call i64 @___qalloc() - %not_max.not.not.i.8 = icmp eq i64 %qalloc.i.8, -1 - br i1 %not_max.not.not.i.8, label %cond_441_case_0.i, label %__barray_check_bounds.exit.8 - -__barray_check_bounds.exit.8: ; preds = %cond_exit_12.7 - tail call void @___reset(i64 %qalloc.i.8) - %37 = load i64, ptr %5, align 4 - %38 = and i64 %37, 256 - %.not1205 = icmp eq i64 %38, 0 - br i1 %.not1205, label %panic.i, label %cond_exit_12.8 - -cond_exit_12.8: ; preds = %__barray_check_bounds.exit.8 - %39 = and i64 %37, -257 - store i64 %39, ptr %5, align 4 - %40 = getelementptr inbounds nuw i8, ptr %4, i64 64 - store i64 %qalloc.i.8, ptr %40, align 4 - %qalloc.i.9 = tail call i64 @___qalloc() - %not_max.not.not.i.9 = icmp eq i64 %qalloc.i.9, -1 - br i1 %not_max.not.not.i.9, label %cond_441_case_0.i, label %__barray_check_bounds.exit.9 - -__barray_check_bounds.exit.9: ; preds = %cond_exit_12.8 - tail call void @___reset(i64 %qalloc.i.9) - %41 = load i64, ptr %5, align 4 - %42 = and i64 %41, 512 - %.not1206 = icmp eq i64 %42, 0 - br i1 %.not1206, label %panic.i, label %cond_exit_12.9 - -cond_exit_12.9: ; preds = %__barray_check_bounds.exit.9 - %43 = and i64 %41, -513 - store i64 %43, ptr %5, align 4 - %44 = getelementptr inbounds nuw i8, ptr %4, i64 72 - store i64 %qalloc.i.9, ptr %44, align 4 - %45 = load i64, ptr %5, align 4 - %46 = trunc i64 %45 to i1 - br i1 %46, label %panic.i1117, label %__barray_mask_borrow.exit - -panic.i1117: ; preds = %cond_exit_12.9 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit: ; preds = %cond_exit_12.9 - %47 = or disjoint i64 %45, 1 - store i64 %47, ptr %5, align 4 - %48 = load i64, ptr %4, align 4 - tail call void @___rp(i64 %48, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %48, double 0x400921FB54442D18) - %49 = load i64, ptr %5, align 4 - %50 = trunc i64 %49 to i1 - br i1 %50, label %__barray_mask_return.exit1119, label %panic.i1118 - -panic.i1118: ; preds = %__barray_mask_borrow.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1119: ; preds = %__barray_mask_borrow.exit - %51 = and i64 %49, -2 - store i64 %51, ptr %5, align 4 - store i64 %48, ptr %4, align 4 - br label %__barray_check_bounds.exit1121 - -__barray_check_bounds.exit1121: ; preds = %__barray_mask_return.exit1119, %__barray_mask_return.exit1135 - %52 = phi i64 [ 1, %__barray_mask_return.exit1119 ], [ %74, %__barray_mask_return.exit1135 ] - %"116_0.01189" = phi i64 [ 0, %__barray_mask_return.exit1119 ], [ %52, %__barray_mask_return.exit1135 ] - %53 = load i64, ptr %5, align 4 - %54 = lshr i64 %53, %"116_0.01189" - %55 = trunc i64 %54 to i1 - br i1 %55, label %panic.i1122, label %__barray_check_bounds.exit1125 - -panic.i1122: ; preds = %__barray_check_bounds.exit1121 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1125: ; preds = %__barray_check_bounds.exit1121 - %56 = shl nuw nsw i64 1, %"116_0.01189" - %57 = xor i64 %53, %56 - store i64 %57, ptr %5, align 4 - %58 = getelementptr inbounds nuw i64, ptr %4, i64 %"116_0.01189" - %59 = load i64, ptr %58, align 4 - %60 = lshr i64 %57, %52 - %61 = trunc i64 %60 to i1 - br i1 %61, label %panic.i1126, label %__barray_check_bounds.exit1129 - -panic.i1126: ; preds = %__barray_check_bounds.exit1125 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1129: ; preds = %__barray_check_bounds.exit1125 - %62 = shl nuw nsw i64 2, %"116_0.01189" - %63 = xor i64 %57, %62 - store i64 %63, ptr %5, align 4 - %64 = getelementptr inbounds nuw i64, ptr %4, i64 %52 - %65 = load i64, ptr %64, align 4 - tail call void @___rp(i64 %59, double 0x3FF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rpp(i64 %59, i64 %65, double 0x3FF921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %65, double 0xBFF921FB54442D18, double 0.000000e+00) - tail call void @___rp(i64 %59, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %59, double 0xBFF921FB54442D18) - %66 = load i64, ptr %5, align 4 - %67 = lshr i64 %66, %"116_0.01189" - %68 = trunc i64 %67 to i1 - br i1 %68, label %__barray_check_bounds.exit1133, label %panic.i1130 - -panic.i1130: ; preds = %__barray_check_bounds.exit1129 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_check_bounds.exit1133: ; preds = %__barray_check_bounds.exit1129 - %69 = xor i64 %66, %56 - store i64 %69, ptr %5, align 4 - store i64 %59, ptr %58, align 4 - %70 = load i64, ptr %5, align 4 - %71 = lshr i64 %70, %52 - %72 = trunc i64 %71 to i1 - br i1 %72, label %__barray_mask_return.exit1135, label %panic.i1134 - -panic.i1134: ; preds = %__barray_check_bounds.exit1133 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit1135: ; preds = %__barray_check_bounds.exit1133 - %73 = xor i64 %70, %62 - store i64 %73, ptr %5, align 4 - store i64 %65, ptr %64, align 4 - %74 = add nuw nsw i64 %52, 1 - %exitcond1192 = icmp eq i64 %74, 10 - br i1 %exitcond1192, label %loop_body346.preheader, label %__barray_check_bounds.exit1121 - -out_of_bounds.i1136: ; preds = %.thread - tail call void @panic(i32 1002, ptr nonnull @"e_Index out .DD115165.0") - unreachable - -__barray_check_bounds.exit1137: ; preds = %.thread - %75 = load i64, ptr %3, align 4 - %76 = lshr i64 %75, %"237_2.01196" - %77 = trunc i64 %76 to i1 - br i1 %77, label %cond_exit_241, label %panic.i1138 - -panic.i1138: ; preds = %__barray_check_bounds.exit1137 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -mask_block_ok.i: ; preds = %cond_exit_241 - %78 = load i64, ptr %5, align 4 - %79 = or i64 %78, -1024 - store i64 %79, ptr %5, align 4 - %80 = icmp eq i64 %79, -1 - br i1 %80, label %loop_body455.preheader.preheader, label %mask_block_err.i - -mask_block_err.i: ; preds = %mask_block_ok.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -loop_body346.preheader: ; preds = %__barray_mask_return.exit1135, %cond_exit_241 - %"237_0.sroa.15.01197" = phi i64 [ %81, %cond_exit_241 ], [ 0, %__barray_mask_return.exit1135 ] - %"237_2.01196" = phi i64 [ %89, %cond_exit_241 ], [ 0, %__barray_mask_return.exit1135 ] - %81 = add nuw nsw i64 %"237_0.sroa.15.01197", 1 - %82 = load i64, ptr %5, align 4 - %83 = lshr i64 %82, %"237_0.sroa.15.01197" - %84 = trunc i64 %83 to i1 - br i1 %84, label %panic.i1142, label %.thread - -panic.i1142: ; preds = %loop_body346.preheader - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -.thread: ; preds = %loop_body346.preheader - %85 = shl nuw nsw i64 1, %"237_0.sroa.15.01197" - %86 = xor i64 %82, %85 - store i64 %86, ptr %5, align 4 - %87 = getelementptr inbounds nuw i64, ptr %4, i64 %"237_0.sroa.15.01197" - %88 = load i64, ptr %87, align 4 - %89 = add i64 %"237_2.01196", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %88) - tail call void @___qfree(i64 %88) - %90 = icmp ult i64 %"237_2.01196", 10 - br i1 %90, label %__barray_check_bounds.exit1137, label %out_of_bounds.i1136 - -cond_exit_241: ; preds = %__barray_check_bounds.exit1137 - %91 = shl nuw nsw i64 1, %"237_2.01196" - %92 = xor i64 %75, %91 - store i64 %92, ptr %3, align 4 - %93 = getelementptr inbounds nuw i64, ptr %2, i64 %"237_2.01196" - store i64 %lazy_measure, ptr %93, align 4 - %94 = icmp samesign ugt i64 %"237_0.sroa.15.01197", 8 - br i1 %94, label %mask_block_ok.i, label %loop_body346.preheader - -loop_body455.preheader.preheader: ; preds = %mask_block_ok.i - tail call void @heap_free(ptr nonnull %4) - tail call void @heap_free(ptr nonnull %5) - br label %__barray_check_bounds.exit1145 - -__barray_check_bounds.exit1145: ; preds = %cond_exit_307, %loop_body455.preheader.preheader - %"303_0.sroa.15.01191" = phi i64 [ %95, %cond_exit_307 ], [ 0, %loop_body455.preheader.preheader ] - %95 = add nuw nsw i64 %"303_0.sroa.15.01191", 1 - %96 = load i64, ptr %3, align 4 - %97 = lshr i64 %96, %"303_0.sroa.15.01191" - %98 = trunc i64 %97 to i1 - br i1 %98, label %panic.i1146, label %__barray_check_bounds.exit1149 - -panic.i1146: ; preds = %__barray_check_bounds.exit1145 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit1149: ; preds = %__barray_check_bounds.exit1145 - %99 = shl nuw nsw i64 1, %"303_0.sroa.15.01191" - %100 = xor i64 %96, %99 - store i64 %100, ptr %3, align 4 - %101 = getelementptr inbounds nuw i64, ptr %2, i64 %"303_0.sroa.15.01191" - %102 = load i64, ptr %101, align 4 - tail call void @___inc_future_refcount(i64 %102) - %103 = load i64, ptr %3, align 4 - %104 = lshr i64 %103, %"303_0.sroa.15.01191" - %105 = trunc i64 %104 to i1 - br i1 %105, label %__barray_check_bounds.exit1153, label %panic.i1150 - -panic.i1150: ; preds = %__barray_check_bounds.exit1149 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_check_bounds.exit1153: ; preds = %__barray_check_bounds.exit1149 - %106 = xor i64 %103, %99 - store i64 %106, ptr %3, align 4 - store i64 %102, ptr %101, align 4 - %read_bool = tail call i1 @___read_future_bool(i64 %102) - tail call void @___dec_future_refcount(i64 %102) - %107 = load i64, ptr %1, align 4 - %108 = lshr i64 %107, %"303_0.sroa.15.01191" - %109 = trunc i64 %108 to i1 - br i1 %109, label %cond_exit_307, label %panic.i1154 - -panic.i1154: ; preds = %__barray_check_bounds.exit1153 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -mask_block_err.i1159: ; preds = %cond_exit_487.9 - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_mask_borrow.exit1167: ; preds = %__barray_check_bounds.exit1163.preheader - %110 = or disjoint i64 %163, 1 - store i64 %110, ptr %3, align 4 - %111 = load i64, ptr %2, align 4 - tail call void @___dec_future_refcount(i64 %111) - br label %cond_exit_487 - -cond_exit_487: ; preds = %__barray_mask_borrow.exit1167, %__barray_check_bounds.exit1163.preheader - %112 = load i64, ptr %3, align 4 - %113 = and i64 %112, 2 - %.not1207 = icmp eq i64 %113, 0 - br i1 %.not1207, label %__barray_mask_borrow.exit1167.1, label %cond_exit_487.1 - -__barray_mask_borrow.exit1167.1: ; preds = %cond_exit_487 - %114 = or disjoint i64 %112, 2 - store i64 %114, ptr %3, align 4 - %115 = getelementptr inbounds nuw i8, ptr %2, i64 8 - %116 = load i64, ptr %115, align 4 - tail call void @___dec_future_refcount(i64 %116) - br label %cond_exit_487.1 - -cond_exit_487.1: ; preds = %__barray_mask_borrow.exit1167.1, %cond_exit_487 - %117 = load i64, ptr %3, align 4 - %118 = and i64 %117, 4 - %.not1208 = icmp eq i64 %118, 0 - br i1 %.not1208, label %__barray_mask_borrow.exit1167.2, label %cond_exit_487.2 - -__barray_mask_borrow.exit1167.2: ; preds = %cond_exit_487.1 - %119 = or disjoint i64 %117, 4 - store i64 %119, ptr %3, align 4 - %120 = getelementptr inbounds nuw i8, ptr %2, i64 16 - %121 = load i64, ptr %120, align 4 - tail call void @___dec_future_refcount(i64 %121) - br label %cond_exit_487.2 - -cond_exit_487.2: ; preds = %__barray_mask_borrow.exit1167.2, %cond_exit_487.1 - %122 = load i64, ptr %3, align 4 - %123 = and i64 %122, 8 - %.not1209 = icmp eq i64 %123, 0 - br i1 %.not1209, label %__barray_mask_borrow.exit1167.3, label %cond_exit_487.3 - -__barray_mask_borrow.exit1167.3: ; preds = %cond_exit_487.2 - %124 = or disjoint i64 %122, 8 - store i64 %124, ptr %3, align 4 - %125 = getelementptr inbounds nuw i8, ptr %2, i64 24 - %126 = load i64, ptr %125, align 4 - tail call void @___dec_future_refcount(i64 %126) - br label %cond_exit_487.3 - -cond_exit_487.3: ; preds = %__barray_mask_borrow.exit1167.3, %cond_exit_487.2 - %127 = load i64, ptr %3, align 4 - %128 = and i64 %127, 16 - %.not1210 = icmp eq i64 %128, 0 - br i1 %.not1210, label %__barray_mask_borrow.exit1167.4, label %cond_exit_487.4 - -__barray_mask_borrow.exit1167.4: ; preds = %cond_exit_487.3 - %129 = or disjoint i64 %127, 16 - store i64 %129, ptr %3, align 4 - %130 = getelementptr inbounds nuw i8, ptr %2, i64 32 - %131 = load i64, ptr %130, align 4 - tail call void @___dec_future_refcount(i64 %131) - br label %cond_exit_487.4 - -cond_exit_487.4: ; preds = %__barray_mask_borrow.exit1167.4, %cond_exit_487.3 - %132 = load i64, ptr %3, align 4 - %133 = and i64 %132, 32 - %.not1211 = icmp eq i64 %133, 0 - br i1 %.not1211, label %__barray_mask_borrow.exit1167.5, label %cond_exit_487.5 - -__barray_mask_borrow.exit1167.5: ; preds = %cond_exit_487.4 - %134 = or disjoint i64 %132, 32 - store i64 %134, ptr %3, align 4 - %135 = getelementptr inbounds nuw i8, ptr %2, i64 40 - %136 = load i64, ptr %135, align 4 - tail call void @___dec_future_refcount(i64 %136) - br label %cond_exit_487.5 - -cond_exit_487.5: ; preds = %__barray_mask_borrow.exit1167.5, %cond_exit_487.4 - %137 = load i64, ptr %3, align 4 - %138 = and i64 %137, 64 - %.not1212 = icmp eq i64 %138, 0 - br i1 %.not1212, label %__barray_mask_borrow.exit1167.6, label %cond_exit_487.6 - -__barray_mask_borrow.exit1167.6: ; preds = %cond_exit_487.5 - %139 = or disjoint i64 %137, 64 - store i64 %139, ptr %3, align 4 - %140 = getelementptr inbounds nuw i8, ptr %2, i64 48 - %141 = load i64, ptr %140, align 4 - tail call void @___dec_future_refcount(i64 %141) - br label %cond_exit_487.6 - -cond_exit_487.6: ; preds = %__barray_mask_borrow.exit1167.6, %cond_exit_487.5 - %142 = load i64, ptr %3, align 4 - %143 = and i64 %142, 128 - %.not1213 = icmp eq i64 %143, 0 - br i1 %.not1213, label %__barray_mask_borrow.exit1167.7, label %cond_exit_487.7 - -__barray_mask_borrow.exit1167.7: ; preds = %cond_exit_487.6 - %144 = or disjoint i64 %142, 128 - store i64 %144, ptr %3, align 4 - %145 = getelementptr inbounds nuw i8, ptr %2, i64 56 - %146 = load i64, ptr %145, align 4 - tail call void @___dec_future_refcount(i64 %146) - br label %cond_exit_487.7 - -cond_exit_487.7: ; preds = %__barray_mask_borrow.exit1167.7, %cond_exit_487.6 - %147 = load i64, ptr %3, align 4 - %148 = and i64 %147, 256 - %.not1214 = icmp eq i64 %148, 0 - br i1 %.not1214, label %__barray_mask_borrow.exit1167.8, label %cond_exit_487.8 - -__barray_mask_borrow.exit1167.8: ; preds = %cond_exit_487.7 - %149 = or disjoint i64 %147, 256 - store i64 %149, ptr %3, align 4 - %150 = getelementptr inbounds nuw i8, ptr %2, i64 64 - %151 = load i64, ptr %150, align 4 - tail call void @___dec_future_refcount(i64 %151) - br label %cond_exit_487.8 - -cond_exit_487.8: ; preds = %__barray_mask_borrow.exit1167.8, %cond_exit_487.7 - %152 = load i64, ptr %3, align 4 - %153 = and i64 %152, 512 - %.not1215 = icmp eq i64 %153, 0 - br i1 %.not1215, label %__barray_mask_borrow.exit1167.9, label %cond_exit_487.9 - -__barray_mask_borrow.exit1167.9: ; preds = %cond_exit_487.8 - %154 = or disjoint i64 %152, 512 - store i64 %154, ptr %3, align 4 - %155 = getelementptr inbounds nuw i8, ptr %2, i64 72 - %156 = load i64, ptr %155, align 4 - tail call void @___dec_future_refcount(i64 %156) - br label %cond_exit_487.9 - -cond_exit_487.9: ; preds = %__barray_mask_borrow.exit1167.9, %cond_exit_487.8 - %157 = load i64, ptr %3, align 4 - %158 = or i64 %157, -1024 - store i64 %158, ptr %3, align 4 - %159 = icmp eq i64 %158, -1 - br i1 %159, label %loop_out454, label %mask_block_err.i1159 - -cond_exit_307: ; preds = %__barray_check_bounds.exit1153 - %160 = xor i64 %107, %99 - store i64 %160, ptr %1, align 4 - %161 = getelementptr inbounds nuw i1, ptr %0, i64 %"303_0.sroa.15.01191" - store i1 %read_bool, ptr %161, align 1 - %162 = icmp eq i64 %"303_0.sroa.15.01191", 9 - br i1 %162, label %__barray_check_bounds.exit1163.preheader, label %__barray_check_bounds.exit1145 - -__barray_check_bounds.exit1163.preheader: ; preds = %cond_exit_307 - %163 = load i64, ptr %3, align 4 - %164 = trunc i64 %163 to i1 - br i1 %164, label %cond_exit_487, label %__barray_mask_borrow.exit1167 - -loop_out454: ; preds = %cond_exit_487.9 - tail call void @heap_free(ptr %2) - tail call void @heap_free(ptr nonnull %3) - %165 = load i64, ptr %1, align 4 - %166 = and i64 %165, 1023 - store i64 %166, ptr %1, align 4 - %167 = icmp eq i64 %166, 0 - br i1 %167, label %__barray_check_none_borrowed.exit, label %mask_block_err.i1168 - -mask_block_err.i1168: ; preds = %loop_out454 - tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") - unreachable - -__barray_check_none_borrowed.exit: ; preds = %loop_out454 - %168 = tail call ptr @heap_alloc(i64 10) - %169 = tail call ptr @heap_alloc(i64 8) - store i64 0, ptr %169, align 1 - tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(10) %168, ptr noundef nonnull align 1 dereferenceable(10) %0, i64 10, i1 false) - tail call void @heap_free(ptr nonnull %168) - %170 = load i64, ptr %1, align 4 - %171 = and i64 %170, 1023 - store i64 %171, ptr %1, align 4 - %172 = icmp eq i64 %171, 0 - br i1 %172, label %__barray_check_none_borrowed.exit1172, label %mask_block_err.i1170 - -mask_block_err.i1170: ; preds = %__barray_check_none_borrowed.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Some array.A77EF32E.0") - unreachable - -__barray_check_none_borrowed.exit1172: ; preds = %__barray_check_none_borrowed.exit - %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 - %y_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 4 - %arr_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 8 - %mask_ptr = getelementptr inbounds nuw i8, ptr %out_arr_alloca, i64 16 - %173 = alloca [10 x i1], align 1 - call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(10) %173, i8 0, i64 10, i1 false) - store i32 10, ptr %out_arr_alloca, align 8 - store i32 1, ptr %y_ptr, align 4 - store ptr %0, ptr %arr_ptr, align 8 - store ptr %173, ptr %mask_ptr, align 8 - call void @print_bool_arr(ptr nonnull @res_outcomes.9CB6D2E7.0, i64 21, ptr nonnull %out_arr_alloca) - ret void -} - -declare ptr @heap_alloc(i64) local_unnamed_addr - -; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) -declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immarg) #0 - -; Function Attrs: noreturn -declare void @panic(i32, ptr) local_unnamed_addr #1 - -declare void @heap_free(ptr) local_unnamed_addr - -declare i64 @___lazy_measure(i64) local_unnamed_addr - -declare void @___qfree(i64) local_unnamed_addr - -declare void @___inc_future_refcount(i64) local_unnamed_addr - -declare void @___dec_future_refcount(i64) local_unnamed_addr - -declare i1 @___read_future_bool(i64) local_unnamed_addr - -; Function Attrs: mustprogress 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) #2 - -declare void @print_bool_arr(ptr, i64, ptr) local_unnamed_addr - -declare void @___rp(i64, double, double) local_unnamed_addr - -declare void @___rz(i64, double) local_unnamed_addr - -declare void @___rpp(i64, i64, double, double) local_unnamed_addr - -declare i64 @___qalloc() local_unnamed_addr - -declare void @___reset(i64) local_unnamed_addr - -define i64 @qmain(i64 %0) local_unnamed_addr { -entry: - tail call void @setup(i64 %0) - tail call void @__hugr__.__main__.main.1() - %1 = tail call i64 @teardown() - ret i64 %1 -} - -declare void @setup(i64) local_unnamed_addr - -declare i64 @teardown() local_unnamed_addr - -attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } -attributes #1 = { noreturn } -attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) } - -!name = !{!0} - -!0 = !{!"mainlib"} diff --git a/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace/trace_test.sha256 b/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace/trace_test.sha256 deleted file mode 100644 index 6c29be6c..00000000 --- a/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace/trace_test.sha256 +++ /dev/null @@ -1 +0,0 @@ -c345565fe357b60d2b5f204893839d2e9ad4551f1fe58823719c1e606082a3a8 \ No newline at end of file diff --git a/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[default]/trace_test-helios-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[default]/trace_test-helios-aarch64-apple-darwin.ll index 345fa847..789dd0ea 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[default]/trace_test-helios-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[default]/trace_test-helios-aarch64-apple-darwin.ll @@ -328,7 +328,7 @@ panic.i1142: ; preds = %loop_body346.prehea %87 = getelementptr inbounds nuw i64, ptr %4, i64 %"237_0.sroa.15.01204" %88 = load i64, ptr %87, align 4 %89 = add i64 %"237_2.01203", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %88) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %88) tail call void @___qfree(i64 %88) %90 = icmp ult i64 %"237_2.01203", 10 br i1 %90, label %__barray_check_bounds.exit1137, label %out_of_bounds.i1136 @@ -338,7 +338,7 @@ cond_exit_241: ; preds = %__barray_check_boun %92 = xor i64 %75, %91 store i64 %92, ptr %3, align 4 %93 = getelementptr inbounds nuw i64, ptr %2, i64 %"237_2.01203" - store i64 %lazy_measure, ptr %93, align 4 + store i64 %___lazy_measure, ptr %93, align 4 %94 = icmp samesign ugt i64 %"237_0.sroa.15.01204", 8 br i1 %94, label %mask_block_ok.i, label %loop_body346.preheader diff --git a/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[default]/trace_test-helios-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[default]/trace_test-helios-aarch64-unknown-linux-gnu.ll index d818baaf..d118642b 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[default]/trace_test-helios-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[default]/trace_test-helios-aarch64-unknown-linux-gnu.ll @@ -328,7 +328,7 @@ panic.i1142: ; preds = %loop_body346.prehea %87 = getelementptr inbounds nuw i64, ptr %4, i64 %"237_0.sroa.15.01204" %88 = load i64, ptr %87, align 4 %89 = add i64 %"237_2.01203", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %88) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %88) tail call void @___qfree(i64 %88) %90 = icmp ult i64 %"237_2.01203", 10 br i1 %90, label %__barray_check_bounds.exit1137, label %out_of_bounds.i1136 @@ -338,7 +338,7 @@ cond_exit_241: ; preds = %__barray_check_boun %92 = xor i64 %75, %91 store i64 %92, ptr %3, align 4 %93 = getelementptr inbounds nuw i64, ptr %2, i64 %"237_2.01203" - store i64 %lazy_measure, ptr %93, align 4 + store i64 %___lazy_measure, ptr %93, align 4 %94 = icmp samesign ugt i64 %"237_0.sroa.15.01204", 8 br i1 %94, label %mask_block_ok.i, label %loop_body346.preheader diff --git a/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[default]/trace_test-helios-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[default]/trace_test-helios-x86_64-apple-darwin.ll index ffbfb432..55160ac4 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[default]/trace_test-helios-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[default]/trace_test-helios-x86_64-apple-darwin.ll @@ -328,7 +328,7 @@ panic.i1142: ; preds = %loop_body346.prehea %87 = getelementptr inbounds nuw i64, ptr %4, i64 %"237_0.sroa.15.01197" %88 = load i64, ptr %87, align 4 %89 = add i64 %"237_2.01196", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %88) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %88) tail call void @___qfree(i64 %88) %90 = icmp ult i64 %"237_2.01196", 10 br i1 %90, label %__barray_check_bounds.exit1137, label %out_of_bounds.i1136 @@ -338,7 +338,7 @@ cond_exit_241: ; preds = %__barray_check_boun %92 = xor i64 %75, %91 store i64 %92, ptr %3, align 4 %93 = getelementptr inbounds nuw i64, ptr %2, i64 %"237_2.01196" - store i64 %lazy_measure, ptr %93, align 4 + store i64 %___lazy_measure, ptr %93, align 4 %94 = icmp samesign ugt i64 %"237_0.sroa.15.01197", 8 br i1 %94, label %mask_block_ok.i, label %loop_body346.preheader diff --git a/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[default]/trace_test-helios-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[default]/trace_test-helios-x86_64-unknown-linux-gnu.ll index ee5498f8..e435bfb3 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[default]/trace_test-helios-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[default]/trace_test-helios-x86_64-unknown-linux-gnu.ll @@ -328,7 +328,7 @@ panic.i1142: ; preds = %loop_body346.prehea %87 = getelementptr inbounds nuw i64, ptr %4, i64 %"237_0.sroa.15.01197" %88 = load i64, ptr %87, align 4 %89 = add i64 %"237_2.01196", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %88) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %88) tail call void @___qfree(i64 %88) %90 = icmp ult i64 %"237_2.01196", 10 br i1 %90, label %__barray_check_bounds.exit1137, label %out_of_bounds.i1136 @@ -338,7 +338,7 @@ cond_exit_241: ; preds = %__barray_check_boun %92 = xor i64 %75, %91 store i64 %92, ptr %3, align 4 %93 = getelementptr inbounds nuw i64, ptr %2, i64 %"237_2.01196" - store i64 %lazy_measure, ptr %93, align 4 + store i64 %___lazy_measure, ptr %93, align 4 %94 = icmp samesign ugt i64 %"237_0.sroa.15.01197", 8 br i1 %94, label %mask_block_ok.i, label %loop_body346.preheader diff --git a/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[default]/trace_test-helios-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[default]/trace_test-helios-x86_64-windows-gnu.ll index ca6a39f5..20c3be93 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[default]/trace_test-helios-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[default]/trace_test-helios-x86_64-windows-gnu.ll @@ -328,7 +328,7 @@ panic.i1142: ; preds = %loop_body346.prehea %87 = getelementptr inbounds nuw i64, ptr %4, i64 %"237_0.sroa.15.01197" %88 = load i64, ptr %87, align 4 %89 = add i64 %"237_2.01196", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %88) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %88) tail call void @___qfree(i64 %88) %90 = icmp ult i64 %"237_2.01196", 10 br i1 %90, label %__barray_check_bounds.exit1137, label %out_of_bounds.i1136 @@ -338,7 +338,7 @@ cond_exit_241: ; preds = %__barray_check_boun %92 = xor i64 %75, %91 store i64 %92, ptr %3, align 4 %93 = getelementptr inbounds nuw i64, ptr %2, i64 %"237_2.01196" - store i64 %lazy_measure, ptr %93, align 4 + store i64 %___lazy_measure, ptr %93, align 4 %94 = icmp samesign ugt i64 %"237_0.sroa.15.01197", 8 br i1 %94, label %mask_block_ok.i, label %loop_body346.preheader diff --git a/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[default]/trace_test-sol-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[default]/trace_test-sol-aarch64-apple-darwin.ll index 50ba00d9..8e9e53c0 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[default]/trace_test-sol-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[default]/trace_test-sol-aarch64-apple-darwin.ll @@ -328,7 +328,7 @@ panic.i1142: ; preds = %loop_body346.prehea %87 = getelementptr inbounds nuw i64, ptr %4, i64 %"237_0.sroa.15.01204" %88 = load i64, ptr %87, align 4 %89 = add i64 %"237_2.01203", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %88) + %___future_measure = tail call i64 @___future_measure(i64 %88, i64 0) tail call void @___qfree(i64 %88) %90 = icmp ult i64 %"237_2.01203", 10 br i1 %90, label %__barray_check_bounds.exit1137, label %out_of_bounds.i1136 @@ -338,7 +338,7 @@ cond_exit_241: ; preds = %__barray_check_boun %92 = xor i64 %75, %91 store i64 %92, ptr %3, align 4 %93 = getelementptr inbounds nuw i64, ptr %2, i64 %"237_2.01203" - store i64 %lazy_measure, ptr %93, align 4 + store i64 %___future_measure, ptr %93, align 4 %94 = icmp samesign ugt i64 %"237_0.sroa.15.01204", 8 br i1 %94, label %mask_block_ok.i, label %loop_body346.preheader @@ -601,7 +601,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #1 declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[default]/trace_test-sol-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[default]/trace_test-sol-aarch64-unknown-linux-gnu.ll index d206b654..be357020 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[default]/trace_test-sol-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[default]/trace_test-sol-aarch64-unknown-linux-gnu.ll @@ -328,7 +328,7 @@ panic.i1142: ; preds = %loop_body346.prehea %87 = getelementptr inbounds nuw i64, ptr %4, i64 %"237_0.sroa.15.01204" %88 = load i64, ptr %87, align 4 %89 = add i64 %"237_2.01203", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %88) + %___future_measure = tail call i64 @___future_measure(i64 %88, i64 0) tail call void @___qfree(i64 %88) %90 = icmp ult i64 %"237_2.01203", 10 br i1 %90, label %__barray_check_bounds.exit1137, label %out_of_bounds.i1136 @@ -338,7 +338,7 @@ cond_exit_241: ; preds = %__barray_check_boun %92 = xor i64 %75, %91 store i64 %92, ptr %3, align 4 %93 = getelementptr inbounds nuw i64, ptr %2, i64 %"237_2.01203" - store i64 %lazy_measure, ptr %93, align 4 + store i64 %___future_measure, ptr %93, align 4 %94 = icmp samesign ugt i64 %"237_0.sroa.15.01204", 8 br i1 %94, label %mask_block_ok.i, label %loop_body346.preheader @@ -601,7 +601,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #1 declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[default]/trace_test-sol-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[default]/trace_test-sol-x86_64-apple-darwin.ll index 8e546f44..d4735fce 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[default]/trace_test-sol-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[default]/trace_test-sol-x86_64-apple-darwin.ll @@ -328,7 +328,7 @@ panic.i1142: ; preds = %loop_body346.prehea %87 = getelementptr inbounds nuw i64, ptr %4, i64 %"237_0.sroa.15.01197" %88 = load i64, ptr %87, align 4 %89 = add i64 %"237_2.01196", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %88) + %___future_measure = tail call i64 @___future_measure(i64 %88, i64 0) tail call void @___qfree(i64 %88) %90 = icmp ult i64 %"237_2.01196", 10 br i1 %90, label %__barray_check_bounds.exit1137, label %out_of_bounds.i1136 @@ -338,7 +338,7 @@ cond_exit_241: ; preds = %__barray_check_boun %92 = xor i64 %75, %91 store i64 %92, ptr %3, align 4 %93 = getelementptr inbounds nuw i64, ptr %2, i64 %"237_2.01196" - store i64 %lazy_measure, ptr %93, align 4 + store i64 %___future_measure, ptr %93, align 4 %94 = icmp samesign ugt i64 %"237_0.sroa.15.01197", 8 br i1 %94, label %mask_block_ok.i, label %loop_body346.preheader @@ -601,7 +601,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #1 declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[default]/trace_test-sol-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[default]/trace_test-sol-x86_64-unknown-linux-gnu.ll index bdf547f3..41958a20 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[default]/trace_test-sol-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[default]/trace_test-sol-x86_64-unknown-linux-gnu.ll @@ -328,7 +328,7 @@ panic.i1142: ; preds = %loop_body346.prehea %87 = getelementptr inbounds nuw i64, ptr %4, i64 %"237_0.sroa.15.01197" %88 = load i64, ptr %87, align 4 %89 = add i64 %"237_2.01196", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %88) + %___future_measure = tail call i64 @___future_measure(i64 %88, i64 0) tail call void @___qfree(i64 %88) %90 = icmp ult i64 %"237_2.01196", 10 br i1 %90, label %__barray_check_bounds.exit1137, label %out_of_bounds.i1136 @@ -338,7 +338,7 @@ cond_exit_241: ; preds = %__barray_check_boun %92 = xor i64 %75, %91 store i64 %92, ptr %3, align 4 %93 = getelementptr inbounds nuw i64, ptr %2, i64 %"237_2.01196" - store i64 %lazy_measure, ptr %93, align 4 + store i64 %___future_measure, ptr %93, align 4 %94 = icmp samesign ugt i64 %"237_0.sroa.15.01197", 8 br i1 %94, label %mask_block_ok.i, label %loop_body346.preheader @@ -601,7 +601,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #1 declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[default]/trace_test-sol-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[default]/trace_test-sol-x86_64-windows-gnu.ll index 837fd720..1f184948 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[default]/trace_test-sol-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[default]/trace_test-sol-x86_64-windows-gnu.ll @@ -328,7 +328,7 @@ panic.i1142: ; preds = %loop_body346.prehea %87 = getelementptr inbounds nuw i64, ptr %4, i64 %"237_0.sroa.15.01197" %88 = load i64, ptr %87, align 4 %89 = add i64 %"237_2.01196", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %88) + %___future_measure = tail call i64 @___future_measure(i64 %88, i64 0) tail call void @___qfree(i64 %88) %90 = icmp ult i64 %"237_2.01196", 10 br i1 %90, label %__barray_check_bounds.exit1137, label %out_of_bounds.i1136 @@ -338,7 +338,7 @@ cond_exit_241: ; preds = %__barray_check_boun %92 = xor i64 %75, %91 store i64 %92, ptr %3, align 4 %93 = getelementptr inbounds nuw i64, ptr %2, i64 %"237_2.01196" - store i64 %lazy_measure, ptr %93, align 4 + store i64 %___future_measure, ptr %93, align 4 %94 = icmp samesign ugt i64 %"237_0.sroa.15.01197", 8 br i1 %94, label %mask_block_ok.i, label %loop_body346.preheader @@ -601,7 +601,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #1 declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[legacy]/trace_test-helios-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[legacy]/trace_test-helios-aarch64-apple-darwin.ll index 345fa847..789dd0ea 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[legacy]/trace_test-helios-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[legacy]/trace_test-helios-aarch64-apple-darwin.ll @@ -328,7 +328,7 @@ panic.i1142: ; preds = %loop_body346.prehea %87 = getelementptr inbounds nuw i64, ptr %4, i64 %"237_0.sroa.15.01204" %88 = load i64, ptr %87, align 4 %89 = add i64 %"237_2.01203", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %88) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %88) tail call void @___qfree(i64 %88) %90 = icmp ult i64 %"237_2.01203", 10 br i1 %90, label %__barray_check_bounds.exit1137, label %out_of_bounds.i1136 @@ -338,7 +338,7 @@ cond_exit_241: ; preds = %__barray_check_boun %92 = xor i64 %75, %91 store i64 %92, ptr %3, align 4 %93 = getelementptr inbounds nuw i64, ptr %2, i64 %"237_2.01203" - store i64 %lazy_measure, ptr %93, align 4 + store i64 %___lazy_measure, ptr %93, align 4 %94 = icmp samesign ugt i64 %"237_0.sroa.15.01204", 8 br i1 %94, label %mask_block_ok.i, label %loop_body346.preheader diff --git a/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[legacy]/trace_test-helios-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[legacy]/trace_test-helios-aarch64-unknown-linux-gnu.ll index d818baaf..d118642b 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[legacy]/trace_test-helios-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[legacy]/trace_test-helios-aarch64-unknown-linux-gnu.ll @@ -328,7 +328,7 @@ panic.i1142: ; preds = %loop_body346.prehea %87 = getelementptr inbounds nuw i64, ptr %4, i64 %"237_0.sroa.15.01204" %88 = load i64, ptr %87, align 4 %89 = add i64 %"237_2.01203", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %88) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %88) tail call void @___qfree(i64 %88) %90 = icmp ult i64 %"237_2.01203", 10 br i1 %90, label %__barray_check_bounds.exit1137, label %out_of_bounds.i1136 @@ -338,7 +338,7 @@ cond_exit_241: ; preds = %__barray_check_boun %92 = xor i64 %75, %91 store i64 %92, ptr %3, align 4 %93 = getelementptr inbounds nuw i64, ptr %2, i64 %"237_2.01203" - store i64 %lazy_measure, ptr %93, align 4 + store i64 %___lazy_measure, ptr %93, align 4 %94 = icmp samesign ugt i64 %"237_0.sroa.15.01204", 8 br i1 %94, label %mask_block_ok.i, label %loop_body346.preheader diff --git a/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[legacy]/trace_test-helios-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[legacy]/trace_test-helios-x86_64-apple-darwin.ll index ffbfb432..55160ac4 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[legacy]/trace_test-helios-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[legacy]/trace_test-helios-x86_64-apple-darwin.ll @@ -328,7 +328,7 @@ panic.i1142: ; preds = %loop_body346.prehea %87 = getelementptr inbounds nuw i64, ptr %4, i64 %"237_0.sroa.15.01197" %88 = load i64, ptr %87, align 4 %89 = add i64 %"237_2.01196", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %88) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %88) tail call void @___qfree(i64 %88) %90 = icmp ult i64 %"237_2.01196", 10 br i1 %90, label %__barray_check_bounds.exit1137, label %out_of_bounds.i1136 @@ -338,7 +338,7 @@ cond_exit_241: ; preds = %__barray_check_boun %92 = xor i64 %75, %91 store i64 %92, ptr %3, align 4 %93 = getelementptr inbounds nuw i64, ptr %2, i64 %"237_2.01196" - store i64 %lazy_measure, ptr %93, align 4 + store i64 %___lazy_measure, ptr %93, align 4 %94 = icmp samesign ugt i64 %"237_0.sroa.15.01197", 8 br i1 %94, label %mask_block_ok.i, label %loop_body346.preheader diff --git a/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[legacy]/trace_test-helios-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[legacy]/trace_test-helios-x86_64-unknown-linux-gnu.ll index ee5498f8..e435bfb3 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[legacy]/trace_test-helios-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[legacy]/trace_test-helios-x86_64-unknown-linux-gnu.ll @@ -328,7 +328,7 @@ panic.i1142: ; preds = %loop_body346.prehea %87 = getelementptr inbounds nuw i64, ptr %4, i64 %"237_0.sroa.15.01197" %88 = load i64, ptr %87, align 4 %89 = add i64 %"237_2.01196", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %88) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %88) tail call void @___qfree(i64 %88) %90 = icmp ult i64 %"237_2.01196", 10 br i1 %90, label %__barray_check_bounds.exit1137, label %out_of_bounds.i1136 @@ -338,7 +338,7 @@ cond_exit_241: ; preds = %__barray_check_boun %92 = xor i64 %75, %91 store i64 %92, ptr %3, align 4 %93 = getelementptr inbounds nuw i64, ptr %2, i64 %"237_2.01196" - store i64 %lazy_measure, ptr %93, align 4 + store i64 %___lazy_measure, ptr %93, align 4 %94 = icmp samesign ugt i64 %"237_0.sroa.15.01197", 8 br i1 %94, label %mask_block_ok.i, label %loop_body346.preheader diff --git a/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[legacy]/trace_test-helios-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[legacy]/trace_test-helios-x86_64-windows-gnu.ll index ca6a39f5..20c3be93 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[legacy]/trace_test-helios-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[legacy]/trace_test-helios-x86_64-windows-gnu.ll @@ -328,7 +328,7 @@ panic.i1142: ; preds = %loop_body346.prehea %87 = getelementptr inbounds nuw i64, ptr %4, i64 %"237_0.sroa.15.01197" %88 = load i64, ptr %87, align 4 %89 = add i64 %"237_2.01196", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %88) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %88) tail call void @___qfree(i64 %88) %90 = icmp ult i64 %"237_2.01196", 10 br i1 %90, label %__barray_check_bounds.exit1137, label %out_of_bounds.i1136 @@ -338,7 +338,7 @@ cond_exit_241: ; preds = %__barray_check_boun %92 = xor i64 %75, %91 store i64 %92, ptr %3, align 4 %93 = getelementptr inbounds nuw i64, ptr %2, i64 %"237_2.01196" - store i64 %lazy_measure, ptr %93, align 4 + store i64 %___lazy_measure, ptr %93, align 4 %94 = icmp samesign ugt i64 %"237_0.sroa.15.01197", 8 br i1 %94, label %mask_block_ok.i, label %loop_body346.preheader diff --git a/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[legacy]/trace_test-sol-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[legacy]/trace_test-sol-aarch64-apple-darwin.ll index 50ba00d9..8e9e53c0 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[legacy]/trace_test-sol-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[legacy]/trace_test-sol-aarch64-apple-darwin.ll @@ -328,7 +328,7 @@ panic.i1142: ; preds = %loop_body346.prehea %87 = getelementptr inbounds nuw i64, ptr %4, i64 %"237_0.sroa.15.01204" %88 = load i64, ptr %87, align 4 %89 = add i64 %"237_2.01203", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %88) + %___future_measure = tail call i64 @___future_measure(i64 %88, i64 0) tail call void @___qfree(i64 %88) %90 = icmp ult i64 %"237_2.01203", 10 br i1 %90, label %__barray_check_bounds.exit1137, label %out_of_bounds.i1136 @@ -338,7 +338,7 @@ cond_exit_241: ; preds = %__barray_check_boun %92 = xor i64 %75, %91 store i64 %92, ptr %3, align 4 %93 = getelementptr inbounds nuw i64, ptr %2, i64 %"237_2.01203" - store i64 %lazy_measure, ptr %93, align 4 + store i64 %___future_measure, ptr %93, align 4 %94 = icmp samesign ugt i64 %"237_0.sroa.15.01204", 8 br i1 %94, label %mask_block_ok.i, label %loop_body346.preheader @@ -601,7 +601,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #1 declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[legacy]/trace_test-sol-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[legacy]/trace_test-sol-aarch64-unknown-linux-gnu.ll index d206b654..be357020 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[legacy]/trace_test-sol-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[legacy]/trace_test-sol-aarch64-unknown-linux-gnu.ll @@ -328,7 +328,7 @@ panic.i1142: ; preds = %loop_body346.prehea %87 = getelementptr inbounds nuw i64, ptr %4, i64 %"237_0.sroa.15.01204" %88 = load i64, ptr %87, align 4 %89 = add i64 %"237_2.01203", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %88) + %___future_measure = tail call i64 @___future_measure(i64 %88, i64 0) tail call void @___qfree(i64 %88) %90 = icmp ult i64 %"237_2.01203", 10 br i1 %90, label %__barray_check_bounds.exit1137, label %out_of_bounds.i1136 @@ -338,7 +338,7 @@ cond_exit_241: ; preds = %__barray_check_boun %92 = xor i64 %75, %91 store i64 %92, ptr %3, align 4 %93 = getelementptr inbounds nuw i64, ptr %2, i64 %"237_2.01203" - store i64 %lazy_measure, ptr %93, align 4 + store i64 %___future_measure, ptr %93, align 4 %94 = icmp samesign ugt i64 %"237_0.sroa.15.01204", 8 br i1 %94, label %mask_block_ok.i, label %loop_body346.preheader @@ -601,7 +601,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #1 declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[legacy]/trace_test-sol-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[legacy]/trace_test-sol-x86_64-apple-darwin.ll index 8e546f44..d4735fce 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[legacy]/trace_test-sol-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[legacy]/trace_test-sol-x86_64-apple-darwin.ll @@ -328,7 +328,7 @@ panic.i1142: ; preds = %loop_body346.prehea %87 = getelementptr inbounds nuw i64, ptr %4, i64 %"237_0.sroa.15.01197" %88 = load i64, ptr %87, align 4 %89 = add i64 %"237_2.01196", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %88) + %___future_measure = tail call i64 @___future_measure(i64 %88, i64 0) tail call void @___qfree(i64 %88) %90 = icmp ult i64 %"237_2.01196", 10 br i1 %90, label %__barray_check_bounds.exit1137, label %out_of_bounds.i1136 @@ -338,7 +338,7 @@ cond_exit_241: ; preds = %__barray_check_boun %92 = xor i64 %75, %91 store i64 %92, ptr %3, align 4 %93 = getelementptr inbounds nuw i64, ptr %2, i64 %"237_2.01196" - store i64 %lazy_measure, ptr %93, align 4 + store i64 %___future_measure, ptr %93, align 4 %94 = icmp samesign ugt i64 %"237_0.sroa.15.01197", 8 br i1 %94, label %mask_block_ok.i, label %loop_body346.preheader @@ -601,7 +601,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #1 declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[legacy]/trace_test-sol-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[legacy]/trace_test-sol-x86_64-unknown-linux-gnu.ll index bdf547f3..41958a20 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[legacy]/trace_test-sol-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[legacy]/trace_test-sol-x86_64-unknown-linux-gnu.ll @@ -328,7 +328,7 @@ panic.i1142: ; preds = %loop_body346.prehea %87 = getelementptr inbounds nuw i64, ptr %4, i64 %"237_0.sroa.15.01197" %88 = load i64, ptr %87, align 4 %89 = add i64 %"237_2.01196", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %88) + %___future_measure = tail call i64 @___future_measure(i64 %88, i64 0) tail call void @___qfree(i64 %88) %90 = icmp ult i64 %"237_2.01196", 10 br i1 %90, label %__barray_check_bounds.exit1137, label %out_of_bounds.i1136 @@ -338,7 +338,7 @@ cond_exit_241: ; preds = %__barray_check_boun %92 = xor i64 %75, %91 store i64 %92, ptr %3, align 4 %93 = getelementptr inbounds nuw i64, ptr %2, i64 %"237_2.01196" - store i64 %lazy_measure, ptr %93, align 4 + store i64 %___future_measure, ptr %93, align 4 %94 = icmp samesign ugt i64 %"237_0.sroa.15.01197", 8 br i1 %94, label %mask_block_ok.i, label %loop_body346.preheader @@ -601,7 +601,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #1 declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[legacy]/trace_test-sol-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[legacy]/trace_test-sol-x86_64-windows-gnu.ll index 837fd720..1f184948 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[legacy]/trace_test-sol-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_trace/test_ghz_trace[legacy]/trace_test-sol-x86_64-windows-gnu.ll @@ -328,7 +328,7 @@ panic.i1142: ; preds = %loop_body346.prehea %87 = getelementptr inbounds nuw i64, ptr %4, i64 %"237_0.sroa.15.01197" %88 = load i64, ptr %87, align 4 %89 = add i64 %"237_2.01196", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %88) + %___future_measure = tail call i64 @___future_measure(i64 %88, i64 0) tail call void @___qfree(i64 %88) %90 = icmp ult i64 %"237_2.01196", 10 br i1 %90, label %__barray_check_bounds.exit1137, label %out_of_bounds.i1136 @@ -338,7 +338,7 @@ cond_exit_241: ; preds = %__barray_check_boun %92 = xor i64 %75, %91 store i64 %92, ptr %3, align 4 %93 = getelementptr inbounds nuw i64, ptr %2, i64 %"237_2.01196" - store i64 %lazy_measure, ptr %93, align 4 + store i64 %___future_measure, ptr %93, align 4 %94 = icmp samesign ugt i64 %"237_0.sroa.15.01197", 8 br i1 %94, label %mask_block_ok.i, label %loop_body346.preheader @@ -601,7 +601,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #1 declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_array_results_unparsed/array_results-helios-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_array_results_unparsed/array_results-helios-aarch64-apple-darwin.ll index 3ce07d6a..66fcabbf 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_array_results_unparsed/array_results-helios-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_array_results_unparsed/array_results-helios-aarch64-apple-darwin.ll @@ -162,7 +162,7 @@ panic.i1806: ; preds = %loop_body321.prehea %45 = getelementptr inbounds nuw i64, ptr %8, i64 %"476_0.sroa.15.01905" %46 = load i64, ptr %45, align 4 %47 = add i64 %"476_2.01904", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %46) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %46) tail call void @___qfree(i64 %46) %48 = icmp ult i64 %"476_2.01904", 10 br i1 %48, label %__barray_check_bounds.exit1801, label %out_of_bounds.i1800 @@ -172,7 +172,7 @@ cond_exit_480: ; preds = %__barray_check_boun %50 = xor i64 %33, %49 store i64 %50, ptr %3, align 4 %51 = getelementptr inbounds nuw i64, ptr %2, i64 %"476_2.01904" - store i64 %lazy_measure, ptr %51, align 4 + store i64 %___lazy_measure, ptr %51, align 4 %52 = icmp samesign ugt i64 %"476_0.sroa.15.01905", 8 br i1 %52, label %mask_block_ok.i, label %loop_body321.preheader diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_array_results_unparsed/array_results-helios-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_array_results_unparsed/array_results-helios-aarch64-unknown-linux-gnu.ll index af2618f8..ddd67e21 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_array_results_unparsed/array_results-helios-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_array_results_unparsed/array_results-helios-aarch64-unknown-linux-gnu.ll @@ -162,7 +162,7 @@ panic.i1806: ; preds = %loop_body321.prehea %45 = getelementptr inbounds nuw i64, ptr %8, i64 %"476_0.sroa.15.01905" %46 = load i64, ptr %45, align 4 %47 = add i64 %"476_2.01904", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %46) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %46) tail call void @___qfree(i64 %46) %48 = icmp ult i64 %"476_2.01904", 10 br i1 %48, label %__barray_check_bounds.exit1801, label %out_of_bounds.i1800 @@ -172,7 +172,7 @@ cond_exit_480: ; preds = %__barray_check_boun %50 = xor i64 %33, %49 store i64 %50, ptr %3, align 4 %51 = getelementptr inbounds nuw i64, ptr %2, i64 %"476_2.01904" - store i64 %lazy_measure, ptr %51, align 4 + store i64 %___lazy_measure, ptr %51, align 4 %52 = icmp samesign ugt i64 %"476_0.sroa.15.01905", 8 br i1 %52, label %mask_block_ok.i, label %loop_body321.preheader diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_array_results_unparsed/array_results-helios-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_array_results_unparsed/array_results-helios-x86_64-apple-darwin.ll index 5ae50b69..b95a0c46 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_array_results_unparsed/array_results-helios-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_array_results_unparsed/array_results-helios-x86_64-apple-darwin.ll @@ -162,7 +162,7 @@ panic.i1806: ; preds = %loop_body321.prehea %45 = getelementptr inbounds nuw i64, ptr %8, i64 %"476_0.sroa.15.01905" %46 = load i64, ptr %45, align 4 %47 = add i64 %"476_2.01904", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %46) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %46) tail call void @___qfree(i64 %46) %48 = icmp ult i64 %"476_2.01904", 10 br i1 %48, label %__barray_check_bounds.exit1801, label %out_of_bounds.i1800 @@ -172,7 +172,7 @@ cond_exit_480: ; preds = %__barray_check_boun %50 = xor i64 %33, %49 store i64 %50, ptr %3, align 4 %51 = getelementptr inbounds nuw i64, ptr %2, i64 %"476_2.01904" - store i64 %lazy_measure, ptr %51, align 4 + store i64 %___lazy_measure, ptr %51, align 4 %52 = icmp samesign ugt i64 %"476_0.sroa.15.01905", 8 br i1 %52, label %mask_block_ok.i, label %loop_body321.preheader diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_array_results_unparsed/array_results-helios-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_array_results_unparsed/array_results-helios-x86_64-unknown-linux-gnu.ll index a17b454d..01e683a2 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_array_results_unparsed/array_results-helios-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_array_results_unparsed/array_results-helios-x86_64-unknown-linux-gnu.ll @@ -162,7 +162,7 @@ panic.i1806: ; preds = %loop_body321.prehea %45 = getelementptr inbounds nuw i64, ptr %8, i64 %"476_0.sroa.15.01905" %46 = load i64, ptr %45, align 4 %47 = add i64 %"476_2.01904", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %46) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %46) tail call void @___qfree(i64 %46) %48 = icmp ult i64 %"476_2.01904", 10 br i1 %48, label %__barray_check_bounds.exit1801, label %out_of_bounds.i1800 @@ -172,7 +172,7 @@ cond_exit_480: ; preds = %__barray_check_boun %50 = xor i64 %33, %49 store i64 %50, ptr %3, align 4 %51 = getelementptr inbounds nuw i64, ptr %2, i64 %"476_2.01904" - store i64 %lazy_measure, ptr %51, align 4 + store i64 %___lazy_measure, ptr %51, align 4 %52 = icmp samesign ugt i64 %"476_0.sroa.15.01905", 8 br i1 %52, label %mask_block_ok.i, label %loop_body321.preheader diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_array_results_unparsed/array_results-helios-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_array_results_unparsed/array_results-helios-x86_64-windows-gnu.ll index 87efbb58..f8216411 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_array_results_unparsed/array_results-helios-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_array_results_unparsed/array_results-helios-x86_64-windows-gnu.ll @@ -162,7 +162,7 @@ panic.i1806: ; preds = %loop_body321.prehea %45 = getelementptr inbounds nuw i64, ptr %8, i64 %"476_0.sroa.15.01905" %46 = load i64, ptr %45, align 4 %47 = add i64 %"476_2.01904", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %46) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %46) tail call void @___qfree(i64 %46) %48 = icmp ult i64 %"476_2.01904", 10 br i1 %48, label %__barray_check_bounds.exit1801, label %out_of_bounds.i1800 @@ -172,7 +172,7 @@ cond_exit_480: ; preds = %__barray_check_boun %50 = xor i64 %33, %49 store i64 %50, ptr %3, align 4 %51 = getelementptr inbounds nuw i64, ptr %2, i64 %"476_2.01904" - store i64 %lazy_measure, ptr %51, align 4 + store i64 %___lazy_measure, ptr %51, align 4 %52 = icmp samesign ugt i64 %"476_0.sroa.15.01905", 8 br i1 %52, label %mask_block_ok.i, label %loop_body321.preheader diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_array_results_unparsed/array_results-sol-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_array_results_unparsed/array_results-sol-aarch64-apple-darwin.ll index 2c28463d..c50312f8 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_array_results_unparsed/array_results-sol-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_array_results_unparsed/array_results-sol-aarch64-apple-darwin.ll @@ -162,7 +162,7 @@ panic.i1806: ; preds = %loop_body321.prehea %45 = getelementptr inbounds nuw i64, ptr %8, i64 %"476_0.sroa.15.01905" %46 = load i64, ptr %45, align 4 %47 = add i64 %"476_2.01904", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %46) + %___future_measure = tail call i64 @___future_measure(i64 %46, i64 0) tail call void @___qfree(i64 %46) %48 = icmp ult i64 %"476_2.01904", 10 br i1 %48, label %__barray_check_bounds.exit1801, label %out_of_bounds.i1800 @@ -172,7 +172,7 @@ cond_exit_480: ; preds = %__barray_check_boun %50 = xor i64 %33, %49 store i64 %50, ptr %3, align 4 %51 = getelementptr inbounds nuw i64, ptr %2, i64 %"476_2.01904" - store i64 %lazy_measure, ptr %51, align 4 + store i64 %___future_measure, ptr %51, align 4 %52 = icmp samesign ugt i64 %"476_0.sroa.15.01905", 8 br i1 %52, label %mask_block_ok.i, label %loop_body321.preheader @@ -591,7 +591,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #1 declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_array_results_unparsed/array_results-sol-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_array_results_unparsed/array_results-sol-aarch64-unknown-linux-gnu.ll index 69ee588b..985ea00e 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_array_results_unparsed/array_results-sol-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_array_results_unparsed/array_results-sol-aarch64-unknown-linux-gnu.ll @@ -162,7 +162,7 @@ panic.i1806: ; preds = %loop_body321.prehea %45 = getelementptr inbounds nuw i64, ptr %8, i64 %"476_0.sroa.15.01905" %46 = load i64, ptr %45, align 4 %47 = add i64 %"476_2.01904", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %46) + %___future_measure = tail call i64 @___future_measure(i64 %46, i64 0) tail call void @___qfree(i64 %46) %48 = icmp ult i64 %"476_2.01904", 10 br i1 %48, label %__barray_check_bounds.exit1801, label %out_of_bounds.i1800 @@ -172,7 +172,7 @@ cond_exit_480: ; preds = %__barray_check_boun %50 = xor i64 %33, %49 store i64 %50, ptr %3, align 4 %51 = getelementptr inbounds nuw i64, ptr %2, i64 %"476_2.01904" - store i64 %lazy_measure, ptr %51, align 4 + store i64 %___future_measure, ptr %51, align 4 %52 = icmp samesign ugt i64 %"476_0.sroa.15.01905", 8 br i1 %52, label %mask_block_ok.i, label %loop_body321.preheader @@ -591,7 +591,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #1 declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_array_results_unparsed/array_results-sol-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_array_results_unparsed/array_results-sol-x86_64-apple-darwin.ll index e5610fd2..df03d990 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_array_results_unparsed/array_results-sol-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_array_results_unparsed/array_results-sol-x86_64-apple-darwin.ll @@ -162,7 +162,7 @@ panic.i1806: ; preds = %loop_body321.prehea %45 = getelementptr inbounds nuw i64, ptr %8, i64 %"476_0.sroa.15.01905" %46 = load i64, ptr %45, align 4 %47 = add i64 %"476_2.01904", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %46) + %___future_measure = tail call i64 @___future_measure(i64 %46, i64 0) tail call void @___qfree(i64 %46) %48 = icmp ult i64 %"476_2.01904", 10 br i1 %48, label %__barray_check_bounds.exit1801, label %out_of_bounds.i1800 @@ -172,7 +172,7 @@ cond_exit_480: ; preds = %__barray_check_boun %50 = xor i64 %33, %49 store i64 %50, ptr %3, align 4 %51 = getelementptr inbounds nuw i64, ptr %2, i64 %"476_2.01904" - store i64 %lazy_measure, ptr %51, align 4 + store i64 %___future_measure, ptr %51, align 4 %52 = icmp samesign ugt i64 %"476_0.sroa.15.01905", 8 br i1 %52, label %mask_block_ok.i, label %loop_body321.preheader @@ -606,7 +606,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #1 declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_array_results_unparsed/array_results-sol-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_array_results_unparsed/array_results-sol-x86_64-unknown-linux-gnu.ll index 5d7de4da..5a918305 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_array_results_unparsed/array_results-sol-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_array_results_unparsed/array_results-sol-x86_64-unknown-linux-gnu.ll @@ -162,7 +162,7 @@ panic.i1806: ; preds = %loop_body321.prehea %45 = getelementptr inbounds nuw i64, ptr %8, i64 %"476_0.sroa.15.01905" %46 = load i64, ptr %45, align 4 %47 = add i64 %"476_2.01904", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %46) + %___future_measure = tail call i64 @___future_measure(i64 %46, i64 0) tail call void @___qfree(i64 %46) %48 = icmp ult i64 %"476_2.01904", 10 br i1 %48, label %__barray_check_bounds.exit1801, label %out_of_bounds.i1800 @@ -172,7 +172,7 @@ cond_exit_480: ; preds = %__barray_check_boun %50 = xor i64 %33, %49 store i64 %50, ptr %3, align 4 %51 = getelementptr inbounds nuw i64, ptr %2, i64 %"476_2.01904" - store i64 %lazy_measure, ptr %51, align 4 + store i64 %___future_measure, ptr %51, align 4 %52 = icmp samesign ugt i64 %"476_0.sroa.15.01905", 8 br i1 %52, label %mask_block_ok.i, label %loop_body321.preheader @@ -606,7 +606,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #1 declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_array_results_unparsed/array_results-sol-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_array_results_unparsed/array_results-sol-x86_64-windows-gnu.ll index ef184177..0441934b 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_array_results_unparsed/array_results-sol-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_array_results_unparsed/array_results-sol-x86_64-windows-gnu.ll @@ -162,7 +162,7 @@ panic.i1806: ; preds = %loop_body321.prehea %45 = getelementptr inbounds nuw i64, ptr %8, i64 %"476_0.sroa.15.01905" %46 = load i64, ptr %45, align 4 %47 = add i64 %"476_2.01904", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %46) + %___future_measure = tail call i64 @___future_measure(i64 %46, i64 0) tail call void @___qfree(i64 %46) %48 = icmp ult i64 %"476_2.01904", 10 br i1 %48, label %__barray_check_bounds.exit1801, label %out_of_bounds.i1800 @@ -172,7 +172,7 @@ cond_exit_480: ; preds = %__barray_check_boun %50 = xor i64 %33, %49 store i64 %50, ptr %3, align 4 %51 = getelementptr inbounds nuw i64, ptr %2, i64 %"476_2.01904" - store i64 %lazy_measure, ptr %51, align 4 + store i64 %___future_measure, ptr %51, align 4 %52 = icmp samesign ugt i64 %"476_0.sroa.15.01905", 8 br i1 %52, label %mask_block_ok.i, label %loop_body321.preheader @@ -606,7 +606,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #1 declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_corrupted_plugin_unparsed/corrupted_plugin-helios-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_corrupted_plugin_unparsed/corrupted_plugin-helios-aarch64-apple-darwin.ll index 7844fc7d..d73bbf34 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_corrupted_plugin_unparsed/corrupted_plugin-helios-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_corrupted_plugin_unparsed/corrupted_plugin-helios-aarch64-apple-darwin.ll @@ -20,10 +20,10 @@ __hugr__.__tk2_helios_qalloc.9.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_corrupted_plugin_unparsed/corrupted_plugin-helios-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_corrupted_plugin_unparsed/corrupted_plugin-helios-aarch64-unknown-linux-gnu.ll index d8e65013..6c93f154 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_corrupted_plugin_unparsed/corrupted_plugin-helios-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_corrupted_plugin_unparsed/corrupted_plugin-helios-aarch64-unknown-linux-gnu.ll @@ -20,10 +20,10 @@ __hugr__.__tk2_helios_qalloc.9.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_corrupted_plugin_unparsed/corrupted_plugin-helios-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_corrupted_plugin_unparsed/corrupted_plugin-helios-x86_64-apple-darwin.ll index a1d32e84..40113e37 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_corrupted_plugin_unparsed/corrupted_plugin-helios-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_corrupted_plugin_unparsed/corrupted_plugin-helios-x86_64-apple-darwin.ll @@ -20,10 +20,10 @@ __hugr__.__tk2_helios_qalloc.9.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_corrupted_plugin_unparsed/corrupted_plugin-helios-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_corrupted_plugin_unparsed/corrupted_plugin-helios-x86_64-unknown-linux-gnu.ll index 503e50d9..f46cfd8f 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_corrupted_plugin_unparsed/corrupted_plugin-helios-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_corrupted_plugin_unparsed/corrupted_plugin-helios-x86_64-unknown-linux-gnu.ll @@ -20,10 +20,10 @@ __hugr__.__tk2_helios_qalloc.9.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_corrupted_plugin_unparsed/corrupted_plugin-helios-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_corrupted_plugin_unparsed/corrupted_plugin-helios-x86_64-windows-gnu.ll index 0040ad68..9238102e 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_corrupted_plugin_unparsed/corrupted_plugin-helios-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_corrupted_plugin_unparsed/corrupted_plugin-helios-x86_64-windows-gnu.ll @@ -20,10 +20,10 @@ __hugr__.__tk2_helios_qalloc.9.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_corrupted_plugin_unparsed/corrupted_plugin-sol-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_corrupted_plugin_unparsed/corrupted_plugin-sol-aarch64-apple-darwin.ll index 524c83da..b4208bb6 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_corrupted_plugin_unparsed/corrupted_plugin-sol-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_corrupted_plugin_unparsed/corrupted_plugin-sol-aarch64-apple-darwin.ll @@ -20,15 +20,15 @@ __hugr__.__tk2_sol_qalloc.9.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_corrupted_plugin_unparsed/corrupted_plugin-sol-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_corrupted_plugin_unparsed/corrupted_plugin-sol-aarch64-unknown-linux-gnu.ll index d9a1c67d..df89ca3b 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_corrupted_plugin_unparsed/corrupted_plugin-sol-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_corrupted_plugin_unparsed/corrupted_plugin-sol-aarch64-unknown-linux-gnu.ll @@ -20,15 +20,15 @@ __hugr__.__tk2_sol_qalloc.9.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_corrupted_plugin_unparsed/corrupted_plugin-sol-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_corrupted_plugin_unparsed/corrupted_plugin-sol-x86_64-apple-darwin.ll index ca57cada..a5f0fb3f 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_corrupted_plugin_unparsed/corrupted_plugin-sol-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_corrupted_plugin_unparsed/corrupted_plugin-sol-x86_64-apple-darwin.ll @@ -20,15 +20,15 @@ __hugr__.__tk2_sol_qalloc.9.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_corrupted_plugin_unparsed/corrupted_plugin-sol-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_corrupted_plugin_unparsed/corrupted_plugin-sol-x86_64-unknown-linux-gnu.ll index 0d7e519d..e271194c 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_corrupted_plugin_unparsed/corrupted_plugin-sol-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_corrupted_plugin_unparsed/corrupted_plugin-sol-x86_64-unknown-linux-gnu.ll @@ -20,15 +20,15 @@ __hugr__.__tk2_sol_qalloc.9.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_corrupted_plugin_unparsed/corrupted_plugin-sol-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_corrupted_plugin_unparsed/corrupted_plugin-sol-x86_64-windows-gnu.ll index 0dc9ebe7..17a7261b 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_corrupted_plugin_unparsed/corrupted_plugin-sol-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_corrupted_plugin_unparsed/corrupted_plugin-sol-x86_64-windows-gnu.ll @@ -20,15 +20,15 @@ __hugr__.__tk2_sol_qalloc.9.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_exit_unparsed/exit_unparsed-helios-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_exit_unparsed/exit_unparsed-helios-aarch64-apple-darwin.ll index 0bfeb1ef..5f6bfe1f 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_exit_unparsed/exit_unparsed-helios-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_exit_unparsed/exit_unparsed-helios-aarch64-apple-darwin.ll @@ -21,10 +21,10 @@ __hugr__.__tk2_helios_qalloc.34.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) br i1 %read_bool, label %1, label %0 0: ; preds = %__hugr__.__tk2_helios_qalloc.34.exit diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_exit_unparsed/exit_unparsed-helios-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_exit_unparsed/exit_unparsed-helios-aarch64-unknown-linux-gnu.ll index 883bf6a3..50949e86 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_exit_unparsed/exit_unparsed-helios-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_exit_unparsed/exit_unparsed-helios-aarch64-unknown-linux-gnu.ll @@ -21,10 +21,10 @@ __hugr__.__tk2_helios_qalloc.34.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) br i1 %read_bool, label %1, label %0 0: ; preds = %__hugr__.__tk2_helios_qalloc.34.exit diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_exit_unparsed/exit_unparsed-helios-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_exit_unparsed/exit_unparsed-helios-x86_64-apple-darwin.ll index 11673473..f70f9aa1 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_exit_unparsed/exit_unparsed-helios-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_exit_unparsed/exit_unparsed-helios-x86_64-apple-darwin.ll @@ -21,10 +21,10 @@ __hugr__.__tk2_helios_qalloc.34.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) br i1 %read_bool, label %1, label %0 0: ; preds = %__hugr__.__tk2_helios_qalloc.34.exit diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_exit_unparsed/exit_unparsed-helios-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_exit_unparsed/exit_unparsed-helios-x86_64-unknown-linux-gnu.ll index b4838677..d1233375 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_exit_unparsed/exit_unparsed-helios-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_exit_unparsed/exit_unparsed-helios-x86_64-unknown-linux-gnu.ll @@ -21,10 +21,10 @@ __hugr__.__tk2_helios_qalloc.34.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) br i1 %read_bool, label %1, label %0 0: ; preds = %__hugr__.__tk2_helios_qalloc.34.exit diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_exit_unparsed/exit_unparsed-helios-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_exit_unparsed/exit_unparsed-helios-x86_64-windows-gnu.ll index 68e712ff..15c808c8 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_exit_unparsed/exit_unparsed-helios-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_exit_unparsed/exit_unparsed-helios-x86_64-windows-gnu.ll @@ -21,10 +21,10 @@ __hugr__.__tk2_helios_qalloc.34.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) br i1 %read_bool, label %1, label %0 0: ; preds = %__hugr__.__tk2_helios_qalloc.34.exit diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_exit_unparsed/exit_unparsed-sol-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_exit_unparsed/exit_unparsed-sol-aarch64-apple-darwin.ll index 8be3d288..93e557c2 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_exit_unparsed/exit_unparsed-sol-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_exit_unparsed/exit_unparsed-sol-aarch64-apple-darwin.ll @@ -21,10 +21,10 @@ __hugr__.__tk2_sol_qalloc.34.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) br i1 %read_bool, label %1, label %0 0: ; preds = %__hugr__.__tk2_sol_qalloc.34.exit @@ -36,7 +36,7 @@ __hugr__.__tk2_sol_qalloc.34.exit: ; preds = %alloca_block unreachable } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_exit_unparsed/exit_unparsed-sol-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_exit_unparsed/exit_unparsed-sol-aarch64-unknown-linux-gnu.ll index 54bfdda0..a8c58003 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_exit_unparsed/exit_unparsed-sol-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_exit_unparsed/exit_unparsed-sol-aarch64-unknown-linux-gnu.ll @@ -21,10 +21,10 @@ __hugr__.__tk2_sol_qalloc.34.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) br i1 %read_bool, label %1, label %0 0: ; preds = %__hugr__.__tk2_sol_qalloc.34.exit @@ -36,7 +36,7 @@ __hugr__.__tk2_sol_qalloc.34.exit: ; preds = %alloca_block unreachable } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_exit_unparsed/exit_unparsed-sol-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_exit_unparsed/exit_unparsed-sol-x86_64-apple-darwin.ll index c40f1810..12283739 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_exit_unparsed/exit_unparsed-sol-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_exit_unparsed/exit_unparsed-sol-x86_64-apple-darwin.ll @@ -21,10 +21,10 @@ __hugr__.__tk2_sol_qalloc.34.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) br i1 %read_bool, label %1, label %0 0: ; preds = %__hugr__.__tk2_sol_qalloc.34.exit @@ -36,7 +36,7 @@ __hugr__.__tk2_sol_qalloc.34.exit: ; preds = %alloca_block unreachable } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_exit_unparsed/exit_unparsed-sol-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_exit_unparsed/exit_unparsed-sol-x86_64-unknown-linux-gnu.ll index 77600b40..cdf0dfce 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_exit_unparsed/exit_unparsed-sol-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_exit_unparsed/exit_unparsed-sol-x86_64-unknown-linux-gnu.ll @@ -21,10 +21,10 @@ __hugr__.__tk2_sol_qalloc.34.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) br i1 %read_bool, label %1, label %0 0: ; preds = %__hugr__.__tk2_sol_qalloc.34.exit @@ -36,7 +36,7 @@ __hugr__.__tk2_sol_qalloc.34.exit: ; preds = %alloca_block unreachable } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_exit_unparsed/exit_unparsed-sol-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_exit_unparsed/exit_unparsed-sol-x86_64-windows-gnu.ll index c4322251..2d881f16 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_exit_unparsed/exit_unparsed-sol-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_exit_unparsed/exit_unparsed-sol-x86_64-windows-gnu.ll @@ -21,10 +21,10 @@ __hugr__.__tk2_sol_qalloc.34.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) br i1 %read_bool, label %1, label %0 0: ; preds = %__hugr__.__tk2_sol_qalloc.34.exit @@ -36,7 +36,7 @@ __hugr__.__tk2_sol_qalloc.34.exit: ; preds = %alloca_block unreachable } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_multishot_unparsed/unparsed_flip_n4-helios-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_multishot_unparsed/unparsed_flip_n4-helios-aarch64-apple-darwin.ll index 12fdf49b..c1691be7 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_multishot_unparsed/unparsed_flip_n4-helios-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_multishot_unparsed/unparsed_flip_n4-helios-aarch64-apple-darwin.ll @@ -53,26 +53,26 @@ cond_27_case_0.i42: ; preds = %__hugr__.__tk2_heli __hugr__.__tk2_helios_qalloc.23.exit43: ; preds = %__hugr__.__tk2_helios_qalloc.23.exit39 tail call void @___reset(i64 %qalloc.i40) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i40, double 0x400921FB54442D18, double 0.000000e+00) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) - %lazy_measure9 = tail call i64 @___lazy_measure(i64 %qalloc.i32) + %___lazy_measure9 = tail call i64 @___lazy_measure(i64 %qalloc.i32) tail call void @___qfree(i64 %qalloc.i32) - %read_bool11 = tail call i1 @___read_future_bool(i64 %lazy_measure9) - tail call void @___dec_future_refcount(i64 %lazy_measure9) + %read_bool11 = tail call i1 @___read_future_bool(i64 %___lazy_measure9) + tail call void @___dec_future_refcount(i64 %___lazy_measure9) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool11) - %lazy_measure17 = tail call i64 @___lazy_measure(i64 %qalloc.i36) + %___lazy_measure17 = tail call i64 @___lazy_measure(i64 %qalloc.i36) tail call void @___qfree(i64 %qalloc.i36) - %read_bool19 = tail call i1 @___read_future_bool(i64 %lazy_measure17) - tail call void @___dec_future_refcount(i64 %lazy_measure17) + %read_bool19 = tail call i1 @___read_future_bool(i64 %___lazy_measure17) + tail call void @___dec_future_refcount(i64 %___lazy_measure17) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool19) - %lazy_measure25 = tail call i64 @___lazy_measure(i64 %qalloc.i40) + %___lazy_measure25 = tail call i64 @___lazy_measure(i64 %qalloc.i40) tail call void @___qfree(i64 %qalloc.i40) - %read_bool27 = tail call i1 @___read_future_bool(i64 %lazy_measure25) - tail call void @___dec_future_refcount(i64 %lazy_measure25) + %read_bool27 = tail call i1 @___read_future_bool(i64 %___lazy_measure25) + tail call void @___dec_future_refcount(i64 %___lazy_measure25) tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool27) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_multishot_unparsed/unparsed_flip_n4-helios-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_multishot_unparsed/unparsed_flip_n4-helios-aarch64-unknown-linux-gnu.ll index 783cf528..fea9c0d4 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_multishot_unparsed/unparsed_flip_n4-helios-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_multishot_unparsed/unparsed_flip_n4-helios-aarch64-unknown-linux-gnu.ll @@ -53,26 +53,26 @@ cond_27_case_0.i42: ; preds = %__hugr__.__tk2_heli __hugr__.__tk2_helios_qalloc.23.exit43: ; preds = %__hugr__.__tk2_helios_qalloc.23.exit39 tail call void @___reset(i64 %qalloc.i40) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i40, double 0x400921FB54442D18, double 0.000000e+00) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) - %lazy_measure9 = tail call i64 @___lazy_measure(i64 %qalloc.i32) + %___lazy_measure9 = tail call i64 @___lazy_measure(i64 %qalloc.i32) tail call void @___qfree(i64 %qalloc.i32) - %read_bool11 = tail call i1 @___read_future_bool(i64 %lazy_measure9) - tail call void @___dec_future_refcount(i64 %lazy_measure9) + %read_bool11 = tail call i1 @___read_future_bool(i64 %___lazy_measure9) + tail call void @___dec_future_refcount(i64 %___lazy_measure9) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool11) - %lazy_measure17 = tail call i64 @___lazy_measure(i64 %qalloc.i36) + %___lazy_measure17 = tail call i64 @___lazy_measure(i64 %qalloc.i36) tail call void @___qfree(i64 %qalloc.i36) - %read_bool19 = tail call i1 @___read_future_bool(i64 %lazy_measure17) - tail call void @___dec_future_refcount(i64 %lazy_measure17) + %read_bool19 = tail call i1 @___read_future_bool(i64 %___lazy_measure17) + tail call void @___dec_future_refcount(i64 %___lazy_measure17) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool19) - %lazy_measure25 = tail call i64 @___lazy_measure(i64 %qalloc.i40) + %___lazy_measure25 = tail call i64 @___lazy_measure(i64 %qalloc.i40) tail call void @___qfree(i64 %qalloc.i40) - %read_bool27 = tail call i1 @___read_future_bool(i64 %lazy_measure25) - tail call void @___dec_future_refcount(i64 %lazy_measure25) + %read_bool27 = tail call i1 @___read_future_bool(i64 %___lazy_measure25) + tail call void @___dec_future_refcount(i64 %___lazy_measure25) tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool27) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_multishot_unparsed/unparsed_flip_n4-helios-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_multishot_unparsed/unparsed_flip_n4-helios-x86_64-apple-darwin.ll index c6291e99..4aa29a2e 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_multishot_unparsed/unparsed_flip_n4-helios-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_multishot_unparsed/unparsed_flip_n4-helios-x86_64-apple-darwin.ll @@ -53,26 +53,26 @@ cond_27_case_0.i42: ; preds = %__hugr__.__tk2_heli __hugr__.__tk2_helios_qalloc.23.exit43: ; preds = %__hugr__.__tk2_helios_qalloc.23.exit39 tail call void @___reset(i64 %qalloc.i40) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i40, double 0x400921FB54442D18, double 0.000000e+00) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) - %lazy_measure9 = tail call i64 @___lazy_measure(i64 %qalloc.i32) + %___lazy_measure9 = tail call i64 @___lazy_measure(i64 %qalloc.i32) tail call void @___qfree(i64 %qalloc.i32) - %read_bool11 = tail call i1 @___read_future_bool(i64 %lazy_measure9) - tail call void @___dec_future_refcount(i64 %lazy_measure9) + %read_bool11 = tail call i1 @___read_future_bool(i64 %___lazy_measure9) + tail call void @___dec_future_refcount(i64 %___lazy_measure9) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool11) - %lazy_measure17 = tail call i64 @___lazy_measure(i64 %qalloc.i36) + %___lazy_measure17 = tail call i64 @___lazy_measure(i64 %qalloc.i36) tail call void @___qfree(i64 %qalloc.i36) - %read_bool19 = tail call i1 @___read_future_bool(i64 %lazy_measure17) - tail call void @___dec_future_refcount(i64 %lazy_measure17) + %read_bool19 = tail call i1 @___read_future_bool(i64 %___lazy_measure17) + tail call void @___dec_future_refcount(i64 %___lazy_measure17) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool19) - %lazy_measure25 = tail call i64 @___lazy_measure(i64 %qalloc.i40) + %___lazy_measure25 = tail call i64 @___lazy_measure(i64 %qalloc.i40) tail call void @___qfree(i64 %qalloc.i40) - %read_bool27 = tail call i1 @___read_future_bool(i64 %lazy_measure25) - tail call void @___dec_future_refcount(i64 %lazy_measure25) + %read_bool27 = tail call i1 @___read_future_bool(i64 %___lazy_measure25) + tail call void @___dec_future_refcount(i64 %___lazy_measure25) tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool27) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_multishot_unparsed/unparsed_flip_n4-helios-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_multishot_unparsed/unparsed_flip_n4-helios-x86_64-unknown-linux-gnu.ll index 104ba9e6..58abf985 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_multishot_unparsed/unparsed_flip_n4-helios-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_multishot_unparsed/unparsed_flip_n4-helios-x86_64-unknown-linux-gnu.ll @@ -53,26 +53,26 @@ cond_27_case_0.i42: ; preds = %__hugr__.__tk2_heli __hugr__.__tk2_helios_qalloc.23.exit43: ; preds = %__hugr__.__tk2_helios_qalloc.23.exit39 tail call void @___reset(i64 %qalloc.i40) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i40, double 0x400921FB54442D18, double 0.000000e+00) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) - %lazy_measure9 = tail call i64 @___lazy_measure(i64 %qalloc.i32) + %___lazy_measure9 = tail call i64 @___lazy_measure(i64 %qalloc.i32) tail call void @___qfree(i64 %qalloc.i32) - %read_bool11 = tail call i1 @___read_future_bool(i64 %lazy_measure9) - tail call void @___dec_future_refcount(i64 %lazy_measure9) + %read_bool11 = tail call i1 @___read_future_bool(i64 %___lazy_measure9) + tail call void @___dec_future_refcount(i64 %___lazy_measure9) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool11) - %lazy_measure17 = tail call i64 @___lazy_measure(i64 %qalloc.i36) + %___lazy_measure17 = tail call i64 @___lazy_measure(i64 %qalloc.i36) tail call void @___qfree(i64 %qalloc.i36) - %read_bool19 = tail call i1 @___read_future_bool(i64 %lazy_measure17) - tail call void @___dec_future_refcount(i64 %lazy_measure17) + %read_bool19 = tail call i1 @___read_future_bool(i64 %___lazy_measure17) + tail call void @___dec_future_refcount(i64 %___lazy_measure17) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool19) - %lazy_measure25 = tail call i64 @___lazy_measure(i64 %qalloc.i40) + %___lazy_measure25 = tail call i64 @___lazy_measure(i64 %qalloc.i40) tail call void @___qfree(i64 %qalloc.i40) - %read_bool27 = tail call i1 @___read_future_bool(i64 %lazy_measure25) - tail call void @___dec_future_refcount(i64 %lazy_measure25) + %read_bool27 = tail call i1 @___read_future_bool(i64 %___lazy_measure25) + tail call void @___dec_future_refcount(i64 %___lazy_measure25) tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool27) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_multishot_unparsed/unparsed_flip_n4-helios-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_multishot_unparsed/unparsed_flip_n4-helios-x86_64-windows-gnu.ll index a6abcf96..c09af8a3 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_multishot_unparsed/unparsed_flip_n4-helios-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_multishot_unparsed/unparsed_flip_n4-helios-x86_64-windows-gnu.ll @@ -53,26 +53,26 @@ cond_27_case_0.i42: ; preds = %__hugr__.__tk2_heli __hugr__.__tk2_helios_qalloc.23.exit43: ; preds = %__hugr__.__tk2_helios_qalloc.23.exit39 tail call void @___reset(i64 %qalloc.i40) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i40, double 0x400921FB54442D18, double 0.000000e+00) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) - %lazy_measure9 = tail call i64 @___lazy_measure(i64 %qalloc.i32) + %___lazy_measure9 = tail call i64 @___lazy_measure(i64 %qalloc.i32) tail call void @___qfree(i64 %qalloc.i32) - %read_bool11 = tail call i1 @___read_future_bool(i64 %lazy_measure9) - tail call void @___dec_future_refcount(i64 %lazy_measure9) + %read_bool11 = tail call i1 @___read_future_bool(i64 %___lazy_measure9) + tail call void @___dec_future_refcount(i64 %___lazy_measure9) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool11) - %lazy_measure17 = tail call i64 @___lazy_measure(i64 %qalloc.i36) + %___lazy_measure17 = tail call i64 @___lazy_measure(i64 %qalloc.i36) tail call void @___qfree(i64 %qalloc.i36) - %read_bool19 = tail call i1 @___read_future_bool(i64 %lazy_measure17) - tail call void @___dec_future_refcount(i64 %lazy_measure17) + %read_bool19 = tail call i1 @___read_future_bool(i64 %___lazy_measure17) + tail call void @___dec_future_refcount(i64 %___lazy_measure17) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool19) - %lazy_measure25 = tail call i64 @___lazy_measure(i64 %qalloc.i40) + %___lazy_measure25 = tail call i64 @___lazy_measure(i64 %qalloc.i40) tail call void @___qfree(i64 %qalloc.i40) - %read_bool27 = tail call i1 @___read_future_bool(i64 %lazy_measure25) - tail call void @___dec_future_refcount(i64 %lazy_measure25) + %read_bool27 = tail call i1 @___read_future_bool(i64 %___lazy_measure25) + tail call void @___dec_future_refcount(i64 %___lazy_measure25) tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool27) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_multishot_unparsed/unparsed_flip_n4-sol-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_multishot_unparsed/unparsed_flip_n4-sol-aarch64-apple-darwin.ll index 2829f836..4acfab66 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_multishot_unparsed/unparsed_flip_n4-sol-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_multishot_unparsed/unparsed_flip_n4-sol-aarch64-apple-darwin.ll @@ -53,31 +53,31 @@ cond_27_case_0.i42: ; preds = %__hugr__.__tk2_sol_ __hugr__.__tk2_sol_qalloc.23.exit43: ; preds = %__hugr__.__tk2_sol_qalloc.23.exit39 tail call void @___reset(i64 %qalloc.i40) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i40, double 0x400921FB54442D18, double 0.000000e+00) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) - %lazy_measure9 = tail call i64 @___lazy_measure(i64 %qalloc.i32) + %___future_measure9 = tail call i64 @___future_measure(i64 %qalloc.i32, i64 0) tail call void @___qfree(i64 %qalloc.i32) - %read_bool11 = tail call i1 @___read_future_bool(i64 %lazy_measure9) - tail call void @___dec_future_refcount(i64 %lazy_measure9) + %read_bool11 = tail call i1 @___read_future_bool(i64 %___future_measure9) + tail call void @___dec_future_refcount(i64 %___future_measure9) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool11) - %lazy_measure17 = tail call i64 @___lazy_measure(i64 %qalloc.i36) + %___future_measure17 = tail call i64 @___future_measure(i64 %qalloc.i36, i64 0) tail call void @___qfree(i64 %qalloc.i36) - %read_bool19 = tail call i1 @___read_future_bool(i64 %lazy_measure17) - tail call void @___dec_future_refcount(i64 %lazy_measure17) + %read_bool19 = tail call i1 @___read_future_bool(i64 %___future_measure17) + tail call void @___dec_future_refcount(i64 %___future_measure17) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool19) - %lazy_measure25 = tail call i64 @___lazy_measure(i64 %qalloc.i40) + %___future_measure25 = tail call i64 @___future_measure(i64 %qalloc.i40, i64 0) tail call void @___qfree(i64 %qalloc.i40) - %read_bool27 = tail call i1 @___read_future_bool(i64 %lazy_measure25) - tail call void @___dec_future_refcount(i64 %lazy_measure25) + %read_bool27 = tail call i1 @___read_future_bool(i64 %___future_measure25) + tail call void @___dec_future_refcount(i64 %___future_measure25) tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool27) ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_multishot_unparsed/unparsed_flip_n4-sol-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_multishot_unparsed/unparsed_flip_n4-sol-aarch64-unknown-linux-gnu.ll index e378ea13..cac103a4 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_multishot_unparsed/unparsed_flip_n4-sol-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_multishot_unparsed/unparsed_flip_n4-sol-aarch64-unknown-linux-gnu.ll @@ -53,31 +53,31 @@ cond_27_case_0.i42: ; preds = %__hugr__.__tk2_sol_ __hugr__.__tk2_sol_qalloc.23.exit43: ; preds = %__hugr__.__tk2_sol_qalloc.23.exit39 tail call void @___reset(i64 %qalloc.i40) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i40, double 0x400921FB54442D18, double 0.000000e+00) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) - %lazy_measure9 = tail call i64 @___lazy_measure(i64 %qalloc.i32) + %___future_measure9 = tail call i64 @___future_measure(i64 %qalloc.i32, i64 0) tail call void @___qfree(i64 %qalloc.i32) - %read_bool11 = tail call i1 @___read_future_bool(i64 %lazy_measure9) - tail call void @___dec_future_refcount(i64 %lazy_measure9) + %read_bool11 = tail call i1 @___read_future_bool(i64 %___future_measure9) + tail call void @___dec_future_refcount(i64 %___future_measure9) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool11) - %lazy_measure17 = tail call i64 @___lazy_measure(i64 %qalloc.i36) + %___future_measure17 = tail call i64 @___future_measure(i64 %qalloc.i36, i64 0) tail call void @___qfree(i64 %qalloc.i36) - %read_bool19 = tail call i1 @___read_future_bool(i64 %lazy_measure17) - tail call void @___dec_future_refcount(i64 %lazy_measure17) + %read_bool19 = tail call i1 @___read_future_bool(i64 %___future_measure17) + tail call void @___dec_future_refcount(i64 %___future_measure17) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool19) - %lazy_measure25 = tail call i64 @___lazy_measure(i64 %qalloc.i40) + %___future_measure25 = tail call i64 @___future_measure(i64 %qalloc.i40, i64 0) tail call void @___qfree(i64 %qalloc.i40) - %read_bool27 = tail call i1 @___read_future_bool(i64 %lazy_measure25) - tail call void @___dec_future_refcount(i64 %lazy_measure25) + %read_bool27 = tail call i1 @___read_future_bool(i64 %___future_measure25) + tail call void @___dec_future_refcount(i64 %___future_measure25) tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool27) ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_multishot_unparsed/unparsed_flip_n4-sol-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_multishot_unparsed/unparsed_flip_n4-sol-x86_64-apple-darwin.ll index f8d9de48..1b458ca2 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_multishot_unparsed/unparsed_flip_n4-sol-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_multishot_unparsed/unparsed_flip_n4-sol-x86_64-apple-darwin.ll @@ -53,31 +53,31 @@ cond_27_case_0.i42: ; preds = %__hugr__.__tk2_sol_ __hugr__.__tk2_sol_qalloc.23.exit43: ; preds = %__hugr__.__tk2_sol_qalloc.23.exit39 tail call void @___reset(i64 %qalloc.i40) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i40, double 0x400921FB54442D18, double 0.000000e+00) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) - %lazy_measure9 = tail call i64 @___lazy_measure(i64 %qalloc.i32) + %___future_measure9 = tail call i64 @___future_measure(i64 %qalloc.i32, i64 0) tail call void @___qfree(i64 %qalloc.i32) - %read_bool11 = tail call i1 @___read_future_bool(i64 %lazy_measure9) - tail call void @___dec_future_refcount(i64 %lazy_measure9) + %read_bool11 = tail call i1 @___read_future_bool(i64 %___future_measure9) + tail call void @___dec_future_refcount(i64 %___future_measure9) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool11) - %lazy_measure17 = tail call i64 @___lazy_measure(i64 %qalloc.i36) + %___future_measure17 = tail call i64 @___future_measure(i64 %qalloc.i36, i64 0) tail call void @___qfree(i64 %qalloc.i36) - %read_bool19 = tail call i1 @___read_future_bool(i64 %lazy_measure17) - tail call void @___dec_future_refcount(i64 %lazy_measure17) + %read_bool19 = tail call i1 @___read_future_bool(i64 %___future_measure17) + tail call void @___dec_future_refcount(i64 %___future_measure17) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool19) - %lazy_measure25 = tail call i64 @___lazy_measure(i64 %qalloc.i40) + %___future_measure25 = tail call i64 @___future_measure(i64 %qalloc.i40, i64 0) tail call void @___qfree(i64 %qalloc.i40) - %read_bool27 = tail call i1 @___read_future_bool(i64 %lazy_measure25) - tail call void @___dec_future_refcount(i64 %lazy_measure25) + %read_bool27 = tail call i1 @___read_future_bool(i64 %___future_measure25) + tail call void @___dec_future_refcount(i64 %___future_measure25) tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool27) ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_multishot_unparsed/unparsed_flip_n4-sol-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_multishot_unparsed/unparsed_flip_n4-sol-x86_64-unknown-linux-gnu.ll index adbd8598..987e9fc7 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_multishot_unparsed/unparsed_flip_n4-sol-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_multishot_unparsed/unparsed_flip_n4-sol-x86_64-unknown-linux-gnu.ll @@ -53,31 +53,31 @@ cond_27_case_0.i42: ; preds = %__hugr__.__tk2_sol_ __hugr__.__tk2_sol_qalloc.23.exit43: ; preds = %__hugr__.__tk2_sol_qalloc.23.exit39 tail call void @___reset(i64 %qalloc.i40) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i40, double 0x400921FB54442D18, double 0.000000e+00) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) - %lazy_measure9 = tail call i64 @___lazy_measure(i64 %qalloc.i32) + %___future_measure9 = tail call i64 @___future_measure(i64 %qalloc.i32, i64 0) tail call void @___qfree(i64 %qalloc.i32) - %read_bool11 = tail call i1 @___read_future_bool(i64 %lazy_measure9) - tail call void @___dec_future_refcount(i64 %lazy_measure9) + %read_bool11 = tail call i1 @___read_future_bool(i64 %___future_measure9) + tail call void @___dec_future_refcount(i64 %___future_measure9) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool11) - %lazy_measure17 = tail call i64 @___lazy_measure(i64 %qalloc.i36) + %___future_measure17 = tail call i64 @___future_measure(i64 %qalloc.i36, i64 0) tail call void @___qfree(i64 %qalloc.i36) - %read_bool19 = tail call i1 @___read_future_bool(i64 %lazy_measure17) - tail call void @___dec_future_refcount(i64 %lazy_measure17) + %read_bool19 = tail call i1 @___read_future_bool(i64 %___future_measure17) + tail call void @___dec_future_refcount(i64 %___future_measure17) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool19) - %lazy_measure25 = tail call i64 @___lazy_measure(i64 %qalloc.i40) + %___future_measure25 = tail call i64 @___future_measure(i64 %qalloc.i40, i64 0) tail call void @___qfree(i64 %qalloc.i40) - %read_bool27 = tail call i1 @___read_future_bool(i64 %lazy_measure25) - tail call void @___dec_future_refcount(i64 %lazy_measure25) + %read_bool27 = tail call i1 @___read_future_bool(i64 %___future_measure25) + tail call void @___dec_future_refcount(i64 %___future_measure25) tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool27) ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_multishot_unparsed/unparsed_flip_n4-sol-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_multishot_unparsed/unparsed_flip_n4-sol-x86_64-windows-gnu.ll index c99060f8..4b3b05f2 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_multishot_unparsed/unparsed_flip_n4-sol-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_multishot_unparsed/unparsed_flip_n4-sol-x86_64-windows-gnu.ll @@ -53,31 +53,31 @@ cond_27_case_0.i42: ; preds = %__hugr__.__tk2_sol_ __hugr__.__tk2_sol_qalloc.23.exit43: ; preds = %__hugr__.__tk2_sol_qalloc.23.exit39 tail call void @___reset(i64 %qalloc.i40) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i40, double 0x400921FB54442D18, double 0.000000e+00) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) - %lazy_measure9 = tail call i64 @___lazy_measure(i64 %qalloc.i32) + %___future_measure9 = tail call i64 @___future_measure(i64 %qalloc.i32, i64 0) tail call void @___qfree(i64 %qalloc.i32) - %read_bool11 = tail call i1 @___read_future_bool(i64 %lazy_measure9) - tail call void @___dec_future_refcount(i64 %lazy_measure9) + %read_bool11 = tail call i1 @___read_future_bool(i64 %___future_measure9) + tail call void @___dec_future_refcount(i64 %___future_measure9) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool11) - %lazy_measure17 = tail call i64 @___lazy_measure(i64 %qalloc.i36) + %___future_measure17 = tail call i64 @___future_measure(i64 %qalloc.i36, i64 0) tail call void @___qfree(i64 %qalloc.i36) - %read_bool19 = tail call i1 @___read_future_bool(i64 %lazy_measure17) - tail call void @___dec_future_refcount(i64 %lazy_measure17) + %read_bool19 = tail call i1 @___read_future_bool(i64 %___future_measure17) + tail call void @___dec_future_refcount(i64 %___future_measure17) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool19) - %lazy_measure25 = tail call i64 @___lazy_measure(i64 %qalloc.i40) + %___future_measure25 = tail call i64 @___future_measure(i64 %qalloc.i40, i64 0) tail call void @___qfree(i64 %qalloc.i40) - %read_bool27 = tail call i1 @___read_future_bool(i64 %lazy_measure25) - tail call void @___dec_future_refcount(i64 %lazy_measure25) + %read_bool27 = tail call i1 @___read_future_bool(i64 %___future_measure25) + tail call void @___dec_future_refcount(i64 %___future_measure25) tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool27) ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_unparsed/unparsed_flip_n4-helios-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_unparsed/unparsed_flip_n4-helios-aarch64-apple-darwin.ll index 12fdf49b..c1691be7 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_unparsed/unparsed_flip_n4-helios-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_unparsed/unparsed_flip_n4-helios-aarch64-apple-darwin.ll @@ -53,26 +53,26 @@ cond_27_case_0.i42: ; preds = %__hugr__.__tk2_heli __hugr__.__tk2_helios_qalloc.23.exit43: ; preds = %__hugr__.__tk2_helios_qalloc.23.exit39 tail call void @___reset(i64 %qalloc.i40) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i40, double 0x400921FB54442D18, double 0.000000e+00) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) - %lazy_measure9 = tail call i64 @___lazy_measure(i64 %qalloc.i32) + %___lazy_measure9 = tail call i64 @___lazy_measure(i64 %qalloc.i32) tail call void @___qfree(i64 %qalloc.i32) - %read_bool11 = tail call i1 @___read_future_bool(i64 %lazy_measure9) - tail call void @___dec_future_refcount(i64 %lazy_measure9) + %read_bool11 = tail call i1 @___read_future_bool(i64 %___lazy_measure9) + tail call void @___dec_future_refcount(i64 %___lazy_measure9) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool11) - %lazy_measure17 = tail call i64 @___lazy_measure(i64 %qalloc.i36) + %___lazy_measure17 = tail call i64 @___lazy_measure(i64 %qalloc.i36) tail call void @___qfree(i64 %qalloc.i36) - %read_bool19 = tail call i1 @___read_future_bool(i64 %lazy_measure17) - tail call void @___dec_future_refcount(i64 %lazy_measure17) + %read_bool19 = tail call i1 @___read_future_bool(i64 %___lazy_measure17) + tail call void @___dec_future_refcount(i64 %___lazy_measure17) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool19) - %lazy_measure25 = tail call i64 @___lazy_measure(i64 %qalloc.i40) + %___lazy_measure25 = tail call i64 @___lazy_measure(i64 %qalloc.i40) tail call void @___qfree(i64 %qalloc.i40) - %read_bool27 = tail call i1 @___read_future_bool(i64 %lazy_measure25) - tail call void @___dec_future_refcount(i64 %lazy_measure25) + %read_bool27 = tail call i1 @___read_future_bool(i64 %___lazy_measure25) + tail call void @___dec_future_refcount(i64 %___lazy_measure25) tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool27) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_unparsed/unparsed_flip_n4-helios-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_unparsed/unparsed_flip_n4-helios-aarch64-unknown-linux-gnu.ll index 783cf528..fea9c0d4 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_unparsed/unparsed_flip_n4-helios-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_unparsed/unparsed_flip_n4-helios-aarch64-unknown-linux-gnu.ll @@ -53,26 +53,26 @@ cond_27_case_0.i42: ; preds = %__hugr__.__tk2_heli __hugr__.__tk2_helios_qalloc.23.exit43: ; preds = %__hugr__.__tk2_helios_qalloc.23.exit39 tail call void @___reset(i64 %qalloc.i40) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i40, double 0x400921FB54442D18, double 0.000000e+00) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) - %lazy_measure9 = tail call i64 @___lazy_measure(i64 %qalloc.i32) + %___lazy_measure9 = tail call i64 @___lazy_measure(i64 %qalloc.i32) tail call void @___qfree(i64 %qalloc.i32) - %read_bool11 = tail call i1 @___read_future_bool(i64 %lazy_measure9) - tail call void @___dec_future_refcount(i64 %lazy_measure9) + %read_bool11 = tail call i1 @___read_future_bool(i64 %___lazy_measure9) + tail call void @___dec_future_refcount(i64 %___lazy_measure9) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool11) - %lazy_measure17 = tail call i64 @___lazy_measure(i64 %qalloc.i36) + %___lazy_measure17 = tail call i64 @___lazy_measure(i64 %qalloc.i36) tail call void @___qfree(i64 %qalloc.i36) - %read_bool19 = tail call i1 @___read_future_bool(i64 %lazy_measure17) - tail call void @___dec_future_refcount(i64 %lazy_measure17) + %read_bool19 = tail call i1 @___read_future_bool(i64 %___lazy_measure17) + tail call void @___dec_future_refcount(i64 %___lazy_measure17) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool19) - %lazy_measure25 = tail call i64 @___lazy_measure(i64 %qalloc.i40) + %___lazy_measure25 = tail call i64 @___lazy_measure(i64 %qalloc.i40) tail call void @___qfree(i64 %qalloc.i40) - %read_bool27 = tail call i1 @___read_future_bool(i64 %lazy_measure25) - tail call void @___dec_future_refcount(i64 %lazy_measure25) + %read_bool27 = tail call i1 @___read_future_bool(i64 %___lazy_measure25) + tail call void @___dec_future_refcount(i64 %___lazy_measure25) tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool27) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_unparsed/unparsed_flip_n4-helios-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_unparsed/unparsed_flip_n4-helios-x86_64-apple-darwin.ll index c6291e99..4aa29a2e 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_unparsed/unparsed_flip_n4-helios-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_unparsed/unparsed_flip_n4-helios-x86_64-apple-darwin.ll @@ -53,26 +53,26 @@ cond_27_case_0.i42: ; preds = %__hugr__.__tk2_heli __hugr__.__tk2_helios_qalloc.23.exit43: ; preds = %__hugr__.__tk2_helios_qalloc.23.exit39 tail call void @___reset(i64 %qalloc.i40) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i40, double 0x400921FB54442D18, double 0.000000e+00) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) - %lazy_measure9 = tail call i64 @___lazy_measure(i64 %qalloc.i32) + %___lazy_measure9 = tail call i64 @___lazy_measure(i64 %qalloc.i32) tail call void @___qfree(i64 %qalloc.i32) - %read_bool11 = tail call i1 @___read_future_bool(i64 %lazy_measure9) - tail call void @___dec_future_refcount(i64 %lazy_measure9) + %read_bool11 = tail call i1 @___read_future_bool(i64 %___lazy_measure9) + tail call void @___dec_future_refcount(i64 %___lazy_measure9) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool11) - %lazy_measure17 = tail call i64 @___lazy_measure(i64 %qalloc.i36) + %___lazy_measure17 = tail call i64 @___lazy_measure(i64 %qalloc.i36) tail call void @___qfree(i64 %qalloc.i36) - %read_bool19 = tail call i1 @___read_future_bool(i64 %lazy_measure17) - tail call void @___dec_future_refcount(i64 %lazy_measure17) + %read_bool19 = tail call i1 @___read_future_bool(i64 %___lazy_measure17) + tail call void @___dec_future_refcount(i64 %___lazy_measure17) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool19) - %lazy_measure25 = tail call i64 @___lazy_measure(i64 %qalloc.i40) + %___lazy_measure25 = tail call i64 @___lazy_measure(i64 %qalloc.i40) tail call void @___qfree(i64 %qalloc.i40) - %read_bool27 = tail call i1 @___read_future_bool(i64 %lazy_measure25) - tail call void @___dec_future_refcount(i64 %lazy_measure25) + %read_bool27 = tail call i1 @___read_future_bool(i64 %___lazy_measure25) + tail call void @___dec_future_refcount(i64 %___lazy_measure25) tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool27) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_unparsed/unparsed_flip_n4-helios-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_unparsed/unparsed_flip_n4-helios-x86_64-unknown-linux-gnu.ll index 104ba9e6..58abf985 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_unparsed/unparsed_flip_n4-helios-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_unparsed/unparsed_flip_n4-helios-x86_64-unknown-linux-gnu.ll @@ -53,26 +53,26 @@ cond_27_case_0.i42: ; preds = %__hugr__.__tk2_heli __hugr__.__tk2_helios_qalloc.23.exit43: ; preds = %__hugr__.__tk2_helios_qalloc.23.exit39 tail call void @___reset(i64 %qalloc.i40) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i40, double 0x400921FB54442D18, double 0.000000e+00) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) - %lazy_measure9 = tail call i64 @___lazy_measure(i64 %qalloc.i32) + %___lazy_measure9 = tail call i64 @___lazy_measure(i64 %qalloc.i32) tail call void @___qfree(i64 %qalloc.i32) - %read_bool11 = tail call i1 @___read_future_bool(i64 %lazy_measure9) - tail call void @___dec_future_refcount(i64 %lazy_measure9) + %read_bool11 = tail call i1 @___read_future_bool(i64 %___lazy_measure9) + tail call void @___dec_future_refcount(i64 %___lazy_measure9) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool11) - %lazy_measure17 = tail call i64 @___lazy_measure(i64 %qalloc.i36) + %___lazy_measure17 = tail call i64 @___lazy_measure(i64 %qalloc.i36) tail call void @___qfree(i64 %qalloc.i36) - %read_bool19 = tail call i1 @___read_future_bool(i64 %lazy_measure17) - tail call void @___dec_future_refcount(i64 %lazy_measure17) + %read_bool19 = tail call i1 @___read_future_bool(i64 %___lazy_measure17) + tail call void @___dec_future_refcount(i64 %___lazy_measure17) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool19) - %lazy_measure25 = tail call i64 @___lazy_measure(i64 %qalloc.i40) + %___lazy_measure25 = tail call i64 @___lazy_measure(i64 %qalloc.i40) tail call void @___qfree(i64 %qalloc.i40) - %read_bool27 = tail call i1 @___read_future_bool(i64 %lazy_measure25) - tail call void @___dec_future_refcount(i64 %lazy_measure25) + %read_bool27 = tail call i1 @___read_future_bool(i64 %___lazy_measure25) + tail call void @___dec_future_refcount(i64 %___lazy_measure25) tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool27) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_unparsed/unparsed_flip_n4-helios-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_unparsed/unparsed_flip_n4-helios-x86_64-windows-gnu.ll index a6abcf96..c09af8a3 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_unparsed/unparsed_flip_n4-helios-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_unparsed/unparsed_flip_n4-helios-x86_64-windows-gnu.ll @@ -53,26 +53,26 @@ cond_27_case_0.i42: ; preds = %__hugr__.__tk2_heli __hugr__.__tk2_helios_qalloc.23.exit43: ; preds = %__hugr__.__tk2_helios_qalloc.23.exit39 tail call void @___reset(i64 %qalloc.i40) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i40, double 0x400921FB54442D18, double 0.000000e+00) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) - %lazy_measure9 = tail call i64 @___lazy_measure(i64 %qalloc.i32) + %___lazy_measure9 = tail call i64 @___lazy_measure(i64 %qalloc.i32) tail call void @___qfree(i64 %qalloc.i32) - %read_bool11 = tail call i1 @___read_future_bool(i64 %lazy_measure9) - tail call void @___dec_future_refcount(i64 %lazy_measure9) + %read_bool11 = tail call i1 @___read_future_bool(i64 %___lazy_measure9) + tail call void @___dec_future_refcount(i64 %___lazy_measure9) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool11) - %lazy_measure17 = tail call i64 @___lazy_measure(i64 %qalloc.i36) + %___lazy_measure17 = tail call i64 @___lazy_measure(i64 %qalloc.i36) tail call void @___qfree(i64 %qalloc.i36) - %read_bool19 = tail call i1 @___read_future_bool(i64 %lazy_measure17) - tail call void @___dec_future_refcount(i64 %lazy_measure17) + %read_bool19 = tail call i1 @___read_future_bool(i64 %___lazy_measure17) + tail call void @___dec_future_refcount(i64 %___lazy_measure17) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool19) - %lazy_measure25 = tail call i64 @___lazy_measure(i64 %qalloc.i40) + %___lazy_measure25 = tail call i64 @___lazy_measure(i64 %qalloc.i40) tail call void @___qfree(i64 %qalloc.i40) - %read_bool27 = tail call i1 @___read_future_bool(i64 %lazy_measure25) - tail call void @___dec_future_refcount(i64 %lazy_measure25) + %read_bool27 = tail call i1 @___read_future_bool(i64 %___lazy_measure25) + tail call void @___dec_future_refcount(i64 %___lazy_measure25) tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool27) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_unparsed/unparsed_flip_n4-sol-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_unparsed/unparsed_flip_n4-sol-aarch64-apple-darwin.ll index 2829f836..4acfab66 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_unparsed/unparsed_flip_n4-sol-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_unparsed/unparsed_flip_n4-sol-aarch64-apple-darwin.ll @@ -53,31 +53,31 @@ cond_27_case_0.i42: ; preds = %__hugr__.__tk2_sol_ __hugr__.__tk2_sol_qalloc.23.exit43: ; preds = %__hugr__.__tk2_sol_qalloc.23.exit39 tail call void @___reset(i64 %qalloc.i40) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i40, double 0x400921FB54442D18, double 0.000000e+00) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) - %lazy_measure9 = tail call i64 @___lazy_measure(i64 %qalloc.i32) + %___future_measure9 = tail call i64 @___future_measure(i64 %qalloc.i32, i64 0) tail call void @___qfree(i64 %qalloc.i32) - %read_bool11 = tail call i1 @___read_future_bool(i64 %lazy_measure9) - tail call void @___dec_future_refcount(i64 %lazy_measure9) + %read_bool11 = tail call i1 @___read_future_bool(i64 %___future_measure9) + tail call void @___dec_future_refcount(i64 %___future_measure9) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool11) - %lazy_measure17 = tail call i64 @___lazy_measure(i64 %qalloc.i36) + %___future_measure17 = tail call i64 @___future_measure(i64 %qalloc.i36, i64 0) tail call void @___qfree(i64 %qalloc.i36) - %read_bool19 = tail call i1 @___read_future_bool(i64 %lazy_measure17) - tail call void @___dec_future_refcount(i64 %lazy_measure17) + %read_bool19 = tail call i1 @___read_future_bool(i64 %___future_measure17) + tail call void @___dec_future_refcount(i64 %___future_measure17) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool19) - %lazy_measure25 = tail call i64 @___lazy_measure(i64 %qalloc.i40) + %___future_measure25 = tail call i64 @___future_measure(i64 %qalloc.i40, i64 0) tail call void @___qfree(i64 %qalloc.i40) - %read_bool27 = tail call i1 @___read_future_bool(i64 %lazy_measure25) - tail call void @___dec_future_refcount(i64 %lazy_measure25) + %read_bool27 = tail call i1 @___read_future_bool(i64 %___future_measure25) + tail call void @___dec_future_refcount(i64 %___future_measure25) tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool27) ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_unparsed/unparsed_flip_n4-sol-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_unparsed/unparsed_flip_n4-sol-aarch64-unknown-linux-gnu.ll index e378ea13..cac103a4 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_unparsed/unparsed_flip_n4-sol-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_unparsed/unparsed_flip_n4-sol-aarch64-unknown-linux-gnu.ll @@ -53,31 +53,31 @@ cond_27_case_0.i42: ; preds = %__hugr__.__tk2_sol_ __hugr__.__tk2_sol_qalloc.23.exit43: ; preds = %__hugr__.__tk2_sol_qalloc.23.exit39 tail call void @___reset(i64 %qalloc.i40) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i40, double 0x400921FB54442D18, double 0.000000e+00) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) - %lazy_measure9 = tail call i64 @___lazy_measure(i64 %qalloc.i32) + %___future_measure9 = tail call i64 @___future_measure(i64 %qalloc.i32, i64 0) tail call void @___qfree(i64 %qalloc.i32) - %read_bool11 = tail call i1 @___read_future_bool(i64 %lazy_measure9) - tail call void @___dec_future_refcount(i64 %lazy_measure9) + %read_bool11 = tail call i1 @___read_future_bool(i64 %___future_measure9) + tail call void @___dec_future_refcount(i64 %___future_measure9) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool11) - %lazy_measure17 = tail call i64 @___lazy_measure(i64 %qalloc.i36) + %___future_measure17 = tail call i64 @___future_measure(i64 %qalloc.i36, i64 0) tail call void @___qfree(i64 %qalloc.i36) - %read_bool19 = tail call i1 @___read_future_bool(i64 %lazy_measure17) - tail call void @___dec_future_refcount(i64 %lazy_measure17) + %read_bool19 = tail call i1 @___read_future_bool(i64 %___future_measure17) + tail call void @___dec_future_refcount(i64 %___future_measure17) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool19) - %lazy_measure25 = tail call i64 @___lazy_measure(i64 %qalloc.i40) + %___future_measure25 = tail call i64 @___future_measure(i64 %qalloc.i40, i64 0) tail call void @___qfree(i64 %qalloc.i40) - %read_bool27 = tail call i1 @___read_future_bool(i64 %lazy_measure25) - tail call void @___dec_future_refcount(i64 %lazy_measure25) + %read_bool27 = tail call i1 @___read_future_bool(i64 %___future_measure25) + tail call void @___dec_future_refcount(i64 %___future_measure25) tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool27) ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_unparsed/unparsed_flip_n4-sol-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_unparsed/unparsed_flip_n4-sol-x86_64-apple-darwin.ll index f8d9de48..1b458ca2 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_unparsed/unparsed_flip_n4-sol-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_unparsed/unparsed_flip_n4-sol-x86_64-apple-darwin.ll @@ -53,31 +53,31 @@ cond_27_case_0.i42: ; preds = %__hugr__.__tk2_sol_ __hugr__.__tk2_sol_qalloc.23.exit43: ; preds = %__hugr__.__tk2_sol_qalloc.23.exit39 tail call void @___reset(i64 %qalloc.i40) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i40, double 0x400921FB54442D18, double 0.000000e+00) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) - %lazy_measure9 = tail call i64 @___lazy_measure(i64 %qalloc.i32) + %___future_measure9 = tail call i64 @___future_measure(i64 %qalloc.i32, i64 0) tail call void @___qfree(i64 %qalloc.i32) - %read_bool11 = tail call i1 @___read_future_bool(i64 %lazy_measure9) - tail call void @___dec_future_refcount(i64 %lazy_measure9) + %read_bool11 = tail call i1 @___read_future_bool(i64 %___future_measure9) + tail call void @___dec_future_refcount(i64 %___future_measure9) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool11) - %lazy_measure17 = tail call i64 @___lazy_measure(i64 %qalloc.i36) + %___future_measure17 = tail call i64 @___future_measure(i64 %qalloc.i36, i64 0) tail call void @___qfree(i64 %qalloc.i36) - %read_bool19 = tail call i1 @___read_future_bool(i64 %lazy_measure17) - tail call void @___dec_future_refcount(i64 %lazy_measure17) + %read_bool19 = tail call i1 @___read_future_bool(i64 %___future_measure17) + tail call void @___dec_future_refcount(i64 %___future_measure17) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool19) - %lazy_measure25 = tail call i64 @___lazy_measure(i64 %qalloc.i40) + %___future_measure25 = tail call i64 @___future_measure(i64 %qalloc.i40, i64 0) tail call void @___qfree(i64 %qalloc.i40) - %read_bool27 = tail call i1 @___read_future_bool(i64 %lazy_measure25) - tail call void @___dec_future_refcount(i64 %lazy_measure25) + %read_bool27 = tail call i1 @___read_future_bool(i64 %___future_measure25) + tail call void @___dec_future_refcount(i64 %___future_measure25) tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool27) ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_unparsed/unparsed_flip_n4-sol-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_unparsed/unparsed_flip_n4-sol-x86_64-unknown-linux-gnu.ll index adbd8598..987e9fc7 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_unparsed/unparsed_flip_n4-sol-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_unparsed/unparsed_flip_n4-sol-x86_64-unknown-linux-gnu.ll @@ -53,31 +53,31 @@ cond_27_case_0.i42: ; preds = %__hugr__.__tk2_sol_ __hugr__.__tk2_sol_qalloc.23.exit43: ; preds = %__hugr__.__tk2_sol_qalloc.23.exit39 tail call void @___reset(i64 %qalloc.i40) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i40, double 0x400921FB54442D18, double 0.000000e+00) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) - %lazy_measure9 = tail call i64 @___lazy_measure(i64 %qalloc.i32) + %___future_measure9 = tail call i64 @___future_measure(i64 %qalloc.i32, i64 0) tail call void @___qfree(i64 %qalloc.i32) - %read_bool11 = tail call i1 @___read_future_bool(i64 %lazy_measure9) - tail call void @___dec_future_refcount(i64 %lazy_measure9) + %read_bool11 = tail call i1 @___read_future_bool(i64 %___future_measure9) + tail call void @___dec_future_refcount(i64 %___future_measure9) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool11) - %lazy_measure17 = tail call i64 @___lazy_measure(i64 %qalloc.i36) + %___future_measure17 = tail call i64 @___future_measure(i64 %qalloc.i36, i64 0) tail call void @___qfree(i64 %qalloc.i36) - %read_bool19 = tail call i1 @___read_future_bool(i64 %lazy_measure17) - tail call void @___dec_future_refcount(i64 %lazy_measure17) + %read_bool19 = tail call i1 @___read_future_bool(i64 %___future_measure17) + tail call void @___dec_future_refcount(i64 %___future_measure17) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool19) - %lazy_measure25 = tail call i64 @___lazy_measure(i64 %qalloc.i40) + %___future_measure25 = tail call i64 @___future_measure(i64 %qalloc.i40, i64 0) tail call void @___qfree(i64 %qalloc.i40) - %read_bool27 = tail call i1 @___read_future_bool(i64 %lazy_measure25) - tail call void @___dec_future_refcount(i64 %lazy_measure25) + %read_bool27 = tail call i1 @___read_future_bool(i64 %___future_measure25) + tail call void @___dec_future_refcount(i64 %___future_measure25) tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool27) ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_unparsed/unparsed_flip_n4-sol-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_unparsed/unparsed_flip_n4-sol-x86_64-windows-gnu.ll index c99060f8..4b3b05f2 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_unparsed/unparsed_flip_n4-sol-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_unparsed/unparsed_flip_n4-sol-x86_64-windows-gnu.ll @@ -53,31 +53,31 @@ cond_27_case_0.i42: ; preds = %__hugr__.__tk2_sol_ __hugr__.__tk2_sol_qalloc.23.exit43: ; preds = %__hugr__.__tk2_sol_qalloc.23.exit39 tail call void @___reset(i64 %qalloc.i40) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i40, double 0x400921FB54442D18, double 0.000000e+00) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) - %lazy_measure9 = tail call i64 @___lazy_measure(i64 %qalloc.i32) + %___future_measure9 = tail call i64 @___future_measure(i64 %qalloc.i32, i64 0) tail call void @___qfree(i64 %qalloc.i32) - %read_bool11 = tail call i1 @___read_future_bool(i64 %lazy_measure9) - tail call void @___dec_future_refcount(i64 %lazy_measure9) + %read_bool11 = tail call i1 @___read_future_bool(i64 %___future_measure9) + tail call void @___dec_future_refcount(i64 %___future_measure9) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool11) - %lazy_measure17 = tail call i64 @___lazy_measure(i64 %qalloc.i36) + %___future_measure17 = tail call i64 @___future_measure(i64 %qalloc.i36, i64 0) tail call void @___qfree(i64 %qalloc.i36) - %read_bool19 = tail call i1 @___read_future_bool(i64 %lazy_measure17) - tail call void @___dec_future_refcount(i64 %lazy_measure17) + %read_bool19 = tail call i1 @___read_future_bool(i64 %___future_measure17) + tail call void @___dec_future_refcount(i64 %___future_measure17) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool19) - %lazy_measure25 = tail call i64 @___lazy_measure(i64 %qalloc.i40) + %___future_measure25 = tail call i64 @___future_measure(i64 %qalloc.i40, i64 0) tail call void @___qfree(i64 %qalloc.i40) - %read_bool27 = tail call i1 @___read_future_bool(i64 %lazy_measure25) - tail call void @___dec_future_refcount(i64 %lazy_measure25) + %read_bool27 = tail call i1 @___read_future_bool(i64 %___future_measure25) + tail call void @___dec_future_refcount(i64 %___future_measure25) tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool27) ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_with_metrics_unparsed/unparsed_flip_n4-helios-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_with_metrics_unparsed/unparsed_flip_n4-helios-aarch64-apple-darwin.ll index 12fdf49b..c1691be7 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_with_metrics_unparsed/unparsed_flip_n4-helios-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_with_metrics_unparsed/unparsed_flip_n4-helios-aarch64-apple-darwin.ll @@ -53,26 +53,26 @@ cond_27_case_0.i42: ; preds = %__hugr__.__tk2_heli __hugr__.__tk2_helios_qalloc.23.exit43: ; preds = %__hugr__.__tk2_helios_qalloc.23.exit39 tail call void @___reset(i64 %qalloc.i40) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i40, double 0x400921FB54442D18, double 0.000000e+00) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) - %lazy_measure9 = tail call i64 @___lazy_measure(i64 %qalloc.i32) + %___lazy_measure9 = tail call i64 @___lazy_measure(i64 %qalloc.i32) tail call void @___qfree(i64 %qalloc.i32) - %read_bool11 = tail call i1 @___read_future_bool(i64 %lazy_measure9) - tail call void @___dec_future_refcount(i64 %lazy_measure9) + %read_bool11 = tail call i1 @___read_future_bool(i64 %___lazy_measure9) + tail call void @___dec_future_refcount(i64 %___lazy_measure9) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool11) - %lazy_measure17 = tail call i64 @___lazy_measure(i64 %qalloc.i36) + %___lazy_measure17 = tail call i64 @___lazy_measure(i64 %qalloc.i36) tail call void @___qfree(i64 %qalloc.i36) - %read_bool19 = tail call i1 @___read_future_bool(i64 %lazy_measure17) - tail call void @___dec_future_refcount(i64 %lazy_measure17) + %read_bool19 = tail call i1 @___read_future_bool(i64 %___lazy_measure17) + tail call void @___dec_future_refcount(i64 %___lazy_measure17) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool19) - %lazy_measure25 = tail call i64 @___lazy_measure(i64 %qalloc.i40) + %___lazy_measure25 = tail call i64 @___lazy_measure(i64 %qalloc.i40) tail call void @___qfree(i64 %qalloc.i40) - %read_bool27 = tail call i1 @___read_future_bool(i64 %lazy_measure25) - tail call void @___dec_future_refcount(i64 %lazy_measure25) + %read_bool27 = tail call i1 @___read_future_bool(i64 %___lazy_measure25) + tail call void @___dec_future_refcount(i64 %___lazy_measure25) tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool27) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_with_metrics_unparsed/unparsed_flip_n4-helios-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_with_metrics_unparsed/unparsed_flip_n4-helios-aarch64-unknown-linux-gnu.ll index 783cf528..fea9c0d4 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_with_metrics_unparsed/unparsed_flip_n4-helios-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_with_metrics_unparsed/unparsed_flip_n4-helios-aarch64-unknown-linux-gnu.ll @@ -53,26 +53,26 @@ cond_27_case_0.i42: ; preds = %__hugr__.__tk2_heli __hugr__.__tk2_helios_qalloc.23.exit43: ; preds = %__hugr__.__tk2_helios_qalloc.23.exit39 tail call void @___reset(i64 %qalloc.i40) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i40, double 0x400921FB54442D18, double 0.000000e+00) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) - %lazy_measure9 = tail call i64 @___lazy_measure(i64 %qalloc.i32) + %___lazy_measure9 = tail call i64 @___lazy_measure(i64 %qalloc.i32) tail call void @___qfree(i64 %qalloc.i32) - %read_bool11 = tail call i1 @___read_future_bool(i64 %lazy_measure9) - tail call void @___dec_future_refcount(i64 %lazy_measure9) + %read_bool11 = tail call i1 @___read_future_bool(i64 %___lazy_measure9) + tail call void @___dec_future_refcount(i64 %___lazy_measure9) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool11) - %lazy_measure17 = tail call i64 @___lazy_measure(i64 %qalloc.i36) + %___lazy_measure17 = tail call i64 @___lazy_measure(i64 %qalloc.i36) tail call void @___qfree(i64 %qalloc.i36) - %read_bool19 = tail call i1 @___read_future_bool(i64 %lazy_measure17) - tail call void @___dec_future_refcount(i64 %lazy_measure17) + %read_bool19 = tail call i1 @___read_future_bool(i64 %___lazy_measure17) + tail call void @___dec_future_refcount(i64 %___lazy_measure17) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool19) - %lazy_measure25 = tail call i64 @___lazy_measure(i64 %qalloc.i40) + %___lazy_measure25 = tail call i64 @___lazy_measure(i64 %qalloc.i40) tail call void @___qfree(i64 %qalloc.i40) - %read_bool27 = tail call i1 @___read_future_bool(i64 %lazy_measure25) - tail call void @___dec_future_refcount(i64 %lazy_measure25) + %read_bool27 = tail call i1 @___read_future_bool(i64 %___lazy_measure25) + tail call void @___dec_future_refcount(i64 %___lazy_measure25) tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool27) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_with_metrics_unparsed/unparsed_flip_n4-helios-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_with_metrics_unparsed/unparsed_flip_n4-helios-x86_64-apple-darwin.ll index c6291e99..4aa29a2e 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_with_metrics_unparsed/unparsed_flip_n4-helios-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_with_metrics_unparsed/unparsed_flip_n4-helios-x86_64-apple-darwin.ll @@ -53,26 +53,26 @@ cond_27_case_0.i42: ; preds = %__hugr__.__tk2_heli __hugr__.__tk2_helios_qalloc.23.exit43: ; preds = %__hugr__.__tk2_helios_qalloc.23.exit39 tail call void @___reset(i64 %qalloc.i40) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i40, double 0x400921FB54442D18, double 0.000000e+00) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) - %lazy_measure9 = tail call i64 @___lazy_measure(i64 %qalloc.i32) + %___lazy_measure9 = tail call i64 @___lazy_measure(i64 %qalloc.i32) tail call void @___qfree(i64 %qalloc.i32) - %read_bool11 = tail call i1 @___read_future_bool(i64 %lazy_measure9) - tail call void @___dec_future_refcount(i64 %lazy_measure9) + %read_bool11 = tail call i1 @___read_future_bool(i64 %___lazy_measure9) + tail call void @___dec_future_refcount(i64 %___lazy_measure9) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool11) - %lazy_measure17 = tail call i64 @___lazy_measure(i64 %qalloc.i36) + %___lazy_measure17 = tail call i64 @___lazy_measure(i64 %qalloc.i36) tail call void @___qfree(i64 %qalloc.i36) - %read_bool19 = tail call i1 @___read_future_bool(i64 %lazy_measure17) - tail call void @___dec_future_refcount(i64 %lazy_measure17) + %read_bool19 = tail call i1 @___read_future_bool(i64 %___lazy_measure17) + tail call void @___dec_future_refcount(i64 %___lazy_measure17) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool19) - %lazy_measure25 = tail call i64 @___lazy_measure(i64 %qalloc.i40) + %___lazy_measure25 = tail call i64 @___lazy_measure(i64 %qalloc.i40) tail call void @___qfree(i64 %qalloc.i40) - %read_bool27 = tail call i1 @___read_future_bool(i64 %lazy_measure25) - tail call void @___dec_future_refcount(i64 %lazy_measure25) + %read_bool27 = tail call i1 @___read_future_bool(i64 %___lazy_measure25) + tail call void @___dec_future_refcount(i64 %___lazy_measure25) tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool27) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_with_metrics_unparsed/unparsed_flip_n4-helios-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_with_metrics_unparsed/unparsed_flip_n4-helios-x86_64-unknown-linux-gnu.ll index 104ba9e6..58abf985 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_with_metrics_unparsed/unparsed_flip_n4-helios-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_with_metrics_unparsed/unparsed_flip_n4-helios-x86_64-unknown-linux-gnu.ll @@ -53,26 +53,26 @@ cond_27_case_0.i42: ; preds = %__hugr__.__tk2_heli __hugr__.__tk2_helios_qalloc.23.exit43: ; preds = %__hugr__.__tk2_helios_qalloc.23.exit39 tail call void @___reset(i64 %qalloc.i40) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i40, double 0x400921FB54442D18, double 0.000000e+00) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) - %lazy_measure9 = tail call i64 @___lazy_measure(i64 %qalloc.i32) + %___lazy_measure9 = tail call i64 @___lazy_measure(i64 %qalloc.i32) tail call void @___qfree(i64 %qalloc.i32) - %read_bool11 = tail call i1 @___read_future_bool(i64 %lazy_measure9) - tail call void @___dec_future_refcount(i64 %lazy_measure9) + %read_bool11 = tail call i1 @___read_future_bool(i64 %___lazy_measure9) + tail call void @___dec_future_refcount(i64 %___lazy_measure9) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool11) - %lazy_measure17 = tail call i64 @___lazy_measure(i64 %qalloc.i36) + %___lazy_measure17 = tail call i64 @___lazy_measure(i64 %qalloc.i36) tail call void @___qfree(i64 %qalloc.i36) - %read_bool19 = tail call i1 @___read_future_bool(i64 %lazy_measure17) - tail call void @___dec_future_refcount(i64 %lazy_measure17) + %read_bool19 = tail call i1 @___read_future_bool(i64 %___lazy_measure17) + tail call void @___dec_future_refcount(i64 %___lazy_measure17) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool19) - %lazy_measure25 = tail call i64 @___lazy_measure(i64 %qalloc.i40) + %___lazy_measure25 = tail call i64 @___lazy_measure(i64 %qalloc.i40) tail call void @___qfree(i64 %qalloc.i40) - %read_bool27 = tail call i1 @___read_future_bool(i64 %lazy_measure25) - tail call void @___dec_future_refcount(i64 %lazy_measure25) + %read_bool27 = tail call i1 @___read_future_bool(i64 %___lazy_measure25) + tail call void @___dec_future_refcount(i64 %___lazy_measure25) tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool27) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_with_metrics_unparsed/unparsed_flip_n4-helios-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_with_metrics_unparsed/unparsed_flip_n4-helios-x86_64-windows-gnu.ll index a6abcf96..c09af8a3 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_with_metrics_unparsed/unparsed_flip_n4-helios-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_with_metrics_unparsed/unparsed_flip_n4-helios-x86_64-windows-gnu.ll @@ -53,26 +53,26 @@ cond_27_case_0.i42: ; preds = %__hugr__.__tk2_heli __hugr__.__tk2_helios_qalloc.23.exit43: ; preds = %__hugr__.__tk2_helios_qalloc.23.exit39 tail call void @___reset(i64 %qalloc.i40) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i40, double 0x400921FB54442D18, double 0.000000e+00) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) - %lazy_measure9 = tail call i64 @___lazy_measure(i64 %qalloc.i32) + %___lazy_measure9 = tail call i64 @___lazy_measure(i64 %qalloc.i32) tail call void @___qfree(i64 %qalloc.i32) - %read_bool11 = tail call i1 @___read_future_bool(i64 %lazy_measure9) - tail call void @___dec_future_refcount(i64 %lazy_measure9) + %read_bool11 = tail call i1 @___read_future_bool(i64 %___lazy_measure9) + tail call void @___dec_future_refcount(i64 %___lazy_measure9) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool11) - %lazy_measure17 = tail call i64 @___lazy_measure(i64 %qalloc.i36) + %___lazy_measure17 = tail call i64 @___lazy_measure(i64 %qalloc.i36) tail call void @___qfree(i64 %qalloc.i36) - %read_bool19 = tail call i1 @___read_future_bool(i64 %lazy_measure17) - tail call void @___dec_future_refcount(i64 %lazy_measure17) + %read_bool19 = tail call i1 @___read_future_bool(i64 %___lazy_measure17) + tail call void @___dec_future_refcount(i64 %___lazy_measure17) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool19) - %lazy_measure25 = tail call i64 @___lazy_measure(i64 %qalloc.i40) + %___lazy_measure25 = tail call i64 @___lazy_measure(i64 %qalloc.i40) tail call void @___qfree(i64 %qalloc.i40) - %read_bool27 = tail call i1 @___read_future_bool(i64 %lazy_measure25) - tail call void @___dec_future_refcount(i64 %lazy_measure25) + %read_bool27 = tail call i1 @___read_future_bool(i64 %___lazy_measure25) + tail call void @___dec_future_refcount(i64 %___lazy_measure25) tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool27) ret void } diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_with_metrics_unparsed/unparsed_flip_n4-sol-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_with_metrics_unparsed/unparsed_flip_n4-sol-aarch64-apple-darwin.ll index 2829f836..4acfab66 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_with_metrics_unparsed/unparsed_flip_n4-sol-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_with_metrics_unparsed/unparsed_flip_n4-sol-aarch64-apple-darwin.ll @@ -53,31 +53,31 @@ cond_27_case_0.i42: ; preds = %__hugr__.__tk2_sol_ __hugr__.__tk2_sol_qalloc.23.exit43: ; preds = %__hugr__.__tk2_sol_qalloc.23.exit39 tail call void @___reset(i64 %qalloc.i40) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i40, double 0x400921FB54442D18, double 0.000000e+00) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) - %lazy_measure9 = tail call i64 @___lazy_measure(i64 %qalloc.i32) + %___future_measure9 = tail call i64 @___future_measure(i64 %qalloc.i32, i64 0) tail call void @___qfree(i64 %qalloc.i32) - %read_bool11 = tail call i1 @___read_future_bool(i64 %lazy_measure9) - tail call void @___dec_future_refcount(i64 %lazy_measure9) + %read_bool11 = tail call i1 @___read_future_bool(i64 %___future_measure9) + tail call void @___dec_future_refcount(i64 %___future_measure9) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool11) - %lazy_measure17 = tail call i64 @___lazy_measure(i64 %qalloc.i36) + %___future_measure17 = tail call i64 @___future_measure(i64 %qalloc.i36, i64 0) tail call void @___qfree(i64 %qalloc.i36) - %read_bool19 = tail call i1 @___read_future_bool(i64 %lazy_measure17) - tail call void @___dec_future_refcount(i64 %lazy_measure17) + %read_bool19 = tail call i1 @___read_future_bool(i64 %___future_measure17) + tail call void @___dec_future_refcount(i64 %___future_measure17) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool19) - %lazy_measure25 = tail call i64 @___lazy_measure(i64 %qalloc.i40) + %___future_measure25 = tail call i64 @___future_measure(i64 %qalloc.i40, i64 0) tail call void @___qfree(i64 %qalloc.i40) - %read_bool27 = tail call i1 @___read_future_bool(i64 %lazy_measure25) - tail call void @___dec_future_refcount(i64 %lazy_measure25) + %read_bool27 = tail call i1 @___read_future_bool(i64 %___future_measure25) + tail call void @___dec_future_refcount(i64 %___future_measure25) tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool27) ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_with_metrics_unparsed/unparsed_flip_n4-sol-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_with_metrics_unparsed/unparsed_flip_n4-sol-aarch64-unknown-linux-gnu.ll index e378ea13..cac103a4 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_with_metrics_unparsed/unparsed_flip_n4-sol-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_with_metrics_unparsed/unparsed_flip_n4-sol-aarch64-unknown-linux-gnu.ll @@ -53,31 +53,31 @@ cond_27_case_0.i42: ; preds = %__hugr__.__tk2_sol_ __hugr__.__tk2_sol_qalloc.23.exit43: ; preds = %__hugr__.__tk2_sol_qalloc.23.exit39 tail call void @___reset(i64 %qalloc.i40) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i40, double 0x400921FB54442D18, double 0.000000e+00) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) - %lazy_measure9 = tail call i64 @___lazy_measure(i64 %qalloc.i32) + %___future_measure9 = tail call i64 @___future_measure(i64 %qalloc.i32, i64 0) tail call void @___qfree(i64 %qalloc.i32) - %read_bool11 = tail call i1 @___read_future_bool(i64 %lazy_measure9) - tail call void @___dec_future_refcount(i64 %lazy_measure9) + %read_bool11 = tail call i1 @___read_future_bool(i64 %___future_measure9) + tail call void @___dec_future_refcount(i64 %___future_measure9) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool11) - %lazy_measure17 = tail call i64 @___lazy_measure(i64 %qalloc.i36) + %___future_measure17 = tail call i64 @___future_measure(i64 %qalloc.i36, i64 0) tail call void @___qfree(i64 %qalloc.i36) - %read_bool19 = tail call i1 @___read_future_bool(i64 %lazy_measure17) - tail call void @___dec_future_refcount(i64 %lazy_measure17) + %read_bool19 = tail call i1 @___read_future_bool(i64 %___future_measure17) + tail call void @___dec_future_refcount(i64 %___future_measure17) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool19) - %lazy_measure25 = tail call i64 @___lazy_measure(i64 %qalloc.i40) + %___future_measure25 = tail call i64 @___future_measure(i64 %qalloc.i40, i64 0) tail call void @___qfree(i64 %qalloc.i40) - %read_bool27 = tail call i1 @___read_future_bool(i64 %lazy_measure25) - tail call void @___dec_future_refcount(i64 %lazy_measure25) + %read_bool27 = tail call i1 @___read_future_bool(i64 %___future_measure25) + tail call void @___dec_future_refcount(i64 %___future_measure25) tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool27) ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_with_metrics_unparsed/unparsed_flip_n4-sol-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_with_metrics_unparsed/unparsed_flip_n4-sol-x86_64-apple-darwin.ll index f8d9de48..1b458ca2 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_with_metrics_unparsed/unparsed_flip_n4-sol-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_with_metrics_unparsed/unparsed_flip_n4-sol-x86_64-apple-darwin.ll @@ -53,31 +53,31 @@ cond_27_case_0.i42: ; preds = %__hugr__.__tk2_sol_ __hugr__.__tk2_sol_qalloc.23.exit43: ; preds = %__hugr__.__tk2_sol_qalloc.23.exit39 tail call void @___reset(i64 %qalloc.i40) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i40, double 0x400921FB54442D18, double 0.000000e+00) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) - %lazy_measure9 = tail call i64 @___lazy_measure(i64 %qalloc.i32) + %___future_measure9 = tail call i64 @___future_measure(i64 %qalloc.i32, i64 0) tail call void @___qfree(i64 %qalloc.i32) - %read_bool11 = tail call i1 @___read_future_bool(i64 %lazy_measure9) - tail call void @___dec_future_refcount(i64 %lazy_measure9) + %read_bool11 = tail call i1 @___read_future_bool(i64 %___future_measure9) + tail call void @___dec_future_refcount(i64 %___future_measure9) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool11) - %lazy_measure17 = tail call i64 @___lazy_measure(i64 %qalloc.i36) + %___future_measure17 = tail call i64 @___future_measure(i64 %qalloc.i36, i64 0) tail call void @___qfree(i64 %qalloc.i36) - %read_bool19 = tail call i1 @___read_future_bool(i64 %lazy_measure17) - tail call void @___dec_future_refcount(i64 %lazy_measure17) + %read_bool19 = tail call i1 @___read_future_bool(i64 %___future_measure17) + tail call void @___dec_future_refcount(i64 %___future_measure17) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool19) - %lazy_measure25 = tail call i64 @___lazy_measure(i64 %qalloc.i40) + %___future_measure25 = tail call i64 @___future_measure(i64 %qalloc.i40, i64 0) tail call void @___qfree(i64 %qalloc.i40) - %read_bool27 = tail call i1 @___read_future_bool(i64 %lazy_measure25) - tail call void @___dec_future_refcount(i64 %lazy_measure25) + %read_bool27 = tail call i1 @___read_future_bool(i64 %___future_measure25) + tail call void @___dec_future_refcount(i64 %___future_measure25) tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool27) ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_with_metrics_unparsed/unparsed_flip_n4-sol-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_with_metrics_unparsed/unparsed_flip_n4-sol-x86_64-unknown-linux-gnu.ll index adbd8598..987e9fc7 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_with_metrics_unparsed/unparsed_flip_n4-sol-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_with_metrics_unparsed/unparsed_flip_n4-sol-x86_64-unknown-linux-gnu.ll @@ -53,31 +53,31 @@ cond_27_case_0.i42: ; preds = %__hugr__.__tk2_sol_ __hugr__.__tk2_sol_qalloc.23.exit43: ; preds = %__hugr__.__tk2_sol_qalloc.23.exit39 tail call void @___reset(i64 %qalloc.i40) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i40, double 0x400921FB54442D18, double 0.000000e+00) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) - %lazy_measure9 = tail call i64 @___lazy_measure(i64 %qalloc.i32) + %___future_measure9 = tail call i64 @___future_measure(i64 %qalloc.i32, i64 0) tail call void @___qfree(i64 %qalloc.i32) - %read_bool11 = tail call i1 @___read_future_bool(i64 %lazy_measure9) - tail call void @___dec_future_refcount(i64 %lazy_measure9) + %read_bool11 = tail call i1 @___read_future_bool(i64 %___future_measure9) + tail call void @___dec_future_refcount(i64 %___future_measure9) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool11) - %lazy_measure17 = tail call i64 @___lazy_measure(i64 %qalloc.i36) + %___future_measure17 = tail call i64 @___future_measure(i64 %qalloc.i36, i64 0) tail call void @___qfree(i64 %qalloc.i36) - %read_bool19 = tail call i1 @___read_future_bool(i64 %lazy_measure17) - tail call void @___dec_future_refcount(i64 %lazy_measure17) + %read_bool19 = tail call i1 @___read_future_bool(i64 %___future_measure17) + tail call void @___dec_future_refcount(i64 %___future_measure17) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool19) - %lazy_measure25 = tail call i64 @___lazy_measure(i64 %qalloc.i40) + %___future_measure25 = tail call i64 @___future_measure(i64 %qalloc.i40, i64 0) tail call void @___qfree(i64 %qalloc.i40) - %read_bool27 = tail call i1 @___read_future_bool(i64 %lazy_measure25) - tail call void @___dec_future_refcount(i64 %lazy_measure25) + %read_bool27 = tail call i1 @___read_future_bool(i64 %___future_measure25) + tail call void @___dec_future_refcount(i64 %___future_measure25) tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool27) ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_with_metrics_unparsed/unparsed_flip_n4-sol-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_with_metrics_unparsed/unparsed_flip_n4-sol-x86_64-windows-gnu.ll index c99060f8..4b3b05f2 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_with_metrics_unparsed/unparsed_flip_n4-sol-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_flip_some_with_metrics_unparsed/unparsed_flip_n4-sol-x86_64-windows-gnu.ll @@ -53,31 +53,31 @@ cond_27_case_0.i42: ; preds = %__hugr__.__tk2_sol_ __hugr__.__tk2_sol_qalloc.23.exit43: ; preds = %__hugr__.__tk2_sol_qalloc.23.exit39 tail call void @___reset(i64 %qalloc.i40) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i40, double 0x400921FB54442D18, double 0.000000e+00) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool) - %lazy_measure9 = tail call i64 @___lazy_measure(i64 %qalloc.i32) + %___future_measure9 = tail call i64 @___future_measure(i64 %qalloc.i32, i64 0) tail call void @___qfree(i64 %qalloc.i32) - %read_bool11 = tail call i1 @___read_future_bool(i64 %lazy_measure9) - tail call void @___dec_future_refcount(i64 %lazy_measure9) + %read_bool11 = tail call i1 @___read_future_bool(i64 %___future_measure9) + tail call void @___dec_future_refcount(i64 %___future_measure9) tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool11) - %lazy_measure17 = tail call i64 @___lazy_measure(i64 %qalloc.i36) + %___future_measure17 = tail call i64 @___future_measure(i64 %qalloc.i36, i64 0) tail call void @___qfree(i64 %qalloc.i36) - %read_bool19 = tail call i1 @___read_future_bool(i64 %lazy_measure17) - tail call void @___dec_future_refcount(i64 %lazy_measure17) + %read_bool19 = tail call i1 @___read_future_bool(i64 %___future_measure17) + tail call void @___dec_future_refcount(i64 %___future_measure17) tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool19) - %lazy_measure25 = tail call i64 @___lazy_measure(i64 %qalloc.i40) + %___future_measure25 = tail call i64 @___future_measure(i64 %qalloc.i40, i64 0) tail call void @___qfree(i64 %qalloc.i40) - %read_bool27 = tail call i1 @___read_future_bool(i64 %lazy_measure25) - tail call void @___dec_future_refcount(i64 %lazy_measure25) + %read_bool27 = tail call i1 @___read_future_bool(i64 %___future_measure25) + tail call void @___dec_future_refcount(i64 %___future_measure25) tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool27) ret void } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_infinite_loop_unparsed/infinite_loop-helios-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_infinite_loop_unparsed/infinite_loop-helios-aarch64-apple-darwin.ll index a47b5a2e..7905528a 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_infinite_loop_unparsed/infinite_loop-helios-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_infinite_loop_unparsed/infinite_loop-helios-aarch64-apple-darwin.ll @@ -22,10 +22,10 @@ __hugr__.__tk2_helios_qalloc.16.exit: ; preds = %alloca_block, %__hu tail call void @___reset(i64 %qalloc.i10) tail call void @___rxy(i64 %qalloc.i10, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i10, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i10) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i10) tail call void @___qfree(i64 %qalloc.i10) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_r.F13F95F2.0, i64 11, i1 %read_bool) %qalloc.i = tail call i64 @___qalloc() %not_max.not.not.i = icmp eq i64 %qalloc.i, -1 diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_infinite_loop_unparsed/infinite_loop-helios-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_infinite_loop_unparsed/infinite_loop-helios-aarch64-unknown-linux-gnu.ll index 42cfcc76..ea1bad78 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_infinite_loop_unparsed/infinite_loop-helios-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_infinite_loop_unparsed/infinite_loop-helios-aarch64-unknown-linux-gnu.ll @@ -22,10 +22,10 @@ __hugr__.__tk2_helios_qalloc.16.exit: ; preds = %alloca_block, %__hu tail call void @___reset(i64 %qalloc.i10) tail call void @___rxy(i64 %qalloc.i10, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i10, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i10) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i10) tail call void @___qfree(i64 %qalloc.i10) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_r.F13F95F2.0, i64 11, i1 %read_bool) %qalloc.i = tail call i64 @___qalloc() %not_max.not.not.i = icmp eq i64 %qalloc.i, -1 diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_infinite_loop_unparsed/infinite_loop-helios-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_infinite_loop_unparsed/infinite_loop-helios-x86_64-apple-darwin.ll index dc0cedda..c2c93745 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_infinite_loop_unparsed/infinite_loop-helios-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_infinite_loop_unparsed/infinite_loop-helios-x86_64-apple-darwin.ll @@ -22,10 +22,10 @@ __hugr__.__tk2_helios_qalloc.16.exit: ; preds = %alloca_block, %__hu tail call void @___reset(i64 %qalloc.i10) tail call void @___rxy(i64 %qalloc.i10, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i10, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i10) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i10) tail call void @___qfree(i64 %qalloc.i10) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_r.F13F95F2.0, i64 11, i1 %read_bool) %qalloc.i = tail call i64 @___qalloc() %not_max.not.not.i = icmp eq i64 %qalloc.i, -1 diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_infinite_loop_unparsed/infinite_loop-helios-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_infinite_loop_unparsed/infinite_loop-helios-x86_64-unknown-linux-gnu.ll index 71be0d68..9f253f7b 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_infinite_loop_unparsed/infinite_loop-helios-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_infinite_loop_unparsed/infinite_loop-helios-x86_64-unknown-linux-gnu.ll @@ -22,10 +22,10 @@ __hugr__.__tk2_helios_qalloc.16.exit: ; preds = %alloca_block, %__hu tail call void @___reset(i64 %qalloc.i10) tail call void @___rxy(i64 %qalloc.i10, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i10, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i10) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i10) tail call void @___qfree(i64 %qalloc.i10) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_r.F13F95F2.0, i64 11, i1 %read_bool) %qalloc.i = tail call i64 @___qalloc() %not_max.not.not.i = icmp eq i64 %qalloc.i, -1 diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_infinite_loop_unparsed/infinite_loop-helios-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_infinite_loop_unparsed/infinite_loop-helios-x86_64-windows-gnu.ll index d010367f..d970c3ec 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_infinite_loop_unparsed/infinite_loop-helios-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_infinite_loop_unparsed/infinite_loop-helios-x86_64-windows-gnu.ll @@ -22,10 +22,10 @@ __hugr__.__tk2_helios_qalloc.16.exit: ; preds = %alloca_block, %__hu tail call void @___reset(i64 %qalloc.i10) tail call void @___rxy(i64 %qalloc.i10, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i10, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i10) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i10) tail call void @___qfree(i64 %qalloc.i10) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) tail call void @print_bool(ptr nonnull @res_r.F13F95F2.0, i64 11, i1 %read_bool) %qalloc.i = tail call i64 @___qalloc() %not_max.not.not.i = icmp eq i64 %qalloc.i, -1 diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_infinite_loop_unparsed/infinite_loop-sol-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_infinite_loop_unparsed/infinite_loop-sol-aarch64-apple-darwin.ll index eeca75f5..d45395b2 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_infinite_loop_unparsed/infinite_loop-sol-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_infinite_loop_unparsed/infinite_loop-sol-aarch64-apple-darwin.ll @@ -22,17 +22,17 @@ __hugr__.__tk2_sol_qalloc.16.exit: ; preds = %alloca_block, %__hu tail call void @___reset(i64 %qalloc.i10) tail call void @___rp(i64 %qalloc.i10, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i10, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i10) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i10, i64 0) tail call void @___qfree(i64 %qalloc.i10) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_r.F13F95F2.0, i64 11, i1 %read_bool) %qalloc.i = tail call i64 @___qalloc() %not_max.not.not.i = icmp eq i64 %qalloc.i, -1 br i1 %not_max.not.not.i, label %cond_20_case_0.i, label %__hugr__.__tk2_sol_qalloc.16.exit } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_infinite_loop_unparsed/infinite_loop-sol-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_infinite_loop_unparsed/infinite_loop-sol-aarch64-unknown-linux-gnu.ll index 3364ed5e..2bb5d457 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_infinite_loop_unparsed/infinite_loop-sol-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_infinite_loop_unparsed/infinite_loop-sol-aarch64-unknown-linux-gnu.ll @@ -22,17 +22,17 @@ __hugr__.__tk2_sol_qalloc.16.exit: ; preds = %alloca_block, %__hu tail call void @___reset(i64 %qalloc.i10) tail call void @___rp(i64 %qalloc.i10, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i10, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i10) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i10, i64 0) tail call void @___qfree(i64 %qalloc.i10) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_r.F13F95F2.0, i64 11, i1 %read_bool) %qalloc.i = tail call i64 @___qalloc() %not_max.not.not.i = icmp eq i64 %qalloc.i, -1 br i1 %not_max.not.not.i, label %cond_20_case_0.i, label %__hugr__.__tk2_sol_qalloc.16.exit } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_infinite_loop_unparsed/infinite_loop-sol-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_infinite_loop_unparsed/infinite_loop-sol-x86_64-apple-darwin.ll index bd9e68a5..696374ca 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_infinite_loop_unparsed/infinite_loop-sol-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_infinite_loop_unparsed/infinite_loop-sol-x86_64-apple-darwin.ll @@ -22,17 +22,17 @@ __hugr__.__tk2_sol_qalloc.16.exit: ; preds = %alloca_block, %__hu tail call void @___reset(i64 %qalloc.i10) tail call void @___rp(i64 %qalloc.i10, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i10, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i10) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i10, i64 0) tail call void @___qfree(i64 %qalloc.i10) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_r.F13F95F2.0, i64 11, i1 %read_bool) %qalloc.i = tail call i64 @___qalloc() %not_max.not.not.i = icmp eq i64 %qalloc.i, -1 br i1 %not_max.not.not.i, label %cond_20_case_0.i, label %__hugr__.__tk2_sol_qalloc.16.exit } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_infinite_loop_unparsed/infinite_loop-sol-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_infinite_loop_unparsed/infinite_loop-sol-x86_64-unknown-linux-gnu.ll index a32c01cc..b5240428 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_infinite_loop_unparsed/infinite_loop-sol-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_infinite_loop_unparsed/infinite_loop-sol-x86_64-unknown-linux-gnu.ll @@ -22,17 +22,17 @@ __hugr__.__tk2_sol_qalloc.16.exit: ; preds = %alloca_block, %__hu tail call void @___reset(i64 %qalloc.i10) tail call void @___rp(i64 %qalloc.i10, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i10, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i10) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i10, i64 0) tail call void @___qfree(i64 %qalloc.i10) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_r.F13F95F2.0, i64 11, i1 %read_bool) %qalloc.i = tail call i64 @___qalloc() %not_max.not.not.i = icmp eq i64 %qalloc.i, -1 br i1 %not_max.not.not.i, label %cond_20_case_0.i, label %__hugr__.__tk2_sol_qalloc.16.exit } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_infinite_loop_unparsed/infinite_loop-sol-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_infinite_loop_unparsed/infinite_loop-sol-x86_64-windows-gnu.ll index 7c30514a..b791beee 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_infinite_loop_unparsed/infinite_loop-sol-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_infinite_loop_unparsed/infinite_loop-sol-x86_64-windows-gnu.ll @@ -22,17 +22,17 @@ __hugr__.__tk2_sol_qalloc.16.exit: ; preds = %alloca_block, %__hu tail call void @___reset(i64 %qalloc.i10) tail call void @___rp(i64 %qalloc.i10, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i10, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i10) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i10, i64 0) tail call void @___qfree(i64 %qalloc.i10) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) tail call void @print_bool(ptr nonnull @res_r.F13F95F2.0, i64 11, i1 %read_bool) %qalloc.i = tail call i64 @___qalloc() %not_max.not.not.i = icmp eq i64 %qalloc.i, -1 br i1 %not_max.not.not.i, label %cond_20_case_0.i, label %__hugr__.__tk2_sol_qalloc.16.exit } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_memory_allocation_unparsed/memory_allocation-helios-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_memory_allocation_unparsed/memory_allocation-helios-aarch64-apple-darwin.ll index ac0cfdd6..6ac40a9d 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_memory_allocation_unparsed/memory_allocation-helios-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_memory_allocation_unparsed/memory_allocation-helios-aarch64-apple-darwin.ll @@ -181,7 +181,7 @@ panic.i1286: ; preds = %__barray_check_boun %57 = getelementptr inbounds nuw i64, ptr %4, i64 %"251_0.sroa.15.01342" %58 = load i64, ptr %57, align 4 %59 = add i64 %"251_2.01341", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %58) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %58) tail call void @___qfree(i64 %58) %60 = icmp ult i64 %"251_2.01341", 70 br i1 %60, label %__barray_check_bounds.exit1281, label %out_of_bounds.i1280 @@ -191,7 +191,7 @@ cond_exit_255: ; preds = %__barray_check_boun %62 = xor i64 %39, %61 store i64 %62, ptr %38, align 4 %63 = getelementptr inbounds nuw i64, ptr %2, i64 %"251_2.01341" - store i64 %lazy_measure, ptr %63, align 4 + store i64 %___lazy_measure, ptr %63, align 4 %64 = icmp samesign ugt i64 %"251_0.sroa.15.01342", 68 br i1 %64, label %mask_block_ok.i, label %__barray_check_bounds.exit1285 diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_memory_allocation_unparsed/memory_allocation-helios-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_memory_allocation_unparsed/memory_allocation-helios-aarch64-unknown-linux-gnu.ll index 635b7411..e778ab2b 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_memory_allocation_unparsed/memory_allocation-helios-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_memory_allocation_unparsed/memory_allocation-helios-aarch64-unknown-linux-gnu.ll @@ -181,7 +181,7 @@ panic.i1286: ; preds = %__barray_check_boun %57 = getelementptr inbounds nuw i64, ptr %4, i64 %"251_0.sroa.15.01342" %58 = load i64, ptr %57, align 4 %59 = add i64 %"251_2.01341", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %58) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %58) tail call void @___qfree(i64 %58) %60 = icmp ult i64 %"251_2.01341", 70 br i1 %60, label %__barray_check_bounds.exit1281, label %out_of_bounds.i1280 @@ -191,7 +191,7 @@ cond_exit_255: ; preds = %__barray_check_boun %62 = xor i64 %39, %61 store i64 %62, ptr %38, align 4 %63 = getelementptr inbounds nuw i64, ptr %2, i64 %"251_2.01341" - store i64 %lazy_measure, ptr %63, align 4 + store i64 %___lazy_measure, ptr %63, align 4 %64 = icmp samesign ugt i64 %"251_0.sroa.15.01342", 68 br i1 %64, label %mask_block_ok.i, label %__barray_check_bounds.exit1285 diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_memory_allocation_unparsed/memory_allocation-helios-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_memory_allocation_unparsed/memory_allocation-helios-x86_64-apple-darwin.ll index b706598d..1561a9ab 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_memory_allocation_unparsed/memory_allocation-helios-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_memory_allocation_unparsed/memory_allocation-helios-x86_64-apple-darwin.ll @@ -181,7 +181,7 @@ panic.i1286: ; preds = %__barray_check_boun %57 = getelementptr inbounds nuw i64, ptr %4, i64 %"251_0.sroa.15.01342" %58 = load i64, ptr %57, align 4 %59 = add i64 %"251_2.01341", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %58) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %58) tail call void @___qfree(i64 %58) %60 = icmp ult i64 %"251_2.01341", 70 br i1 %60, label %__barray_check_bounds.exit1281, label %out_of_bounds.i1280 @@ -191,7 +191,7 @@ cond_exit_255: ; preds = %__barray_check_boun %62 = xor i64 %39, %61 store i64 %62, ptr %38, align 4 %63 = getelementptr inbounds nuw i64, ptr %2, i64 %"251_2.01341" - store i64 %lazy_measure, ptr %63, align 4 + store i64 %___lazy_measure, ptr %63, align 4 %64 = icmp samesign ugt i64 %"251_0.sroa.15.01342", 68 br i1 %64, label %mask_block_ok.i, label %__barray_check_bounds.exit1285 diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_memory_allocation_unparsed/memory_allocation-helios-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_memory_allocation_unparsed/memory_allocation-helios-x86_64-unknown-linux-gnu.ll index e8b85b0a..172277f0 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_memory_allocation_unparsed/memory_allocation-helios-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_memory_allocation_unparsed/memory_allocation-helios-x86_64-unknown-linux-gnu.ll @@ -181,7 +181,7 @@ panic.i1286: ; preds = %__barray_check_boun %57 = getelementptr inbounds nuw i64, ptr %4, i64 %"251_0.sroa.15.01342" %58 = load i64, ptr %57, align 4 %59 = add i64 %"251_2.01341", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %58) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %58) tail call void @___qfree(i64 %58) %60 = icmp ult i64 %"251_2.01341", 70 br i1 %60, label %__barray_check_bounds.exit1281, label %out_of_bounds.i1280 @@ -191,7 +191,7 @@ cond_exit_255: ; preds = %__barray_check_boun %62 = xor i64 %39, %61 store i64 %62, ptr %38, align 4 %63 = getelementptr inbounds nuw i64, ptr %2, i64 %"251_2.01341" - store i64 %lazy_measure, ptr %63, align 4 + store i64 %___lazy_measure, ptr %63, align 4 %64 = icmp samesign ugt i64 %"251_0.sroa.15.01342", 68 br i1 %64, label %mask_block_ok.i, label %__barray_check_bounds.exit1285 diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_memory_allocation_unparsed/memory_allocation-helios-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_memory_allocation_unparsed/memory_allocation-helios-x86_64-windows-gnu.ll index 5c566068..c7a872e4 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_memory_allocation_unparsed/memory_allocation-helios-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_memory_allocation_unparsed/memory_allocation-helios-x86_64-windows-gnu.ll @@ -181,7 +181,7 @@ panic.i1286: ; preds = %__barray_check_boun %57 = getelementptr inbounds nuw i64, ptr %4, i64 %"251_0.sroa.15.01342" %58 = load i64, ptr %57, align 4 %59 = add i64 %"251_2.01341", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %58) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %58) tail call void @___qfree(i64 %58) %60 = icmp ult i64 %"251_2.01341", 70 br i1 %60, label %__barray_check_bounds.exit1281, label %out_of_bounds.i1280 @@ -191,7 +191,7 @@ cond_exit_255: ; preds = %__barray_check_boun %62 = xor i64 %39, %61 store i64 %62, ptr %38, align 4 %63 = getelementptr inbounds nuw i64, ptr %2, i64 %"251_2.01341" - store i64 %lazy_measure, ptr %63, align 4 + store i64 %___lazy_measure, ptr %63, align 4 %64 = icmp samesign ugt i64 %"251_0.sroa.15.01342", 68 br i1 %64, label %mask_block_ok.i, label %__barray_check_bounds.exit1285 diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_memory_allocation_unparsed/memory_allocation-sol-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_memory_allocation_unparsed/memory_allocation-sol-aarch64-apple-darwin.ll index d3eb9a5d..3cb56393 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_memory_allocation_unparsed/memory_allocation-sol-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_memory_allocation_unparsed/memory_allocation-sol-aarch64-apple-darwin.ll @@ -181,7 +181,7 @@ panic.i1286: ; preds = %__barray_check_boun %57 = getelementptr inbounds nuw i64, ptr %4, i64 %"251_0.sroa.15.01342" %58 = load i64, ptr %57, align 4 %59 = add i64 %"251_2.01341", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %58) + %___future_measure = tail call i64 @___future_measure(i64 %58, i64 0) tail call void @___qfree(i64 %58) %60 = icmp ult i64 %"251_2.01341", 70 br i1 %60, label %__barray_check_bounds.exit1281, label %out_of_bounds.i1280 @@ -191,7 +191,7 @@ cond_exit_255: ; preds = %__barray_check_boun %62 = xor i64 %39, %61 store i64 %62, ptr %38, align 4 %63 = getelementptr inbounds nuw i64, ptr %2, i64 %"251_2.01341" - store i64 %lazy_measure, ptr %63, align 4 + store i64 %___future_measure, ptr %63, align 4 %64 = icmp samesign ugt i64 %"251_0.sroa.15.01342", 68 br i1 %64, label %mask_block_ok.i, label %__barray_check_bounds.exit1285 @@ -358,7 +358,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #1 declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_memory_allocation_unparsed/memory_allocation-sol-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_memory_allocation_unparsed/memory_allocation-sol-aarch64-unknown-linux-gnu.ll index 41a060fc..60b1f666 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_memory_allocation_unparsed/memory_allocation-sol-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_memory_allocation_unparsed/memory_allocation-sol-aarch64-unknown-linux-gnu.ll @@ -181,7 +181,7 @@ panic.i1286: ; preds = %__barray_check_boun %57 = getelementptr inbounds nuw i64, ptr %4, i64 %"251_0.sroa.15.01342" %58 = load i64, ptr %57, align 4 %59 = add i64 %"251_2.01341", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %58) + %___future_measure = tail call i64 @___future_measure(i64 %58, i64 0) tail call void @___qfree(i64 %58) %60 = icmp ult i64 %"251_2.01341", 70 br i1 %60, label %__barray_check_bounds.exit1281, label %out_of_bounds.i1280 @@ -191,7 +191,7 @@ cond_exit_255: ; preds = %__barray_check_boun %62 = xor i64 %39, %61 store i64 %62, ptr %38, align 4 %63 = getelementptr inbounds nuw i64, ptr %2, i64 %"251_2.01341" - store i64 %lazy_measure, ptr %63, align 4 + store i64 %___future_measure, ptr %63, align 4 %64 = icmp samesign ugt i64 %"251_0.sroa.15.01342", 68 br i1 %64, label %mask_block_ok.i, label %__barray_check_bounds.exit1285 @@ -358,7 +358,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #1 declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_memory_allocation_unparsed/memory_allocation-sol-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_memory_allocation_unparsed/memory_allocation-sol-x86_64-apple-darwin.ll index a95e1fa8..6396f84a 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_memory_allocation_unparsed/memory_allocation-sol-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_memory_allocation_unparsed/memory_allocation-sol-x86_64-apple-darwin.ll @@ -181,7 +181,7 @@ panic.i1286: ; preds = %__barray_check_boun %57 = getelementptr inbounds nuw i64, ptr %4, i64 %"251_0.sroa.15.01342" %58 = load i64, ptr %57, align 4 %59 = add i64 %"251_2.01341", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %58) + %___future_measure = tail call i64 @___future_measure(i64 %58, i64 0) tail call void @___qfree(i64 %58) %60 = icmp ult i64 %"251_2.01341", 70 br i1 %60, label %__barray_check_bounds.exit1281, label %out_of_bounds.i1280 @@ -191,7 +191,7 @@ cond_exit_255: ; preds = %__barray_check_boun %62 = xor i64 %39, %61 store i64 %62, ptr %38, align 4 %63 = getelementptr inbounds nuw i64, ptr %2, i64 %"251_2.01341" - store i64 %lazy_measure, ptr %63, align 4 + store i64 %___future_measure, ptr %63, align 4 %64 = icmp samesign ugt i64 %"251_0.sroa.15.01342", 68 br i1 %64, label %mask_block_ok.i, label %__barray_check_bounds.exit1285 @@ -358,7 +358,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #1 declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_memory_allocation_unparsed/memory_allocation-sol-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_memory_allocation_unparsed/memory_allocation-sol-x86_64-unknown-linux-gnu.ll index e975486c..211daebe 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_memory_allocation_unparsed/memory_allocation-sol-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_memory_allocation_unparsed/memory_allocation-sol-x86_64-unknown-linux-gnu.ll @@ -181,7 +181,7 @@ panic.i1286: ; preds = %__barray_check_boun %57 = getelementptr inbounds nuw i64, ptr %4, i64 %"251_0.sroa.15.01342" %58 = load i64, ptr %57, align 4 %59 = add i64 %"251_2.01341", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %58) + %___future_measure = tail call i64 @___future_measure(i64 %58, i64 0) tail call void @___qfree(i64 %58) %60 = icmp ult i64 %"251_2.01341", 70 br i1 %60, label %__barray_check_bounds.exit1281, label %out_of_bounds.i1280 @@ -191,7 +191,7 @@ cond_exit_255: ; preds = %__barray_check_boun %62 = xor i64 %39, %61 store i64 %62, ptr %38, align 4 %63 = getelementptr inbounds nuw i64, ptr %2, i64 %"251_2.01341" - store i64 %lazy_measure, ptr %63, align 4 + store i64 %___future_measure, ptr %63, align 4 %64 = icmp samesign ugt i64 %"251_0.sroa.15.01342", 68 br i1 %64, label %mask_block_ok.i, label %__barray_check_bounds.exit1285 @@ -358,7 +358,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #1 declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_memory_allocation_unparsed/memory_allocation-sol-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_memory_allocation_unparsed/memory_allocation-sol-x86_64-windows-gnu.ll index bd8059e2..fcbf1a63 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_memory_allocation_unparsed/memory_allocation-sol-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_memory_allocation_unparsed/memory_allocation-sol-x86_64-windows-gnu.ll @@ -181,7 +181,7 @@ panic.i1286: ; preds = %__barray_check_boun %57 = getelementptr inbounds nuw i64, ptr %4, i64 %"251_0.sroa.15.01342" %58 = load i64, ptr %57, align 4 %59 = add i64 %"251_2.01341", 1 - %lazy_measure = tail call i64 @___lazy_measure(i64 %58) + %___future_measure = tail call i64 @___future_measure(i64 %58, i64 0) tail call void @___qfree(i64 %58) %60 = icmp ult i64 %"251_2.01341", 70 br i1 %60, label %__barray_check_bounds.exit1281, label %out_of_bounds.i1280 @@ -191,7 +191,7 @@ cond_exit_255: ; preds = %__barray_check_boun %62 = xor i64 %39, %61 store i64 %62, ptr %38, align 4 %63 = getelementptr inbounds nuw i64, ptr %2, i64 %"251_2.01341" - store i64 %lazy_measure, ptr %63, align 4 + store i64 %___future_measure, ptr %63, align 4 %64 = icmp samesign ugt i64 %"251_0.sroa.15.01342", 68 br i1 %64, label %mask_block_ok.i, label %__barray_check_bounds.exit1285 @@ -358,7 +358,7 @@ declare void @panic(i32, ptr) local_unnamed_addr #1 declare void @heap_free(ptr) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_panic_unparsed/panic_unparsed-helios-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_panic_unparsed/panic_unparsed-helios-aarch64-apple-darwin.ll index 0c961d3e..3ed85a64 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_panic_unparsed/panic_unparsed-helios-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_panic_unparsed/panic_unparsed-helios-aarch64-apple-darwin.ll @@ -21,10 +21,10 @@ __hugr__.__tk2_helios_qalloc.32.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) br i1 %read_bool, label %1, label %0 0: ; preds = %__hugr__.__tk2_helios_qalloc.32.exit diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_panic_unparsed/panic_unparsed-helios-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_panic_unparsed/panic_unparsed-helios-aarch64-unknown-linux-gnu.ll index 2fefffd7..71e91b0e 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_panic_unparsed/panic_unparsed-helios-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_panic_unparsed/panic_unparsed-helios-aarch64-unknown-linux-gnu.ll @@ -21,10 +21,10 @@ __hugr__.__tk2_helios_qalloc.32.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) br i1 %read_bool, label %1, label %0 0: ; preds = %__hugr__.__tk2_helios_qalloc.32.exit diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_panic_unparsed/panic_unparsed-helios-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_panic_unparsed/panic_unparsed-helios-x86_64-apple-darwin.ll index f95ebc14..054b879a 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_panic_unparsed/panic_unparsed-helios-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_panic_unparsed/panic_unparsed-helios-x86_64-apple-darwin.ll @@ -21,10 +21,10 @@ __hugr__.__tk2_helios_qalloc.32.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) br i1 %read_bool, label %1, label %0 0: ; preds = %__hugr__.__tk2_helios_qalloc.32.exit diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_panic_unparsed/panic_unparsed-helios-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_panic_unparsed/panic_unparsed-helios-x86_64-unknown-linux-gnu.ll index f59902e7..8e493665 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_panic_unparsed/panic_unparsed-helios-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_panic_unparsed/panic_unparsed-helios-x86_64-unknown-linux-gnu.ll @@ -21,10 +21,10 @@ __hugr__.__tk2_helios_qalloc.32.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) br i1 %read_bool, label %1, label %0 0: ; preds = %__hugr__.__tk2_helios_qalloc.32.exit diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_panic_unparsed/panic_unparsed-helios-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_panic_unparsed/panic_unparsed-helios-x86_64-windows-gnu.ll index 62a09e02..99c0133c 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_panic_unparsed/panic_unparsed-helios-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_panic_unparsed/panic_unparsed-helios-x86_64-windows-gnu.ll @@ -21,10 +21,10 @@ __hugr__.__tk2_helios_qalloc.32.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___lazy_measure) + tail call void @___dec_future_refcount(i64 %___lazy_measure) br i1 %read_bool, label %1, label %0 0: ; preds = %__hugr__.__tk2_helios_qalloc.32.exit diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_panic_unparsed/panic_unparsed-sol-aarch64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_panic_unparsed/panic_unparsed-sol-aarch64-apple-darwin.ll index e98c236e..91da8990 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_panic_unparsed/panic_unparsed-sol-aarch64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_panic_unparsed/panic_unparsed-sol-aarch64-apple-darwin.ll @@ -21,10 +21,10 @@ __hugr__.__tk2_sol_qalloc.32.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) br i1 %read_bool, label %1, label %0 0: ; preds = %__hugr__.__tk2_sol_qalloc.32.exit @@ -36,7 +36,7 @@ __hugr__.__tk2_sol_qalloc.32.exit: ; preds = %alloca_block unreachable } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_panic_unparsed/panic_unparsed-sol-aarch64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_panic_unparsed/panic_unparsed-sol-aarch64-unknown-linux-gnu.ll index 931e2eb8..3b08b394 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_panic_unparsed/panic_unparsed-sol-aarch64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_panic_unparsed/panic_unparsed-sol-aarch64-unknown-linux-gnu.ll @@ -21,10 +21,10 @@ __hugr__.__tk2_sol_qalloc.32.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) br i1 %read_bool, label %1, label %0 0: ; preds = %__hugr__.__tk2_sol_qalloc.32.exit @@ -36,7 +36,7 @@ __hugr__.__tk2_sol_qalloc.32.exit: ; preds = %alloca_block unreachable } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_panic_unparsed/panic_unparsed-sol-x86_64-apple-darwin.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_panic_unparsed/panic_unparsed-sol-x86_64-apple-darwin.ll index 21fa8787..b306c4ba 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_panic_unparsed/panic_unparsed-sol-x86_64-apple-darwin.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_panic_unparsed/panic_unparsed-sol-x86_64-apple-darwin.ll @@ -21,10 +21,10 @@ __hugr__.__tk2_sol_qalloc.32.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) br i1 %read_bool, label %1, label %0 0: ; preds = %__hugr__.__tk2_sol_qalloc.32.exit @@ -36,7 +36,7 @@ __hugr__.__tk2_sol_qalloc.32.exit: ; preds = %alloca_block unreachable } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_panic_unparsed/panic_unparsed-sol-x86_64-unknown-linux-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_panic_unparsed/panic_unparsed-sol-x86_64-unknown-linux-gnu.ll index 74082299..247eb68c 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_panic_unparsed/panic_unparsed-sol-x86_64-unknown-linux-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_panic_unparsed/panic_unparsed-sol-x86_64-unknown-linux-gnu.ll @@ -21,10 +21,10 @@ __hugr__.__tk2_sol_qalloc.32.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) br i1 %read_bool, label %1, label %0 0: ; preds = %__hugr__.__tk2_sol_qalloc.32.exit @@ -36,7 +36,7 @@ __hugr__.__tk2_sol_qalloc.32.exit: ; preds = %alloca_block unreachable } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_panic_unparsed/panic_unparsed-sol-x86_64-windows-gnu.ll b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_panic_unparsed/panic_unparsed-sol-x86_64-windows-gnu.ll index 4de6fbba..f48c3716 100644 --- a/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_panic_unparsed/panic_unparsed-sol-x86_64-windows-gnu.ll +++ b/selene-sim/python/tests/resources/from_guppy/test_unparsed/test_panic_unparsed/panic_unparsed-sol-x86_64-windows-gnu.ll @@ -21,10 +21,10 @@ __hugr__.__tk2_sol_qalloc.32.exit: ; preds = %alloca_block tail call void @___reset(i64 %qalloc.i) tail call void @___rp(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18) - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + %___future_measure = tail call i64 @___future_measure(i64 %qalloc.i, i64 0) tail call void @___qfree(i64 %qalloc.i) - %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - tail call void @___dec_future_refcount(i64 %lazy_measure) + %read_bool = tail call i1 @___read_future_bool(i64 %___future_measure) + tail call void @___dec_future_refcount(i64 %___future_measure) br i1 %read_bool, label %1, label %0 0: ; preds = %__hugr__.__tk2_sol_qalloc.32.exit @@ -36,7 +36,7 @@ __hugr__.__tk2_sol_qalloc.32.exit: ; preds = %alloca_block unreachable } -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr diff --git a/selene-sim/python/tests/resources/qis/sol/add_3_11-any.ll b/selene-sim/python/tests/resources/qis/sol/add_3_11-any.ll index fed12f9d..27ab9e1c 100644 --- a/selene-sim/python/tests/resources/qis/sol/add_3_11-any.ll +++ b/selene-sim/python/tests/resources/qis/sol/add_3_11-any.ll @@ -16,7 +16,7 @@ declare void @___qfree(i64) local_unnamed_addr declare void @___rp(i64, double, double) local_unnamed_addr declare void @___rpp(i64, i64, double, double) local_unnamed_addr declare void @___rz(i64, double) local_unnamed_addr -declare i64 @___lazy_measure(i64) local_unnamed_addr +declare i64 @___future_measure(i64, i64) local_unnamed_addr declare void @___dec_future_refcount(i64) local_unnamed_addr declare void @print_int(i8*, i64, i64) local_unnamed_addr @@ -464,11 +464,11 @@ entry: tail call void @___rp(i64 %rhs_3, double %minus_half_pi, double %zero) ; allocate 4 int64s for measurement handles - %ref_0 = tail call i64 @___lazy_measure(i64 %rhs_0) - %ref_1 = tail call i64 @___lazy_measure(i64 %rhs_1) - %ref_2 = tail call i64 @___lazy_measure(i64 %rhs_2) - %ref_3 = tail call i64 @___lazy_measure(i64 %rhs_3) - %ref_4 = tail call i64 @___lazy_measure(i64 %carry) + %ref_0 = tail call i64 @___future_measure(i64 %rhs_0, i64 0) + %ref_1 = tail call i64 @___future_measure(i64 %rhs_1, i64 0) + %ref_2 = tail call i64 @___future_measure(i64 %rhs_2, i64 0) + %ref_3 = tail call i64 @___future_measure(i64 %rhs_3, i64 0) + %ref_4 = tail call i64 @___future_measure(i64 %carry, i64 0) ; read them back as booleans %ans_0 = tail call i1 @___read_future_bool(i64 %ref_0) diff --git a/selene-sim/python/tests/snapshots/test_guppy/test_rng/rng b/selene-sim/python/tests/snapshots/test_guppy/test_rng/rng index 9a3946c8..64f4e387 100644 --- a/selene-sim/python/tests/snapshots/test_guppy/test_rng/rng +++ b/selene-sim/python/tests/snapshots/test_guppy/test_rng/rng @@ -1,7 +1,7 @@ rfloat: 0.18373215361498296 -rfloat2: 0.41753021418116987 +rfloat2: 0.7466911864466965 rint: 1085446021 rint1: 176895750 -rint2: -65901028 +rint2: -952414024 rint_bnd: 45 -rint_bnd2: 65 +rint_bnd2: 137